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>"
  ],
  "timeHorizon": {
    "start": "2023-12-25",
    "end": "2023-12-25"
  },
  "employees": [
    {
      "id": "<string>",
      "name": "<string>",
      "roleIds": [
        "<string>"
      ],
      "skillIds": [
        "<string>"
      ]
    }
  ],
  "roles": [
    {
      "id": "<string>",
      "name": "<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
timeHorizon
object
required
employees
object[]
required
Minimum array length: 1
roles
object[]
required

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