Returns the send status of the given message ID. The status will be kept for 7 days.
URL
GET https://api.wknd.ai/text/message/status?messageId={messageID}
Request Headers
The following are used for authentication/authorization checks.
X-Client-ID: A 32-byte hashed string provided by Wunderkind.
X-Client-Secret: A 64-byte hashed string provided by Wunderkind.
Query Parameters
messageId - (required) a string. This is the message ID that will be passed to get the status,e.g. f9eea82a-ce63-4dfa-ae8e-09b891f446cc
Responses
Success Response - 200
Model:
{
"status": "string"
}
status - the status of given message ID.
Status Codes
- NOT_FOUND: This response will be sent if no subscription with this phone number is found.
- NOT_SUBSCRIBED : This response will be sent if the phone number found is not subscribed
- FAILED_TO_ MATCH : This response indicates that the email sent has not sms matches or too many device IDs tied to it. Too many device IDs tied to the user is indicative of super users (typically internal to the company)
- PENDING_TO_SEND : This response indicates that the message has been received and is preparing to be deliveredSENDING: This response indicates that the message has been sent to our text aggregator for delivery to the end user
- FAILED_TO_SEND : This indicates that an unexpected error has occurred before the message was sent to our text aggregator for delivery
- DELIVERED : This response serves as confirmation from our text aggregator and the service provider (Verizon, AT&T, T-Mobile, etc.) that the message has been delivered successfully
- FAILED_TO_DELIVERY: This indicates that a downstream error has occurred with either our text aggregator or the service provider
Error Responses
Model:
{
"code": 0,
"message": "string",
"details": []
}
- code - error code
- message - error message
- Details - (optional) additional info will be appended here
Error Codes
- 401 - Unauthorized
- 403 - Forbidden
- 429 - Denied (exceed the limits)
- 4XX(others) - Bad Request
- 5XX - Internal Server Error
Example
Request:
curl -X 'GET' \
'https://api.wknd.ai/text/message/status?
messageId=f9eea82a-ce63-4dfa-ae8e-09b891f446cc' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'X-Client-ID: ********s19bvx18vly70bk5********' \
-H 'X-Client-Secret: ********c2a4b82f10f8a137b1b056c6f3f3909ddc062a6fb6b4826c********'
Response:
{
"status": "DELIVERED"
}
Receive Message Status
Wunderkind's system can automatically callback an existing API endpoint with the message status. To do so, the following information needs to be collected for Wunderkind system settings before performing the callback.
Note: Wunderkind cannot support token authentication, only POST or PUT requests.
Required Information
- Callback URL: the url for making the callback
- Header: Request headers (e.g. key, secret, etc.)
Examples:
POST https://example.endpoint.com/user
Headers
"X-Client-ID": "miu39r98mjrys73upzi9l4kqfbxxxxxx",
"X-Client-Secret": "oj07v6m137t1uhuf4w2c4dglvi093xahdb2unrrydlrxkxxxxxxxxxxx"
Payload
{
"messageID": "540e8400-e29b-41d4-a716-446655440000",
"status": "DELIVERED",
"phone": "++11234567890",
"email": "[email protected]",
"callbackData": "{\"key1\":\"value1\",\"key2\":\"value2\"}"
}