Skip to main content
POST
/
insights
Get customer insights
curl --request POST \
  --url https://api.open.cx/insights \
  --header 'Content-Type: application/json' \
  --data '
{
  "category": "<string>",
  "status": "all",
  "sentiment": "angry",
  "sortBy": "occurrence_count",
  "sortOrder": "desc",
  "minSessions": 4503599627370495,
  "search": "<string>",
  "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "insightNumber": 4503599627370495,
  "sessionLanguage": "el",
  "ticketSentiment": "angry",
  "channel": "web",
  "sessionFromDate": "<string>",
  "sessionToDate": "<string>",
  "sessionStatus": "closed_resolved",
  "sessionContactId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ticketCustomData": [
    {}
  ],
  "contactCustomData": [
    {}
  ],
  "page": 1
}
'
{
  "data": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "insight_number": 0,
      "content": "<string>",
      "sentiment": "angry",
      "occurrence_count": 0,
      "category": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>",
        "description": "<string>"
      },
      "team": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "name": "<string>"
      },
      "resolved_by": {
        "name": "<string>",
        "avatar_url": "<string>"
      },
      "resolved_at": "2023-11-07T05:31:56Z",
      "archived_by": {
        "name": "<string>",
        "avatar_url": "<string>",
        "reason": "<string>"
      },
      "archived_at": "2023-11-07T05:31:56Z",
      "deep_research": "<string>",
      "deep_research_completed_at": "2023-11-07T05:31:56Z",
      "first_seen_at": "2023-11-07T05:31:56Z",
      "last_seen_at": "2023-11-07T05:31:56Z",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "page": 0,
  "total": 0,
  "totalPages": 0
}

Body

application/json
category
string | null

Filter by category name

status
enum<string> | null
default:all
Available options:
all,
unresolved,
resolved,
archived
sentiment
enum<string> | null

Filter by sentiment

Available options:
angry,
happy,
neutral
sortBy
enum<string> | null
default:occurrence_count
Available options:
occurrence_count,
last_seen_at,
first_seen_at,
created_at
sortOrder
enum<string> | null
default:desc
Available options:
asc,
desc
minSessions
integer | null

Minimum occurrence count

Required range: 0 < x <= 9007199254740991
search
string | null

Search in insight content

teamId

Filter by specific team ID or none for unassigned insights

insightNumber
integer | null

Filter by insight number

Required range: 0 < x <= 9007199254740991
sessionLanguage
enum<string> | null

Filter by language

Available options:
el,
de,
fr,
it,
es,
pt,
nl,
da,
sv,
no,
fi,
pl,
cs,
sk,
hu,
ro,
bg,
hr,
sr,
uk,
ru,
tr,
en,
zh,
ja,
ko,
hi,
id,
ms,
th,
vi,
tl,
ar,
he,
fa,
af,
sw
ticketSentiment
enum<string> | null

Filter by sentiment

Available options:
angry,
happy,
neutral
channel
enum<string> | null

Filter by session channel

Available options:
web,
email,
phone_voice,
slack,
sms,
whatsapp,
instagram,
messenger,
api,
web_voice
sessionFromDate
string | null

Filter sessions created from this date (ISO 8601)

sessionToDate
string | null

Filter sessions created to this date (ISO 8601)

sessionStatus
enum<string> | null

Filter by session status

Available options:
closed_resolved,
closed_unresolved,
open
sessionContactId
string<uuid> | null

Filter by session contact ID

ticketCustomData
object[] | null

A list of objects with key-value pairs to filter by. Relationship is OR between objects, and AND between the values in each object

contactCustomData
object[] | null

Filter by contact custom data key-value pairs

page
integer
default:1
Required range: x <= 9007199254740991

Response

Default Response

data
object[]
required
page
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
total
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991
totalPages
integer
required
Required range: -9007199254740991 <= x <= 9007199254740991