Reports API
The Reports API enables you to request a report of activity for your Vonage account.
Depending on your query pattern, you can choose from one of the two versions of the Reports API: asynchronous and synchronous. The asynchronous version is optimized for infrequent and large data queries (from several records to tens of millions). The synchronous version is optimized for frequent and periodic retrievals of small batches of data records (from one record to tens of thousand per query).
Only synchronous version supports retrival of data records by message/record ID.
Vonage recommends that you limit asynchronous queries to a maximum of 7 million records, by setting the start and end dates accordingly. On average, the asynchronous Reports API takes 5 - 10 minutes to generate 1 million records.
Reports API is a paid product. Full pricing is available at https://www.vonage.com/communications-apis/pricing/.
We recommend the monthly subscription option if you are going to retrieve more than 1M records per month.
Load records synchronously
Generate and immediately return report data synchronously. Supports query parameters for filtering. For large datasets, consider using asynchronous reports instead. Two query modes are supported: date-based queries (using date_start/date_end) or ID-based queries (using the id parameter). Only synchronous version supports retrival of data records by message/record ID. When using ID queries, only a limited subset of parameters are allowed: product, account_id, direction, id, include_message, show_concatenated.
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Query Parameters
The product to return records for.
SMSSMS-TRAFFIC-CONTROLVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLASRAMDVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2CONVERSATION-EVENTCONVERSATION-MESSAGEMESSAGESVIDEO-APINETWORK-API-EVENTREPORTS-USAGEThe account ID (API key) you wish to search for. This can differ from the API key in the authorization header because some accounts can request reports for other accounts, e.g. a primary account owner wants to create a report for one of its subaccounts.
ISO-8601 extended time zone offset or ISO-8601 UTC zone offset formatted date (format yyyy-mm-ddThh:mm:ss[.sss]±hh:mm or yyyy-mm-ddThh:mm:ss[.sss]Z) for when reports
should begin. It filters on the time the API call was received by Vonage and corresponds to the field date_received (date_start for Voice) in the report file. It is
inclusive, i.e. the provided value is less than or equal to the value in the field date_received (date_start for Voice) in the CDR.
If unspecified, defaults
to seven days ago.
ISO-8601 extended time zone offset or ISO-8601 UTC zone offset formatted date (format yyyy-mm-ddThh:mm:ss[.sss]±hh:mm or yyyy-mm-ddThh:mm:ss[.sss]Z) for when report should end.
It is exclusive, i.e. the provided value is strictly greater than the value in the field date_received in the CDR.
If unspecified, defaults to the current time.
Pagination cursor for retrieving the next page of results (date-based queries only)
Initialization vector for encrypted cursor pagination (date-based queries only)
The UUID of the message or call to be searched for. You can specify a comma-separated list of UUIDs (maximum 20 UUIDs). If UUIDs are not found they are listed in the response in the ids_not_found field.
When the id parameter is specified, only the following parameters are accepted: product, account_id, direction, include_message and show_concatenated.
Direction of the communication, either inbound (received by our services), or outbound (originated from our services). Required for products SMS and MESSAGES. Optional for VOICE-CALL,VOICE-FAILED, ASR.
inboundoutboundStatus of the event. Optional for SMS, CONVERSATION-EVENT, IN-APP-VOICE, MESSAGES, VOICE-CAL, VERIFY-V2, NUMBER-INSIGHT-V2.
Sender ID/number. Optional for SMS, MESSAGES, VOICE-CALL, VOICE-FAILED, ASR.
Recipient phone number. Optioanl for SMS, VOICE-CALL, VOICE-FAILED, ASR, MESSAGES, VERIFY-API, VERIFY-V2.
Country code filter. Optional for SMS, VOICE-CALL, VOICE-FAILED, ASR, MESSAGES, VERIFY-API, VERIFY-V2, NUMBER-INSIGHT, NUMBER-INSIGHT-V2, NETWORK-API-EVENT.
Mobile network code filter. Optional for SMS, VOICE-CALL, VOICE-FAILED, ASR, VERIFY-API, VERIFY-V2, NUMBER-INSIGHT, NUMBER-INSIGHT-V2, NETWORK-API-EVENT.
Client reference. Optional for SMS, MESSAGES, VERIFY-API, VERIFY-V2, NUMBER-INSIGHT, NUMBER-INSIGHT-V2, CONVERSATION-EVENT, CONVERSATION-MESSAGE, IN-APP-VOICE, VIDEO-API, NETWORK-API-EVENT.
Phone number for lookup. Optional for NUMBER-INSIGHT, NUMBER-INSIGHT-V2.
Language/locale. Optional for VERIFY-API, VERIFY-V2.
Include message content in response. Optional for SMS, MESSAGES.
A boolean flag that determines whether the concatenated field is included in the report. Optional for SMS with direction=outbound.
Account reference. Optional for SMS, MESSAGES.
Unique call identifier. Optional for VOICE-CALL, VOICE-FAILED, ASR, WEBSOCKET-CALL.
Unique leg identifier for the call. Optional for IN-APP-VOICE.
Messaging provider. Optional for MESSAGES.
whatsappsmsmmsmessengerviber_service_msginstagramrcsNumber type. Optional for VERIFY-API.
Verification channel. Optional for VERIFY-V2.
v2emailsilent_authFilter by parent request ID, which correlates v2 verification requests with their associated email or silent_auth events. Optional for VERIFY-V2.
Type of Request. Optional for NUMBER-INSIGHT-V2, NETWORK-API-EVENT.
Risk assessment level. Optional for NUMBER-INSIGHT-V2.
Whether the number has been ported/swapped. Optional for NUMBER-INSIGHT-V2.
Conversation ID. Optional for CONVERSATION-EVENT, CONVERSATION-MESSAGE, IN-APP-VOICE.
Session ID. Optional for VIDEO-API.
Meeting ID. Optional for VIDEO-API.
Product name for Network API event. Optional for NETWORK-API-EVENT.
Session ID for Network API. Optional for NETWORK-API-EVENT.
API path. Optional for NETWORK-API-EVENT.
Correlation ID. Optional for NETWORK-API-EVENT.
HAL links for navigation and pagination. The next link is only present if more records are available.
https://api.nexmo.com/v2/reports/sms/records?product=SMS&direction=outbound&date_start=2024-02-01T00:00:00Z&date_end=2024-02-02T00:00:00ZLink to the next page of records. Present only if pagination is applicable.
https://api.nexmo.com/v2/reports/sms/records?product=SMS&direction=outbound&cursor=MTY0OTQ3ODAwMDAwMAMTY0OTQ3ODAwMDAwMACursor for paginating results. Present only if pagination is applicable.
8a2c4e6f-12d3-45b6-78c9-0a1b2c3d4e5fInitialization vector for cursor processing. Present only if pagination is applicable.
a91b34c2-5d98-4c0e-8f23-a6b1c7d4e9f0Unique ID associated with this synchronous request.
SUCCESSThe result status of the request.
SUCCESSTRUNCATED2024-02-07T14:22:08+00:00Timestamp when the request was processed by the Reports API.
50The number of records returned in this page/response.
id-missing-1,id-missing-2A comma-separated list of IDs if the request was made by ID and some were not found.
SMSSMSList of outbound SMS records
12aa3456The account ID (API key) of the Customer. Might be a main account id or a sub-account
aaaaaaaa-bbbb-cccc-dddd-0123456789abVonage's unique identifier for this message
customer1234It's used to identify separate accounts using the SMS endpoint for billing purposes. The field is optional in SMS. It can be empty in the report
my-personal-referenceIf client-ref parameter were used by the Customer while calling SMS, the value with Client's own reference will be shown in this field. Up to 100 characters.
outboundDirection of the call, either inbound or outbound.
447700900001SMS sent from this phone number. The value specified by the Customer in from parameter in SMS request (can be numeric, alpha-numeric or short code)
447700900000SMS sent to this phone number. In other words, the destination phone number.
44770090045The number used instead of from field by Vonage, but only if there are any special routing rules were applied. It will be empty if not applicable.
NXSMSThe number used instead of from field by Vonage, but only if if Number Pools API was used or if routing rules were changed due to compliance reasons. It will be empty if not applicable.
FALSEIndicates whether the SMS was split up into multiple parts (due to its length). The field will be available in the report if Reports API were called with the parameter show_concatenated= true.
Hello World!Body of the message sent. Only present if include_message parameter is set to true.
12345The network code of the destination phone number. Taken from a carrier lookup (or sometimes the numbering plan), and always a master network code. Usually an MCC/MNC but sometimes alpha e.g US-FIXED
Orange Polska S.A.The name of the network code
PLThe ISO two letter country code to which the network code belongs in the numbering plan
PolandCountry name of the country code
2024-02-02T13:50:00+00:00Date when Vonage received SMS request. Format: yyyy-mm-ddThh:mm:ss±hh:mm Time zone: UTC
2024-02-02T13:50:00+00:00Date when the SMS message reached its final state. Format: yyyy-mm-ddThh:mm:ss±hh:mm Time zone: UTC
42Latency of the request in ms
deliveredThe final status of the message delivery, derived from the Delivery Receipt (DLR) provided by the carrier/supplier. The statuses are according to "SMS Delivery statuses" explained on Developer portal and in KB article
0The specific code indicating the result of the Vonage handoff to the supplier. A code of 0 typically indicates a successful handoff. See the Delivery Receipt documentation for more details
DeliveredA short text explanation for the value in error_code. This confirms the immediate status of the message handover from Vonage to the destination carrier/supplier. See the Delivery Receipt documentation for more details
Currency of the price of the SMS request. Always returns an empty string.
0.036Price of the SMS request
aaaaaaaa-bbbb-cccc-dddd-0123456789abThe UUID of the record in the report
0DCS (Data Coding Scheme) is the encoding with which the message body was delivered to the phone. It is according to the value of the type parameter used in SMS request. DCS = 0 (the default value) is for GSM/text. DCS = 8 is for unicode text messages DCS = 4 is for binary text messages
240210092938000+The validity period of the SMS message used in the ttl parameter of the SMS request. The duration in milliseconds the delivery of an SMS will be attempted. By default Vonage attempts delivery for 72 hours, however the maximum effective value depends on the operator and is typically 24 - 48 hours.
12.23.456.111The IP address of the Customer's server calling SMS.
50003940401User Data Header, available if SMS was split up into multiple parts (due to its length). Pay attention: UDHs are not unique values. An 8 bit concatenation UDH is always going to start from 050003, then the reference e.g. 00 and then the total parts and part index e.g. 0201 for the first part of a two part message
3TcNjgZvTgbJ41bJGMiHQxf7s6UPsKUEnkhyYUnique ID for the failover workflow.
Example Response»SMS (Outbound)
{
"_links": {
"self": {
"href": "https://api.nexmo.com/v2/reports/sms/records?product=SMS&direction=outbound&date_start=2024-02-01T00:00:00Z&date_end=2024-02-02T00:00:00Z"
},
"next": {
"href": "https://api.nexmo.com/v2/reports/sms/records?product=SMS&direction=outbound&cursor=MTY0OTQ3ODAwMDAwMA"
}
},
"cursor": "MTY0OTQ3ODAwMDAwMA",
"iv": "8a2c4e6f-12d3-45b6-78c9-0a1b2c3d4e5f",
"request_id": "a91b34c2-5d98-4c0e-8f23-a6b1c7d4e9f0",
"request_status": "SUCCESS",
"received_at": "2024-02-07T14:22:08+00:00",
"items_count": 50,
"ids_not_found": "id-missing-1,id-missing-2",
"product": "SMS",
"records": [
{
"account_id": "12aa3456",
"message_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"account_ref": "customer1234",
"client_ref": "my-personal-reference",
"direction": "outbound",
"from": "447700900001",
"to": "447700900000",
"forced_from": "44770090045",
"changed_from": "NXSMS",
"concatenated": "FALSE",
"message_body": "Hello World!",
"network": "12345",
"network_name": "Orange Polska S.A.",
"country": "PL",
"country_name": "Poland",
"date_received": "2024-02-02T13:50:00+00:00",
"date_finalized": "2024-02-02T13:50:00+00:00",
"latency": "42",
"status": "delivered",
"error_code": "0",
"error_code_description": "Delivered",
"currency": "",
"total_price": "0.036",
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"dcs": "0",
"validity_period": "240210092938000+",
"ip_address": "12.23.456.111",
"udh": "50003940401",
"workflow_id": "3TcNjgZvTgbJ41bJGMiHQxf7s6UPsKUEnkhyY"
}
]
}Create an asynchronous report
Creates an asynchronous report generation request. The report will be processed in the background and you can check its status using the returned report ID. The API returns a combination of the standard required fields and those specified in the input payload.
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
SMSProduct type for the report
SMSSMS-TRAFFIC-CONTROLVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLASRAMDVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2CONVERSATION-EVENTCONVERSATION-MESSAGEMESSAGESVIDEO-APINETWORK-API-EVENTREPORTS-USAGESMS12aa3456The account ID (API key) you wish to search for. This can differ from the API key in the authorization header because some accounts can request reports for other accounts, e.g. a primary account owner wants to create a report for one of its subaccounts.
2024-02-02T13:50:00+00:00Start date for the report (ISO 8601 format). Not mandatory for async requests - defaults to CURRENT_TIME-7D if not provided.
2024-02-07T14:22:08+00:00End date for the report (ISO 8601 format). Defaults to current time if not provided.
trueInclude data from sub-accounts
https://example.com/webhookWebhook URL for completion notifications
outboundDirection of the communication.
inboundoutbounddeliveredThe final status of the message delivery filter
deliveredexpiredaccepteddeletedunknownsubmittedfailedrejectedbuffered447700900001SMS sent from this phone number. The value specified by the Customer in from parameter in SMS request
447700900000Recipient phone number
PLThe ISO two letter country code
12345The network code of the destination phone number
my-personal-referenceThe optional custom reference value
customer1234Account reference.
trueDetermines whether the message body is included.
A boolean flag that determines whether the concatenated field is included in the report
Example Request»SMS
{
"product": "SMS",
"account_id": "12aa3456",
"date_start": "2024-02-02T13:50:00+00:00",
"date_end": "2024-02-07T14:22:08+00:00",
"include_subaccounts": true,
"callback_url": "https://example.com/webhook",
"direction": "outbound",
"status": "delivered",
"from": "447700900001",
"to": "447700900000",
"country": "PL",
"network": "12345",
"client_ref": "my-personal-reference",
"account_ref": "customer1234",
"include_message": true,
"show_concatenated": false
}{
"product": "SMS",
"account_id": "12aa3456",
"date_start": "2024-02-02T13:50:00+00:00",
"date_end": "2024-02-07T14:22:08+00:00",
"include_subaccounts": true,
"callback_url": "https://example.com/webhook",
"direction": "outbound",
"status": "delivered",
"from": "447700900001",
"to": "447700900000",
"country": "PL",
"network": "12345",
"client_ref": "my-personal-reference",
"account_ref": "customer1234",
"include_message": true,
"show_concatenated": false
}aaaaaaaa-bbbb-cccc-dddd-0123456789abUUID of the request.
PENDINGStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATED2024-02-07T14:22:08+00:00Time at which the request of the report was received.
2024-02-07T14:22:10+00:00Time at which the report processing of the report has started.
1523Number of records
HAL links
https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789abhttps://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789abDownload URL
SMSProduct type for the report
SMSSMS-TRAFFIC-CONTROLVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLASRAMDVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2CONVERSATION-EVENTCONVERSATION-MESSAGEMESSAGESVIDEO-APINETWORK-API-EVENTREPORTS-USAGESMS12aa3456The account ID (API key) you wish to search for. This can differ from the API key in the authorization header because some accounts can request reports for other accounts, e.g. a primary account owner wants to create a report for one of its subaccounts.
2024-02-02T13:50:00+00:00Start date for the report (ISO 8601 format). Not mandatory for async requests - defaults to CURRENT_TIME-7D if not provided.
2024-02-07T14:22:08+00:00End date for the report (ISO 8601 format). Defaults to current time if not provided.
trueInclude data from sub-accounts
https://example.com/webhookWebhook URL for completion notifications
outboundDirection of the communication.
inboundoutbounddeliveredThe final status of the message delivery filter
deliveredexpiredaccepteddeletedunknownsubmittedfailedrejectedbuffered447700900001SMS sent from this phone number. The value specified by the Customer in from parameter in SMS request
447700900000Recipient phone number
PLThe ISO two letter country code
12345The network code of the destination phone number
my-personal-referenceThe optional custom reference value
customer1234Account reference.
trueDetermines whether the message body is included.
A boolean flag that determines whether the concatenated field is included in the report
Example Response»SMS
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "PENDING",
"receive_time": "2024-02-07T14:22:08+00:00",
"start_time": "2024-02-07T14:22:10+00:00",
"items_count": 1523,
"_links": {
"self": {
"href": "https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
},
"download_report": {
"href": "https://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}
},
"product": "SMS",
"account_id": "12aa3456",
"date_start": "2024-02-02T13:50:00+00:00",
"date_end": "2024-02-07T14:22:08+00:00",
"include_subaccounts": true,
"callback_url": "https://example.com/webhook",
"direction": "outbound",
"status": "delivered",
"from": "447700900001",
"to": "447700900000",
"country": "PL",
"network": "12345",
"client_ref": "my-personal-reference",
"account_ref": "customer1234",
"include_message": true,
"show_concatenated": false
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
aaaaaaaa-bbbb-cccc-dddd-0123456789abUUID of the request.
PENDINGStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATED2024-02-07T14:22:08+00:00Time at which the request of the report was received.
2024-02-07T14:22:10+00:00Time at which the report processing of the report has started.
1523Number of records
HAL links
https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789abhttps://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789abDownload URL
SMSProduct type for the report
SMSSMS-TRAFFIC-CONTROLVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLASRAMDVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2CONVERSATION-EVENTCONVERSATION-MESSAGEMESSAGESVIDEO-APINETWORK-API-EVENTREPORTS-USAGESMS12aa3456The account ID (API key) you wish to search for. This can differ from the API key in the authorization header because some accounts can request reports for other accounts, e.g. a primary account owner wants to create a report for one of its subaccounts.
2024-02-02T13:50:00+00:00Start date for the report (ISO 8601 format). Not mandatory for async requests - defaults to CURRENT_TIME-7D if not provided.
2024-02-07T14:22:08+00:00End date for the report (ISO 8601 format). Defaults to current time if not provided.
trueInclude data from sub-accounts
https://example.com/webhookWebhook URL for completion notifications
outboundDirection of the communication.
inboundoutbounddeliveredThe final status of the message delivery filter
deliveredexpiredaccepteddeletedunknownsubmittedfailedrejectedbuffered447700900001SMS sent from this phone number. The value specified by the Customer in from parameter in SMS request
447700900000Recipient phone number
PLThe ISO two letter country code
12345The network code of the destination phone number
my-personal-referenceThe optional custom reference value
customer1234Account reference.
trueDetermines whether the message body is included.
A boolean flag that determines whether the concatenated field is included in the report
Example Response»SMS
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "PENDING",
"receive_time": "2024-02-07T14:22:08+00:00",
"start_time": "2024-02-07T14:22:10+00:00",
"items_count": 1523,
"_links": {
"self": {
"href": "https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
},
"download_report": {
"href": "https://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}
},
"product": "SMS",
"account_id": "12aa3456",
"date_start": "2024-02-02T13:50:00+00:00",
"date_end": "2024-02-07T14:22:08+00:00",
"include_subaccounts": true,
"callback_url": "https://example.com/webhook",
"direction": "outbound",
"status": "delivered",
"from": "447700900001",
"to": "447700900000",
"country": "PL",
"network": "12345",
"client_ref": "my-personal-reference",
"account_ref": "customer1234",
"include_message": true,
"show_concatenated": false
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
aaaaaaaa-bbbb-cccc-dddd-0123456789abUUID of the request.
PENDINGStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATED2024-02-07T14:22:08+00:00Time at which the request of the report was received.
2024-02-07T14:22:10+00:00Time at which the report processing of the report has started.
1523Number of records
HAL links
https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789abhttps://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789abDownload URL
SMSProduct type for the report
SMSSMS-TRAFFIC-CONTROLVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLASRAMDVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2CONVERSATION-EVENTCONVERSATION-MESSAGEMESSAGESVIDEO-APINETWORK-API-EVENTREPORTS-USAGESMS12aa3456The account ID (API key) you wish to search for. This can differ from the API key in the authorization header because some accounts can request reports for other accounts, e.g. a primary account owner wants to create a report for one of its subaccounts.
2024-02-02T13:50:00+00:00Start date for the report (ISO 8601 format). Not mandatory for async requests - defaults to CURRENT_TIME-7D if not provided.
2024-02-07T14:22:08+00:00End date for the report (ISO 8601 format). Defaults to current time if not provided.
trueInclude data from sub-accounts
https://example.com/webhookWebhook URL for completion notifications
outboundDirection of the communication.
inboundoutbounddeliveredThe final status of the message delivery filter
deliveredexpiredaccepteddeletedunknownsubmittedfailedrejectedbuffered447700900001SMS sent from this phone number. The value specified by the Customer in from parameter in SMS request
447700900000Recipient phone number
PLThe ISO two letter country code
12345The network code of the destination phone number
my-personal-referenceThe optional custom reference value
customer1234Account reference.
trueDetermines whether the message body is included.
A boolean flag that determines whether the concatenated field is included in the report
Example Response»SMS
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "PENDING",
"receive_time": "2024-02-07T14:22:08+00:00",
"start_time": "2024-02-07T14:22:10+00:00",
"items_count": 1523,
"_links": {
"self": {
"href": "https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
},
"download_report": {
"href": "https://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}
},
"product": "SMS",
"account_id": "12aa3456",
"date_start": "2024-02-02T13:50:00+00:00",
"date_end": "2024-02-07T14:22:08+00:00",
"include_subaccounts": true,
"callback_url": "https://example.com/webhook",
"direction": "outbound",
"status": "delivered",
"from": "447700900001",
"to": "447700900000",
"country": "PL",
"network": "12345",
"client_ref": "my-personal-reference",
"account_ref": "customer1234",
"include_message": true,
"show_concatenated": false
}Get report data
Download a zipped archive of the rendered report. The file is available for download for 72 hours.
The zip file will be named <PRODUCT>_<REPORT_ID>.zip
The csv file in the zip archive will be named as report_<PRODUCT>_<ACCOUNT_ID>_<DATE>.csv the date will be formatted as yyyyMMdd.
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
The report in CSV format inside the zip archive.
12aa3456Account authenticated when making Reports API call. Not necessarily the same as account_id for which reports data is requested.
reportsReport's API product. Always reports.
2024-02-02T13:50:00+00:00Date when report was requested by Customer by calling Reports API. Format: yyyy-mm-ddThh:mm:ss±hh:mm Time zone: UTC
2024-02-02T13:50:00+00:00Date when Reports API started processing the request. Format: yyyy-mm-ddThh:mm:ss±hh:mm Time zone: UTC
2024-02-02T13:50:00+00:00Date when Reports API finished processing the request. Format: yyyy-mm-ddThh:mm:ss±hh:mm Time zone: UTC
SUCCESSStatus of the report's request
12aa3456The account ID (API key) for which the report data is generated.
88aa3456Master account ID of requested account. If Master account is not available, the field will be equal to account_id.
TRUEWould be TRUE if the report request was charged, otherwise - FALSE
Base parameters for all report requests
SMSProduct type for the report
SMSSMS-TRAFFIC-CONTROLVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLASRAMDVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2CONVERSATION-EVENTCONVERSATION-MESSAGEMESSAGESVIDEO-APINETWORK-API-EVENTREPORTS-USAGE12aa3456The account ID (API key) you wish to search for. This can differ from the API key in the authorization header because some accounts can request reports for other accounts, e.g. a primary account owner wants to create a report for one of its subaccounts.
2024-02-02T13:50:00+00:00Start date for the report (ISO 8601 format). Not mandatory for async requests - defaults to CURRENT_TIME-7D if not provided.
2024-02-07T14:22:08+00:00End date for the report (ISO 8601 format). Defaults to current time if not provided.
ASYNC_JOBThis is either sync or async Reports API request. Possible values: SYNC_JOB_FROM_ID, SYNC_JOB_FROM_DATES, ASYNC_JOB
SMSProduct requested in the report.
134Number of CDRs/records returned in the report
0.0004The price for the CDR in the report (individual record in the report)
EURCurrency of the price of the report
120The total price for the whole report
ab12345678c90-b1234-ba78-f1c3e400f28dThe unique id of the record in the report
Example Response
application/octet-streamErrors
The following is a non-exhaustive list of error codes that may occur while using this API.
These codes are in addition to any of our generic error codes.
| Code | Information |
|---|---|
| invalid-request-parameters | Description The provided payload is invalid Resolution Modify your request to provide a valid payload |
| invalid-abort-operation | Description The job is already in a terminated state such as Resolution None |
| rate-limit | Description The request was rate limited. Resolution The Reports API supports 5 requests per second when used Asynchronously, and 10 requests per second Synchronously. Slow down your request rate. |