Send Line Notification message
POST https://chatapps.8x8.com/api/v1/subaccounts/:subAccountId/lon
This endpoint is used to send Messaging Apps messages individually (1 request per message). It is ideal to send single personalized messages for use-cases like notifications or alerting for example.
Request
Path Parameters
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.
Body
Messaging Apps API: request model for send single Line Notification message
- Array [
- ]
- Array [
- ]
user objectrequired
User information
Mobile phone number (MSISDN) to send the message to. International phone number format with '+ sign prefered. In addition we support national (local) phone numbers, please set country field to use it.
+6500000000
Default country code (like 'sg', 'uk') for national phone numbers format. You don't need it if msisdn in E.164 format (with '+' sign at the beginning)
Possible values: <= 2 characters
SG
Client managed id for the message : your own unique reference
Possible values: <= 50 characters
abc-123
content objectrequired
Content of the Line Notification message
Message title
Event reminder
Company name
8x8
Message icon
Possible values: [userPlus, chatEllipsis, phone, note, gear, bell, checkCircle, slashCircle, search, link, wallet, store, mapMarker, idCard, utensils, medicalKit, train, planeDeparture, questionCircle, infoCircle, boxCheck, calendarCheck, calendar, file, envelope, usdCircle, thbCircle, usdCircleSend, thbCircleSend, invoice, couponStar, coupon, creditCard, starCard, shoppingBag, megaphone, shieldCheck, history]
emphasis object
Emphasis component data
Label
Event name
Content
8x8 Conference
list object[]
Template list items
Label
Date
Content
Tue 26/09/2023
Greeting message
Can't wait to see you there!
Explanation
We would like to remind you about your reservation for tomorrow event
actions object[]
Template action list
Title
See direction
Url
https://www.google.com/maps
Override default DR callback URL for the message
smsFallback object
SMS fallback message text
Source number (SenderId) - "From" field for SMS. Max length 16 chars.
Possible values: <= 16 characters
Info
Encoding for the text of the message. "AUTO", "GSM7" and "UCS2"
Possible values: [AUTO, GSM7, UCS2]
AUTO
Success response
Schema
- 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
- 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.
status objectrequired
Delivery status of the message. Status contains the following information.
General status of the message. Possible values are
delivered
delivered_to_carrier
Error code for the operation
Description of the error.
Invalid message length
Date and time when the status was observed expressed in ISO 8601 format.
2020-06-17T04:17:21.06Z
Unique message id (guid) generated by 8x8 CPaaS platform upon message submission
user objectrequired
User information
Mobile phone number (MSISDN) to send the message to. International phone number format with '+ sign prefered. In addition we support national (local) phone numbers, please set country field to use it.
+6500000000
Default country code (like 'sg', 'uk') for national phone numbers format. You don't need it if msisdn in E.164 format (with '+' sign at the beginning)
Possible values: <= 2 characters
SG
Client managed id for the message: your own unique reference
{
"status":{
"state":"delivered",
"detail":"delivered_to_carrier",
"errorCode":0,
"errorMessage":"Invalid message length",
"timestamp":"2020-06-17T04:17:21.06Z"
},
"umid":"3fa85f64-5717-4562-b3fc-2c963f66afa6",
"user":{
"msisdn":"+6500000000",
"country":"SG"
},
"clientMessageId":"string"
}
{
"umid":"82188ee0-109f-e811-8150-020897df5459",
"user":{
"msisdn":"+6512341234"
},
"clientMessageId":"1234_id",
"status":{
"state":"queued",
"timestamp":"2021-01-04T08:19:45.99Z"
}
}
Bad request error response
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
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
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
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"
}
Internal server error
Schema
Error code
Error description
Unique id of error. You can use it as reference when sending enquiries to 8x8 support
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":2000,
"message":"Internal server error",
"errorId":"db9dced4-3534-4d86-9d18-6b448af0d621",
"timestamp":"2018-07-02T09:42:38.8988997+00:00"
}
Source: https://developer.8x8.com/connect/reference/send-lon-message · 8x8 CPaaS Developer Docs. Synced for support deflection.
0 Comments