# Data API

> Collections, submissions and their e-mail notifications. With curl and TypeScript examples.

## `GET /v1/collections`

List the collections of the workspace's components, newest first

Operation `listCollections`. Scopes: `data:read`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer (1 to 100, default 20) | no | Page size, 1 to 100. |
| `cursor` | query | string | no | Opaque `next_cursor` of the previous page, for the same list and filters. Omit for the first page. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | One page of collections. | `application/json` |
| `400` | `validation_failed` (bad `limit` or filter) or `invalid_cursor`. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl "https://api.taggor.dev/v1/collections" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/collections", {
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "data": [
    {
      "id": "col_0123456789abcdefghjkmnpqrs",
      "component_id": "cmp_0123456789abcdefghjkmnpqrs",
      "name": "subscribers",
      "schema": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          }
        },
        "required": [
          "email"
        ]
      },
      "schema_version": 1,
      "visibility": "private",
      "retention_days": 365,
      "status": "active",
      "created_at": "2026-11-02T12:00:00.000Z",
      "updated_at": "2026-11-02T12:00:00.000Z"
    }
  ],
  "next_cursor": null,
  "has_more": false
}
```

## `GET /v1/collections/{collection_id}`

Read one collection of the workspace

Operation `getCollection`. Scopes: `data:read`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `collection_id` | path | string | yes | Public collection id. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The collection. | `application/json` |
| `400` | `validation_failed`: a bad path parameter. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no collection with this id in the caller's workspace (also another workspace's). | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl "https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs", {
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "id": "col_0123456789abcdefghjkmnpqrs",
  "component_id": "cmp_0123456789abcdefghjkmnpqrs",
  "name": "subscribers",
  "schema": {
    "type": "object",
    "properties": {
      "email": {
        "type": "string",
        "format": "email"
      }
    },
    "required": [
      "email"
    ]
  },
  "schema_version": 1,
  "visibility": "private",
  "retention_days": 365,
  "status": "active",
  "created_at": "2026-11-02T12:00:00.000Z",
  "updated_at": "2026-11-02T12:00:00.000Z"
}
```

## `PATCH /v1/collections/{collection_id}`

Change how long a collection keeps its submissions

Only the retention can be changed here (the schema comes from the component manifest). Shortening it makes older submissions due for the next daily deletion; deletion is for good.

Operation `updateCollection`. Scopes: `data:write`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `collection_id` | path | string | yes | Public collection id. |

