Update pending items
Manage the pending list with action: skip or restore an optional item, finish the list or dismiss it. To resolve an item, change the agent’s configuration; Platica marks it as done when it detects the change. This route manages the list and does not modify or publish the agent.
Example
curl https://api.platic.ai/v1/agents/$AGENT_ID/template-setup \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "action": "complete" }' await platic.agents.templateSetup.update("agent_123", { action: "complete" }); Path parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
agentId | string | Agent id | ✓ |
Request body
| Field | Type | Description | Required |
|---|---|---|---|
action | string | skip, unskip, complete or dismiss | ✓ |
slotId | string | The pending item's id. Only with skip and unskip, and there it is mandatory | — |
action | What it does |
|---|---|
skip | Skips an optional pending item: it becomes skipped and counts in done |
unskip | Brings a skipped pending item back to pending |
complete | Finishes the template. Only when ready is true: all the required items are done |
dismiss | Dismisses the list. The agent keeps everything it has, without the pending items |
{
"action": "skip",
"slotId": "conocimiento"
} complete and dismiss close the list: afterwards, pending items can no longer be skipped or brought back. Repeating complete on a finished list, or dismiss on a dismissed one, answers the list as it is.
Response
200 OK, with the list after the change, in the shape of Get pending items. The example is complete:
{
"status": "success",
"message": "Template finished",
"data": {
"agentId": "Ag6bV8nM1qW3eR5t",
"setup": {
"template": { "slug": "vendedor-de-tienda", "name": "Vendedor de la tienda", "version": 3 },
"status": "completed",
"ready": true,
"done": 4,
"total": 4,
"slots": [
{ "id": "negocio", "kind": "variable", "label": "Datos del negocio", "detail": "Horario", "required": true, "state": "done", "variables": [{ "key": "horario", "label": "Horario", "placeholder": "{{horario}}" }], "openUrl": null },
{ "id": "tool-shopify", "kind": "tool", "label": "Shopify", "detail": "Conéctala y actívala para este agente", "required": false, "state": "done", "provider": { "type": "mcp", "id": "shopify" }, "openUrl": null },
{ "id": "canal", "kind": "channel", "label": "Canal", "detail": "WhatsApp", "required": true, "state": "done", "channels": [{ "id": "whatsapp", "name": "WhatsApp" }], "openUrl": "https://app.platica.mx/workspace/K7u9rQ2LmZx18BvC5tNd/integrations" },
{ "id": "conocimiento", "kind": "knowledge", "label": "Catálogo", "detail": "Tu catálogo de productos con precios", "required": false, "state": "skipped", "hint": "Tu catálogo de productos con precios", "openUrl": null }
]
}
},
"nextStep": "The template is finished. Publish the agent when it is ready with POST /v1/agents/Ag6bV8nM1qW3eR5t/publication."
} message is Item skipped, Item pending again, Template finished or Template dismissed, depending on the action.
Errors
| Status | details.code | When |
|---|---|---|
400 | INVALID_REQUEST | action isn't valid, slotId is missing with skip or unskip, the body includes another field or agentId isn't a valid id. details.issues says which |
400 | AGENT_TEMPLATE_SLOT_REQUIRED | You tried to skip a required pending item |
403 | FORBIDDEN | Your token only sees your assigned agents and this one isn't yours |
404 | AGENT_NOT_FOUND | The agent doesn't exist in this workspace |
404 | AGENT_TEMPLATE_SETUP_NOT_FOUND | The agent doesn't come from a template |
404 | AGENT_TEMPLATE_SLOT_NOT_FOUND | There is no pending item with that slotId |
409 | AGENT_TEMPLATE_SETUP_INCOMPLETE | complete with required pending items not done. See which ones with Get pending items |
409 | AGENT_TEMPLATE_SETUP_CLOSED | The list is already finished or dismissed. details.status says which |
The errors that come up on any operation are in the introduction.
Notes
- A pending item isn't marked done with this route: it becomes
doneonly when Platica sees it in the agent. See the pending items. - Finishing the template doesn't publish the agent: publish it with Publish a version.
- From an AI agent, the tool is
update_agent_template_setup.