Skip to main content
POST
/
v2.0
/
playbooks
/
{playbookId}
/
schedule
Schedule a Playbook Run
curl --request POST \
  --url https://api-trial.cognigy.ai/new/v2.0/playbooks/{playbookId}/schedule \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "entrypoint": "61f25579055c2f43c249a181",
  "flowId": "010d1970-89b9-4012-892b-53c78ef6c117",
  "localeId": "8b3b45e2-48f9-446d-a4c5-35d8284a01b2"
}
'
{
  "_id": "<string>",
  "status": "queued",
  "type": "runPlaybook",
  "parameters": {},
  "createdAt": 123,
  "lastChangedAt": 123,
  "progress": 50,
  "job": {
    "name": "<string>",
    "namespace": "<string>",
    "timeoutInMs": 123
  }
}

Authorizations

X-API-Key
string
header
required

Supply the API Key in the HTTP-Header

Headers

Accept
enum<string>

The Accept header specifies the media type that the client expects in the response. Available options: application/json, application/hal+json, application/xml, text/xml, text/csv. The default value is application/json.

Available options:
application/json,
application/hal+json,
application/xml,
text/xml,
text/csv

Path Parameters

playbookId
string
required

The Id of the Playbook

Required string length: 24
Pattern: ^[a-z0-9]{24}$

Body

application/json
entrypoint
string

snapshot or project ID

Example:

"61f25579055c2f43c249a181"

flowId
string

The reference ID of the flow

Example:

"010d1970-89b9-4012-892b-53c78ef6c117"

localeId
string

The reference ID of locale

Example:

"8b3b45e2-48f9-446d-a4c5-35d8284a01b2"

Response

Successfully scheduled the Playbook Run. Returns the created task (run) metadata.

Created task metadata (same shape as ITaskReturnValue).

_id
string
Required string length: 24
Pattern: ^[a-z0-9]{24}$
status
string

Task status (e.g. queued, active, done)

Example:

"queued"

type
string

Task type (e.g. runPlaybook)

Example:

"runPlaybook"

parameters
object

Task payload (playbookId, projectId, entrypoint, flowId, localeId, etc.)

createdAt
number

Unix timestamp in seconds when the task was created

lastChangedAt
number

Unix timestamp in seconds when the task was last updated

progress
integer

Task progress (0-100)

Required range: 0 <= x <= 100
job
object

Present only when the task runs as a Kubernetes job