**Request body** (`application/json`, required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `retention_days` | integer or null (1 to 3650) | yes | Keep submissions this many days: fewer than the plan keeps is always accepted, more is a 409 `retention_exceeds_plan`; `null` goes back to what the plan keeps. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The collection after the change. | `application/json` |
| `400` | `validation_failed`: a bad path parameter. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `402` | `workspace_payment_required`: the workspace needs a paid plan and has none, so it accepts no change; reading and exporting still work. A person pays in the portal, under Settings, Plan and billing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `cross_site_request`: authenticated by the session cookie, but not from the portal (another `Origin`, or not `Content-Type: application/json`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no collection with this id in the caller's workspace (also another workspace's). | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `409` | `retention_exceeds_plan`: more days than the plan keeps; `limit` is the most it keeps. Nothing was created; the body carries `limit`, `plan` and `upgrade_url`. | `application/problem+json` |
| `413` | `payload_too_large`: the request body is over the limit of the route (256 KiB for JSON). | `application/problem+json` |
| `415` | `unsupported_media_type`: the body was sent with a `Content-Type` other than `application/json`. Send the body as JSON with `Content-Type: application/json`. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl -X PATCH "https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs" \
  -H "Authorization: Bearer $TAGGOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "retention_days": 1
}'
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs", {
  method: "PATCH",
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({
    "retention_days": 1
  }),
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "id": "col_0123456789abcdefghjkmnpqrs",
  "component_id": "cmp_0123456789abcdefghjkmnpqrs",
  "name": "subscribers",
  "schema": {
    "type": "object",
    "properties": {
      "email": {
        "type": "string",
        "format": "email"
      }
    },
    "required": [
      "email"
    ]
  },
  "schema_version": 1,
  "visibility": "private",
  "retention_days": 365,
  "status": "active",
  "created_at": "2026-11-02T12:00:00.000Z",
  "updated_at": "2026-11-02T12:00:00.000Z"
}
```

## `GET /v1/collections/{collection_id}/submissions`

List a collection's submissions, newest first

Filters: `site`, `status`, `suspect`, `environment`, `from` (inclusive) and `to` (exclusive). A cursor is valid only with the same filters. Submissions may hold visitors' personal data.

Operation `listCollectionSubmissions`. Scopes: `data:read`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `collection_id` | path | string | yes | Public collection id. |
| `limit` | query | integer (1 to 100, default 20) | no | Page size, 1 to 100. |
| `cursor` | query | string | no | Opaque `next_cursor` of the previous page, for the same list and filters. Omit for the first page. |
| `site_id` | query | string | no | Only this site's submissions. |
| `client_id` | query | string | no | Only submissions from the sites of this agency client. An id that is not a client of your workspace gives an empty page. |
| `status` | query | one of received, spam, over_quota | no | - |
| `suspect` | query | one of true, false | no | `true`: only the submissions the bot filter marked (a filled honeypot, or sent faster than a person fills the form); `false`: only the others. Absent: both. |
| `environment` | query | one of production, staging | no | Only the submissions sent from one environment of their site: `production` (sent with the production snippet) or `staging` (sent with the staging snippet). Absent: both. |
| `from` | query | string | no | Created at or after this instant (ISO 8601). |
| `to` | query | string | no | Created before this instant (ISO 8601). |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | One page of submissions. | `application/json` |
| `400` | `validation_failed` (bad `limit` or filter) or `invalid_cursor`. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no collection with this id in the caller's workspace (also another workspace's). | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl "https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/submissions" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/submissions", {
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "data": [
    {
      "id": "sub_0123456789abcdefghjkmnpqrs",
      "collection_id": "col_0123456789abcdefghjkmnpqrs",
      "site_id": "st_0123456789abcdefghjkmnpqrs",
      "component_version_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
      "schema_version": 1,
      "data": {
        "email": "visitor@example.com"
      },
      "meta": {
        "page": "/pricing",
        "country": "BR",
        "browser": "firefox"
      },
      "status": "received",
      "verification": "none",
      "suspect": null,
      "environment": "production",
      "created_at": "2026-11-02T12:30:00.000Z"
    }
  ],
  "next_cursor": null,
  "has_more": false
}
```

## `GET /v1/collections/{collection_id}/export`

Download a collection's submissions as CSV or NDJSON

Streams the submissions newest first, with the filters `site_id`, `client_id`, `status`, `suspect`, `environment`, `from` (inclusive) and `to` (exclusive). CSV: UTF-8 with BOM, CRLF, ISO 8601 UTC instants, one column per field of the latest schema then one per field of older versions; text cells starting with `=`, `+`, `-`, `@`, tab or CR get a leading `'`. NDJSON: one submission object per line, as in the list. At most 500000 rows; narrow the period past that. Contains visitors' personal data.

