Create an agent run
Authentication
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
Business to use as context for the run. Shorthand for context_type=business. Required when thread_id is not provided (unless context_type and context_id are given).
The type of context resource (e.g., “business”)
The ID of the context resource. Must be provided with context_type.
Response
Middesk business the run is scoped to. Null when the run was started with an inline business payload whose business did not exist yet.
Agent type that produced this run (for example, cip_orchestrator).
Principal that initiated the run. Populated with the authenticated user’s identity when a session caller initiates the run, and with the account when an API key caller initiates the run. null for system-initiated runs.
Artifact envelope produced by the agent. Non-null only when status is completed; null for running, interrupted, and error runs.
Pending interrupt requests awaiting input. Empty when the run is not interrupted. To resume a run, POST the interrupt’s id along with the caller-supplied input to POST /v1/runs/{id}/resume.
Top-level execution steps for this run. Opt-in: pass ?include=steps on GET /v1/runs/{id} (or POST /v1/runs/{id}/resume) to populate this field. Omitted by default to avoid the cost of fetching step state from the underlying execution backend.