curl --request POST \
--url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/schedules' \
--header "x-stateset-api-key: $STATESET_SYNC_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"jobType": "string",
"everySeconds": 250,
"cronExpression": "string",
"enabled": true
}'
{
"scheduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantId": "acme-outdoors",
"jobType": "string",
"everySeconds": 250,
"enabled": true,
"nextRunAt": "2026-08-31T14:22:05Z",
"lastRunAt": "2026-08-31T14:22:05Z",
"lastError": "string",
"consecutiveFailures": 1,
"createdAt": "2026-08-31T14:22:05Z",
"updatedAt": "2026-08-31T14:22:05Z",
"cronExpression": "string",
"triggerType": "string",
"maxConsecutiveFailures": 1
}
Create a schedule for a tenant.
Create a schedule for a tenant.
POST
/
v1
/
tenants
/
{tenant_id}
/
schedules
curl --request POST \
--url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/schedules' \
--header "x-stateset-api-key: $STATESET_SYNC_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"jobType": "string",
"everySeconds": 250,
"cronExpression": "string",
"enabled": true
}'
{
"scheduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantId": "acme-outdoors",
"jobType": "string",
"everySeconds": 250,
"enabled": true,
"nextRunAt": "2026-08-31T14:22:05Z",
"lastRunAt": "2026-08-31T14:22:05Z",
"lastError": "string",
"consecutiveFailures": 1,
"createdAt": "2026-08-31T14:22:05Z",
"updatedAt": "2026-08-31T14:22:05Z",
"cronExpression": "string",
"triggerType": "string",
"maxConsecutiveFailures": 1
}
Path parameters
Request body
object
Response
object
Status codes
| Code | Meaning |
|---|---|
201 | Schedule created |
401 | Unauthorized |
422 | Validation error |
424 | Database not configured |
curl --request POST \
--url 'https://api.sync.stateset.com/v1/tenants/{tenant_id}/schedules' \
--header "x-stateset-api-key: $STATESET_SYNC_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"jobType": "string",
"everySeconds": 250,
"cronExpression": "string",
"enabled": true
}'
{
"scheduleId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"tenantId": "acme-outdoors",
"jobType": "string",
"everySeconds": 250,
"enabled": true,
"nextRunAt": "2026-08-31T14:22:05Z",
"lastRunAt": "2026-08-31T14:22:05Z",
"lastError": "string",
"consecutiveFailures": 1,
"createdAt": "2026-08-31T14:22:05Z",
"updatedAt": "2026-08-31T14:22:05Z",
"cronExpression": "string",
"triggerType": "string",
"maxConsecutiveFailures": 1
}
Last modified on August 31, 2026