Skip to main content
PUT
/
training
/
{id}
Update a custom training
curl --request PUT \
  --url https://api.open.cx/training/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "BEHAVIORAL",
  "is_draft": true,
  "directory_id": "<string>",
  "answer": "<string>",
  "question": "<string>",
  "restricted_to_channels": [
    "web"
  ],
  "restricted_to_segments": [
    "<string>"
  ]
}'
This response does not have an example.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

application/json
directory_id
string | null
required

The directory ID for the custom training. This is the ID of the directory that the custom training will be added to. This is optional.

answer
string
required

The answer for the custom training. This is the answer for the custom training.

question
string
required

The question for the custom training. This is the question for the custom training.

restricted_to_channels
enum<string>[]
required

(is array is empty, instruction works for all channels, if array contains channels, instruction is limited to those channels

restricted_to_segments
string[]
required

(is array is empty, instruction works for all segments, if array contains segments, instruction is limited to those segments

type
enum<string>

The type of custom training. This is the type of custom training that will be created.

Available options:
BEHAVIORAL,
SCENARIO_SPECIFIC
is_draft
boolean

The draft status of the custom training. This is the draft status of the custom training.

Response

Custom training updated successfully

I