Skip to main content
POST
/
v1
/
schedules
Create a schedule
curl --request POST \
  --url https://api.erna.ai/v1/schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "instructions": [
    "<string>"
  ],
  "dateRange": {
    "start": "2023-12-25",
    "end": "2023-12-25"
  },
  "roles": [
    {
      "id": "<string>",
      "name": "<string>"
    }
  ],
  "members": [
    {
      "id": "<string>",
      "name": "<string>",
      "roles": [
        "<string>"
      ],
      "skills": [
        "<string>"
      ]
    }
  ]
}
'
{
  "jobId": "<string>",
  "status": "pending",
  "progress": "generating"
}

Authorizations

Authorization
string
header
required

OAuth2 access token or API key

Body

application/json
instructions
string[]
required
Minimum array length: 1
dateRange
object
required
roles
object[]
required
members
object[]

Response

Job created. Poll GET /v1/schedules/jobs/{jobId} for the result.

jobId
string
required
status
enum<string>
required
Available options:
pending
progress
enum<string>
required
Available options:
generating,
validating,
running