# Convs API v1 — reference for AI agents

The complete Convs public API reference in one Markdown file. HTML version: https://convs.io/en/docs/api. OpenAPI 3.1 spec: https://app.convs.io/api/v1/openapi.json. MCP server for agents: https://convs.io/docs/mcp.md.

Base URL: `https://app.convs.io/api/v1`

## Authentication

Every request sends an organisation key in the `Authorization: Bearer cvs_live_…` header. A key belongs to one organisation and sees only its data.

The full key is shown once, when it is created. We store only its hash, so it cannot be recovered: revoke a lost key and create a new one.

You can revoke a key in the panel at any time and give it an expiry date. A revoked key gets `401 key_revoked`, an expired one `401 key_expired`.

A key has scopes. A `:write` scope (and `leads:answers`) includes `:read` of the same area. `contacts:*` and `leads:answers` return personal data. A missing scope answers `403 insufficient_scope` with `details.required_scope`.

The API and the MCP server are included in the Growth, Agency and Custom plans. On Free and Start the account owner gets a 5-day trial from creating the account. After it every request answers `402 plan_required`, new keys cannot be created and API webhooks are not delivered. Once you pick Growth or higher under “Plan & billing”, existing keys work again at once.

| Scope | Allows |
| --- | --- |
| `contacts:read` | Read people of the Klienci (Clients) page (names, phones, e-mails — personal data). |
| `contacts:write` | Create and change people: details, stage, notes, tags, SMS block. |
| `leads:read` | Read Meta Instant Forms leads, without form answers. |
| `leads:answers` | Like `leads:read`, plus the form answers (`answers`) — personal data. |
| `events:read` | Read conversions and the status of their deliveries to Meta. |
| `events:write` | Send server-to-server conversions to the queue. |
| `tasks:read` | My day and open tasks (personal data). |
| `tasks:write` | Create, complete and postpone tasks. |
| `campaigns:read` | Campaign report and readiness for lead-quality optimisation. |
| `creatives:read` | Creative report. |
| `reports:read` | Team reports and lead response (personal data: lead names). |
| `diagnostics:read` | The last self-check. |
| `diagnostics:write` | Run the self-check. |
| `jobs:read` | Read background jobs. |
| `webhooks:read` | Read webhooks and their delivery history. |
| `webhooks:write` | Create, change, delete and test webhooks. |

## Errors

Every error has the same shape: `{"error": {"code", "message", "details?"}}`.

`code` is stable and never translated, so base your error handling on it. `message` is for humans, in the language of the `Accept-Language` header: Polish by default, `en` for English. `details` appears only when there is extra data, e.g. `required_scope`.

| Code | Meaning |
| --- | --- |
| `unauthorized` | Missing key, wrong format or unknown key. |
| `key_revoked` | The key was revoked. |
| `key_expired` | The key is past its expiry date. |
| `insufficient_scope` | The key lacks the required scope (`details.required_scope`). |
| `plan_required` | The organisation’s plan does not include the API: it needs Growth or higher after the 5-day trial. |
| `rate_limited` | Over 120 requests per minute for this key; wait `Retry-After` seconds. |
| `invalid_json` | The body is not valid JSON or has an unknown field. |
| `validation_error` | A field or parameter has an invalid value; the message says what to fix. |
| `invalid_cursor` | `cursor` is not from the previous page of the same list. |
| `not_found` | No such record in your organisation. |
| `route_not_found` | No such endpoint. |
| `conflict` | The operation conflicts with the record’s current state. |
| `contact_exists` | A person with this phone or e-mail already exists (`details.contact_id`). |
| `contact_merged` | The card was merged into another one (`details.merged_into`). |
| `stage_conflict` | The stage cannot be changed this way right now. |
| `event_conflict` | The event conflicts with one already accepted. |
| `source_paused` | The source is paused. |
| `limit_reached` | A limit was reached, e.g. 10 webhooks per organisation. |
| `idempotency_key_reused` | The same `Idempotency-Key` with a different request body. |
| `idempotency_in_progress` | A request with this `Idempotency-Key` is still running; retry shortly. |
| `payload_too_large` | Request body over 64 KB. |
| `internal_error` | An error on our side; retry later. |

## Pagination

Lists return `{"data": [...], "next_cursor", "has_more"}`. Set the page size with `limit` (1–100, default 25).

Fetch the next page by passing the previous response’s `next_cursor` as `cursor`. When `has_more` is `false`, the list is complete.

Records are ordered by `updated_at`, then id: `order=desc` newest first (default) or `order=asc`.

`updated_since` (ISO 8601) returns only records changed at or after that time. For incremental sync, store the time you start a sync, page through to the end, and use the stored time as `updated_since` for the next sync.

## Limits and formats

- Rate limit: 120 requests per minute per key. Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`.
- Over the limit you get `429 rate_limited` with a `Retry-After` header (seconds). Wait that long, then retry.
- A request body can be at most 64 KB, otherwise `413 payload_too_large`.
- Times in responses are ISO 8601 in UTC, e.g. `2026-10-08T10:00:00Z`.

## Idempotency

- Every `POST` accepts an `Idempotency-Key` header (1–255 visible ASCII characters). Use a value tied to the operation, e.g. a UUID stored with the record on your side.
- Repeating a request with the same key and the same body within 24 hours returns the stored response with `Idempotent-Replayed: true`, without running the operation again.
- The same key with a different body answers `422 idempotency_key_reused`. While the first request is still running you get `409 idempotency_in_progress`.
- 5xx and 429 responses are not stored, so after them you can safely retry with the same key.

## Endpoints

### Keys

The calling key.

#### `GET /me` — Describe the calling key

Organisation, key name, scopes and expiry. A safe first call to check a new key; needs no scope.

Scope: none

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `organization` | object |  |  |
| `organization.id` | string |  |  |
| `organization.name` | string |  |  |
| `key` | object |  |  |
| `key.id` | string |  |  |
| `key.name` | string |  |  |
| `key.prefix` | string |  |  |
| `key.scopes` | string[] |  |  |
| `key.expires_at` | string (date-time) \| null |  |  |
| `rate_limit` | object |  |  |
| `rate_limit.per_minute` | integer |  |  |

```bash
curl "https://app.convs.io/api/v1/me" \
  -H "Authorization: Bearer $API_KEY"
