Retrieve SMS details

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

This resource can be used to query message details like delivery status using the unique message identifier (UMID) of the message.

URL

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 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.

Response returned with the message details if a message with the UMID is found for the specified sub account.

Schema

    umidstringrequired

    Unique message ID automatically generated by 8x8.

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

    Sub account id associated with the message.

    directionstringrequired

    Direction of the message (mobile terminated vs mobile originated). Possible values are

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

    Two-letter country code.

    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
    msisdnstringrequired

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

    Example: +63922110xxxx
    sourcestringrequired

    Message source.

    bodystringrequired

    Message content (obfuscated to protect sensitive information).

    Default value: **MASKED**
    Example: **MASKED**
    encodingstringrequired

    Message encoding. Possible values are GSM7, GSM8 or UCS2.

    Example: GSM8
    createdAtstringrequired

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

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

    Number of SMS segments in the messsage.

    Example: 2

    price objectrequired

    Price information of the message.

    totalnumberrequired

    Total price of the message which is equivalent to perSms x smsCount.

    Example: 0.0012
    perSmsnumberrequired

    Price per SMS.

    Example: 0.0012
    currencystringrequired

    Currency code of price information expressed in ISO 4217 format.

    Example: EUR
    clientMessageIdstring

    Client message identifier.

    clientBatchIdstring

    Client batch identifier.

    batchIdstring

    Universaly unique batch identifier (UUID).

    Example: c9c01382-38bf-4e27-8962-ae0684ab56c3
{
"umid":"dec02e44-c76f-4a0a-b69f-6ac2a4386eb9",
"subAccountId":"string",
"direction":"outbound",
"country":"SG",
"status":{
"state":"delivered",
"detail":"delivered_to_carrier",
"errorCode":0,
"errorMessage":"Invalid message length",
"timestamp":"2020-06-17T04:17:21.06Z"
},
"msisdn":"+63922110xxxx",
"source":"string",
"body":"**MASKED**",
"encoding":"GSM8",
"createdAt":"2020-06-17T04:17:21.06Z",
"smsCount":2,
"price":{
"total":0.0012,
"perSms":0.0012,
"currency":"EUR"
},
"clientMessageId":"string",
"clientBatchId":"string",
"batchId":"c9c01382-38bf-4e27-8962-ae0684ab56c3"
}
{
"umid":"dec02e44-c76f-4a0a-b69f-6ac2a4386eb9",
"subAccountId":"sub-account",
"direction":"outbound",
"country":"SG",
"status":{
"state":"delivered",
"detail":"delivered_to_recipient",
"timestamp":"2020-06-17T04:17:21.06Z"
},
"msisdn":"+63922110xxxx",
"source":"Seller",
"body":"**MASKED**",
"encoding":"GSM8",
"createdAt":"2020-06-17T04:17:21.06Z",
"smsCount":2,
"price":{
"total":0.0024,
"perSms":0.0012,
"currency":"EUR"
},
"clientMessageId":"some-client-identifier"
}

This error response is returned if the request is invalid (e.g. umid is not a valid uuid).

Schema

    codeinteger

    Error code.

    Example: 1000
    messagestring

    Error message.

    Example: Invalid umid.
    errorIdstring

    Unique error id auto-generated per request.

    Example: fbb239f1-2eb1-ea11-afa9-00155db6eaf4
    timestampstring

    Date and time of the error event.

    Example: 2020-06-18T06:42:57.20Z
{
"code":1000,
"message":"Invalid umid.",
"errorId":"fbb239f1-2eb1-ea11-afa9-00155db6eaf4",
"timestamp":"2020-06-18T06:42:57.20Z"
}
{
"code":1000,
"message":"Invalid umid.",
"errorId":"fbb239f1-2eb1-ea11-afa9-00155db6eaf4",
"timestamp":"2020-06-18T06:42:57.20Z"
}

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"
}

This error response is returned if there is a message by the specified sub account and umid does not exist.

Schema

    codeintegerrequired

    Error code.

    Example: 1300
    messagestringrequired

    Descriptive error message.

    Example: Message not found.
    errorIdstringrequired

    Unique error id auto-generated per request.

    Example: 1949a467-2db1-ea11-afa9-00155db6eaf4
    timestampstringrequired

    Date and time of the error event.

    Example: 2020-06-18T06:31:58.11Z
{
"code":1300,
"message":"Message not found.",
"errorId":"1949a467-2db1-ea11-afa9-00155db6eaf4",
"timestamp":"2020-06-18T06:31:58.11Z"
}
{
"code":1300,
"message":"Message not found.",
"errorId":"1949a467-2db1-ea11-afa9-00155db6eaf4",
"timestamp":"2020-06-18T06:31:58.11Z"
}

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-sms-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