Skip to main content
GET
/
training
List all trainings
curl --request GET \
  --url https://api.open.cx/training \
  --header 'Authorization: Bearer <token>'
{
  "items": [
    {
      "id": "<string>",
      "title": "<string>",
      "content": "<string>",
      "draft_title": "<string>",
      "draft_content": "<string>",
      "type": "BEHAVIORAL",
      "is_draft": true,
      "directory_id": "<string>",
      "restricted_to_channels": [
        "web"
      ],
      "restricted_to_segments": [
        "<string>"
      ],
      "current_version": 123,
      "metadata": {},
      "published_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "total": 123,
  "limit": 123,
  "offset": 123,
  "has_more": true
}

Authorizations

Authorization
string
header
required

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

Query Parameters

Case-insensitive search on title or content

type
enum<string>

Filter by type: BEHAVIORAL or SCENARIO_SPECIFIC

Available options:
BEHAVIORAL,
SCENARIO_SPECIFIC
is_draft
enum<string>

Filter by draft status

Available options:
true,
false
limit
integer
default:50

Max items to return (1-100, default 50)

Required range: 1 <= x <= 100
offset
integer
default:0

Number of items to skip (default 0)

Required range: 0 <= x <= 9007199254740991
sort_by
enum<string>
default:created_at

Sort by field: created_at (default) or handoff_count (most handoffs first)

Available options:
created_at,
handoff_count
metadata
string

Filter by metadata — JSON object of key-value pairs to match (uses jsonb @> containment)

Response

Default Response

items
object[]
required
total
number
required

Total matching items before pagination

limit
number
required
offset
number
required
has_more
boolean
required

Whether more items exist beyond this page