```

### Contacts

People of the Klienci page.

#### `GET /contacts` — List contacts

People of the Klienci page (merged cards are left out). Filter by stage, tag, exact e-mail or phone, or the ad they came from.

Scope: `contacts:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `limit` | query |  | Page size, 1–100 (default 25). |
| `cursor` | query |  | `next_cursor` of the previous page. |
| `order` | query |  | Sort by `updated_at` (then id): `desc` newest first (default) or `asc`. |
| `updated_since` | query |  | Only records changed at or after this ISO 8601 time. |
| `stage` | query |  | Stage. |
| `tag` | query |  | Tag. |
| `email` | query |  | Exact e-mail (matched by hash). |
| `phone` | query |  | Exact phone (matched by hash). |
| `campaign` | query |  | People with a lead from this Meta campaign id. |
| `adset` | query |  | …from this ad set id. |
| `ad` | query |  | …from this ad id. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Contact[] | yes |  |
| `data[].id` | string |  | Contact id. |
| `data[].name` | string |  | Full name. |
| `data[].phone` | string |  | Phone in E.164 form, empty when unknown. |
| `data[].email` | string |  | E-mail, empty when unknown. |
| `data[].stage` | string |  | Sales stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `data[].cycle` | integer |  | Sales cycle number; a new lead for a closed person opens the next cycle. |
| `data[].tags` | string[] |  | Tags. |
| `data[].sms_optout` | boolean |  | True when SMS to this person are blocked. |
| `data[].first_source` | string |  | Where the person first came from (form name, "Ręcznie"…). |
| `data[].first_ad` | AdSource \| null |  | The first ad the person came from, null for organic or unknown. |
| `data[].owner_id` | string \| null |  | User id of the person's owner (opiekun). |
| `data[].owner_candidates` | string[] |  | Read-only. User ids the person is offered to while nobody owns it yet; the first of them who takes the lead becomes `owner_id`. Empty when none. |
| `data[].last_activity_at` | string (date-time) \| null |  | Last activity time. |
| `data[].created_at` | string (date-time) |  | Creation time. |
| `data[].updated_at` | string (date-time) |  | Last change; use with `updated_since`. |
| `next_cursor` | string \| null | yes | Pass as `cursor` to get the next page; null on the last page. |
| `has_more` | boolean | yes | True when another page exists. |

```bash
curl "https://app.convs.io/api/v1/contacts" \
  -H "Authorization: Bearer $API_KEY"
```

#### `POST /contacts` — Create a contact

Adds a person like „Dodaj osobę” in the panel (round robin owner when it is on).

Scope: `contacts:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string |  | Full name (up to 200 characters). Max 200 characters. |
| `phone` | string |  | Phone with a country code, e.g. +48 600 857 482, or 9 digits (Poland). |
| `email` | string |  | E-mail address. Max 254 characters. |
| `tags` | string[] |  | Tags. |

Response 201:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Contact id. |
| `name` | string |  | Full name. |
| `phone` | string |  | Phone in E.164 form, empty when unknown. |
| `email` | string |  | E-mail, empty when unknown. |
| `stage` | string |  | Sales stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `cycle` | integer |  | Sales cycle number; a new lead for a closed person opens the next cycle. |
| `tags` | string[] |  | Tags. |
| `sms_optout` | boolean |  | True when SMS to this person are blocked. |
| `first_source` | string |  | Where the person first came from (form name, "Ręcznie"…). |
| `first_ad` | AdSource \| null |  | The first ad the person came from, null for organic or unknown. |
| `first_ad.platform` | string |  | Placement platform reported by Meta (facebook, instagram…). |
| `first_ad.campaign_id` | string |  | Meta campaign id. |
| `first_ad.campaign_name` | string |  | Campaign name. |
| `first_ad.adset_id` | string |  | Meta ad set id. |
| `first_ad.adset_name` | string |  | Ad set name. |
| `first_ad.ad_id` | string |  | Meta ad id. |
| `first_ad.ad_name` | string |  | Ad name. |
| `owner_id` | string \| null |  | User id of the person's owner (opiekun). |
| `owner_candidates` | string[] |  | Read-only. User ids the person is offered to while nobody owns it yet; the first of them who takes the lead becomes `owner_id`. Empty when none. |
| `last_activity_at` | string (date-time) \| null |  | Last activity time. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change; use with `updated_since`. |

```bash
curl -X POST "https://app.convs.io/api/v1/contacts" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Anna Nowak",
    "phone": "+48600100200",
    "email": "anna@example.com",
    "tags": [
      "vip"
    ]
  }'
```

#### `GET /contacts/{id}` — Get a contact

A merged card answers 409 `contact_merged` with `details.merged_into`.

Scope: `contacts:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Contact id. |
| `name` | string |  | Full name. |
| `phone` | string |  | Phone in E.164 form, empty when unknown. |
| `email` | string |  | E-mail, empty when unknown. |
| `stage` | string |  | Sales stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `cycle` | integer |  | Sales cycle number; a new lead for a closed person opens the next cycle. |
| `tags` | string[] |  | Tags. |
| `sms_optout` | boolean |  | True when SMS to this person are blocked. |
| `first_source` | string |  | Where the person first came from (form name, "Ręcznie"…). |
| `first_ad` | AdSource \| null |  | The first ad the person came from, null for organic or unknown. |
| `first_ad.platform` | string |  | Placement platform reported by Meta (facebook, instagram…). |
| `first_ad.campaign_id` | string |  | Meta campaign id. |
| `first_ad.campaign_name` | string |  | Campaign name. |
| `first_ad.adset_id` | string |  | Meta ad set id. |
| `first_ad.adset_name` | string |  | Ad set name. |
| `first_ad.ad_id` | string |  | Meta ad id. |
| `first_ad.ad_name` | string |  | Ad name. |
| `owner_id` | string \| null |  | User id of the person's owner (opiekun). |
| `owner_candidates` | string[] |  | Read-only. User ids the person is offered to while nobody owns it yet; the first of them who takes the lead becomes `owner_id`. Empty when none. |
| `last_activity_at` | string (date-time) \| null |  | Last activity time. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change; use with `updated_since`. |

```bash
curl "https://app.convs.io/api/v1/contacts/abc123" \
  -H "Authorization: Bearer $API_KEY"
```

#### `PATCH /contacts/{id}` — Update a contact

Changes name, phone, e-mail or tags; every change is a history line.

Scope: `contacts:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string |  | Full name. |
| `phone` | string |  | Phone; an empty string removes it (a phone or an e-mail must remain). |
| `email` | string |  | E-mail; an empty string removes it. |
| `tags` | string[] |  | Replaces all tags. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Contact id. |
| `name` | string |  | Full name. |
| `phone` | string |  | Phone in E.164 form, empty when unknown. |
| `email` | string |  | E-mail, empty when unknown. |
| `stage` | string |  | Sales stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `cycle` | integer |  | Sales cycle number; a new lead for a closed person opens the next cycle. |
| `tags` | string[] |  | Tags. |
| `sms_optout` | boolean |  | True when SMS to this person are blocked. |
| `first_source` | string |  | Where the person first came from (form name, "Ręcznie"…). |
| `first_ad` | AdSource \| null |  | The first ad the person came from, null for organic or unknown. |
| `first_ad.platform` | string |  | Placement platform reported by Meta (facebook, instagram…). |
| `first_ad.campaign_id` | string |  | Meta campaign id. |
| `first_ad.campaign_name` | string |  | Campaign name. |
| `first_ad.adset_id` | string |  | Meta ad set id. |
| `first_ad.adset_name` | string |  | Ad set name. |
| `first_ad.ad_id` | string |  | Meta ad id. |
| `first_ad.ad_name` | string |  | Ad name. |
| `owner_id` | string \| null |  | User id of the person's owner (opiekun). |
| `owner_candidates` | string[] |  | Read-only. User ids the person is offered to while nobody owns it yet; the first of them who takes the lead becomes `owner_id`. Empty when none. |
| `last_activity_at` | string (date-time) \| null |  | Last activity time. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change; use with `updated_since`. |

```bash
curl -X PATCH "https://app.convs.io/api/v1/contacts/abc123" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Anna Nowak",
    "phone": "+48600100200",
    "email": "anna@example.com",
    "tags": [
      "vip"
    ]
  }'
