---
docId: doc_acda4dbe7eb344899eafe0b452387e52
title: Resume the agent
description: Give a conversation back to the agent so it replies to the contact now, following your instruction.
version: v2
versionGroup: conversations-resume
api:
  group: conversaciones
  auth: bearer
  operations:
    - operationId: resumeConversationV2
      method: POST
      path: '/v2/conversations/{conversationId}/resume'
      postmanName: Resume the agent
---

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

# Resume the agent

Give the conversation back to the agent: `operation` becomes `automatic` and the agent **replies to the contact now**, following `instruction` if you send one. To give it back without writing to the contact yet, use [Hand back on the next message](/api-reference/conversations/wait).

## Example

<Ways tabs="api,sdk,asistente">
<Ways.Way name="api">

```bash
curl -X POST "https://api.platic.ai/v2/conversations/$CONVERSATION_ID/resume?fields=id,operation" \
  -H "Authorization: Bearer $PLATIC_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ "instruction": "Apologize for the delay and confirm the refund date." }'
```

</Ways.Way>
<Ways.Way name="sdk">

```ts
const { meta } = await platic.conversations.resume("8Yc2kQ1mZ0rTq4Lp7WvX", {
  instruction: "Apologize for the delay and confirm the refund date.",
});

if (!meta.effects.replying) console.log("It was already with the agent; no reply was requested");
```

The SDK sends an `Idempotency-Key` on every action and reuses it when it retries, so a retry never makes the agent reply twice. It also waits and retries by itself on `409 AGENT_STOPPING`.

</Ways.Way>
<Ways.Way name="asistente">
<Ways.Say>

Give the conversation with Ana back to the agent. Have it apologize for the delay and confirm the refund date.

</Ways.Say>

