Retrieve message details

GET https://chatapps.8x8.com/api/v1/subaccounts/:subAccountId/messages/:umid

This resource can be used to query message details like delivery status using the UMID of the message. You need to specify the sub account id and the umid of the message in place of {subAccountId} and {umid} respectively. umid is the unique identifier (in the form of a uuid) you received when you submitted the message to the api.

API Rate Limiting

To protect the platform from being overloaded and maintain a high quality of service to all customers, we enforce API rate limits for this API endpoint.

The limit is set to 1 request/second per subaccount.

To safeguard your privacy, sensitive data such as message content and phone numbers are masked by default. Access to this information can be requested by contacting our support team.

Request

Path Parameters

    subAccountId stringrequired

    Possible values: >= 3 characters and <= 50 characters, Value must match regular expression ^[A-Za-z0-9\-._&]{3,50}$

    You must replace {subAccountId} with the subaccountid that you want to use. By default this is generated once you signed up with a new account at https://connect.8x8.com.

    umid stringrequired

    Unique message Id, generated by 8x8 API.

The success response returned with the message details of the message specified by the umid. Since channel fallback is supported, a single message umid may have multiple message details records depending on the number of channels attempted.

Schema

    data object[]required

  • Array [
  • umidstringrequired

    Unique message ID automatically generated by 8x8.

    Example: dec02e44-c76f-4a0a-b69f-6ac2a4386eb9
    subAccountIdstringrequired

    Sub account id with which the message is associated with.

    channelstringrequired

    Name of the channel used to send the message. Possible values are SMS, WhatsApp, RCS, Viber, Line, Facebook, WeChat, Zalo or Kakao.

    Example: WhatsApp
    channelIdstringrequired

    Unique channel identifier. This property uniquely identifies the channel used to send the message when multiple channels of the same type are associated with one sub account.

    Example: 8e4d1303-5754-e911-8154-020897df5459
    directionstringrequired

    Direction of the message. Possible values are

    • outbound: Mobile terminated.
    • inbound: Mobile originated.
    Example: outbound
    countrystring

    Two-letter ISO 3166 country code associated with the message.

    Example: SG

    status objectrequired

    Delivery status of the message. Status contains the following information.

    statestring

    General status of the message. Possible values are

    • unknown: Status is not known. This is an exceptional/intermediate status.
    • queued: The request is accepted and queued for processing
    • failed: The request has been rejected by the api and will not be processed.
    • sent: The message has been sent to the operator and we have not received an acknowledgment yet.
    • delivered: Message has been delivered to destination and we have received confirmation from the operator.
    • undelivered: We have received a delivery receipt from the operator that the message was not delivered.
    • read: Message was delivered and read.
    • ok: Operation was successful
    • error: An error occurred during operation
    Example: delivered
    detailstring
    • delivered_to_operator: The message has been delivered to the operator. Associated with delivered state
    • delivered_to_recipient: The message has been delivered to the recipient. Associated with delivered state.
    • rejected_by_operator: The message has been rejected by the operator. Associated with undelivered status.
    • undelivered_to_recipient: The message has been delivered but rejected by the target device. Associated with undelivered state.
    Example: delivered_to_carrier
    errorCodeinteger

    Error code for the operation

    errorMessagestring

    Description of the error.

    Example: Invalid message length
    timestampstring<date-time>

    Date and time when the status was observed expressed in ISO 8601 format.

    Example: 2020-06-17T04:17:21.06Z

    user object

    Information about the user the message is associated with.

    msisdnstring

    Phone number (obfuscated to protect sensitive information) expressed in E.164 international format.

    Example: +63922110xxxx
    channelUserIdstring

    Channel user identifier (obfuscated to protect sensitive data).

    contentTypestringrequired

    Content type of the message. Possible values are Text, Audio, Video, Image, Location, File, Carousel, List, Buttons or Template.

    Example: Text
    contentstring

    Message content (obfuscated to protect sensitive information).

    Example: **MASKED**
    createdAtstringrequired

    Date and time the message was submitted to the api expressed in ISO 8601 format.

    Example: 2020-06-17T04:17:21.06Z
    clientMessageIdstring

    Client message identifier.

    clientBatchIdstring

    Client batch identifier.

    batchIdstring

    Universaly unique batch identifier (UUID).

    Example: c9c01382-38bf-4e27-8962-ae0684ab56c3
    stepintegerrequired

    Indicates the attempt on which the channel was used. For instance, a message delivery may be failed via Viber and a fallback channel like WhatsApp may be attempted next. In this case, step 1 will contain message details for Viber and step 2 will contain the message details for WhatsApp.

    Example: 1
  • ]
{
"data":[
{
"umid":"dec02e44-c76f-4a0a-b69f-6ac2a4386eb9",
"subAccountId":"string",
"channel":"WhatsApp",
"channelId":"8e4d1303-5754-e911-8154-020897df5459",
"direction":"outbound",
"country":"SG",
"status":{
"state":"delivered",
"detail":"delivered_to_carrier",
"errorCode":0,
"errorMessage":"Invalid message length",
"timestamp":"2020-06-17T04:17:21.06Z"
},
"user":{
"msisdn":"+63922110xxxx",
"channelUserId":"string"
},
"contentType":"Text",
"content":"**MASKED**",
"createdAt":"2020-06-17T04:17:21.06Z",
"clientMessageId":"string",
"clientBatchId":"string",
"batchId":"c9c01382-38bf-4e27-8962-ae0684ab56c3",
"step":1
}
]
}
{
"data":[
{
"umid":"dec02e44-c76f-4a0a-b69f-6ac2a4386eb9",
"subAccountId":"sub_account_id",
"channel":"WhatsApp",
"channelId":"904d1303-5754-e911-8154-020897df5459",
"direction":"Outbound",
"status":{
"state":"read",
"timestamp":"2020-06-17T04:25:21.06Z"
},
"contentType":"Text",
"createdAt":"2020-06-17T04:15:21.06Z",
"step":2,
"country":"SG",
"user":{
"msisdn":"+63922110xxxx"
},
"content":"**MASKED**",
"clientMessageId":"client message id",
"clientBatchId":"client batch id",
"batchId":"c9c01382-38bf-4e27-8962-ae0684ab56c3"
}
]
}

