Skip to main content
Adds a scenario. An instructions scenario starts empty: add its routes with POST .../routes, or start from a template with POST .../scenarios/from-template instead.

Endpoint

Required scope

agents:write

Path parameters

Body

Example request

curl

Response

201 Created

400 Bad Request

Missing name, an unknown kind or status, a field over its limit, or an unknown property.

422 Unprocessable Entity

knowledge_folder_required (an information scenario without folder), knowledge_folder_not_found, or too_many_scenarios (50 per agent).

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.

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

  • Write when_to_open from the customer’s side. It is all the agent sees of the scenario before opening it.
  • The agent picks it up on its next turn.