Get log export job result
GET/api/v1/subaccounts/:subAccountId/messages/exports/:jobId
- Sending a GET request on this endpoint allows to check the status of an SMS Logs export job and to get a download link if its generation has succeeded.
URL
To define which SMS logs export you want to retrieve, you need to enter the Job ID generated by XXXXX in the path as well as the 8x8 SMS subaccountid you used in the previous request.
https://sms.8x8.com/api/v1/subaccounts/{subAccountID}/messages/exports/{jobId}
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.
You must replace
{jobID}and{subAccountId}in the URL above with the jobID and subaccountid from the start SMS logs export job request
Request
Responses
- 200
- 404
In case of successful request which comes with a 200 code, you will be presented with a status parameter value (string). Here are the possible cases and their meaning:
-
queued - request for report creation is waiting in the queue
-
running - report creation has started, but not finished yet
-
succeeded - report created and CSV file can be downloaded using the link in the data property
-
failed - the report creation failed
-
cancelled - the report job has been cancelled
-
empty - the report is empty
-
error - an internal server error occurred
Once the platform will have successfully generated an SMS logs export ("status":"succeeded"), the links to the files will be contained in an array value of the parameter called data.
The files to the links have a default expiry date of 1 month from the moment the jobs succeeds and the files are made available for download. This expiration datetime is included in the response along with the data, as the value of a parameter called expires
SMS Logs files format
The SMS logs files generated are CSV files. The files contains the following columns of data about individual messages:
- umid: Unique Message ID (automatically generated by the platform)
- subaccountid: Subaccount used to send/receive the message
- direction: Indicates the direction of the message (1 = Outbound, 0= Inbound)
- country: Country of destination of the message
- operator: * Operator of destination of the message*
- mcc: * Mobile Country Code of the recipient number of the message*
- mnc: Mobile Network Code of the recipient number of the message
- status_value: Delivery status of the message
- status_details: Additional information about the delivery status of the message
- status_errorcode: Error code value if delivery error
- status_errormessage: Message associated with the delivery error
- status_timestamp: Last update datetime of the delivery status
- msisdn: Recipient phone number of the message (Redacted for PII protection)
- source: Origin / SenderID for the message
- encoding: Encoding of the message body
- createdat: Creation datetime of the message in the platform
- smscount: Number of SMS parts in the message
- price_currency: Billing currency for the message
- price_persms: Unit price billed for each SMS part
- price_total: Total price for the message (all SMS parts)
- clientmessageid: Custom Message ID defined by the client for the message
- clientbatchid: Customer Batch of messages ID defined by the client for the message batch
- batchid: Unique Messages Batch ID (automatically generated by the plaform)
- body: Body of the message (Redacted for PII protection)