Automation
Scheduled Runs
Set up one-time or recurring tasks and inspect occurrences.
On this page
Choose a target
Create an Environment and Session with your own native model connection first. A Platform schedule selects that Session and a model ID served by your provider or gateway, then submits an ordinary Run when due. Provider availability, runtime credit, Project budgets, serial execution and checkpoints apply to scheduled work too.
Create a recurring schedule
Create an Environment schedule
/v1/environments/{environmentId}/schedulesSchedules submit ordinary Platform Runs into an existing Session using the selected model. Runs retain normal credit, budget, queue, recovery and checkpoint behavior. Missed cron intervals coalesce to the latest occurrence; an overlapping occurrence is skipped. Admission failures are recorded without retrying side effects.
Authentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
path: environmentId | string | Yes | Environment identifier. It must belong to the caller’s account or Project. |
Request example
curl -X POST \
"https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/schedules" \
-H "Authorization: Bearer $SANDPI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily review",
"prompt": "Review recent changes and summarize findings.",
"timing": {
"kind": "cron",
"expression": "0 9 * * *",
"timeZone": "Asia/Shanghai"
},
"target": {
"kind": "platform",
"sessionId": "YOUR_SESSION_ID",
"model": "YOUR_SUPPORTED_MODEL_ID"
},
"enabled": true
}'Request body · required application/json
Saved timed task, target, due-time policy and enabled state.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
name | string · min length 1; max length 80 | Yes | Human-readable name for this resource. |
prompt | string · min length 1; max length 100000 | Yes | Saved instructions used for each scheduled Run. |
timing | one of the variants below | Yes | One future Unix timestamp or a recurring five-field cron expression with an IANA time zone. |
timing | object · extra fields rejected | Yeskind = "once" | — |
timing.kind | string · values: "once" | Yeskind = "once" | Selects the resource or operation variant described by the allowed values. |
timing.runAt | number · > 0 | Yeskind = "once" | Unix timestamp in seconds. |
timing | object · extra fields rejected | Yeskind = "cron" | — |
timing.kind | string · values: "cron" | Yeskind = "cron" | Selects the resource or operation variant described by the allowed values. |
timing.expression | string · min length 1; max length 200 | Yeskind = "cron" | Five-field cron expression; evaluated in the configured time zone. |
timing.timeZone | string · min length 1; max length 100 | Yeskind = "cron" | IANA time zone, such as Asia/Shanghai or UTC. |
target | object · extra fields rejected | Yes | Existing Platform Session and model used for scheduled execution. |
target.kind | string · values: "platform" | Yeswithin target | Selects the resource or operation variant described by the allowed values. |
target.sessionId | string · min length 1 | Yeswithin target | Existing Session identifier within the named Environment. |
target.model | string · min length 1 | Yeswithin target | Exact native model ID served by your provider or gateway. |
enabled | boolean | Yes | Whether this configuration is enabled for future use. |
Example
{
"name": "Daily review",
"prompt": "Review recent changes and summarize findings.",
"timing": {
"kind": "cron",
"expression": "0 9 * * *",
"timeZone": "Asia/Shanghai"
},
"target": {
"kind": "platform",
"sessionId": "YOUR_SESSION_ID",
"model": "YOUR_SUPPORTED_MODEL_ID"
},
"enabled": true
}Responses
201 SuccessResponse body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | object · extra fields rejected | Yes | Schedule definition, next due time and latest occurrence outcome. |
data.name | string · min length 1; max length 80 | Yeswithin data | Human-readable name for this resource. |
data.prompt | string · min length 1; max length 100000 | Yeswithin data | Saved instructions used for each scheduled Run. |
data.timing | one of the variants below | Yeswithin data | One future Unix timestamp or a recurring five-field cron expression with an IANA time zone. |
data.timing | object · extra fields rejected | Yeskind = "once" | — |
data.timing.kind | string · values: "once" | Yeskind = "once" | Selects the resource or operation variant described by the allowed values. |
data.timing.runAt | number · > 0 | Yeskind = "once" | Unix timestamp in seconds. |
data.timing | object · extra fields rejected | Yeskind = "cron" | — |
data.timing.kind | string · values: "cron" | Yeskind = "cron" | Selects the resource or operation variant described by the allowed values. |
data.timing.expression | string · min length 1; max length 200 | Yeskind = "cron" | Five-field cron expression; evaluated in the configured time zone. |
data.timing.timeZone | string · min length 1; max length 100 | Yeskind = "cron" | IANA time zone, such as Asia/Shanghai or UTC. |
data.target | object · extra fields rejected | Yeswithin data | Existing Platform Session and model used for scheduled execution. |
data.target.kind | string · values: "platform" | Yeswithin data | Selects the resource or operation variant described by the allowed values. |
data.target.sessionId | string · min length 1 | Yeswithin data | Existing Session identifier within the named Environment. |
data.target.model | string · min length 1 | Yeswithin data | Exact native model ID served by your provider or gateway. |
data.enabled | boolean | Yeswithin data | Whether this configuration is enabled for future use. |
data.id | string | Yeswithin data | Resource identifier used to read or manage this resource. |
data.environmentId | string | Yeswithin data | Environment identifier. It must belong to the caller’s account or Project. |
data.nextRunAt | number | Nowithin data | Next due time as a Unix timestamp in seconds; absent when no occurrence is scheduled. |
data.lastScheduledFor | number | Nowithin data | Due time of the most recent recorded occurrence, in Unix seconds. |
data.lastRunStatus | string · values: "queued" | "running" | "succeeded" | "failed" | "skipped" | Nowithin data | Outcome of the most recent scheduled occurrence. |
data.lastError | string | Nowithin data | Diagnostic message for the most recent admission or execution failure. |
data.revision | integer | Yeswithin data | Configuration revision. MCP updates must use the currently observed revision. |
data.createdAt | number | Yeswithin data | Creation time as a Unix timestamp in seconds. |
data.updatedAt | number | Yeswithin data | Last update time as a Unix timestamp in seconds. |
Example
{
"data": {
"name": "example",
"prompt": "example",
"timing": {
"kind": "once",
"runAt": 0
},
"target": {
"kind": "platform",
"sessionId": "example",
"model": "example"
},
"enabled": false,
"id": "",
"environmentId": "",
"revision": 0,
"createdAt": 0,
"updatedAt": 0
}
}Error responses
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}Use a five-field cron expression and an IANA time zone. The example runs at 09:00 in Asia/Shanghai. A time zone makes the intended local clock explicit; inspect nextRunAt after saving, especially for zones with daylight saving changes.
Schedule one task
Choose timing.kind: once with a positive future Unix timestamp in seconds. The schedule API details provides the timing variants. Do not send milliseconds or an ISO string in place of that timestamp.
Observe occurrences
List scheduled occurrences
/v1/environments/{environmentId}/schedules/{scheduleId}/runsSchedules submit ordinary Platform Runs into an existing Session using the selected model. Runs retain normal credit, budget, queue, recovery and checkpoint behavior. Missed cron intervals coalesce to the latest occurrence; an overlapping occurrence is skipped. Admission failures are recorded without retrying side effects.
Authentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
path: environmentId | string | Yes | Environment identifier. It must belong to the caller’s account or Project. |
path: scheduleId | string | Yes | Schedule identifier within this Environment. |
Request example
curl \
"https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/schedules/$SCHEDULE_ID/runs" \
-H "Authorization: Bearer $SANDPI_API_TOKEN"No request body.
Responses
200 SuccessResponse body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | array | Yes | Successful result wrapped by the API. The child fields describe its content. |
data[] | object · extra fields rejected | Yeseach array item | Scheduled occurrence with admission outcome and Run reference when admitted. |
data[].id | string | Yeseach array item | Resource identifier used to read or manage this resource. |
data[].scheduleId | string | Yeseach array item | Schedule identifier within this Environment. |
data[].scheduledFor | number | Yeseach array item | Intended due time of this occurrence as a Unix timestamp in seconds. |
data[].status | string · values: "queued" | "running" | "succeeded" | "failed" | "skipped" | Yeseach array item | Current resource state; inspect the allowed values and the operation’s lifecycle notes. |
data[].target | object · extra fields rejected | Yeseach array item | Existing Platform Session and model used for scheduled execution. |
data[].target.kind | string · values: "platform" | Yeseach array item | Selects the resource or operation variant described by the allowed values. |
data[].target.sessionId | string · min length 1 | Yeseach array item | Existing Session identifier within the named Environment. |
data[].target.model | string · min length 1 | Yeseach array item | Exact native model ID served by your provider or gateway. |
data[].platformRunId | string | Noeach array item | Admitted Run identifier; absent if admission failed or the occurrence was skipped. |
data[].output | string | Noeach array item | Final agent output when available. Content retention may erase this field. |
data[].error | string | Noeach array item | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
data[].startedAt | number | Noeach array item | Execution start time as a Unix timestamp in seconds. |
data[].finishedAt | number | Noeach array item | Terminal execution time as a Unix timestamp in seconds. |
data[].createdAt | number | Yeseach array item | Creation time as a Unix timestamp in seconds. |
Example
{
"data": [
{
"id": "",
"scheduleId": "",
"scheduledFor": 0,
"status": "queued",
"target": {
"kind": "platform",
"sessionId": "example",
"model": "example"
},
"createdAt": 0
}
]
}Error responses
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}Occurrence history records admission failures and links to admitted Runs. Missed recurring intervals coalesce to the latest due occurrence. If the same schedule’s previous Run is still queued or running, the next occurrence is skipped. This does not promise one Run for every elapsed cron interval.
A database failure rolls back admission and the occurrence together so a worker can retry without creating another Run. A recorded admission failure does not prevent a later recurring occurrence from being eligible.
Change or disable automation
Replace the definition to edit its prompt, timing, target or enabled state. Editing, disabling or deleting a schedule affects future admission. Already admitted Runs keep their original instructions and continue; use the Run stop operation if you also need to stop one.
Update an Environment schedule
/v1/environments/{environmentId}/schedules/{scheduleId}Schedules submit ordinary Platform Runs into an existing Session using the selected model. Runs retain normal credit, budget, queue, recovery and checkpoint behavior. Missed cron intervals coalesce to the latest occurrence; an overlapping occurrence is skipped. Admission failures are recorded without retrying side effects.
Authentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
path: environmentId | string | Yes | Environment identifier. It must belong to the caller’s account or Project. |
path: scheduleId | string | Yes | Schedule identifier within this Environment. |
Request example
curl -X PUT \
"https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/schedules/$SCHEDULE_ID" \
-H "Authorization: Bearer $SANDPI_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Daily review",
"prompt": "Review recent changes and summarize findings.",
"timing": {
"kind": "cron",
"expression": "0 9 * * *",
"timeZone": "Asia/Shanghai"
},
"target": {
"kind": "platform",
"sessionId": "YOUR_SESSION_ID",
"model": "YOUR_SUPPORTED_MODEL_ID"
},
"enabled": true
}'Request body · required application/json
Saved timed task, target, due-time policy and enabled state.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
name | string · min length 1; max length 80 | Yes | Human-readable name for this resource. |
prompt | string · min length 1; max length 100000 | Yes | Saved instructions used for each scheduled Run. |
timing | one of the variants below | Yes | One future Unix timestamp or a recurring five-field cron expression with an IANA time zone. |
timing | object · extra fields rejected | Yeskind = "once" | — |
timing.kind | string · values: "once" | Yeskind = "once" | Selects the resource or operation variant described by the allowed values. |
timing.runAt | number · > 0 | Yeskind = "once" | Unix timestamp in seconds. |
timing | object · extra fields rejected | Yeskind = "cron" | — |
timing.kind | string · values: "cron" | Yeskind = "cron" | Selects the resource or operation variant described by the allowed values. |
timing.expression | string · min length 1; max length 200 | Yeskind = "cron" | Five-field cron expression; evaluated in the configured time zone. |
timing.timeZone | string · min length 1; max length 100 | Yeskind = "cron" | IANA time zone, such as Asia/Shanghai or UTC. |
target | object · extra fields rejected | Yes | Existing Platform Session and model used for scheduled execution. |
target.kind | string · values: "platform" | Yeswithin target | Selects the resource or operation variant described by the allowed values. |
target.sessionId | string · min length 1 | Yeswithin target | Existing Session identifier within the named Environment. |
target.model | string · min length 1 | Yeswithin target | Exact native model ID served by your provider or gateway. |
enabled | boolean | Yes | Whether this configuration is enabled for future use. |
Example
{
"name": "Daily review",
"prompt": "Review recent changes and summarize findings.",
"timing": {
"kind": "cron",
"expression": "0 9 * * *",
"timeZone": "Asia/Shanghai"
},
"target": {
"kind": "platform",
"sessionId": "YOUR_SESSION_ID",
"model": "YOUR_SUPPORTED_MODEL_ID"
},
"enabled": true
}Responses
200 SuccessResponse body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | object · extra fields rejected | Yes | Schedule definition, next due time and latest occurrence outcome. |
data.name | string · min length 1; max length 80 | Yeswithin data | Human-readable name for this resource. |
data.prompt | string · min length 1; max length 100000 | Yeswithin data | Saved instructions used for each scheduled Run. |
data.timing | one of the variants below | Yeswithin data | One future Unix timestamp or a recurring five-field cron expression with an IANA time zone. |
data.timing | object · extra fields rejected | Yeskind = "once" | — |
data.timing.kind | string · values: "once" | Yeskind = "once" | Selects the resource or operation variant described by the allowed values. |
data.timing.runAt | number · > 0 | Yeskind = "once" | Unix timestamp in seconds. |
data.timing | object · extra fields rejected | Yeskind = "cron" | — |
data.timing.kind | string · values: "cron" | Yeskind = "cron" | Selects the resource or operation variant described by the allowed values. |
data.timing.expression | string · min length 1; max length 200 | Yeskind = "cron" | Five-field cron expression; evaluated in the configured time zone. |
data.timing.timeZone | string · min length 1; max length 100 | Yeskind = "cron" | IANA time zone, such as Asia/Shanghai or UTC. |
data.target | object · extra fields rejected | Yeswithin data | Existing Platform Session and model used for scheduled execution. |
data.target.kind | string · values: "platform" | Yeswithin data | Selects the resource or operation variant described by the allowed values. |
data.target.sessionId | string · min length 1 | Yeswithin data | Existing Session identifier within the named Environment. |
data.target.model | string · min length 1 | Yeswithin data | Exact native model ID served by your provider or gateway. |
data.enabled | boolean | Yeswithin data | Whether this configuration is enabled for future use. |
data.id | string | Yeswithin data | Resource identifier used to read or manage this resource. |
data.environmentId | string | Yeswithin data | Environment identifier. It must belong to the caller’s account or Project. |
data.nextRunAt | number | Nowithin data | Next due time as a Unix timestamp in seconds; absent when no occurrence is scheduled. |
data.lastScheduledFor | number | Nowithin data | Due time of the most recent recorded occurrence, in Unix seconds. |
data.lastRunStatus | string · values: "queued" | "running" | "succeeded" | "failed" | "skipped" | Nowithin data | Outcome of the most recent scheduled occurrence. |
data.lastError | string | Nowithin data | Diagnostic message for the most recent admission or execution failure. |
data.revision | integer | Yeswithin data | Configuration revision. MCP updates must use the currently observed revision. |
data.createdAt | number | Yeswithin data | Creation time as a Unix timestamp in seconds. |
data.updatedAt | number | Yeswithin data | Last update time as a Unix timestamp in seconds. |
Example
{
"data": {
"name": "example",
"prompt": "example",
"timing": {
"kind": "once",
"runAt": 0
},
"target": {
"kind": "platform",
"sessionId": "example",
"model": "example"
},
"enabled": false,
"id": "",
"environmentId": "",
"revision": 0,
"createdAt": 0,
"updatedAt": 0
}
}Error responses
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}Archived Environments disable their schedules. Platform schedules do not control the interactive TUI’s terminal. For event-driven work, use inbound webhooks.
Browse schedule definitions
List the saved definitions and inspect their next due time, revision and latest outcome before editing automation.
List Environment schedules
/v1/environments/{environmentId}/schedulesSchedules submit ordinary Platform Runs into an existing Session using the selected model. Runs retain normal credit, budget, queue, recovery and checkpoint behavior. Missed cron intervals coalesce to the latest occurrence; an overlapping occurrence is skipped. Admission failures are recorded without retrying side effects.
Authentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
path: environmentId | string | Yes | Environment identifier. It must belong to the caller’s account or Project. |
Request example
curl \
"https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/schedules" \
-H "Authorization: Bearer $SANDPI_API_TOKEN"No request body.
Responses
200 SuccessResponse body application/json
| Field | Type and constraints | Required | Description |
|---|---|---|---|
data | array | Yes | Successful result wrapped by the API. The child fields describe its content. |
data[] | object · extra fields rejected | Yeseach array item | Schedule definition, next due time and latest occurrence outcome. |
data[].name | string · min length 1; max length 80 | Yeseach array item | Human-readable name for this resource. |
data[].prompt | string · min length 1; max length 100000 | Yeseach array item | Saved instructions used for each scheduled Run. |
data[].timing | one of the variants below | Yeseach array item | One future Unix timestamp or a recurring five-field cron expression with an IANA time zone. |
data[].timing | object · extra fields rejected | Yeskind = "once" | — |
data[].timing.kind | string · values: "once" | Yeskind = "once" | Selects the resource or operation variant described by the allowed values. |
data[].timing.runAt | number · > 0 | Yeskind = "once" | Unix timestamp in seconds. |
data[].timing | object · extra fields rejected | Yeskind = "cron" | — |
data[].timing.kind | string · values: "cron" | Yeskind = "cron" | Selects the resource or operation variant described by the allowed values. |
data[].timing.expression | string · min length 1; max length 200 | Yeskind = "cron" | Five-field cron expression; evaluated in the configured time zone. |
data[].timing.timeZone | string · min length 1; max length 100 | Yeskind = "cron" | IANA time zone, such as Asia/Shanghai or UTC. |
data[].target | object · extra fields rejected | Yeseach array item | Existing Platform Session and model used for scheduled execution. |
data[].target.kind | string · values: "platform" | Yeseach array item | Selects the resource or operation variant described by the allowed values. |
data[].target.sessionId | string · min length 1 | Yeseach array item | Existing Session identifier within the named Environment. |
data[].target.model | string · min length 1 | Yeseach array item | Exact native model ID served by your provider or gateway. |
data[].enabled | boolean | Yeseach array item | Whether this configuration is enabled for future use. |
data[].id | string | Yeseach array item | Resource identifier used to read or manage this resource. |
data[].environmentId | string | Yeseach array item | Environment identifier. It must belong to the caller’s account or Project. |
data[].nextRunAt | number | Noeach array item | Next due time as a Unix timestamp in seconds; absent when no occurrence is scheduled. |
data[].lastScheduledFor | number | Noeach array item | Due time of the most recent recorded occurrence, in Unix seconds. |
data[].lastRunStatus | string · values: "queued" | "running" | "succeeded" | "failed" | "skipped" | Noeach array item | Outcome of the most recent scheduled occurrence. |
data[].lastError | string | Noeach array item | Diagnostic message for the most recent admission or execution failure. |
data[].revision | integer | Yeseach array item | Configuration revision. MCP updates must use the currently observed revision. |
data[].createdAt | number | Yeseach array item | Creation time as a Unix timestamp in seconds. |
data[].updatedAt | number | Yeseach array item | Last update time as a Unix timestamp in seconds. |
Example
{
"data": [
{
"name": "example",
"prompt": "example",
"timing": {
"kind": "once",
"runAt": 0
},
"target": {
"kind": "platform",
"sessionId": "example",
"model": "example"
},
"enabled": false,
"id": "",
"environmentId": "",
"revision": 0,
"createdAt": 0,
"updatedAt": 0
}
]
}Error responses
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}Delete a schedule
Remove the definition to stop future occurrences. Runs already admitted continue independently.
Delete an Environment schedule
/v1/environments/{environmentId}/schedules/{scheduleId}Schedules submit ordinary Platform Runs into an existing Session using the selected model. Runs retain normal credit, budget, queue, recovery and checkpoint behavior. Missed cron intervals coalesce to the latest occurrence; an overlapping occurrence is skipped. Admission failures are recorded without retrying side effects.
Authentication: Platform API bearer token
Parameters and headers
| Field | Type and constraints | Required | Description |
|---|---|---|---|
path: environmentId | string | Yes | Environment identifier. It must belong to the caller’s account or Project. |
path: scheduleId | string | Yes | Schedule identifier within this Environment. |
Request example
curl -X DELETE \
"https://api.sandpi.ai/v1/environments/$ENVIRONMENT_ID/schedules/$SCHEDULE_ID" \
-H "Authorization: Bearer $SANDPI_API_TOKEN"No request body.
Responses
204 SuccessEmpty response body.
Error responses
default Sandpi error.Error body application/json
Standard error envelope containing a stable code, diagnostic message and request identity.
| Field | Type and constraints | Required | Description |
|---|---|---|---|
error | object · extra fields rejected | Yes | Structured failure information. Inspect the stable code and retain the request ID for investigation. |
error.code | string | Yeswithin error | Stable error code used to distinguish failures programmatically. |
error.message | string | Yeswithin error | Human-readable diagnostic text. |
error.requestId | string | Yeswithin error | Request identifier for correlating diagnostics and support investigations. |
error.details | any | Nowithin error | Optional structured error context. Its shape is specific to the service failure. |
error.loginUrl | string | Nowithin error | Authentication URL supplied when a browser login is required. |
error.registrationOpen | boolean | Nowithin error | Whether new account registration is enabled for this deployment. |
Example
{
"error": {
"code": "platform_balance_insufficient",
"message": "Top up Platform credits before submitting a Run.",
"requestId": "req_example"
}
}