omnidesk
  • Ticket
    • Message
    • Using forms
    • Contact forms
  • Customers
    • General
    • API sync on contact
    • CSV import
    • API sync before contact
    • Customer lookup
  • Telephone
    • Callflow
    • Numbers
  • E-mail
  • Users
  • Live chat
    • Livechat chatbot and app integration (backend)
  • Facebook
  • Twitter
  • Survey
    • Push data
  • Statistics
    • Statistics API
  • Raw data - BI
  • Security policy
  • Hosting
  • API docs
    • General
    • Authentication
    • REST
  • API specification
    • Documentation for the Omnidesk API endpoints
    • Chat
    • Customer
    • Email
    • Form
    • Formfield
    • Message
    • Notification
    • Raw
    • Ticket
    • User
    • View
    • Statisticsv2
Powered by GitBook
On this page
  1. API specification

Chat

PreviousDocumentation for the Omnidesk API endpointsNextCustomer

All the endpoints that can be called on the Chat controller.

All endpoints require the API_CHAT permission.

whitelistedDomainsAndBlacklistedIPs

get

Returns all the whitelisted domains and blacklisted IP addresses.

Authorizations
Responses
200Success
get
GET /api/v2/chat/whitelistedDomainsAndBlacklistedIPs HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Accept: */*
200Success

No content

  • POSTrequestChatConfig
  • POSTnotifyUserNewChatMessage
  • POSTnotifyUserNewChatEvent
  • POSTnotifyUserVisited
  • POSTnotifyUserEndChat
  • POSTaddAttachment
  • POSTcheckOriginAndIP
  • GETwhitelistedDomainsAndBlacklistedIPs
  • POSTrequestChatQueue

requestChatConfig

post

Requests chat configuration by this chat's details.

Authorizations
Body
chatServerstring · min: 5RequiredPattern: ^[a-zA-Z0-9\.\:\/\-]+$
chatAccountTokenstring · min: 10RequiredPattern: ^[a-zA-Z0-9]+$
Responses
200Success
post
POST /api/v2/chat/requestChatConfig HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 47

{
  "chatServer": "text",
  "chatAccountToken": "text"
}
200Success

No content

notifyUserNewChatMessage

post

Notifies the user of a new chat message.

Authorizations
Body
chatServerstring · min: 5RequiredPattern: ^[a-zA-Z0-9\.\:\/\-]+$
chatSessionIDstring · min: 10 · max: 65RequiredPattern: ^\+?[a-zA-Z0-9\-]+$
chatAccountTokenstring · min: 10RequiredPattern: ^[a-zA-Z0-9]+$
channelIDnumber · min: 1OptionalDefault: 8
messagestring · min: 1RequiredDefault: ""
urlstring · min: 1OptionalDefault: ""
messageNumbernumber · min: 1 · max: 50OptionalDefault: 1
usedPredefinedUserInputstring · min: 1OptionalDefault: false
additionalDatastring · min: 1OptionalDefault: ""
externalAddressOverwritestring · min: 1OptionalDefault: ""
customerNamestringOptionalPattern: ^[a-zA-Z 0-9]+$
emailAddressstring · emailOptional
phoneNumberstringOptionalPattern: ^\+[0-9]+$
Responses
200Success
post
POST /api/v2/chat/notifyUserNewChatMessage HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 281

{
  "chatServer": "text",
  "chatSessionID": "text",
  "chatAccountToken": "text",
  "channelID": 8,
  "message": "",
  "url": "",
  "messageNumber": 1,
  "usedPredefinedUserInput": false,
  "additionalData": "",
  "externalAddressOverwrite": "",
  "customerName": "text",
  "emailAddress": "name@gmail.com",
  "phoneNumber": "text"
}
200Success

No content

notifyUserNewChatEvent

post

Notifies the user of a new chat event.

Authorizations
Body
chatServerstring · min: 5RequiredPattern: ^[a-zA-Z0-9\.\:\/\-]+$
chatSessionIDstring · min: 10RequiredPattern: ^[a-zA-Z0-9\-]+$
eventstring · enumRequiredPossible values:
Responses
200Success
post
POST /api/v2/chat/notifyUserNewChatEvent HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 68

{
  "chatServer": "text",
  "chatSessionID": "text",
  "event": "startedtyping"
}
200Success

No content

notifyUserVisited

post

Notifies the user of a new chat URL visited.

Authorizations
Body
chatServerstring · min: 5RequiredPattern: ^[a-zA-Z0-9\.\:\/\-]+$
chatSessionIDstring · min: 10RequiredPattern: ^[a-zA-Z0-9\-]+$
urlstring · min: 4Required
Responses
200Success
post
POST /api/v2/chat/notifyUserVisited HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 57

{
  "chatServer": "text",
  "chatSessionID": "text",
  "url": "text"
}
200Success

No content

notifyUserEndChat

post

Notifies the user that the chat has ended.

Authorizations
Body
chatServerstring · min: 5RequiredPattern: ^[a-zA-Z0-9\.\:\/\-]+$
chatSessionIDstring · min: 10RequiredPattern: ^[a-zA-Z0-9\-]+$
Responses
200Success
post
POST /api/v2/chat/notifyUserEndChat HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 44

{
  "chatServer": "text",
  "chatSessionID": "text"
}
200Success

No content

addAttachment

post

Adds an attachment to the chat.

Authorizations
Query parameters
chatServerstring · min: 5RequiredPattern: ^[a-zA-Z0-9\.\:\/\-]+$
chatSessionIDstring · min: 10RequiredPattern: ^\+?[a-zA-Z0-9\-]+$
chatAccountTokenstring · min: 10RequiredPattern: ^[a-zA-Z0-9]+$
phoneNumberstringOptionalPattern: ^\+?[0-9]+$
messageNumbernumberOptional
Body
filestring · byteRequired
Responses
200Success
post
POST /api/v2/chat/addAttachment?chatServer=text&chatSessionID=text&chatAccountToken=text HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 19

{
  "file": "Ynl0ZXM="
}
200Success

No content

checkOriginAndIP

post

Checks the origin and IP address of this user.

Authorizations
Body
chatServerstring · min: 5RequiredPattern: ^[a-zA-Z0-9\.\:\/\-]+$
chatAccountTokenstring · min: 10RequiredPattern: ^[a-zA-Z0-9]+$
originstring · min: 1Required

The hostname from the domain to be checked.

Pattern: ^[a-zA-Z0-9\.\-]+$
ipstring · min: 5Required
Responses
200Success
post
POST /api/v2/chat/checkOriginAndIP HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 75

{
  "chatServer": "text",
  "chatAccountToken": "text",
  "origin": "text",
  "ip": "text"
}
200Success

No content

requestChatQueue

post

Returns the chat queue.

Authorizations
Body
chatAccountTokenstring · min: 10RequiredPattern: ^[a-zA-Z0-9]+$
Responses
200Success
post
POST /api/v2/chat/requestChatQueue HTTP/1.1
Host: {{base_url}}
apiKey: YOUR_API_KEY
Content-Type: multipart/form-data
Accept: */*
Content-Length: 27

{
  "chatAccountToken": "text"
}
200Success

No content