v1

latestOpenAPI 3.1.02026-07-24317911.4 MB
Messages

Start a new Message Session

This is a good place to start with messaging if you do not already have a message session ID.

post/domains/{domain}/users/{user}/messages

Path parameters

domainstring required

This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. Then using in path for GET you can set to "~" to use the domain name linked to your token/key instead of the domain name itself when reading for your own domain.

Example:example.com
userstring required

This is the main user extension for the user account. ~ can be used to mean "my account" which will extract the user from the token/key used for authentication.

Example:1000

Request body

typestring required
messagestring required

This is the text that will be sent as the message

from-numberstring

This is used only for SMS. This is the user's number used to send outbound for SMS

datastring nullable

This is used only for media chat or MMS. This is the base64 data of the media file to be sent

mime-typestring
sizeinteger nullable

This is used only for media chat or MMS. This is the size in bytes of the media file being sent

Example request

{
  "type": "chat",
  "destination": "1123",
  "mime-type": "image/png"
}

Response

timestamp'YYYY-MM-DDTHH:MM:SS.ssZ' required

This is the time stamp that the formated via RFC 3339

typestring required
domainstring required

This is the main organization name. This is used to link resource to its group/tenant/organization/enterprise. ~ and * can be used alone in special cases to mean My Domain (~) and All Domains (*).

directionstring required

This is the direction of the message. Either term for outbound or orig for inbound

from-user-idstring nullable required

This is the User ID the message came from. Not set for offnet numbers

from-video-attendee-idstring nullable required

This is the video attendee id the message came from if sent within a video call

from-user-agentstring nullable required

This is the HTTP USER AGENT the message came from

dialedstring nullable required

This is the number that this message is sent to. This can be comma seperated list of numbers if more than one in a group MMS session. Or null for chat sessions

terminating-user-idstring nullable required

This is the receiving User ID of the message

terminating-numberstring nullable required

This is the number that this message is sent to. This can be comma seperated list of numbers if more than one in a group MMS session. Or null for chat sessions

statusstring required

This is the status of the message

video-instance-idstring nullable

This is the video instance ID of the message if the message was sent from a video session.

media-typestring nullable required

This is the media type of the message if applicable

media-sizeinteger nullable required

This is the media size of the message if applicable

deleted-datetime'YYYY-MM-DDTHH:MM:SS.ssZ'

This is the time stamp that the formated via RFC 3339

messagesession-reciever-hostnamestring required

This is the receiver hostname for the message

messagesession-idstring required

This is the messagesession ID for this message

messagesession-participantsstring nullable required

This is the comma seperated participants of the messagesession associated with this message

Example response

{
  "type": "chat",
  "domain": "example.com",
  "direction": "term"
}