Creates a schedule for an agent after validating its cadence, timezone, and optional project or task context.
Authentication
AuthorizationBearerSend your token in the Authorization: Bearer <token> header. See Authentication for API keys and OAuth.
Path parameters
agentIdstringRequiredThe Custom Agent ID.
Request body Required
The schedule payload.
application/json
namestringRequired1 maxLength: 255 The schedule display name.
promptstring or nullOptional25000 Optional custom instructions for the initial message. Omitted, null, or blank input clears custom instructions.
cronRulestringRequired1 maxLength: 100 The cron rule used for recurring execution.
recurrenceIntervalinteger or nullOptional1 maximum: 99 The number of matching cron occurrences between scheduled runs.
timezonestring or nullOptional100 The timezone for the cron rule.
projectIdstring or nullOptionalThe optional project context id.
taskIdstring or nullOptionalThe optional task context id.
isEnabledboolean or nullOptionalWhether the schedule is enabled.
Responses
200 OK
application/json
namestring or nullOptionalThe schedule display name.
idstringOptionalThe schedule id.
createdOnstringOptionalWhen the schedule was created.
agentIdstring or nullOptionalThe agent id that is executed by this schedule.
typestring or nullOptionalRuntime target type: personal-agent or custom-agent.
ownerUserIdstringOptionalThe user id whose context is used to execute the scheduled run.
promptstring or nullOptionalOptional custom instructions. An omitted or null prompt means no custom instructions.
cronRulestring or nullOptionalThe normalized cron rule used for recurring execution.
recurrenceIntervalintegerOptionalThe number of matching cron occurrences between scheduled runs.
timezonestring or nullOptionalThe timezone used to evaluate the cron rule.
projectIdstring or nullOptionalThe optional project context id.
taskIdstring or nullOptionalThe optional task context id.
isTaskContextDeletedbooleanOptionalWhether the required task context was deleted.
isEnabledbooleanOptionalWhether this schedule is active.
needsAttentionbooleanOptionalWhether the schedule needs user attention.
lastFailureReasonstring or nullOptionalThe latest rejection reason.
consecutiveFailureCountintegerOptionalThe number of consecutive failed scheduled executions.
lastAttemptOnstring or nullOptionalThe latest occurrence time.
lastSuccessfulRunOnstring or nullOptionalThe latest accepted occurrence time.
400 Bad Request
application/json
codestringRequired1 The error code.
descriptionstringRequired1 The description of the error.
linkstringRequired1 The link to the API documentation page.
detailsarray of string or nullOptionalA list of details describing the error.
validationErrorsarray of object or nullOptionalIf a validation error occurred, this contains the validation errors for each property.
Show 2 properties
propertystring or nullOptionalThe name of the property that failed validation.
messagestring or nullOptionalThe reason why this property failed validation.
traceIdstring or nullOptionalThe request trace id for tracking the request.
401 Unauthorized
application/json
codestringRequired1 The error code.
descriptionstringRequired1 The description of the error.
linkstringRequired1 The link to the API documentation page.
detailsarray of string or nullOptionalA list of details describing the error.
validationErrorsarray of object or nullOptionalIf a validation error occurred, this contains the validation errors for each property.
Show 2 properties
propertystring or nullOptionalThe name of the property that failed validation.
messagestring or nullOptionalThe reason why this property failed validation.
traceIdstring or nullOptionalThe request trace id for tracking the request.
404 Not Found
application/json
codestringRequired1 The error code.
descriptionstringRequired1 The description of the error.
linkstringRequired1 The link to the API documentation page.
detailsarray of string or nullOptionalA list of details describing the error.
validationErrorsarray of object or nullOptionalIf a validation error occurred, this contains the validation errors for each property.
Show 2 properties
propertystring or nullOptionalThe name of the property that failed validation.
messagestring or nullOptionalThe reason why this property failed validation.
traceIdstring or nullOptionalThe request trace id for tracking the request.