Diska
Agents

Publish an agent

Publishes the agent's draft as a new version and leaves the agent active.
POST https://api.diska.ai/v1/agents/{agent_id}/publish

Scope: agents:write

For flow agents it also publishes the main flow and the subflows it uses. If nothing changed since the last publish, no new version is created. The body is optional.

Parameters

Path

NameTypeRequiredDescription
agent_idstringYesThe agent's ID.

Request body

application/json — The body is optional.

FieldTypeRequiredDescription
labelstring | nullNoVersion name. Default: Versão N. Up to 120 characters.
{
  "label": "Horário de Dezembro"
}

Examples

curl -X POST "https://api.diska.ai/v1/agents/<agent_id>/publish" \
  -H "Authorization: Bearer $DISKA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"label":"Horário de Dezembro"}'

Try it

Send the request from this page, with your key. The key stays on this page: it is not stored and is only sent to api.diska.ai. Use a test key with the fewest scopes you need.

POSThttps://api.diska.ai/v1/agents/{agent_id}/publish
Starts with dsk_. It stays in this browser tab only.
path
Enter an API key (dsk_…).

Response 200

FieldTypeDescription
idstringAgent ID.
namestringAgent name.
slugstringReadable agent identifier.
descriptionstring | nullDescription, or null.
statusstringdraft, active, inactive or archived. A published agent is active.
agent_typestringinbound, outbound, voice_widget or chat.
editing_modestringprompt or flow (Flow Builder). It does not change after creation. Default: prompt.
versionintegerAgent version number. Default: 1.
phone_numberstring | nullNumber assigned to the agent, or null.
public_channel_enabledbooleantrue when the agent's public link is on. Default: false.
created_atstringCreation date (ISO 8601).
updated_atstringLast change date (ISO 8601).
{
  "id": "3f1c2a7e-5b9d-4c1e-8f3a-2d6b7e9c1a40",
  "name": "Recepção",
  "slug": "recepcao",
  "description": "Atende as chamadas da recepção.",
  "status": "active",
  "agent_type": "inbound",
  "editing_mode": "prompt",
  "version": 3,
  "phone_number": "+244900000000",
  "public_channel_enabled": false,
  "created_at": "2026-10-25T18:40:00Z",
  "updated_at": "2026-10-25T18:40:00Z"
}

Errors

CodeWhen
404Agente não encontrado. — the agent does not exist in this organization.
409O agente está arquivado. Restaure-o antes de publicar. (archived: restore it first).
422The agent cannot be published — for example O agente precisa de instruções (prompt) antes de ser publicado. (needs a prompt) or a flow validation error.

Errors common to every endpoint (401, 403, 422, 429 and 5xx) are in Errors.

Copyright © 2026