Resume the agent

SDK platic.conversations.resume()

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.

Example

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.

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 a finished or archived conversation first; unmark spam first.
  • Open cases: close or decline them 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 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 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

ParameterTypeDescriptionRequired
conversationIdstringThe conversation's id. See How IDs work✓

Headers

HeaderDescriptionRequired
Idempotency-KeyMakes 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—

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

Query parameters

ParameterTypeDescription
fieldsstringFields of the conversation to return, comma-separated. Replaces the defaults; id is always returned. The fields are the same as in Get a conversation
includestringRelations to resolve in included: agents, channels, assignees
workspacestringThe workspace, for an API key that covers several. Other credentials always act on their own workspace

Request body

The body is optional.

FieldTypeRequiredDescription
instructionstring—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
{
  "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, and a meta that says what the action did. This example used ?fields=id,operation.

{
  "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
  }
}
FieldDescription
dataThe conversation as it is now, with the selected fields
includedRelated records, only when you sent include
meta.actionAlways resume
meta.changedfalse when the conversation was already automatic: nothing was written and no reply was requested
meta.effects.replyingtrue when the agent was asked to reply now
meta.resourceVersionThe conversation's version after the change
meta.replayedtrue 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.includeFields and relations applied
meta.requestIdID of the request, for support
meta.warningsOnly 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.

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTThe 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
400INVALID_REQUESTThe workspace in ?workspace= is not covered by the credential. details.available lists the ones it covers
400INVALID_FIELDA name in fields does not exist. details.allowed lists the accepted ones
400INVALID_INCLUDEA name in include does not exist. details.allowed lists the accepted ones
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENThe credential cannot change conversations, or your role can read this conversation but not change it
403INSUFFICIENT_SCOPEAn OAuth token without the platica:write scope. details.requiredScope says which one is missing
404CONVERSATION_NOT_FOUNDNo conversation has that id in the workspace, or it is out of your credential's reach
409STATUS_TRANSITION_NOT_ALLOWEDThe conversation is finished. Reopen it first
409CONVERSATION_ARCHIVEDThe conversation is archived. Reopen it first
409CONVERSATION_SPAMThe conversation is marked as spam. Unmark it first
409CASE_OPENThe conversation has open cases. details.caseIds lists them. Close or decline them first
409NO_ACTIVE_AGENTThe conversation has no active agent to hand it back to. Change the agent first
409AGENT_STOPPINGThe agent is still stopping a previous reply. Try again in a few seconds
409ASSISTANT_CONTINUATION_INVALIDThe agent cannot continue from the conversation's last message. Read the conversation and try again
409IDEMPOTENCY_KEY_REUSEDThe Idempotency-Key was already used with a different body
409IDEMPOTENCY_IN_PROGRESSThe first call with this Idempotency-Key is still running. Retry shortly with the same key
503CONTINUE_FAILEDThe 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
503ACTION_FAILEDThe 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.

Notes

A resume that changes the conversation sends conversation.operation.updated with source: "api.conversation.resumed", or "mcp.conversation.resumed" when your assistant did it. The agent's reply arrives later as message.created.