Your assistant uses [`resume_conversation_v2`](/mcp/tools#resume_conversation_v2).

</Ways.Way>
</Ways>

<Note type="important">

Send an `Idempotency-Key`. Without it, a retry after a lost answer could make the agent reply twice.

</Note>

## What happens

1. If you paused the conversation a moment ago and the agent is still stopping its previous reply, the API waits up to 5 seconds. If it has not stopped by then, the answer is `409 AGENT_STOPPING`: try again in a few seconds.
2. `operation` becomes `automatic` and the conversation's timeline in the inbox shows that the agent was resumed through the API (or through MCP).
3. The agent starts a reply to the contact. With `instruction`, it follows it. Without one, it reviews what happened while it was paused and answers what is pending.

`meta.effects.replying: true` means the agent was asked to reply now. It is not a delivery receipt: the reply arrives as a new message, like any other.

If the conversation was already `automatic`, the answer has `meta.changed: false` and `replying: false`: nothing is written and the agent does not reply. Only a change to `automatic` asks for a reply.

### Before you resume

- **Finished, archived or spam conversations** cannot be resumed. [Reopen](/api-reference/conversations/reopen) a finished or archived conversation first; [unmark spam](/api-reference/conversations/spam) first.
- **Open cases:** [close or decline them](/api-reference/cases/close) first. `details.caseIds` lists them.
- **An active agent:** the conversation's agent must be active. Otherwise the answer is `409 NO_ACTIVE_AGENT`: [change the agent](/api-reference/conversations/agent) first.

### If the reply could not be requested

`503 CONTINUE_FAILED` means the conversation **is already back with the agent** (`automatic`), but its reply could not be started. The agent will answer the contact's next message. Repeating `resume` answers `changed: false` and does not ask for a reply, because the conversation is already `automatic`. To have the agent reply now, [pause](/api-reference/conversations/pause) and resume again.

On connected Gmail or Outlook mailboxes, the call can take longer: it answers once the agent has its reply ready.

## Path parameters

| Parameter | Type | Description | Required |
|-----------|------|-------------|----------|
| `conversationId` | string | The conversation's `id`. See [How IDs work](/api-reference/conversations#how-ids-work) | ✓ |

## Headers

| Header | Description | Required |
|--------|-------------|----------|
| `Idempotency-Key` | Makes the call safe to retry: a repeat returns the first outcome and the agent does not reply again. 1 to 255 visible ASCII characters; a UUID works. See [Retries](#retries) | — |

This action does not take `If-Resource-Version`: sending it returns `400 INVALID_REQUEST`.

## Query parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `fields` | string | Fields of the conversation to return, comma-separated. Replaces the defaults; `id` is always returned. The fields are the same as in [Get a conversation](/api-reference/conversations/get#query-parameters) |
| `include` | string | Relations to resolve in `included`: `agents`, `channels`, `assignees` |
| `workspace` | string | The workspace, for an API key that covers several. Other credentials always act on their own workspace |

## Request body

The body is optional.

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `instruction` | string | — | What the agent should do in the reply it writes now, 1 to 4,000 characters. The contact does not see it. Without it, the agent picks up where the conversation left off |

```json
{
  "instruction": "Apologize for the delay and confirm the refund date."
}
```

Any other field returns `400 INVALID_REQUEST`.

## Response

The answer is the conversation after the change, read with `fields` and `include` as in [Get a conversation](/api-reference/conversations/get), and a `meta` that says what the action did. This example used `?fields=id,operation`.

```json
{
  "status": "success",
  "data": {
    "id": "8Yc2kQ1mZ0rTq4Lp7WvX",
    "operation": "automatic"
  },
  "meta": {
    "fields": ["id", "operation"],
    "include": [],
    "requestId": "req_7f3c",
    "resourceVersion": "MTc2NDYxMjAwMC4xMjM0NTY3ODk",
    "action": "resume",
    "changed": true,
    "effects": {
      "replying": true
    },
    "replayed": false
  }
}
```

| Field | Description |
|-------|-------------|
| `data` | The conversation as it is now, with the selected fields |
| `included` | Related records, only when you sent `include` |
| `meta.action` | Always `resume` |
| `meta.changed` | `false` when the conversation was already `automatic`: nothing was written and no reply was requested |
| `meta.effects.replying` | `true` when the agent was asked to reply now |
| `meta.resourceVersion` | The conversation's version after the change |
| `meta.replayed` | `true` when this is the stored outcome of an earlier call with the same `Idempotency-Key`. Nothing ran again and the agent did not reply again; `data` and `resourceVersion` show the conversation as it is now |
| `meta.fields` · `meta.include` | Fields and relations applied |
| `meta.requestId` | ID of the request, for support |
| `meta.warnings` | Only when there is something to report. `CONVERSATION_NOT_READABLE`: the action was applied, but your credential can no longer read the conversation, so `data` has only `id` |

## Retries

Send an `Idempotency-Key` so a retry after a lost answer is safe. A key belongs to one credential, one action and one conversation.

- **Same key, same body:** you get the first outcome with `meta.replayed: true`. Nothing runs again and the agent does not reply again. `fields` and `include` may change: they only choose what the answer shows.
- **Same key, different body** (for example, another `instruction`): `409 IDEMPOTENCY_KEY_REUSED`.
- **First call still running:** `409 IDEMPOTENCY_IN_PROGRESS`. Retry in a few seconds with the same key.
- **Lifetime:** keys are kept for one day. A call that fails does not keep its key, so retrying it runs the action again.

Your access is checked again on every retry. More in [Idempotency](/api-reference/idempotency).

## Errors

<Collapsible summary="Show error codes and fixes">

| Status | `details.code` | When it happens |
|--------|----------------|-----------------|
| `400` | `INVALID_REQUEST` | The body, a query parameter or a header is not valid: `instruction` empty or longer than 4,000 characters, another field, or `If-Resource-Version`. `details.issues` says which |
| `400` | `INVALID_REQUEST` | The workspace in `?workspace=` is not covered by the credential. `details.available` lists the ones it covers |
| `400` | `INVALID_FIELD` | A name in `fields` does not exist. `details.allowed` lists the accepted ones |
| `400` | `INVALID_INCLUDE` | A name in `include` does not exist. `details.allowed` lists the accepted ones |
| `401` | `UNAUTHENTICATED` | The credential is missing or invalid |
| `403` | `FORBIDDEN` | The credential cannot change conversations, or your role can read this conversation but not change it |
| `403` | `INSUFFICIENT_SCOPE` | An OAuth token without the `platica:write` scope. `details.requiredScope` says which one is missing |
| `404` | `CONVERSATION_NOT_FOUND` | No conversation has that `id` in the workspace, or it is out of your credential's reach |
| `409` | `STATUS_TRANSITION_NOT_ALLOWED` | The conversation is finished. [Reopen it](/api-reference/conversations/reopen) first |
| `409` | `CONVERSATION_ARCHIVED` | The conversation is archived. [Reopen it](/api-reference/conversations/reopen) first |
| `409` | `CONVERSATION_SPAM` | The conversation is marked as spam. [Unmark it](/api-reference/conversations/spam) first |
| `409` | `CASE_OPEN` | The conversation has open cases. `details.caseIds` lists them. [Close or decline them](/api-reference/cases/close) first |
| `409` | `NO_ACTIVE_AGENT` | The conversation has no active agent to hand it back to. [Change the agent](/api-reference/conversations/agent) first |
| `409` | `AGENT_STOPPING` | The agent is still stopping a previous reply. Try again in a few seconds |
| `409` | `ASSISTANT_CONTINUATION_INVALID` | The agent cannot continue from the conversation's last message. Read the conversation and try again |
| `409` | `IDEMPOTENCY_KEY_REUSED` | The `Idempotency-Key` was already used with a different body |
| `409` | `IDEMPOTENCY_IN_PROGRESS` | The first call with this `Idempotency-Key` is still running. Retry shortly with the same key |
| `503` | `CONTINUE_FAILED` | The conversation went back to the agent, but its reply could not be started. It stays `automatic` and the agent answers the contact's next message. See [If the reply could not be requested](#if-the-reply-could-not-be-requested) |
| `503` | `ACTION_FAILED` | The outcome could not be confirmed (`details.retryable: true`). Repeat with the same `Idempotency-Key`: an action that already ran is not run again |

The general error format is in [Errors](/api-reference/errors).

</Collapsible>

## Notes

A resume that changes the conversation sends [`conversation.operation.updated`](/api-reference/webhooks/payloads#conversations) with `source: "api.conversation.resumed"`, or `"mcp.conversation.resumed"` when your assistant did it. The agent's reply arrives later as `message.created`.