Bad request error response

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1002,
"message":"Invalid MSISDN format (not E.164 international number)",
"errorId":"b4478860-b76c-e811-814e-022a35cc1c71",
"timestamp":"2018-08-04T09:25:40.9235752+00:00"
}

Request was not authenticated response

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":1200,
"message":"Request was not authenticated properly",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-08-02T09:42:38.8988997+00:00"
}

The entity doesn't exist

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":4018,
"message":"Invalid jobId",
"errorId":"aa400d4b-fffe-ea11-8277-00155d4ff7ed",
"timestamp":"2020-09-25T07:18:22.78Z"
}

Rate limiting quota exceeded error

Schema

    codeintegerrequired

    Error code

    messagestring

    Error description

    errorIdstring<uuid>required

    Unique id of error. You can use it as reference when sending enquiries to 8x8 support

    timestampstring<date-time>required

    Data and time of the error occurence

{
"code":1001,
"message":"Provided subAccountId doesn't belongs to your account",
"errorId":"91b106f0-c0da-4aba-a43a-7af9c5893a80",
"timestamp":"2017-04-19T02:31:19.4297387+00:00"
}
{
"code":429,
"message":"Quota exceeded. Please try again in 1 second(s).",
"errorId":"c8a41b47-57bf-ea11-8273-00155d466a31",
"timestamp":"2020-07-06T07:07:00.30Z"
}

Source: https://developer.8x8.com/connect/reference/get-chatapps-message-details · 8x8 CPaaS Developer Docs. Synced for support deflection.

Was this article helpful?
or
0 out of 0 found this helpful

0 Comments

Please sign in to leave a comment.

Didn't find what you were looking for?

Submit a request