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 unlimited option if you are going to retrieve more than 1M records per month.
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Query Parameters
88The account for which the list of reports will be queried. Mandatory for Video API Reports.
SMSThe product to return records for. NB: CONVERSATIONS has been deprecated - please use CONVERSATION-EVENT instead.
SMSVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2MESSAGESASRCONVERSATION-MESSAGECONVERSATION-EVENTREPORTS-USAGEMEETINGSNETWORK-API-EVENTAMDSMS-TRAFFIC-CONTROLVIDEO-APIoutboundDirection 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. Invalid for REPORTS-USAGE, VOICE-TTS, IN-APP-VOICE, WEBSOCKET-CALL, CONVERSATION-EVENT (deprecated CONVERSATIONS), CONVERSATION-MESSAGE, NUMBER-INSIGHT, VERIFY-API, VERIFY-V2, NUMBER-INSIGHT-V2, NETWORK-API-EVENT, AMD, VIDEO-API, SMS-TRAFFIC-CONTROL.
inboundoutboundThe UUID of the message or call to be searched for. You can specify a comma-separated list of UUIDs. If UUIDs are not found they are listed in the response in the ids_not_found field.
If you specify id, you must not specify status, date_start or date_end.
Whether to include subaccounts in the report.
aaaaaaaa-bbbb-cccc-dddd-0123456789abFilter by Meeting ID for Video API reports.
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 you provide this, you must provide date_end and must not provide id.
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 you provide this, you must provide date_start and must not provide id.
aaaaaaaa-bbbb-cccc-dddd-0123456789abSession ID to filter by for Video API reports.
Include the message contents in the records. Only applicable for use with products SMS and MESSAGES, where it is optional.
truefalseIndicates whether the SMS was split up into multiple parts (due to its length).
truefalsenoneThe SMS status to search for. Optional where product is SMS.
deliveredexpiredfailedrejectedacceptedbufferedunknowndeletedhttps://api.nexmo.com/v2/reports/records?product=SMS&direction=outbound&date_start=2020-03-05T13%3A00%3A00Z&date_end=2020-03-05T14%0A00%3A00Z&account_id=abcdef01aaaaaaaa-bbbb-cccc-dddd-0123456789abUUID of the request.
SUCCESSStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATED2019-06-28T15:30:00+0000Time at which the report request was received by the service.
0.042Price of the request (deprecated).
Always an empty string (deprecated).
abcdef01The 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.
7b10a0c2-1a05-11eb-bad9-38f9d331649,7b1091b8-1a05-11eb-bad9-38f9d331493If you request multiple records using a comma-separated list of UUIDs, then the UUIDs of any records not found are listed in this field.
Records in JSON format
REPORTS-USAGEabcdef01Account authenticated when making Reports API call. Not necessarily the same as account_id for which reports data is requested.
For example, In case of authenticating with master account API Key to request data for it's subaccount, the field will hold master account id/API Key, but report itself will show data related to it's subaccount id (subaccount API Key will be reflected in account_id).
reportsReport's API product.
reports2019-06-28T15:30:00+0000Date when report was requested by Customer by calling Reports API.
2019-06-28T15:30:00+0000Date when Reports API started processing the request.
2019-06-28T15:30:00+0000Date when Reports API finished processing the request.
abcdef01The account ID (API key) for which the report data is generated (the account_id parameter used in the request).
abcdef01Master account ID of requested account (account_id field in the report). If Master account is not available, the field will be equal to account_id.
{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}Parameters/filters used by the Customer while requesting the report - all possible request parameters are specified at https://developer.vonage.com/en/api/reports#get-records.
134Number of CDRs/records returned in the report
0.042The price for the CDR in the report (individual record in the report).
EURCurrency of the price of the report.
0.042Total price of the report.
aaaaaaaa-bbbb-cccc-dddd-0123456789abThe unique id of the record in the report
Example Response
{
"_links": {
"self": {
"href": "https://api.nexmo.com/v2/reports/records?product=SMS&direction=outbound&date_start=2020-03-05T13%3A00%3A00Z&date_end=2020-03-05T14%0A00%3A00Z&account_id=abcdef01"
}
},
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "SUCCESS",
"received_at": "2019-06-28T15:30:00+0000",
"price": "0.042",
"currency": "",
"account_id": "abcdef01",
"ids_not_found": "7b10a0c2-1a05-11eb-bad9-38f9d331649,7b1091b8-1a05-11eb-bad9-38f9d331493",
"records": [
{
"product": "REPORTS-USAGE",
"acc": "abcdef01",
"product_type": "reports",
"date_received": "2019-06-28T15:30:00+0000",
"date_started": "2019-06-28T15:30:00+0000",
"date_finished": "2019-06-28T15:30:00+0000",
"account_id": "abcdef01",
"master_account_id": "abcdef01",
"request_params": "{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}",
"items_written": "134",
"price": "0.042",
"currency": "EUR",
"total_price": "0.042",
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}
]
}List reports
This operation is deprecated. Please use the Load records synchronously or Load records asynchronously operations with the REPORTS-USAGE product.
List reports created by the specified account based on filtered provided.
Note that there is a data retention period of 4 days, so reports older than 4 days will not be listed.
Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
Query Parameters
88The account for which the list of reports will be queried.
A comma-separated list of report status values. Reports with any of the statuses specified are returned. The values in the comma-seperated list specified for status can be any of PENDING, PROCESSING, SUCCESS, ABORTED, FAILED, TRUNCATED.
ISO-8601 extended time zone offset or ISO-8601 UTC zone offset formatted date from which the list of reports will be queried. Format yyyy-mm-ddThh:mm:ss[.sss]±hh:mm or yyyy-mm-ddThh:mm:ss[.sss]Z.
ISO-8601 extended time zone offset or ISO-8601 UTC zone offset formatted date until which the list of reports will be queried. Format yyyy-mm-ddThh:mm:ss[.sss]±hh:mm or yyyy-mm-ddThh:mm:ss[.sss]Z.
The number of reports in the list.
https://api.nexmo.com/v2/reports/URI of this search.
The list of reports.
aaaaaaaa-bbbb-cccc-dddd-0123456789abUUID of the request.
SUCCESSStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATED[
"SMS",
"REPORTS-USAGE"
]Which product you wish to generate a report for. NB: CONVERSATIONS has been deprecated - please use CONVERSATION-EVENT instead.
SMSVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2MESSAGESASRCONVERSATION-MESSAGECONVERSATION-EVENTREPORTS-USAGEMEETINGSNETWORK-API-EVENTAMDSMS-TRAFFIC-CONTROLVIDEO-APIabcdef01The account ID (API key) for which the report data is generated (the account_id parameter used in the request).
2017-12-01T00:00:00+00:00ISO-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.
2018-01-01T00:00:00+00:00ISO-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.
falsefalseWhether to include subaccounts or not.
https://requestb.in/12345URL to send a callback upon completion of the report. This POST callback contains the same information as the response to Get status of report.
2019-06-28T15:30:00+0000Time at which the report request was received by the service.
2019-06-28T15:30:00+0000Time at which the report processing of the report has started.
https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789abURI of this document.
https://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789abURL pointing to the generated report.
10The number of rows in the resulting file (when report has been completed).
abcdef01Account authenticated when making Reports API call. Not necessarily the same as account_id for which reports data is requested.
For example, In case of authenticating with master account API Key to request data for it's subaccount, the field will hold master account id/API Key, but report itself will show data related to it's subaccount id (subaccount API Key will be reflected in account_id).
reportsReport's API product.
reports2019-06-28T15:30:00+0000Date when report was requested by Customer by calling Reports API.
2019-06-28T15:30:00+0000Date when Reports API started processing the request.
2019-06-28T15:30:00+0000Date when Reports API finished processing the request.
abcdef01Master account ID of requested account (account_id field in the report). If Master account is not available, the field will be equal to account_id.
{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}Parameters/filters used by the Customer while requesting the report - all possible request parameters are specified at https://developer.vonage.com/en/api/reports#get-records.
134Number of CDRs/records returned in the report
0.042The price for the CDR in the report (individual record in the report).
EURCurrency of the price of the report.
0.042Total price of the report.
aaaaaaaa-bbbb-cccc-dddd-0123456789abThe unique id of the record in the report
Example Response
{
"items_count": "string",
"self_link": "https://api.nexmo.com/v2/reports/",
"reports": [
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "SUCCESS",
"product": "REPORTS-USAGE",
"account_id": "abcdef01",
"date_start": "2017-12-01T00:00:00+00:00",
"date_end": "2018-01-01T00:00:00+00:00",
"include_subaccounts": "false",
"callback_url": "https://requestb.in/12345",
"receive_time": "2019-06-28T15:30:00+0000",
"start_time": "2019-06-28T15:30:00+0000",
"_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"
}
},
"items_count": "10",
"acc": "abcdef01",
"product_type": "reports",
"date_received": "2019-06-28T15:30:00+0000",
"date_started": "2019-06-28T15:30:00+0000",
"date_finished": "2019-06-28T15:30:00+0000",
"master_account_id": "abcdef01",
"request_params": "{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}",
"items_written": "134",
"price": "0.042",
"currency": "EUR",
"total_price": "0.042",
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}
]
}Authentication
| Key | Description | Where | Example |
|---|---|---|---|
| Authorization | Base64 encoded API key and secret joined by a colon. | Headers | Basic <base64> |
[
"SMS",
"REPORTS-USAGE"
]Which product you wish to generate a report for. NB: CONVERSATIONS has been deprecated - please use CONVERSATION-EVENT instead.
SMSVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2MESSAGESASRCONVERSATION-MESSAGECONVERSATION-EVENTREPORTS-USAGEMEETINGSAMDSMS-TRAFFIC-CONTROLabcdef01The account ID (API key) for which the report data is generated (the account_id parameter used in the request).
2017-12-01T00:00:00+00:00ISO-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.
2018-01-01T00:00:00+00:00ISO-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.
falsefalseWhether to include subaccounts or not.
https://requestb.in/12345URL to send a callback upon completion of the report. This POST callback contains the same information as the response to Get status of report.
abcdef01Account authenticated when making Reports API call. Not necessarily the same as account_id for which reports data is requested.
For example, In case of authenticating with master account API Key to request data for it's subaccount, the field will hold master account id/API Key, but report itself will show data related to it's subaccount id (subaccount API Key will be reflected in account_id).
reportsReport's API product.
reports2019-06-28T15:30:00+0000Date when report was requested by Customer by calling Reports API.
2019-06-28T15:30:00+0000Date when Reports API started processing the request.
2019-06-28T15:30:00+0000Date when Reports API finished processing the request.
abcdef01Master account ID of requested account (account_id field in the report). If Master account is not available, the field will be equal to account_id.
{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}Parameters/filters used by the Customer while requesting the report - all possible request parameters are specified at https://developer.vonage.com/en/api/reports#get-records.
134Number of CDRs/records returned in the report
0.042The price for the CDR in the report (individual record in the report).
EURCurrency of the price of the report.
0.042Total price of the report.
aaaaaaaa-bbbb-cccc-dddd-0123456789abThe unique id of the record in the report
Example Request»Reports Usage
{
"product": "REPORTS-USAGE",
"account_id": "abcdef01",
"date_start": "2017-12-01T00:00:00+00:00",
"date_end": "2018-01-01T00:00:00+00:00",
"include_subaccounts": "false",
"callback_url": "https://requestb.in/12345",
"acc": "abcdef01",
"product_type": "reports",
"date_received": "2019-06-28T15:30:00+0000",
"date_started": "2019-06-28T15:30:00+0000",
"date_finished": "2019-06-28T15:30:00+0000",
"master_account_id": "abcdef01",
"request_params": "{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}",
"items_written": "134",
"price": "0.042",
"currency": "EUR",
"total_price": "0.042",
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}{
"product": "REPORTS-USAGE",
"account_id": "abcdef01",
"date_start": "2017-12-01T00:00:00+00:00",
"date_end": "2018-01-01T00:00:00+00:00",
"include_subaccounts": "false",
"callback_url": "https://requestb.in/12345",
"acc": "abcdef01",
"product_type": "reports",
"date_received": "2019-06-28T15:30:00+0000",
"date_started": "2019-06-28T15:30:00+0000",
"date_finished": "2019-06-28T15:30:00+0000",
"master_account_id": "abcdef01",
"request_params": "{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}",
"items_written": "134",
"price": "0.042",
"currency": "EUR",
"total_price": "0.042",
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}aaaaaaaa-bbbb-cccc-dddd-0123456789abUUID of the request.
PENDINGStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATEDSMSWhich product you wish to generate a report for. NB: CONVERSATIONS has been deprecated - please use CONVERSATION-EVENT instead.
SMSVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2MESSAGESASRCONVERSATION-MESSAGECONVERSATION-EVENTREPORTS-USAGEMEETINGSNETWORK-API-EVENTAMDSMS-TRAFFIC-CONTROLVIDEO-APIabcdef01The 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.
2017-12-01T00:00:00+00:00ISO-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.
2018-01-01T00:00:00+00:00ISO-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.
falsefalseWhether to include subaccounts or not.
https://requestb.in/12345URL to send a callback upon completion of the report. This POST callback contains the same information as the response to Get status of report.
2019-06-28T15:30:00+0000Time at which the report request was received by the service.
2019-06-28T15:30:00+0000Time at which the report processing of the report has started.
https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789abURI of this document.
outboundDirection 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. Invalid for REPORTS-USAGE, VOICE-TTS, IN-APP-VOICE, WEBSOCKET-CALL, CONVERSATION-EVENT (deprecated CONVERSATIONS), CONVERSATION-MESSAGE, NUMBER-INSIGHT, VERIFY-API, VERIFY-V2, NUMBER-INSIGHT-V2, NETWORK-API-EVENT, AMD, VIDEO-API, SMS-TRAFFIC-CONTROL`.
inboundoutbounddeliveredSearch only for sms with the corresponding status.
deliveredexpiredfailedrejectedacceptedbufferedunknown40100Search for messages with this client_ref.
4040Search for messages with this account_ref.
falsetrueInclude the text of messages in the report.
falsefalseIndicates whether the SMS was split up into multiple parts (due to its length).
23415The 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).
441234567890Request from this number.
441234567890Request to this number.
Example Response»SMS
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "PENDING",
"product": "SMS",
"account_id": "abcdef01",
"date_start": "2017-12-01T00:00:00+00:00",
"date_end": "2018-01-01T00:00:00+00:00",
"include_subaccounts": "false",
"callback_url": "https://requestb.in/12345",
"receive_time": "2019-06-28T15:30:00+0000",
"start_time": "2019-06-28T15:30:00+0000",
"_links": {
"self": {
"href": "https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}
},
"direction": "outbound",
"status": "delivered",
"client_ref": "stringstringstringstringstringstringstri",
"account_ref": "stringstringstringstringstringstringstri",
"include_message": "true",
"show_concatenated": "false",
"network": "23415",
"from": "441234567890",
"to": "441234567890"
}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.
SUCCESSStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATED[
"SMS",
"REPORTS-USAGE"
]Which product you wish to generate a report for. NB: CONVERSATIONS has been deprecated - please use CONVERSATION-EVENT instead.
SMSVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2MESSAGESASRCONVERSATION-MESSAGECONVERSATION-EVENTREPORTS-USAGEMEETINGSNETWORK-API-EVENTAMDSMS-TRAFFIC-CONTROLVIDEO-APIabcdef01The account ID (API key) for which the report data is generated (the account_id parameter used in the request).
2017-12-01T00:00:00+00:00ISO-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.
2018-01-01T00:00:00+00:00ISO-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.
falsefalseWhether to include subaccounts or not.
https://requestb.in/12345URL to send a callback upon completion of the report. This POST callback contains the same information as the response to Get status of report.
2019-06-28T15:30:00+0000Time at which the report request was received by the service.
2019-06-28T15:30:00+0000Time at which the report processing of the report has started.
https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789abURI of this document.
https://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789abURL pointing to the generated report.
10The number of rows in the resulting file (when report has been completed).
abcdef01Account authenticated when making Reports API call. Not necessarily the same as account_id for which reports data is requested.
For example, In case of authenticating with master account API Key to request data for it's subaccount, the field will hold master account id/API Key, but report itself will show data related to it's subaccount id (subaccount API Key will be reflected in account_id).
reportsReport's API product.
reports2019-06-28T15:30:00+0000Date when report was requested by Customer by calling Reports API.
2019-06-28T15:30:00+0000Date when Reports API started processing the request.
2019-06-28T15:30:00+0000Date when Reports API finished processing the request.
abcdef01Master account ID of requested account (account_id field in the report). If Master account is not available, the field will be equal to account_id.
{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}Parameters/filters used by the Customer while requesting the report - all possible request parameters are specified at https://developer.vonage.com/en/api/reports#get-records.
134Number of CDRs/records returned in the report
0.042The price for the CDR in the report (individual record in the report).
EURCurrency of the price of the report.
0.042Total price of the report.
aaaaaaaa-bbbb-cccc-dddd-0123456789abThe unique id of the record in the report
Example Response»Reports Usage
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "SUCCESS",
"product": "REPORTS-USAGE",
"account_id": "abcdef01",
"date_start": "2017-12-01T00:00:00+00:00",
"date_end": "2018-01-01T00:00:00+00:00",
"include_subaccounts": "false",
"callback_url": "https://requestb.in/12345",
"receive_time": "2019-06-28T15:30:00+0000",
"start_time": "2019-06-28T15:30:00+0000",
"_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"
}
},
"items_count": "10",
"acc": "abcdef01",
"product_type": "reports",
"date_received": "2019-06-28T15:30:00+0000",
"date_started": "2019-06-28T15:30:00+0000",
"date_finished": "2019-06-28T15:30:00+0000",
"master_account_id": "abcdef01",
"request_params": "{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}",
"items_written": "134",
"price": "0.042",
"currency": "EUR",
"total_price": "0.042",
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}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.
SUCCESSStatus of the request.
PENDINGPROCESSINGSUCCESSABORTEDFAILEDTRUNCATED[
"SMS",
"REPORTS-USAGE"
]Which product you wish to generate a report for. NB: CONVERSATIONS has been deprecated - please use CONVERSATION-EVENT instead.
SMSVOICE-CALLVOICE-FAILEDVOICE-TTSIN-APP-VOICEWEBSOCKET-CALLVERIFY-APIVERIFY-V2NUMBER-INSIGHTNUMBER-INSIGHT-V2MESSAGESASRCONVERSATION-MESSAGECONVERSATION-EVENTREPORTS-USAGEMEETINGSNETWORK-API-EVENTAMDSMS-TRAFFIC-CONTROLVIDEO-APIabcdef01The account ID (API key) for which the report data is generated (the account_id parameter used in the request).
2017-12-01T00:00:00+00:00ISO-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.
2018-01-01T00:00:00+00:00ISO-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.
falsefalseWhether to include subaccounts or not.
https://requestb.in/12345URL to send a callback upon completion of the report. This POST callback contains the same information as the response to Get status of report.
2019-06-28T15:30:00+0000Time at which the report request was received by the service.
2019-06-28T15:30:00+0000Time at which the report processing of the report has started.
https://api.nexmo.com/v2/reports/aaaaaaaa-bbbb-cccc-dddd-0123456789abURI of this document.
https://api.nexmo.com/v3/media/aaaaaaaa-bbbb-cccc-dddd-0123456789abURL pointing to the generated report.
10The number of rows in the resulting file (when report has been completed).
abcdef01Account authenticated when making Reports API call. Not necessarily the same as account_id for which reports data is requested.
For example, In case of authenticating with master account API Key to request data for it's subaccount, the field will hold master account id/API Key, but report itself will show data related to it's subaccount id (subaccount API Key will be reflected in account_id).
reportsReport's API product.
reports2019-06-28T15:30:00+0000Date when report was requested by Customer by calling Reports API.
2019-06-28T15:30:00+0000Date when Reports API started processing the request.
2019-06-28T15:30:00+0000Date when Reports API finished processing the request.
abcdef01Master account ID of requested account (account_id field in the report). If Master account is not available, the field will be equal to account_id.
{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}Parameters/filters used by the Customer while requesting the report - all possible request parameters are specified at https://developer.vonage.com/en/api/reports#get-records.
134Number of CDRs/records returned in the report
0.042The price for the CDR in the report (individual record in the report).
EURCurrency of the price of the report.
0.042Total price of the report.
aaaaaaaa-bbbb-cccc-dddd-0123456789abThe unique id of the record in the report
Example Response»Reports Usage
{
"request_id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab",
"request_status": "SUCCESS",
"product": "REPORTS-USAGE",
"account_id": "abcdef01",
"date_start": "2017-12-01T00:00:00+00:00",
"date_end": "2018-01-01T00:00:00+00:00",
"include_subaccounts": "false",
"callback_url": "https://requestb.in/12345",
"receive_time": "2019-06-28T15:30:00+0000",
"start_time": "2019-06-28T15:30:00+0000",
"_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"
}
},
"items_count": "10",
"acc": "abcdef01",
"product_type": "reports",
"date_received": "2019-06-28T15:30:00+0000",
"date_started": "2019-06-28T15:30:00+0000",
"date_finished": "2019-06-28T15:30:00+0000",
"master_account_id": "abcdef01",
"request_params": "{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}",
"items_written": "134",
"price": "0.042",
"currency": "EUR",
"total_price": "0.042",
"id": "aaaaaaaa-bbbb-cccc-dddd-0123456789ab"
}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.
REPORTS-USAGEabcdef01Account authenticated when making Reports API call. Not necessarily the same as account_id for which reports data is requested.
For example, In case of authenticating with master account API Key to request data for it's subaccount, the field will hold master account id/API Key, but report itself will show data related to it's subaccount id (subaccount API Key will be reflected in account_id).
reportsReport's API product.
reports2019-06-28T15:30:00+0000Date when report was requested by Customer by calling Reports API.
2019-06-28T15:30:00+0000Date when Reports API started processing the request.
2019-06-28T15:30:00+0000Date when Reports API finished processing the request.
abcdef01The account ID (API key) for which the report data is generated (the account_id parameter used in the request).
abcdef01Master account ID of requested account (account_id field in the report). If Master account is not available, the field will be equal to account_id.
{product: 'MESSAGES', account_id: '12334sdf', include_message: 'true', include_subaccounts: 'true', direction: 'outbound', date_start: 'Mon Feb 19 00:00:00 GMT 2024', date_end: 'Tue Feb 20 00:00:00 GMT 2024', callback_url: 'test1@example.com'}Parameters/filters used by the Customer while requesting the report - all possible request parameters are specified at https://developer.vonage.com/en/api/reports#get-records.
134Number of CDRs/records returned in the report
0.042The price for the CDR in the report (individual record in the report).
EURCurrency of the price of the report.
0.042Total price of the report.
aaaaaaaa-bbbb-cccc-dddd-0123456789abThe 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. |