Publish a version
SDK platic.agents.publish()
Apply the draft to your customer conversations. Send the request without a body to publish it, or use versionId to choose another version. The agent uses it from the next incoming message.
Example
curl -X POST https://api.platic.ai/v1/agents/$AGENT_ID/publication \
-H "Authorization: Bearer $PLATIC_API_KEY" await platic.agents.publish("agent_123"); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent id | ✓ |
Request body
The body is optional. Without a body, it publishes the draft's version. To publish an exact version or leave a note:
| Field | Type | Description | Required |
|---|---|---|---|
versionId | string | Version to publish, for example v5. Defaults to the draft's | - |
note | string | Publication note, up to 500 characters | - |
{
"versionId": "v5",
"note": "Shorter answers"
} Response
The new publication, with the fields from Get the publication.
{
"status": "success",
"data": {
"agentId": "Xq8mTe2LwP4kZ1aB9cDf",
"publication": { "versionId": "v5", "number": 5 },
"last": {
"publicationId": "p3",
"action": "publish",
"versionId": "v5",
"previousVersionId": "v3",
"createdAt": "2026-10-28T12:30:00.000Z",
"createdBy": { "kind": "api_key", "keyId": "k3yId" },
"source": "api",
"via": null,
"note": "Shorter answers"
}
}
} Errors
| Status | details.code | When |
|---|---|---|
403 | FORBIDDEN | The credential can't edit this agent. Publishing needs the same permission as editing |
404 | AGENT_NOT_FOUND | The agent doesn't exist in the workspace or was deleted |
404 | VERSION_NOT_FOUND | versionId doesn't exist on that agent |
409 | COPY_INCOMPLETE | The agent is a copy whose files didn't finish connecting. See Copy an agent |
409 | CONFLICT | Someone else changed this at the same time. Try again |
422 | INVALID_SUBAGENT_LINK | A link in that version points to an agent that no longer exists, or the links would form a cycle. It isn't published |
422 | INVALID_ESCALATION | An escalation that version connects or turns on, compared to the published one, doesn't exist in the workspace or is archived. details.escalations lists each one with escalationId and reason: not_found or archived. It isn't published |
503 | SUPPORT_SERVICE_UNAVAILABLE | That version's escalations couldn't be checked. It isn't published; try again |
Notes
- Publishing doesn't move the draft: you can keep editing.
- If the draft is already the published version, the same version is published again and there is one more entry in the publication history.
- If you publish from an AI assistant connected to the Platica MCP, do it only when the person asks explicitly. Each publication is recorded with who made it and from where.
- To evaluate the version with scenarios before publishing it, see Agent evals. To review what changes, compare the versions.
- If the published version doesn't work as you expected, go back to the previous one with Roll back.