Runs an agent schedule.

POSThttps://api.awork.com/api/v1/agents/{agentId}/schedules/{scheduleId}/run
POST https://api.awork.com/api/v1/agents/{agentId}/schedules/{scheduleId}/run

Immediately starts a new agent session for the selected schedule.

Authentication

AuthorizationBearer

Send your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.

Path parameters

agentIdstringRequired
format: uuid

The agent id.

scheduleIdstringRequired
format: uuid

The schedule id.

Responses

200 OK

application/json

idstringOptional
format: uuid

The thread id.

threadRunIdstring or nullOptional
format: uuid

The current run id.

acceptedMessageIdstring or nullOptional
format: uuid

The accepted first-message id, or null when the thread was created without a message.

typestring or nullOptional

The thread type.

titlestring or nullOptional

The thread title.

statusstringOptional

Allowed: "ready" "accepted" "queued" "failed"

The creation result: ready without a first message, accepted with a first message, queued when the first message waits for a run, or failed to start.

createdOnstring or nullOptional
format: date-time

The creation timestamp.

createdBystringOptional
format: uuid

The id of the user who created the thread.

updatedOnstring or nullOptional
format: date-time

The last update timestamp.

updatedBystringOptional
format: uuid

The id of the user who last updated the thread.

agentIdstring or nullOptional
format: uuid

The custom agent assigned to the thread.

projectIdstring or nullOptional
format: uuid

The associated project id.

taskIdstring or nullOptional
format: uuid

The associated task id.

clientIdstring or nullOptional
format: uuid

The associated client id.

documentIdstring or nullOptional
format: uuid

The associated document id.

400 Bad Request

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

401 Unauthorized

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

404 Not Found

application/json

codestringRequired
minLength: 1

The error code.

descriptionstringRequired
minLength: 1

The description of the error.

linkstringRequired
minLength: 1

The link to the API documentation page.

detailsarray of string or nullOptional

A list of details describing the error.

validationErrorsarray of object or nullOptional

If a validation error occurred, this contains the validation errors for each property.

Show 2 properties
propertystring or nullOptional

The name of the property that failed validation.

messagestring or nullOptional

The reason why this property failed validation.

traceIdstring or nullOptional

The request trace id for tracking the request.

Search documentation