Operation `exportCollectionSubmissions`. Scopes: `data:read`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `collection_id` | path | string | yes | Public collection id. |
| `format` | query | one of csv, ndjson | no | File format (default csv). |
| `site_id` | query | string | no | Only this site's submissions. |
| `client_id` | query | string | no | Only submissions from the sites of this agency client. An id that is not a client of your workspace gives an empty page. |
| `status` | query | one of received, spam, over_quota | no | - |
| `suspect` | query | one of true, false | no | `true`: only the submissions the bot filter marked (a filled honeypot, or sent faster than a person fills the form); `false`: only the others. Absent: both. |
| `environment` | query | one of production, staging | no | Only the submissions sent from one environment of their site: `production` (sent with the production snippet) or `staging` (sent with the staging snippet). Absent: both. |
| `from` | query | string | no | Created at or after this instant (ISO 8601). |
| `to` | query | string | no | Created before this instant (ISO 8601). |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The file, as an attachment. | `text/csv`, `application/x-ndjson` |
| `400` | `validation_failed`: a bad path parameter. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no collection with this id in the caller's workspace (also another workspace's). | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `422` | `export_too_large`: more than 500000 submissions match; narrow `from`/`to`. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl "https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/export" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/export", {
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result = await response.text();
console.log(result);
```

## `GET /v1/submissions/{submission_id}`

Read one submission

Operation `getSubmission`. Scopes: `data:read`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `submission_id` | path | string | yes | Public submission id. Either case is accepted (the public read of a collection answers it in upper case) and read as lower case. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The submission. | `application/json` |
| `400` | `validation_failed`: a bad path parameter. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no submission with this id in the caller's workspace (also another workspace's). | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl "https://api.taggor.dev/v1/submissions/sub_0123456789abcdefghjkmnpqrs" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/submissions/sub_0123456789abcdefghjkmnpqrs", {
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "id": "sub_0123456789abcdefghjkmnpqrs",
  "collection_id": "col_0123456789abcdefghjkmnpqrs",
  "site_id": "st_0123456789abcdefghjkmnpqrs",
  "component_version_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "schema_version": 1,
  "data": {
    "email": "visitor@example.com"
  },
  "meta": {
    "page": "/pricing",
    "country": "BR",
    "browser": "firefox"
  },
  "status": "received",
  "verification": "none",
  "suspect": null,
  "environment": "production",
  "created_at": "2026-11-02T12:30:00.000Z"
}
```

## `DELETE /v1/submissions/{submission_id}`

Delete a submission for good

Removes the row from the database; it cannot be recovered. Use it to honor a visitor's request to erase their data.

Operation `deleteSubmission`. Scopes: `data:write`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `submission_id` | path | string | yes | Public submission id. Either case is accepted (the public read of a collection answers it in upper case) and read as lower case. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The submission as it was before it was deleted. A credential without the `data:read` scope gets `data` empty: deleting never lets it read what the visitor sent. | `application/json` |
| `400` | `validation_failed`: a bad path parameter. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `402` | `workspace_payment_required`: the workspace needs a paid plan and has none, so it accepts no change; reading and exporting still work. A person pays in the portal, under Settings, Plan and billing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `cross_site_request`: authenticated by the session cookie, but not from the portal (another `Origin`, or not `Content-Type: application/json`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no submission with this id in the caller's workspace (also another workspace's). | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl -X DELETE "https://api.taggor.dev/v1/submissions/sub_0123456789abcdefghjkmnpqrs" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/submissions/sub_0123456789abcdefghjkmnpqrs", {
  method: "DELETE",
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "id": "sub_0123456789abcdefghjkmnpqrs",
  "collection_id": "col_0123456789abcdefghjkmnpqrs",
  "site_id": "st_0123456789abcdefghjkmnpqrs",
  "component_version_hash": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "schema_version": 1,
  "data": {
    "email": "visitor@example.com"
  },
  "meta": {
    "page": "/pricing",
    "country": "BR",
    "browser": "firefox"
  },
  "status": "received",
  "verification": "none",
  "suspect": null,
  "environment": "production",
  "created_at": "2026-11-02T12:30:00.000Z"
}
```

## `GET /v1/submissions/{submission_id}/files/{file_id}`

Get a short download link to a file of a submission

Files of form submissions are private: this returns a link valid for ten minutes on the files domain. Ask again for a new one.

Operation `getSubmissionFileLink`. Scopes: `data:read`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `submission_id` | path | string | yes | Public submission id. Either case is accepted (the public read of a collection answers it in upper case) and read as lower case. |
| `file_id` | path | string | yes | The `id` of the file in the submission's data. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The link. | `application/json` |
| `400` | `validation_failed`: a bad path parameter. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no such file in this submission of the caller's workspace, a file taken down, or files are off. | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl "https://api.taggor.dev/v1/submissions/sub_0123456789abcdefghjkmnpqrs/files/upl_0123456789abcdefghjkmnpqrs" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/submissions/sub_0123456789abcdefghjkmnpqrs/files/upl_0123456789abcdefghjkmnpqrs", {
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "id": "upl_0123456789abcdefghjkmnpqrs",
  "name": "resume.pdf",
  "type": "application/pdf",
  "size": 48213,
  "url": "https://dl.taggorusercontent.com/dl/v1.u~st_abcdefghij~jobs~resume~upl_0123456789abcdefghjkmnpqrs.1796250000.0000000000000000000000000000000000000000000000000000000000000000",
  "expires_at": "2026-12-02T12:10:00.000Z"
}
```

