Skip to main content
POST
/
v1
/
api
/
schedules
Create a schedule
curl --request POST \
  --url https://api.hq.zone/v1/api/schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deliver_to": {},
  "name": "<string>",
  "prompt": "<string>",
  "trigger": {},
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "delivery_locale": "<string>",
  "description": "<string>",
  "reset_each_fire": true
}
'
{
  "schedule": {
    "args": "<unknown>",
    "consecutive_failure_count": 123,
    "failure_count": 123,
    "fire_count": 123,
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "owner_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "state": "<string>",
    "trigger": "<unknown>",
    "description": "<string>",
    "last_fire_at": "2023-11-07T05:31:56Z",
    "last_fire_lag_ms": 123,
    "last_fire_status": "<string>",
    "last_run_conversation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "next_fire_at": "2023-11-07T05:31:56Z",
    "owner_display_name": "<string>",
    "owner_external_id": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Personal Access Token. Send as Authorization: Bearer hq_pat_....

Body

application/json
deliver_to
object
required
name
string
required
prompt
string
required
trigger
object
required
agent_id
string<uuid> | null
delivery_locale
string | null

Optional BCP-47 locale override for this schedule's deliveries. Falls back to the owner's workspace_users.locale when absent.

description
string | null
reset_each_fire
boolean | null

Response

Created

schedule
object
required