Skip to main content
GET
Get a message

Authorizations

Authorization
string
header
required

HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).

Path Parameters

messageId
string
required

The message id.

Example:

"918273"

Response

The message.

An SMS, MMS or WhatsApp message, sent or received. Fields and the values of channel, status and error.code match the message webhooks, in camelCase.

id
string | null
required

The message id. null only when CloudTalk could not tell whether the message went out: on a send's 202 answer or a bulk ok row.

Example:

"918273"

conversationId
string | null
required

The conversation the message belongs to. null for a moment after the message is stored.

Example:

"55120"

direction
enum<string>
required

outbound: sent from your number. inbound: received on it.

Available options:
outbound,
inbound
channel
string
required

sms, mms or whatsapp: how the message was carried. A WhatsApp message with files is whatsapp, not mms. New values may be added; handle a value you do not know.

externalNumber
string
required

The other party (recipient or sender) in E.164, without a whatsapp: prefix.

Example:

"+12025550143"

internalNumber
object | null
required

Your CloudTalk number the message went through. null when the number is no longer in your account.

body
string | null
required

The text. null on a message with files only.

media
object[]
required

Files sent or received with the message. Empty when there are none.

fragments
integer | null
required

How many SMS segments the message used, as on the webhooks.

Example:

1

whatsappTemplate
object | null
required

The template used, on a send's answer only. Reads answer null.

status
string | null
required

Delivery status of an outbound message: queued (accepted, not yet with the mobile network), sent (the network took it), delivered (it reached the phone), not_delivered or failed (error says why), seen (read on WhatsApp, best effort). null on inbound messages. A message stays queued until the provider first reports on it. Whether it moves past sent depends on the mobile network and the sending number: where no delivery receipt comes back, it stays sent. New values may be added; handle a value you do not know as still in progress.

error
object | null
required

Why the message was not delivered, when status is not_delivered or failed. Otherwise null.

statusUpdatedAt
string<date-time>
required

When CloudTalk received the report of the current status. Equals createdAt before the first report and on inbound messages. RFC 3339 in UTC, to the second.

sentAt
string<date-time> | null
required

When the mobile network accepted the message, kept after later changes. null until then and on inbound messages. RFC 3339 in UTC, to the second.

deliveredAt
string<date-time> | null
required

When the network confirmed delivery, kept after later changes such as seen. null until then and on inbound messages. RFC 3339 in UTC, to the second.

contact
object | null
required

The contact whose phone number matches externalNumber. null when no contact carries it, or when contacts could not be read.

contactAmbiguous
boolean
required

true when several contacts carry externalNumber, so contact is one of them. Do not link a CRM record by contact.id then.

user
object | null
required

The user who sent the message. null on inbound messages and on API sends without userId.

createdAt
string<date-time>
required

When the message was sent or received. RFC 3339 in UTC, to the second.