## `GET /v1/collections/{collection_id}/notifications`

Get the e-mail notifications of a collection

The mode, the language and the recipient list with each recipient's state (`pending` until the confirmation link is opened, `confirmed`, `unsubscribed`). A collection that never had notifications answers the defaults with `updated_at` null. An address that refused e-mail from Taggor anywhere is shown as `pending`, as the answer of the PUT does. Nothing is sent.

Operation `getCollectionNotifications`. Scopes: `data:read`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `collection_id` | path | string | yes | Public collection id. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The stored settings, with each recipient's state. | `application/json` |
| `400` | `validation_failed`: a bad path parameter. | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. | `application/problem+json` |
| `404` | `not_found`: no collection with this id in the caller's workspace. | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `429` | `rate_limited`: the limit of the route class (`rate_limit.limit_class`: read, write, publish, heavy, approval, diff, metrics, destructive or ip) was reached. Wait `Retry-After` seconds. `rate_limiter_unavailable` (503) is answered for `heavy` routes and destructive calls when the limiter itself fails, and for a valid OAuth token with no grant when the consent-link limiter fails (never a 401, so an MCP client does not log in again). | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl "https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/notifications" \
  -H "Authorization: Bearer $TAGGOR_API_KEY"
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/notifications", {
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}` },
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "collection_id": "col_0123456789abcdefghjkmnpqrs",
  "mode": "instant",
  "locale": "en",
  "recipients": [
    {
      "id": "nrc_0123456789abcdefghjkmnpqrs",
      "email": "ana@example.com",
      "kind": "member",
      "status": "confirmed",
      "confirmed_at": "2026-11-08T12:00:00.000Z"
    }
  ],
  "updated_at": "2026-11-08T12:00:00.000Z"
}
```

## `PUT /v1/collections/{collection_id}/notifications`

Set the e-mail notifications of a collection

Replaces the settings and the recipient list (up to 5). A workspace member who may read submissions is confirmed at once; any other address is sent ONE confirmation e-mail and receives nothing until it opens the link (double opt-in). An address that unsubscribed or refused is shown as `"pending"` and is never written to. Confirmation e-mails are limited (per workspace, per address and for the platform); when one is not sent the answer is a neutral 429 and the settings are saved. Only a portal session may add an address from outside the workspace: any other credential (an API key or a token) naming a NEW one gets 403 `human_action_required`; members, and outside addresses already on the list, go through. Submissions marked as spam never notify; a collection that holds personal data shows values only to member recipients.

Operation `putCollectionNotifications`. Scopes: `data:write`.

**Parameters**

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `collection_id` | path | string | yes | Public collection id. |

**Request body** (`application/json`, required)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `mode` | one of instant, daily_digest | yes | `instant`: one e-mail per recipient for each submission that is not marked suspect, up to the workspace's plan allowance of instant e-mails per month (`immediateEmailsPerMonth` in `GET /v1/usage`). Past it, the submission goes to the daily digest, which says why. A suspect submission is still stored and shown as suspect, and goes only to the daily digest. `daily_digest`: one summary per day. |
| `locale` | one of pt-BR, en | yes | Language saved for the collection (the portal uses it). The e-mails themselves are always in English. |
| `recipients` | array of string (3 to 254 characters) | yes | The full list of addresses, up to 5; it replaces the old one (empty turns notifications off). Workspace members who may read submissions are confirmed at once; any other address is sent a confirmation link first. |

