Create run

createRun(command: RunsCreateRunCommand!, idempotencyKey: String): RunsCreatedRun!

Arguments

ArgumentTypeRequiredDescription
commandRunsCreateRunCommand!YesProject-owned runs need project.runs.write; conversation-owned runs need editor access on the conversation.
idempotencyKeyStringNoRetry key for this mutation (1-128 characters); overrides Idempotency-Key.

Input fields

command

RunsCreateRunCommand

FieldTypeRequiredDescription
inputRunsCreateRunCommandInput!YesCreates a run for a project and target, or executes a saved schedule or webhook. Input is business data; configuration and execution settings are separate.

Response

Returns RunsCreatedRun!. Open the type for its fields and nested types.

FieldTypeDescription
idIDUnique run UUID.
runIdID!Depending on the selected variant: Public run ID that run events (metadata.run_id) and runtime tools name. Equals id for runs the server names; older runs keep their run_ ID. UUID of the admitted run (a full run calls it id). A receipt carries no public run ID.
statusString!Current execution state.
projectIdIDProject containing the run.
targetRunsCreatedRunTargetResolved execution definition.
inputJSONBusiness input supplied when the run was created.
outputJSONFinal business output; null until successful finalization.
errorRunsRunErrorFailure details, present only when the run failed.

All fields of RunsCreatedRun.

Types marked with ! cannot be null. Lists use [Type] notation. The type index lists all published input and response types.

Example

graphql
mutation CreateRun($command: RunsCreateRunCommand!, $idempotencyKey: String) {
  createRun(command: $command, idempotencyKey: $idempotencyKey) {
    id
    projectId
    runId
    status
    createdAt
  }
}
json
{
  "command": {
    "input": {
      "projectId": "00000000-0000-4000-8000-000000000001",
      "target": {
        "type": "task",
        "id": "health-check"
      }
    }
  }
}