```

#### `POST /contacts/{id}/stage` — Set the stage

Moves the person and, in the same transaction, every open lead of the current cycle; leads with an active flow get a Meta conversion event queued. The same path as „Zmień etap” in the panel; stage automations start.

Scope: `contacts:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `stage` | string | yes | Target stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `value` | number |  | Sale value (for `sold`); counted once, on the newest lead whose Meta event is queued. |
| `currency` | string |  | ISO 4217 currency of `value`, e.g. PLN. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `contact` | Contact |  |  |
| `contact.id` | string |  | Contact id. |
| `contact.name` | string |  | Full name. |
| `contact.phone` | string |  | Phone in E.164 form, empty when unknown. |
| `contact.email` | string |  | E-mail, empty when unknown. |
| `contact.stage` | string |  | Sales stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `contact.cycle` | integer |  | Sales cycle number; a new lead for a closed person opens the next cycle. |
| `contact.tags` | string[] |  | Tags. |
| `contact.sms_optout` | boolean |  | True when SMS to this person are blocked. |
| `contact.first_source` | string |  | Where the person first came from (form name, "Ręcznie"…). |
| `contact.first_ad` | AdSource \| null |  | The first ad the person came from, null for organic or unknown. |
| `contact.owner_id` | string \| null |  | User id of the person's owner (opiekun). |
| `contact.owner_candidates` | string[] |  | Read-only. User ids the person is offered to while nobody owns it yet; the first of them who takes the lead becomes `owner_id`. Empty when none. |
| `contact.last_activity_at` | string (date-time) \| null |  | Last activity time. |
| `contact.created_at` | string (date-time) |  | Creation time. |
| `contact.updated_at` | string (date-time) |  | Last change; use with `updated_since`. |
| `meta_events_queued` | integer |  | Meta conversion events queued for open leads (the queue sends them; this is not a confirmation from Meta). |
| `leads_without_send` | integer |  | Open leads moved without a Meta event (no active flow for the stage). |

```bash
curl -X POST "https://app.convs.io/api/v1/contacts/abc123/stage" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "stage": "sold",
    "value": 1200,
    "currency": "PLN"
  }'
```

#### `POST /contacts/{id}/notes` — Add a note

Adds a note, call or meeting to the person's history.

Scope: `contacts:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | string |  | Entry kind. One of: `note`, `call`, `meeting`. Default `note`. |
| `text` | string | yes | Text, 1–5000 characters. Max 5000 characters. |
| `time` | string (date-time) |  | When it happened (default: now); not in the future. |

Response 201:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | History entry id. |
| `contact_id` | string |  | Contact id. |
| `kind` | string |  | Entry kind. |
| `text` | string |  | Text. |
| `time` | string (date-time) |  | Entry time. |

```bash
curl -X POST "https://app.convs.io/api/v1/contacts/abc123/notes" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "call",
    "text": "Called back, wants an offer by Friday."
  }'
```

#### `POST /contacts/{id}/tags` — Add or remove tags

Adds and removes tags without sending the whole list.

Scope: `contacts:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `add` | string[] |  | Tags to add. |
| `remove` | string[] |  | Tags to remove. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Contact id. |
| `name` | string |  | Full name. |
| `phone` | string |  | Phone in E.164 form, empty when unknown. |
| `email` | string |  | E-mail, empty when unknown. |
| `stage` | string |  | Sales stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `cycle` | integer |  | Sales cycle number; a new lead for a closed person opens the next cycle. |
| `tags` | string[] |  | Tags. |
| `sms_optout` | boolean |  | True when SMS to this person are blocked. |
| `first_source` | string |  | Where the person first came from (form name, "Ręcznie"…). |
| `first_ad` | AdSource \| null |  | The first ad the person came from, null for organic or unknown. |
| `first_ad.platform` | string |  | Placement platform reported by Meta (facebook, instagram…). |
| `first_ad.campaign_id` | string |  | Meta campaign id. |
| `first_ad.campaign_name` | string |  | Campaign name. |
| `first_ad.adset_id` | string |  | Meta ad set id. |
| `first_ad.adset_name` | string |  | Ad set name. |
| `first_ad.ad_id` | string |  | Meta ad id. |
| `first_ad.ad_name` | string |  | Ad name. |
| `owner_id` | string \| null |  | User id of the person's owner (opiekun). |
| `owner_candidates` | string[] |  | Read-only. User ids the person is offered to while nobody owns it yet; the first of them who takes the lead becomes `owner_id`. Empty when none. |
| `last_activity_at` | string (date-time) \| null |  | Last activity time. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change; use with `updated_since`. |

```bash
curl -X POST "https://app.convs.io/api/v1/contacts/abc123/tags" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "add": [
      "vip"
    ],
    "remove": [
      "cold"
    ]
  }'
```

#### `POST /contacts/{id}/sms-optout` — Block or allow SMS

Keeps the „nie wysyłaj” list and every person with the same phone in step.

Scope: `contacts:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `sms_optout` | boolean | yes | True blocks SMS to the person's phone (for every person sharing it), false allows them again. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Contact id. |
| `name` | string |  | Full name. |
| `phone` | string |  | Phone in E.164 form, empty when unknown. |
| `email` | string |  | E-mail, empty when unknown. |
| `stage` | string |  | Sales stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `cycle` | integer |  | Sales cycle number; a new lead for a closed person opens the next cycle. |
| `tags` | string[] |  | Tags. |
| `sms_optout` | boolean |  | True when SMS to this person are blocked. |
| `first_source` | string |  | Where the person first came from (form name, "Ręcznie"…). |
| `first_ad` | AdSource \| null |  | The first ad the person came from, null for organic or unknown. |
| `first_ad.platform` | string |  | Placement platform reported by Meta (facebook, instagram…). |
| `first_ad.campaign_id` | string |  | Meta campaign id. |
| `first_ad.campaign_name` | string |  | Campaign name. |
| `first_ad.adset_id` | string |  | Meta ad set id. |
| `first_ad.adset_name` | string |  | Ad set name. |
| `first_ad.ad_id` | string |  | Meta ad id. |
| `first_ad.ad_name` | string |  | Ad name. |
| `owner_id` | string \| null |  | User id of the person's owner (opiekun). |
| `owner_candidates` | string[] |  | Read-only. User ids the person is offered to while nobody owns it yet; the first of them who takes the lead becomes `owner_id`. Empty when none. |
| `last_activity_at` | string (date-time) \| null |  | Last activity time. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change; use with `updated_since`. |

```bash
curl -X POST "https://app.convs.io/api/v1/contacts/abc123/sms-optout" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "sms_optout": true
  }'
