Skip to main content
Creates a scenario from a template with all its routes — or nothing, if one route fails.

Endpoint

Required scope

agents:write

Path parameters

Body

Example request

curl

Response

201 Created

400 Bad Request

Missing template_key or an unknown property.

404 Not Found

AGENT_NOT_FOUND when the agent belongs to another project of the company, UPSTREAM_ERROR (message AGENT_NOT_FOUND) when no agent has that id in the company; template_not_found when no template has that key.

422 Unprocessable Entity

knowledge_folder_required when the template is of kind information and no knowledge_node_id was sent; knowledge_folder_not_found when that folder does not exist or is not active; too_many_scenarios (50 per agent).

401 Unauthorized

Missing, invalid, revoked, or expired token.

403 Forbidden

The token does not have the agents:write scope.

502 Bad Gateway

The agent service is unreachable.

Operational notes

  • missing_functions are functions its routes use that your company does not have yet. The routes keep them and the agent gets them as soon as they exist — so this is a to-do list, not an error.
  • An information template needs its folder. Send knowledge_node_id with the knowledge base folder it answers from; the kind of each template comes in GET /v1/scenario-templates.
  • A template is a starting point. Adjust its routes to the business with PATCH .../routes/{routeId}.