POST
/
training
Create a custom training
curl --request POST \
  --url https://api.open.cx/training \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "answer": "<string>"
}'
{
  "id": "<string>",
  "organization_id": "<string>",
  "question": "<string>",
  "answer": "<string>",
  "is_draft": true,
  "accepted_by": 123,
  "draft_payload": "<any>",
  "learned_from_session_id": "<string>",
  "type": "BEHAVIORAL",
  "restricted_to_channels": [
    "web"
  ],
  "created_at": "<string>",
  "updated_at": "<string>",
  "directory_id": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
title
string
required

The title or question for the custom training. This serves as the prompt or situation that the AI will be trained to recognize. It should be clear and concise, ideally framed as a question or scenario.

Minimum length: 3
answer
string
required

The answer content for the custom training. This is the response that the AI should provide when it encounters a question or situation similar to the one defined in the title field. It should be comprehensive and provide the information needed to address the scenario.

Minimum length: 10

Response

Returns the created custom training

id
string
required
organization_id
string
required
question
string
required
answer
string
required
is_draft
boolean
required
accepted_by
number | null
required
learned_from_session_id
string | null
required
type
enum<string>
required
Available options:
BEHAVIORAL,
SCENARIO_SPECIFIC
restricted_to_channels
enum<string>[]
required
created_at
string
required
updated_at
string
required
directory_id
string | null
required
draft_payload
any

Draft payload with structured data