```

#### `GET /contacts/search` — Search contacts with panel filters

The Klienci list with its filters: values of one filter are alternatives (comma list), filters combine. Every bad value is a 400. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `contacts:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `q` | query |  | Name, e-mail or phone. |
| `page` | query |  | Page, 1 = first. |
| `owner` | query |  | me, any, none, claimable, unclaimed or member ids. |
| `stage` | query |  | Stages. |
| `status` | query |  | Status ids, none or attempt. |
| `tag` | query |  | Tag. |
| `source` | query |  | First source name. |
| `form` | query |  | Meta form (source) ids. |
| `created` | query |  | today, 7d, 30d or 90d (or created_from / created_to days). |
| `activity` | query |  | Last activity: today, 7d, 30d, 90d (or activity_from / activity_to). |
| `inactive_days` | query |  | No activity for at least this many days. |
| `next_attempt` | query |  | planned, due or none. |
| `tasks` | query |  | open, overdue or none. |
| `leads` | query |  | one, many or none. |
| `phone` | query |  | yes or no. |
| `email` | query |  | yes or no. |
| `optout` | query |  | yes or no. |
| `duplicate` | query |  | yes or no. |
| `campaign` | query |  | Meta campaign id. |
| `adset` | query |  | Meta ad set id. |
| `ad` | query |  | Meta ad id. |
| `sort` | query |  | activity, activity_asc, created, created_asc or next_attempt. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] |  | People: id, name, stage, status, owner, last activity, next attempt, lead counts. |
| `total` | integer |  | All matching people. |
| `page` | integer |  | Page number. |

```bash
curl "https://app.convs.io/api/v1/contacts/search" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /contact-statuses` — List statuses

The organisation's internal statuses. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `contacts:read`

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `statuses` | object[] |  | Statuses: id, name, counts_as_contact, archived, sort, people. |

```bash
curl "https://app.convs.io/api/v1/contact-statuses" \
  -H "Authorization: Bearer $API_KEY"
```

#### `POST /contacts/{id}/status` — Set the status

Sets an internal status (a history line; a status that counts as contact ends a next contact attempt and counts as first contact). Never sent to Meta; status automations start. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `contacts:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string | yes | Status id, or "" to clear. |
| `again` | boolean |  | Record the same status once more (e.g. a second unanswered call). |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | string |  | Status id ("" = none). |
| `owner` | string |  | Owner id (a candidate's touch status takes the lead). |

```bash
curl -X POST "https://app.convs.io/api/v1/contacts/abc123/status" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "purchase"
  }'
```

#### `GET /contacts/{id}/history` — Contact history

Calls, notes, stages, statuses, tasks, SMS and form leads of the person. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `contacts:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `page` | query |  | Page, 1 = newest. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] |  | History lines: kind, time, actor, summary, details. |
| `page` | integer |  | Page number (`?page=`). |
| `more` | boolean |  | An older page exists. |

```bash
curl "https://app.convs.io/api/v1/contacts/abc123/history" \
  -H "Authorization: Bearer $API_KEY"
```

### Leads

Meta Instant Forms leads.

#### `GET /leads` — List leads

Meta Instant Forms leads. `answers` are included only for keys with `leads:answers`.

Scope: `leads:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `limit` | query |  | Page size, 1–100 (default 25). |
| `cursor` | query |  | `next_cursor` of the previous page. |
| `order` | query |  | Sort by `updated_at` (then id): `desc` newest first (default) or `asc`. |
| `updated_since` | query |  | Only records changed at or after this ISO 8601 time. |
| `form` | query |  | Convs form (source) id. |
| `campaign` | query |  | Meta campaign id. |
| `adset` | query |  | Meta ad set id. |
| `ad` | query |  | Meta ad id. |
| `contact` | query |  | Contact id. |
| `stage` | query |  | Stage. |
| `from` | query |  | Submitted on or after (YYYY-MM-DD in the organisation's zone, or ISO 8601). |
| `to` | query |  | Submitted on or before. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Lead[] | yes |  |
| `data[].id` | string |  | Lead id in Convs. |
| `data[].meta_lead_id` | string |  | Lead id in Meta. |
| `data[].form_id` | string |  | Convs source (form) id; use as `form` filter. |
| `data[].form_name` | string |  | Form name. |
| `data[].meta_form_id` | string |  | Meta form id. |
| `data[].meta_page_id` | string |  | Meta Page id. |
| `data[].stage` | string |  | Lead stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `data[].cycle` | integer |  | Sales cycle of the person this lead belongs to. |
| `data[].contact_id` | string \| null |  | The person (contact) of this lead. |
| `data[].fetch_status` | string |  | `ready` when the lead data is stored. |
| `data[].ad` | AdSource \| null |  | Ad the lead came from, null for organic or unknown. |
| `data[].stages` | object[] |  | Stage history. |
| `data[].answers` | LeadAnswer[] |  | Form answers. Only for keys with `leads:answers`. |
| `data[].created_at` | string (date-time) \| null |  | When the lead was submitted. |
| `data[].updated_at` | string (date-time) |  | Last change. |
| `next_cursor` | string \| null | yes | Pass as `cursor` to get the next page; null on the last page. |
| `has_more` | boolean | yes | True when another page exists. |

```bash
curl "https://app.convs.io/api/v1/leads" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /leads/{id}` — Get a lead

One lead; `answers` only with `leads:answers`.

Scope: `leads:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Lead id in Convs. |
| `meta_lead_id` | string |  | Lead id in Meta. |
| `form_id` | string |  | Convs source (form) id; use as `form` filter. |
| `form_name` | string |  | Form name. |
| `meta_form_id` | string |  | Meta form id. |
| `meta_page_id` | string |  | Meta Page id. |
| `stage` | string |  | Lead stage. One of: `new`, `contacted`, `qualified`, `sold`, `rejected`. |
| `cycle` | integer |  | Sales cycle of the person this lead belongs to. |
| `contact_id` | string \| null |  | The person (contact) of this lead. |
| `fetch_status` | string |  | `ready` when the lead data is stored. |
| `ad` | AdSource \| null |  | Ad the lead came from, null for organic or unknown. |
| `ad.platform` | string |  | Placement platform reported by Meta (facebook, instagram…). |
| `ad.campaign_id` | string |  | Meta campaign id. |
| `ad.campaign_name` | string |  | Campaign name. |
| `ad.adset_id` | string |  | Meta ad set id. |
| `ad.adset_name` | string |  | Ad set name. |
| `ad.ad_id` | string |  | Meta ad id. |
| `ad.ad_name` | string |  | Ad name. |
| `stages` | object[] |  | Stage history. |
| `stages[].stage` | string |  |  |
| `stages[].at` | string (date-time) |  |  |
| `stages[].meta_event_queued` | boolean |  |  |
| `answers` | LeadAnswer[] |  | Form answers. Only for keys with `leads:answers`. |
| `answers[].key` | string |  | Field key (also the automation variable). |
| `answers[].label` | string |  | Question as shown in the form. |
| `answers[].values` | string[] |  | Answers. |
| `created_at` | string (date-time) \| null |  | When the lead was submitted. |
| `updated_at` | string (date-time) |  | Last change. |

