> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scheduler api (/v1/brands/{brand_id}/scheduled-jobs)

> Schedule created.

### Path parameters

<ParamField path="brand_id" type="string (uuid)" required />

### Request body

`object`

<ParamField body="name" type="string" required />

<ParamField body="workflow_type" type="string" required />

<ParamField body="workflow_binding" type="object" />

<ParamField body="event_payload" type="object" />

<ParamField body="task_queue" type="string" required />

<ParamField body="interval_seconds" type="integer" required />

<ParamField body="first_run_at" type="string (date-time)" />

### Response

`object`

<ResponseField name="id" type="string (uuid)" required />

<ResponseField name="brand_id" type="string (uuid)" required />

<ResponseField name="name" type="string" required />

<ResponseField name="workflow_type" type="string" required />

<ResponseField name="workflow_binding" type="object" required />

<ResponseField name="event_payload" type="object" required />

<ResponseField name="task_queue" type="string" required />

<ResponseField name="interval_seconds" type="integer" required />

<ResponseField name="next_run_at" type="string (date-time)" required />

<ResponseField name="last_run_at" type="string (date-time)" />

<ResponseField name="enabled" type="boolean" required />

<ResponseField name="created_at" type="string (date-time)" required />

### Status codes

| Code  | Meaning           |
| ----- | ----------------- |
| `201` | Schedule created. |
| `400` | Validation error  |
| `401` | Unauthorized      |
| `404` | Not found         |
| `429` | Rate limited      |
| `500` | Internal error    |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.workstream.stateset.com/v1/brands/{brand_id}/scheduled-jobs' \
    --header "x-api-key: $STATESET_TEMPORAL_API_KEY" \
    --header 'Content-Type: application/json' \
    --data '{
    "name": "Two-Person Tent",
    "workflow_type": "string",
    "workflow_binding": {},
    "event_payload": {},
    "task_queue": "string",
    "interval_seconds": 250,
    "first_run_at": "2026-08-31T14:22:05Z"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "brand_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "Two-Person Tent",
    "workflow_type": "string",
    "workflow_binding": {},
    "event_payload": {},
    "task_queue": "string",
    "interval_seconds": 250,
    "next_run_at": "2026-08-31T14:22:05Z",
    "last_run_at": "2026-08-31T14:22:05Z",
    "enabled": true,
    "created_at": "2026-08-31T14:22:05Z"
  }
  ```
</ResponseExample>
