---
docId: doc_fe7b20db40d94305a1dd4ca400dbdd7d
title: Responses
description: "Read response data and decide what to do based on its HTTP status."
---

<script>
  import { Collapsible } from '$lib/components';
</script>

# Responses

Read the HTTP status to check whether the request succeeded. Each endpoint reference shows the JSON you will receive; many operations return their result in `data`:

<span id="success-envelope"></span>

```json
{
  "status": "success",
  "data": {
    "id": "Xq8mTe2LwP4kZ1aB9cDf",
    "name": "Sales"
  }
}
```

## Where to find the data

In a list with `data`, that field contains the page’s items. If more results exist, use `nextPageToken` to fetch the next page. See [Pagination](/api-reference/pagination).

<span id="conversations-v2"></span>

### Conversations V2

`/v2/conversations` answers with the same envelope plus a few blocks:

```json
{
  "status": "success",
  "data": { "id": "conv_123", "status": "active", "operation": "supervised", "agentId": "agent_1" },
  "included": { "agents": [{ "id": "agent_1", "name": "Sales" }] },
  "meta": {
    "fields": ["id", "status", "operation", "agentId"],
    "include": ["agents"],
    "requestId": "req_123",
    "resourceVersion": "MTczMjk5MDQwMDAwMA"
  }
}
```

| Block | What it has |
|-------|-------------|
| `data` | The conversation, or the page of conversations or messages. Only the fields chosen with `fields` (or the defaults); `id` is always there |
| `included` | Related records asked for with `include` (`agents`, `channels`, `assignees`, `members`), each once per response. Left out when you don't ask |
| `meta` | The fields and relations applied, the `requestId` and, when they apply, `warnings`, `resourceVersion` (a single conversation) or `search` (how a search ran) |
| `nextPageToken` and `pagination` | Lists only. `nextPageToken` is `null` on the last page. See [Pagination](/api-reference/pagination#conversations-v2) |

<span id="action-results"></span>

Every action ([pause](/api-reference/conversations/pause), [resume](/api-reference/conversations/resume), [tags](/api-reference/conversations/tags)…) answers the conversation as it is afterwards, and `meta` says what the action did:

```json
{
  "status": "success",
  "data": { "id": "conv_123", "status": "active", "operation": "supervised" },
  "meta": {
    "fields": ["id", "status", "operation"],
    "include": [],
    "requestId": "req_456",
    "resourceVersion": "MTczMjk5MDQ2MDAwMA",
    "action": "pause",
    "changed": true,
    "effects": { "interrupted": true },
    "replayed": false
  }
}
```

| Field | What it says |
|-------|--------------|
| `meta.action` | The action that ran |
| `meta.changed` | `false` when the result already held: nothing was written and no one was notified |
| `meta.effects` | What else happened. Each action lists its keys, such as `interrupted`, `added`, `removed`, `notified` or `memoryCycleClosed` |
| `meta.resourceVersion` | The conversation's version afterwards, for the next `If-Resource-Version`. See [Idempotency](/api-reference/idempotency#versions) |
| `meta.replayed` | `true` when this is the stored outcome of an earlier request with the same `Idempotency-Key` |

A [bulk action](/api-reference/conversations/bulk) answers `data.results`, one item per conversation with `ok`, and `changed` and `effects` or an `error`.

<span id="older-bodies"></span>

Some lists and reads of `/v1/clients`, `/v1/conversations` (V1) and `/v1/messages` return `workspaces: [...]`: read the data inside each item in `workspaces`. Getting a contact, sending an email and getting, rescheduling or cancelling a scheduled message return `status` and `data`.

Extra fields may appear beside `data`: for example, `limits` and `usage` for custom functions, or `warnings` when part of the data could not be read. Use the endpoint’s example to read its complete response.

A `204` means the operation completed and there is no body to read; for example, when disconnecting a file from an agent. Errors use `details.code` to identify the cause. See [Errors](/api-reference/errors).

## Status codes

| Status | Meaning |
|--------|---------|
| `200` | Successful request; the response contains the operation’s data |
| `201` | Created, with the new resource |
| `204` | Operation completed, no response body |
| `400` | Invalid request; `?workspace=` may also be missing from an operation that requires it |
| `401` | Missing, invalid, expired or revoked credential |
| `403` | The credential or the person doesn't have permission |
| `404` | The resource doesn't exist or belongs to another workspace |
| `409` | Conflict with the current state. Check `details.code` |
| `422` | Invalid content |
| `429` | Too many requests |
| `5xx` | A failure on Platica's side or in a service it depends on |

Every code, with what to do about it, is in [Errors](/api-reference/errors#by-status).

## Dates and identifiers

- Dates use ISO 8601 in UTC: `2026-11-11T18:30:00.000Z`.
- Identifiers are strings. Treat them as complete values without assuming their format or length.

<span id="what-is-published-and-what-applies-immediately"></span>

<Collapsible summary="When agent changes take effect">

Timing depends on the change:

| Change | When it applies |
|--------|-----------------|
| The agent's configuration: instructions, assistance, schedule, subagents… | You edit the [draft](/api-reference/agents/drafts/update) and nothing changes for your contacts until you [publish](/api-reference/agents/publications/publish) |
| Connecting, pausing or disconnecting a [file](/api-reference/agents/files/connect) or a [tool](/api-reference/agents/tools/connect) | Immediately, without publishing |
| Connecting, turning off or disconnecting an [escalation](/api-reference/agents/escalations/connect) | Immediately: it creates a version of the agent and publishes it |
| Activating or deactivating the agent and changing its owners | Immediately, without publishing |

If two people change the same thing at once, the last change wins; on agents, the previous one stays in the [version history](/api-reference/agents/versions/list). When two changes collide right as they are saved, the answer is `409` with `details.code: "CONFLICT"`: try again.

</Collapsible>

<span id="credential-and-workspace"></span>

<Collapsible summary="Credential and workspace selection">

The API base URL is:

```bash
https://api.platic.ai/v1
```

Conversations are at `https://api.platic.ai/v2/conversations`.

Every request carries your credential in the `Authorization` header:

```bash
Authorization: Bearer pl_key_xxxxxxxxxxxxx
```

For a single-workspace credential, the API selects the workspace automatically. For a credential covering several, add `?workspace=<id>` to operations that need one specific workspace. Find the ids with [List workspaces](/api-reference/workspaces).

On those operations, omitting `?workspace=` returns `400 INVALID_REQUEST`, with available ids in `details.available`. Some calls can search across workspaces: contact, V1 conversation and message lists, `GET /v1/conversations/{id}`, a contact’s conversations, `POST /v1/messages` and `POST /v1/messages/email`. `POST /v1/messages/template` can also omit it if the channel identifies one workspace; you must clarify an ambiguous match. Sending `?workspace=` restricts these calls to that workspace. Getting a contact (`GET /v1/clients/{id}`) does require choosing one. Every `/v2/conversations` call works in one workspace: an API key that covers several sends `?workspace=`. An unauthorized workspace returns `400`; each endpoint details its rules under **Errors**.

With an OAuth token, asking with `?workspace=` for one where the person doesn't have the module for that section (Conversations, Campaigns…) answers `403`. On contacts, conversations and messages, a read without `?workspace=` only includes the workspaces where they have it.

See [Authentication](/authentication). In the API, contacts live under `/v1/clients`.

</Collapsible>