```bash
curl "https://app.convs.io/api/v1/leads/abc123" \
  -H "Authorization: Bearer $API_KEY"
```

### Conversions

Conversions sent to Meta and their deliveries.

#### `GET /events` — List events

Conversions with their deliveries; payloads are never returned.

Scope: `events:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `limit` | query |  | Page size, 1–100 (default 25). |
| `cursor` | query |  | `next_cursor` of the previous page. |
| `order` | query |  | Sort by `updated_at` (then id): `desc` newest first (default) or `asc`. |
| `updated_since` | query |  | Only records changed at or after this ISO 8601 time. |
| `source` | query |  | Source id. |
| `status` | query |  | Your status. |
| `external_id` | query |  | Your record id. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Event[] | yes |  |
| `data[].id` | string |  | Event id. |
| `data[].source_id` | string |  | Source id. |
| `data[].external_id` | string |  | Your record id. |
| `data[].status` | string |  | Your status. |
| `data[].meta_event_id` | string |  | Meta deduplication id. |
| `data[].event_time` | string (date-time) \| null |  | Event time. |
| `data[].value` | number \| null |  | Value. |
| `data[].currency` | string |  | Currency. |
| `data[].deliveries` | Delivery[] |  | Deliveries of this event. |
| `data[].created_at` | string (date-time) |  | Creation time. |
| `data[].updated_at` | string (date-time) |  | Last change. |
| `next_cursor` | string \| null | yes | Pass as `cursor` to get the next page; null on the last page. |
| `has_more` | boolean | yes | True when another page exists. |

```bash
curl "https://app.convs.io/api/v1/events" \
  -H "Authorization: Bearer $API_KEY"
```

#### `POST /events` — Send a conversion

Server-to-server conversion ingest. The source's active flows map `status` to Meta events and queue one delivery per dataset; dedupe rules are unchanged. Answers 202: queued, not yet sent.

Scope: `events:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `source` | string | yes | Id of a Google Sheets or Shoper source of your organisation (Połączenia → source details). |
| `external_id` | string | yes | Your id of the record (order, lead…), max 128 characters. Max 128 characters. |
| `status` | string | yes | Your status mapped to a Meta event by the source's flow, e.g. QUALIFIED or purchase. Max 80 characters. |
| `consent` | boolean | yes | Must be true: you confirm a legal basis for sending the data. |
| `event_time` | integer \| string (date-time) |  | Unix seconds or ISO 8601; at most 7 days old. |
| `event_id` | string |  | Meta deduplication id; generated from source + external_id + status when omitted. |
| `email` | string |  | Customer e-mail (hashed with SHA-256 before storage). |
| `phone` | string |  | Customer phone in E.164 (hashed). |
| `lead_id` | string |  | Meta lead id, when the conversion closes a Meta lead. |
| `user_id` | string |  | Your customer id (hashed as external_id). |
| `fbp` | string |  | _fbp cookie. |
| `fbc` | string |  | _fbc cookie. |
| `event_source_url` | string |  | Page URL of the conversion. |
| `tracking_id` | string |  | Collector tracking id (Shoper). |
| `client_ip_address` | string |  | Customer IP. |
| `client_user_agent` | string |  | Customer user agent. |
| `value` | number |  | Conversion value (required for Purchase). |
| `currency` | string |  | ISO 4217 currency (required with value). |
| `content_ids` | string[] |  | Product ids. |

Response 202:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `event_id` | string |  | Convs event id. |
| `deliveries_created` | integer |  | New deliveries queued for Meta datasets. |
| `duplicates` | integer |  | Deliveries skipped as duplicates. |
| `sending_enabled` | boolean |  | False when the server does not send to Meta (queued only). |

```bash
curl -X POST "https://app.convs.io/api/v1/events" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "src_abc123",
    "external_id": "order-1001",
    "status": "purchase",
    "consent": true,
    "event_time": "2026-10-08T10:00:00Z",
    "email": "anna@example.com",
    "phone": "+48600100200",
    "value": 1200,
    "currency": "PLN"
  }'
```

#### `GET /events/{id}` — Get an event

One conversion with the status of each delivery.

Scope: `events:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Event id. |
| `source_id` | string |  | Source id. |
| `external_id` | string |  | Your record id. |
| `status` | string |  | Your status. |
| `meta_event_id` | string |  | Meta deduplication id. |
| `event_time` | string (date-time) \| null |  | Event time. |
| `value` | number \| null |  | Value. |
| `currency` | string |  | Currency. |
| `deliveries` | Delivery[] |  | Deliveries of this event. |
| `deliveries[].id` | string |  | Delivery id. |
| `deliveries[].event_id` | string |  | Convs event id. |
| `deliveries[].target_id` | string |  | Meta receiver (dataset connection) id. |
| `deliveries[].dataset_id` | string |  | Meta dataset (pixel) id. |
| `deliveries[].event_name` | string |  | Meta event name, e.g. Lead, Purchase. |
| `deliveries[].meta_event_id` | string |  | event_id sent to Meta. |
| `deliveries[].mode` | string |  | `test` or `live`. |
| `deliveries[].status` | string |  | Delivery status. One of: `pending`, `sending`, `retry`, `accepted`, `failed`, `cancelled`. |
| `deliveries[].attempts` | integer |  | Attempts so far. |
| `deliveries[].last_error` | string |  | Last error, empty when none. |
| `deliveries[].accepted_at` | string (date-time) \| null |  | When Meta accepted it (receipt, not proof of attribution). |
| `deliveries[].next_attempt_at` | string (date-time) \| null |  | Next attempt. |
| `deliveries[].created_at` | string (date-time) |  | Creation time. |
| `deliveries[].updated_at` | string (date-time) |  | Last change. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change. |

```bash
curl "https://app.convs.io/api/v1/events/abc123" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /deliveries` — List deliveries

Delivery status to Meta, e.g. `status=failed&updated_since=…` to follow failures.

Scope: `events:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `limit` | query |  | Page size, 1–100 (default 25). |
| `cursor` | query |  | `next_cursor` of the previous page. |
| `order` | query |  | Sort by `updated_at` (then id): `desc` newest first (default) or `asc`. |
| `updated_since` | query |  | Only records changed at or after this ISO 8601 time. |
| `status` | query |  | Delivery status. |
| `event` | query |  | Event id. |
| `target` | query |  | Receiver id. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Delivery[] | yes |  |
| `data[].id` | string |  | Delivery id. |
| `data[].event_id` | string |  | Convs event id. |
| `data[].target_id` | string |  | Meta receiver (dataset connection) id. |
| `data[].dataset_id` | string |  | Meta dataset (pixel) id. |
| `data[].event_name` | string |  | Meta event name, e.g. Lead, Purchase. |
| `data[].meta_event_id` | string |  | event_id sent to Meta. |
| `data[].mode` | string |  | `test` or `live`. |
| `data[].status` | string |  | Delivery status. One of: `pending`, `sending`, `retry`, `accepted`, `failed`, `cancelled`. |
| `data[].attempts` | integer |  | Attempts so far. |
| `data[].last_error` | string |  | Last error, empty when none. |
| `data[].accepted_at` | string (date-time) \| null |  | When Meta accepted it (receipt, not proof of attribution). |
| `data[].next_attempt_at` | string (date-time) \| null |  | Next attempt. |
| `data[].created_at` | string (date-time) |  | Creation time. |
| `data[].updated_at` | string (date-time) |  | Last change. |
| `next_cursor` | string \| null | yes | Pass as `cursor` to get the next page; null on the last page. |
| `has_more` | boolean | yes | True when another page exists. |