**Responses**

| Status | Meaning | Content type |
| --- | --- | --- |
| `200` | The stored settings, with each recipient's state. | `application/json` |
| `400` | `validation_failed`: a bad path parameter or body (also an invalid address, at `/recipients`). | `application/problem+json` |
| `401` | `unauthenticated`: no credentials, or credentials that prove nothing. | `application/problem+json` |
| `402` | `workspace_payment_required`: the workspace needs a paid plan and has none, so it accepts no change; reading and exporting still work. A person pays in the portal, under Settings, Plan and billing. | `application/problem+json` |
| `403` | `insufficient_scope`: the credential lacks a scope this route needs (see `missing_scopes`). `permission_denied`: the current workspace role does not allow the action. `oauth_consent_required`: an OAuth token whose person has not yet chosen the workspace and the permissions (see `consent_url`). `mfa_required`: a portal session that must still verify or set up MFA (see `mfa_reason`). `cross_site_request`: authenticated by the session cookie, but not from the portal (another `Origin`, or not `Content-Type: application/json`). `workspace_suspended`: Taggor suspended the workspace; every credential acting in it is refused until it is lifted. `human_action_required` (`external_notification_recipient`): only a portal session adds an address from outside the workspace to the recipients. | `application/problem+json` |
| `404` | `not_found`: no collection with this id in the caller's workspace. | `application/problem+json` |
| `405` | `method_not_allowed`: the path exists, but not for this method; `Allow` lists the methods it answers. | `application/problem+json` |
| `413` | `payload_too_large`: the request body is over the limit of the route (256 KiB for JSON). | `application/problem+json` |
| `415` | `unsupported_media_type`: the body was sent with a `Content-Type` other than `application/json`. Send the body as JSON with `Content-Type: application/json`. | `application/problem+json` |
| `429` | `notification_quota_exceeded`: the settings were saved, but a confirmation could not be requested at this time for a recipient awaiting confirmation (a limit was reached; the answer never says which, nor why). `Retry-After` says when the UTC day ends. Also `rate_limited`: the limit of the route class was reached (`rate_limit.limit_class`); wait `Retry-After` seconds. | `application/problem+json` |
| `500` | `internal_error` (nothing about the failure; quote `request_id`) or `configuration_error`. | `application/problem+json` |
| `503` | `database_unavailable`: the API could not reach its database (timeout, dropped connection). Wait `Retry-After` seconds and send the same request again: repeating is safe with the same `Idempotency-Key`; without it a POST may already have been applied. | `application/problem+json` |

```sh title="curl"
curl -X PUT "https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/notifications" \
  -H "Authorization: Bearer $TAGGOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "mode": "instant",
  "locale": "pt-BR",
  "recipients": [
    "example"
  ]
}'
```

```ts title="TypeScript"
const response = await fetch("https://api.taggor.dev/v1/collections/col_0123456789abcdefghjkmnpqrs/notifications", {
  method: "PUT",
  headers: { authorization: `Bearer ${process.env.TAGGOR_API_KEY}`, "content-type": "application/json" },
  body: JSON.stringify({
    "mode": "instant",
    "locale": "pt-BR",
    "recipients": [
      "example"
    ]
  }),
});
if (!response.ok) throw new Error(await response.text());
const result: unknown = await response.json();
console.log(result);
```

```json title="Example response"
{
  "collection_id": "col_0123456789abcdefghjkmnpqrs",
  "mode": "instant",
  "locale": "en",
  "recipients": [
    {
      "id": "nrc_0123456789abcdefghjkmnpqrs",
      "email": "ana@example.com",
      "kind": "member",
      "status": "confirmed",
      "confirmed_at": "2026-11-08T12:00:00.000Z"
    }
  ],
  "updated_at": "2026-11-08T12:00:00.000Z"
}
```