```bash
curl "https://app.convs.io/api/v1/deliveries" \
  -H "Authorization: Bearer $API_KEY"
```

### My day and tasks

My day and tasks.

#### `GET /my-day` — My day

One list in work order: tasks due now, new uncontacted leads, next contact attempts, overdue and today. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `tasks:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `scope` | query |  | Whose work: mine, user (with user) or all. |
| `user` | query |  | Member id for scope=user. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `scope` | string |  | mine, user or all. |
| `today` | string |  | Today in the organisation's zone (YYYY-MM-DD). |
| `timezone` | string |  | Organisation time zone. |
| `sections` | object |  | Rows per section in work order: now, new_leads, attempts, overdue, today (≤200 each). |
| `counts` | object |  | Whole count per section. |
| `done_today` | object |  | Calls and meetings logged today. |

```bash
curl "https://app.convs.io/api/v1/my-day" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /tasks` — List tasks

Open tasks by due time. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `tasks:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `scope` | query |  | Whose work: mine, user (with user) or all. |
| `user` | query |  | Member id for scope=user. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | object[] |  | Tasks by due time. |
| `counts` | object |  | Counts per section (overdue, today, later, none). |
| `truncated` | boolean |  | More than 500 open tasks. |

```bash
curl "https://app.convs.io/api/v1/tasks" \
  -H "Authorization: Bearer $API_KEY"
```

#### `POST /contacts/{id}/tasks` — Create a task

Adds a task to the person, like „Dodaj zadanie” on the card. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `tasks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | yes | Task title. Max 200 characters. |
| `note` | string |  | Note. |
| `due_date` | string |  | Due day YYYY-MM-DD (organisation's zone); without it no due date. |
| `due_time` | string |  | Due time HH:MM; without it the end of the day. |
| `assignee` | string |  | Member id (default: the person's owner or the key's member). |

Response 201:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | New record id. |

```bash
curl -X POST "https://app.convs.io/api/v1/contacts/abc123/tasks" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "example"
  }'
```

#### `POST /tasks/{id}/done` — Complete a task

Closes the task (and ends a next contact attempt linked to it), optionally with a history entry. Send `{}` for none. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `tasks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entry` | object |  | Optional history entry written with the task (e.g. the call that closed it). |
| `entry.kind` | string | yes | Entry kind. One of: `note`, `call`, `meeting`. |
| `entry.text` | string | yes | Text. |

Response 204.

```bash
curl -X POST "https://app.convs.io/api/v1/tasks/abc123/done" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "entry": {
      "kind": "call",
      "text": "Called back, wants an offer by Friday."
    }
  }'
```

#### `POST /tasks/{id}/postpone` — Postpone a task

Moves the due time by days, to a date or to the person's contact hours. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `tasks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `days` | integer |  | Move by 1–30 days. Range 1–30. |
| `due_date` | string |  | Or a new day YYYY-MM-DD. |
| `due_time` | string |  | With due_date: time HH:MM. |
| `to_hours` | boolean |  | Or the start of the person's contact hours. |

Response 204.

```bash
curl -X POST "https://app.convs.io/api/v1/tasks/abc123/postpone" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "days": 1,
    "due_date": "example",
    "due_time": "example",
    "to_hours": true
  }'
```

### Reports

Campaign, creative and team numbers.

#### `GET /campaigns/report` — Campaign report

Spend, leads, qualified leads, sales and costs per campaign, ad set or ad — the numbers of the Kampanie page.

Scope: `campaigns:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `from` | query |  | First day YYYY-MM-DD (default: 30 days ago). |
| `to` | query |  | Last day YYYY-MM-DD (range up to 366 days). |
| `level` | query |  | Row level. |
| `campaign` | query |  | Only this campaign (for adset/ad level). |
| `adset` | query |  | Only this ad set (ad level). |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | string |  | First day (organisation time zone). |
| `to` | string |  | Last day. |
| `level` | string |  | Row level. One of: `campaign`, `adset`, `ad`. |
| `totals` | object[] |  | Totals per currency: `current` and the `previous` period of the same length. |
| `rows` | object[] |  | One row per campaign / ad set / ad with `metrics` (spend, meta_leads, leads, qualified, rejected, sales, revenue, cost_per_lead, cost_per_qualified, cost_per_sale, revenue_per_spend; costs are null when the divisor is 0). |
| `organic` | object |  | Leads without a known ad. |
| `syncs` | object[] |  | Spend sync state per ad account. |
| `maturing` | boolean |  | True when the range includes the last 30 days (sales may still come). |
| `unattributed` | integer |  | Leads of the period with a known source but no id at this level. |

```bash
curl "https://app.convs.io/api/v1/campaigns/report" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /creatives/report` — Creative report

Metrics per creative group with weekly momentum and the fatigue rule — the numbers of the Kreacje page.

Scope: `creatives:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `from` | query |  | First day YYYY-MM-DD. |
| `to` | query |  | Last day YYYY-MM-DD. |
| `format` | query |  | Creative format. |
| `campaign` | query |  | Meta campaign id. |
| `ad_account` | query |  | Ad account id. |
| `tag` | query |  | Tag filter `dimension:value` (hook, creator, offer). |
| `weeks` | query |  | Weeks of momentum, 4–8. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `from` | string |  | First day. |
| `to` | string |  | Last day. |
| `weeks` | array[] |  | Week ranges used for momentum. |
| `rows` | object[] |  | One row per creative group (same video, image or creative) with metrics, weekly trend, fatigue verdict and tags. |
| `totals` | object[] |  | Totals per currency. |
| `syncs` | object[] |  | Spend sync state per ad account. |
| `unattributed` | integer |  | Leads without a known creative. |

```bash
curl "https://app.convs.io/api/v1/creatives/report" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /reports/team` — Team report

Leads, handled, response time, positive outcomes, visits, sales and calls per member — the numbers of the Raporty page. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `reports:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `from` | query |  | First day YYYY-MM-DD (default: 30 days ago). |
| `to` | query |  | Last day YYYY-MM-DD. |

Response 200:


```bash
curl "https://app.convs.io/api/v1/reports/team" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /reports/lead-response` — Lead response report

How fast each Meta lead got its first contact, per owner — the numbers of the Obsługa leadów page. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `reports:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `from` | query |  | First day YYYY-MM-DD (default: 30 days ago). |
| `to` | query |  | Last day YYYY-MM-DD. |
| `owner` | query |  | Owner id or `me`. |
| `status` | query |  | Only this state. |

Response 200:


```bash
curl "https://app.convs.io/api/v1/reports/lead-response" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /campaigns/readiness` — Campaign readiness

Whether each ad set (or campaign) can optimise for lead quality and what is missing. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `campaigns:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `level` | query |  | Row level. |
| `campaign` | query |  | Only this campaign. |

Response 200:


```bash
curl "https://app.convs.io/api/v1/campaigns/readiness" \
  -H "Authorization: Bearer $API_KEY"
```

### Self-check

The organisation's self-check.

#### `GET /diagnostics` — Last self-check

The last self-check run with every check. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `diagnostics:read`

Response 200:


```bash
curl "https://app.convs.io/api/v1/diagnostics" \
  -H "Authorization: Bearer $API_KEY"
```

#### `POST /diagnostics/run` — Run the self-check

Like „Sprawdź teraz”: queues a run (or starts a waiting one at once). Read the result with GET /diagnostics. Runs as the member who created the key: their role applies, `scope=mine` means their own work.

Scope: `diagnostics:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Response 202:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `job` | object |  | The job (number, status). |

```bash
curl -X POST "https://app.convs.io/api/v1/diagnostics/run" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b"
```

### Background jobs

Background work.

#### `GET /jobs` — List background jobs

Lead imports, spend syncs, sheet syncs and other background work of the organisation.

Scope: `jobs:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `limit` | query |  | Page size, 1–100 (default 25). |
| `cursor` | query |  | `next_cursor` of the previous page. |
| `order` | query |  | Sort by `updated_at` (then id): `desc` newest first (default) or `asc`. |
| `updated_since` | query |  | Only records changed at or after this ISO 8601 time. |
| `status` | query |  | Job status. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Job[] | yes |  |
| `data[].number` | integer |  | Job number within the organisation. |
| `data[].kind` | string |  | Job kind, e.g. lead_import, ad_spend, sheets_sync. |
| `data[].label` | string |  | Description. |
| `data[].status` | string |  | Status. One of: `queued`, `running`, `done`, `failed`, `cancelled`. |
| `data[].priority` | string |  | `user` or `background`. |
| `data[].trigger` | string |  | What started it. |
| `data[].progress` | object |  | `done` count and `text`. |
| `data[].attempts` | integer |  | Attempts. |
| `data[].error` | string |  | Error text of a failed job. |
| `data[].summary` | string |  | Result summary. |
| `data[].run_after` | string (date-time) \| null |  | Not before. |
| `data[].started_at` | string (date-time) \| null |  | Start. |
| `data[].finished_at` | string (date-time) \| null |  | End. |
| `data[].created` | string (date-time) |  | Creation time. |
| `data[].updated_at` | string (date-time) |  | Last change. |
| `next_cursor` | string \| null | yes | Pass as `cursor` to get the next page; null on the last page. |
| `has_more` | boolean | yes | True when another page exists. |

```bash
curl "https://app.convs.io/api/v1/jobs" \
  -H "Authorization: Bearer $API_KEY"
```

#### `GET /jobs/{number}` — Get a job

One job by its number.

Scope: `jobs:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `number` | path | yes | Job number. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `number` | integer |  | Job number within the organisation. |
| `kind` | string |  | Job kind, e.g. lead_import, ad_spend, sheets_sync. |
| `label` | string |  | Description. |
| `status` | string |  | Status. One of: `queued`, `running`, `done`, `failed`, `cancelled`. |
| `priority` | string |  | `user` or `background`. |
| `trigger` | string |  | What started it. |
| `progress` | object |  | `done` count and `text`. |
| `attempts` | integer |  | Attempts. |
| `error` | string |  | Error text of a failed job. |
| `summary` | string |  | Result summary. |
| `run_after` | string (date-time) \| null |  | Not before. |
| `started_at` | string (date-time) \| null |  | Start. |
| `finished_at` | string (date-time) \| null |  | End. |
| `created` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change. |

```bash
curl "https://app.convs.io/api/v1/jobs/42" \
  -H "Authorization: Bearer $API_KEY"
```

### Webhooks

Events pushed to your server.

#### `GET /webhooks` — List webhooks

Webhook subscriptions of the organisation (up to 10).

Scope: `webhooks:read`

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | Webhook[] | yes |  |
| `data[].id` | string |  | Webhook id. |
| `data[].url` | string |  | HTTPS endpoint that receives POSTs. |
| `data[].description` | string |  | Your note. |
| `data[].events` | string[] |  | Subscribed events. One of: `contact.created`, `contact.stage_changed`, `lead.created`, `delivery.failed`. |
| `data[].active` | boolean |  | False pauses deliveries. |
| `data[].last_status` | integer |  | HTTP status of the last attempt (0 = no answer). |
| `data[].last_error` | string |  | Last error. |
| `data[].last_delivery_at` | string (date-time) \| null |  | Last attempt. |
| `data[].consecutive_failures` | integer |  | Failed attempts in a row. |
| `data[].created_at` | string (date-time) |  | Creation time. |
| `data[].updated_at` | string (date-time) |  | Last change. |
| `next_cursor` | string \| null | yes | Pass as `cursor` to get the next page; null on the last page. |
| `has_more` | boolean | yes | True when another page exists. |

```bash
curl "https://app.convs.io/api/v1/webhooks" \
  -H "Authorization: Bearer $API_KEY"
```

#### `POST /webhooks` — Create a webhook

Subscribes an HTTPS URL to events. The signing `secret` is returned only here.

Scope: `webhooks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes | HTTPS URL (no credentials, no private or local addresses). Max 2000 characters. |
| `events` | string[] | yes | Events to receive. One of: `contact.created`, `contact.stage_changed`, `lead.created`, `delivery.failed`. |
| `description` | string |  | Your note. Max 200 characters. |

Response 201:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Webhook id. |
| `url` | string |  | HTTPS endpoint that receives POSTs. |
| `description` | string |  | Your note. |
| `events` | string[] |  | Subscribed events. One of: `contact.created`, `contact.stage_changed`, `lead.created`, `delivery.failed`. |
| `active` | boolean |  | False pauses deliveries. |
| `last_status` | integer |  | HTTP status of the last attempt (0 = no answer). |
| `last_error` | string |  | Last error. |
| `last_delivery_at` | string (date-time) \| null |  | Last attempt. |
| `consecutive_failures` | integer |  | Failed attempts in a row. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change. |
| `secret` | string | yes | Signing secret (`whsec_…`). Shown only in this response — store it. |

```bash
curl -X POST "https://app.convs.io/api/v1/webhooks" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks",
    "events": [
      "contact.created",
      "contact.stage_changed"
    ]
  }'
```

#### `GET /webhooks/{id}` — Get a webhook

One subscription with its last result.

Scope: `webhooks:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Webhook id. |
| `url` | string |  | HTTPS endpoint that receives POSTs. |
| `description` | string |  | Your note. |
| `events` | string[] |  | Subscribed events. One of: `contact.created`, `contact.stage_changed`, `lead.created`, `delivery.failed`. |
| `active` | boolean |  | False pauses deliveries. |
| `last_status` | integer |  | HTTP status of the last attempt (0 = no answer). |
| `last_error` | string |  | Last error. |
| `last_delivery_at` | string (date-time) \| null |  | Last attempt. |
| `consecutive_failures` | integer |  | Failed attempts in a row. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change. |

```bash
curl "https://app.convs.io/api/v1/webhooks/abc123" \
  -H "Authorization: Bearer $API_KEY"
```

#### `PATCH /webhooks/{id}` — Update a webhook

Changes URL, events, description or pauses it; resuming resets the failure count.

Scope: `webhooks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |

Request body:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string |  | New URL. |
| `events` | string[] |  | New event list. One of: `contact.created`, `contact.stage_changed`, `lead.created`, `delivery.failed`. |
| `description` | string |  | Your note. |
| `active` | boolean |  | Pause or resume. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Webhook id. |
| `url` | string |  | HTTPS endpoint that receives POSTs. |
| `description` | string |  | Your note. |
| `events` | string[] |  | Subscribed events. One of: `contact.created`, `contact.stage_changed`, `lead.created`, `delivery.failed`. |
| `active` | boolean |  | False pauses deliveries. |
| `last_status` | integer |  | HTTP status of the last attempt (0 = no answer). |
| `last_error` | string |  | Last error. |
| `last_delivery_at` | string (date-time) \| null |  | Last attempt. |
| `consecutive_failures` | integer |  | Failed attempts in a row. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change. |

```bash
curl -X PATCH "https://app.convs.io/api/v1/webhooks/abc123" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/webhooks",
    "events": [
      "contact.created",
      "contact.stage_changed"
    ],
    "active": false
  }'
```

#### `DELETE /webhooks/{id}` — Delete a webhook

Removes the subscription and its queued deliveries.

Scope: `webhooks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |

Response 204.

```bash
curl -X DELETE "https://app.convs.io/api/v1/webhooks/abc123" \
  -H "Authorization: Bearer $API_KEY"
```

#### `POST /webhooks/{id}/test` — Send a test ping

Queues a signed `ping` event to check your endpoint and signature verification.

Scope: `webhooks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Response 202:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `delivery_id` | string |  | Queued delivery of a `ping` event. |

```bash
curl -X POST "https://app.convs.io/api/v1/webhooks/abc123/test" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b"
```

#### `POST /webhooks/{id}/rotate-secret` — Rotate the signing secret

Replaces the signing secret at once; the new `secret` is returned only here. Deliveries still queued are signed with the new secret.

Scope: `webhooks:write`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `Idempotency-Key` | header |  | Unique key (1–255 visible ASCII characters). Repeating a POST with the same key and body within 24 hours returns the stored response with `Idempotent-Replayed: true`. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string |  | Webhook id. |
| `url` | string |  | HTTPS endpoint that receives POSTs. |
| `description` | string |  | Your note. |
| `events` | string[] |  | Subscribed events. One of: `contact.created`, `contact.stage_changed`, `lead.created`, `delivery.failed`. |
| `active` | boolean |  | False pauses deliveries. |
| `last_status` | integer |  | HTTP status of the last attempt (0 = no answer). |
| `last_error` | string |  | Last error. |
| `last_delivery_at` | string (date-time) \| null |  | Last attempt. |
| `consecutive_failures` | integer |  | Failed attempts in a row. |
| `created_at` | string (date-time) |  | Creation time. |
| `updated_at` | string (date-time) |  | Last change. |
| `secret` | string | yes | Signing secret (`whsec_…`). Shown only in this response — store it. |

```bash
curl -X POST "https://app.convs.io/api/v1/webhooks/abc123/rotate-secret" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Idempotency-Key: 5f0c7a2e-8d41-4b6a-9e3f-1c2d3e4f5a6b"
```

#### `GET /webhooks/{id}/deliveries` — List webhook deliveries

Recent attempts (kept 30 days), newest first.

Scope: `webhooks:read`

Parameters:

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Record id. |
| `limit` | query |  | Page size, 1–100 (default 25). |
| `cursor` | query |  | `next_cursor` of the previous page. |
| `order` | query |  | Sort by `updated_at` (then id): `desc` newest first (default) or `asc`. |
| `updated_since` | query |  | Only records changed at or after this ISO 8601 time. |

Response 200:

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `data` | WebhookDelivery[] | yes |  |
| `data[].id` | string |  | Delivery id (header X-Convs-Delivery). |
| `data[].webhook_id` | string |  | Webhook id. |
| `data[].event` | string |  | Event type. |
| `data[].event_id` | string |  | Event id (`evt_…`, the same for every webhook of one event). |
| `data[].status` | string |  | Status. One of: `pending`, `sending`, `retry`, `delivered`, `failed`, `cancelled`. |
| `data[].attempts` | integer |  | Attempts. |
| `data[].response_status` | integer |  | HTTP status of the last attempt. |
| `data[].last_error` | string |  | Last error. |
| `data[].next_attempt_at` | string (date-time) \| null |  | Next attempt. |
| `data[].delivered_at` | string (date-time) \| null |  | Delivered at. |
| `data[].created_at` | string (date-time) |  | Creation time. |
| `data[].updated_at` | string (date-time) |  | Last change. |
| `next_cursor` | string \| null | yes | Pass as `cursor` to get the next page; null on the last page. |
| `has_more` | boolean | yes | True when another page exists. |

```bash
curl "https://app.convs.io/api/v1/webhooks/abc123/deliveries" \
  -H "Authorization: Bearer $API_KEY"
```

## Webhooks

A webhook sends a JSON `POST` to your HTTPS URL when something changes in the organisation. An organisation can have up to 10 webhooks. The signing secret (`whsec_…`) is returned only in the response that creates the webhook.

Delivery is at least once: the same event can arrive more than once, so skip any `id` you have already handled. Payloads carry ids and states only, never names, phones or e-mails; fetch details with `GET`.

### `contact.created`

A person was added (form lead, manual, API, automation).

```json
{
  "contact_id": "abc123",
  "stage": "new",
  "first_source": "Formularz kontaktowy"
}
```

### `contact.stage_changed`

A person moved to another stage.

```json
{
  "contact_id": "abc123",
  "from": "new",
  "to": "qualified",
  "cycle": 1,
  "meta_events_queued": 1,
  "leads_without_send": 0
}
```

### `lead.created`

A Meta Instant Forms lead was stored.

```json
{
  "lead_id": "l123",
  "meta_lead_id": "1234567890",
  "form_id": "src123",
  "contact_id": "abc123",
  "campaign_id": "120200000",
  "adset_id": "",
  "ad_id": "",
  "created_at": "2026-10-08T10:00:00Z"
}
```

### `delivery.failed`

A conversion delivery to Meta failed for good.

```json
{
  "delivery_id": "d123",
  "event_id": "e123",
  "target_id": "t123",
  "dataset_id": "123456789",
  "event_name": "Lead",
  "mode": "live",
  "error": "Połącz konto Meta ponownie lub sprawdź token."
}
```

- Answer with any 2xx code within 15 seconds. Store the event first and do longer work later.
- Any other answer, or none, is retried: up to 8 attempts in total, after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h.
