WhatsApp Reports
Use the WhatsApp Reports APIs to create message reports, fetch report URLs, view campaign summaries, download opt-in reports, and count templates.
API overview
Create reports for your WhatsApp Business account.
Create a campaign-specific report for a WhatsApp Business account.
Fetch campaign data by using the report ID.
View campaign summary details for a WhatsApp Business account.
View report summary details for generated WhatsApp reports.
Create a report for user opt-ins.
Download the user opt-ins report.
Count approved templates associated with a WhatsApp Business account.
Endpoint summary
| API | Purpose | URL |
|---|---|---|
| Create Report | Create reports for your WhatsApp Business account. | https://apis.rmlconnect.net/whatsapp/report/v1/create_report/myaccounts_panel |
| Create Campaign Specific Report | Create a campaign-specific report for WhatsApp Business account. | https://apis.rmlconnect.net/whatsapp/report/v1/create_campaign_specific_report/myaccounts_panel |
| Fetch Report URL | Fetch campaign data by entering the report_id parameter details. | https://apis.rmlconnect.net/whatsapp/report/v1/fetch_campaign_specific_report/{report_id} |
| View Campaign Summary | View the campaign summary for the WhatsApp Business account. | https://apis.rmlconnect.net/whatsapp/report/v1/fetch_campaign_details |
| View Report Summary | View report summary for the WhatsApp Business account. | https://apis.rmlconnect.net/whatsapp/report/v1/fetch_reports |
| Optin Create Report | Report user opt-ins for receiving messages from a business. | https://apis.rmlconnect.net/whatsapp/report/v1/optin-download |
| Download Optin Report | Download the user opt-ins report for receiving messages from a business. | https://apis.rmlconnect.net/whatsapp/report/v1/summary/download_optin_report |
| Template Wise Count | Count approved templates associated with a WhatsApp Business account. | https://apis.rmlconnect.net/whatsapp/report/v1/template-count |
Create Report
Create reports for your WhatsApp Business account. Use the projections while creating a new report.
Available projection fields
| Field | Description |
|---|---|
| country_code | The country code of the phone number. |
| msisdn | The phone number of the customer. |
| message_type | The type of the message, such as text, image, video, and document. |
| message_payload | The content of the message. |
| request_id | The request ID of the message. |
| conversation_id | The conversation ID of the message. |
| message_id | The message ID of the message. |
| submit_timestamp | The timestamp when the message was submitted. |
| sent_timestamp | The timestamp when the message was sent. |
| delivery_timestamp | The timestamp when the message was delivered. |
| read_timestamp | The timestamp when the message was read. |
| failed_timestamp | The timestamp when the message failed to be delivered. |
| deleted_timestamp | The timestamp when the message was deleted. |
| extra | Any additional metadata associated with the message. |
| pricing_model | The pricing model for the message. |
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/create_report/myaccounts_panel |
| Authorization | jwt |
| Request Body schema | application/json |
Request sample
{
"csv_max_lines": 10000,
"filters": {
"end_date": "{end-date}",
"start_date": "{start-date}"
},
"projections": [
"country_code",
"msisdn",
"message_type",
"message_payload",
"request_id",
"conversation_id",
"message_id",
"submit_timestamp",
"sent_timestamp",
"delivery_timestamp",
"read_timestamp",
"failed_timestamp",
"deleted_timestamp",
"extra",
"pricing_model"
]
}Request body parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| csv_max_lines | Yes | number | An integer representing the maximum number of lines to include in the CSV file. |
| filters | Yes | object (whatsappreportv1create_reportmyaccounts_panel_filters) | A JSON object that contains the start and end dates for the report. The format of the dates should be in YYYY-MM-DD format. |
| projections | Yes | Array of strings | An array of fields that you want to include in the report. |
Create Report responses
202 Accepted
Response
{
"status": "success",
"id": 86
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the report. |
| id | integer | The unique identifier that represents the report. |
400 Bad Request
Response
{
"status": "failed",
"errors": {
"filters": {
"start_date": [
"Missing data for required field."
]
}
}
}Response Schema: application/json
One of create_report_400_invalid_start_date/create_report_400_invalid_end_date
| Field | Type | Description |
|---|---|---|
| status | string | The status of the report. |
| errors | object | The error message details. |
401 Authentication Failure
Response
{
"message": "Unable to process request",
"status": "Failed",
"reason": "Please check the integrity or validity of the token sent."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the product feed update request. |
| status | string | The status of the product feed update. |
500 Internal Server Error
Response
{
"status": "failed",
"errors": "Contact administration for more info"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the report. |
| errors | string | The error for not generating the report. |
Create Campaign Specific Report
Create a campaign-specific report for WhatsApp Business account. The projections field contains a comma-separated list of field names.
Available projection fields
| Field | Description |
|---|---|
| country_code | The country code of the recipient's phone number. |
| msisdn | The recipient's phone number. |
| message_type | The type of the message, such as text, image, and video. |
| message_payload | The content of the message. |
| request_id | The unique ID assigned to the message by the WhatsApp Business API. |
| conversation_id | The ID of the conversation thread. |
| message_id | The ID of the message. |
| submit_timestamp | The timestamp of when the message was submitted to the API. |
| sent_timestamp | The timestamp of when the message was sent to the recipient. |
| delivery_timestamp | The timestamp of when the message was delivered to the recipient. |
| read_timestamp | The timestamp of when the message was marked as read by the recipient. |
| failed_timestamp | The timestamp of when the message failed to be delivered. |
| deleted_timestamp | The timestamp of when the message was deleted. |
| extra | Additional information about the message. |
| pricing_model | The pricing model used for the message. |
| scheduled_time | The scheduled time of the message, if it was a scheduled message. |
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/create_campaign_specific_report/myaccounts_panel |
| Authorization | jwt |
| Request Body schema | application/json |
Request sample
{
"csv_max_lines": 100000,
"filters": {
"campaign_id": "{campaign-id}",
"campaign_name": "{campaign-name}",
"end_date": "{end-date}",
"start_date": "{start-date}"
},
"projections": [
"country_code",
"msisdn",
"message_type",
"message_payload",
"request_id",
"conversation_id",
"message_id",
"submit_timestamp",
"sent_timestamp",
"delivery_timestamp",
"read_timestamp",
"failed_timestamp",
"deleted_timestamp",
"extra",
"pricing_model",
"scheduled_time"
]
}Request body parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| csv_max_lines | Yes | number | An integer representing the maximum number of lines to include in the CSV file. |
| filters | Yes | object (whatsappreportv1create_campaign_specific_reportmyaccounts_panel_filters) | An object containing the filters to apply to the report. |
| projections | Yes | Array of strings | An array of strings representing the fields to include in the report. |
Create Campaign Specific Report responses
202 Accepted
Response
{
"status": "success",
"id": 186
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status for the campaign specific report. |
| id | integer | The unique identifier that represents the campaign specific report. |
400 Bad Request
Response
{
"status": "failed",
"errors": {
"filters": {
"start_date": [
"Missing data for required field."
]
}
}
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status for the campaign specific report. |
| errors | object | The object that represents the error messages. |
401 Authentication Failure
Response
{
"message": "Unable to process request",
"status": "Failed",
"reason": "Please check the integrity or validity of the token sent."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the product feed update request. |
| status | string | The status of the product feed update. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
500 Internal Server Error
Response
{
"status": "failed",
"errors": "Contact administration for more info"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status for the campaign specific report. |
| errors | string | The error for not generating the report. |
Fetch Report URL
Fetch campaign data from the provided URL by entering the report_id parameter details.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/fetch_campaign_specific_report/{report_id} |
| Authorization | jwt |
Path parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| report_id | Yes | string | Unique ID of the report. |
Fetch Report URL responses
202 Accepted
Response
{
"message": "report is not yet generated"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
400 Bad Request
Response
{
"report_url": "url"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| report_url | string | The URL of the report. |
401 Authentication Failure
Response
{
"message": "Unable to process request",
"status": "Failed",
"reason": "Please check the integrity or validity of the token sent."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| status | string | The status of the report. |
| reason | string | The status for not generating the report. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
500 Internal Server Error
Response
{
"message": "Exception in Fetch Campaign Report",
"reason": "reason"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the request or not generating the report. |
View Campaign Summary
View the campaign summary for the WhatsApp Business account. Ensure that you provide an authentication token in the request headers for the successful API call.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/fetch_campaign_details |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page_number | Yes | number | The page number of the results to be fetched. Default is "1". |
| download | Yes | boolean | Example: download=true A boolean flag indicating whether to download the report or not. Default value is 'false'. |
| start-date | Yes | string | The start date in "YYYY-MM-DD" order followed by the time in the "HH:MM:SS" format, that specifies the beginning of the date range for which to fetch campaign summary report. |
| end-date | Yes | string | The end date in "YYYY-MM-DD" order followed by the time in the "HH:MM:SS" format, that specifies the end of the date range for which to fetch campaign summary report. |
View Campaign Summary responses
200 Success
Response
{
"result": [
{
"campaign_id": "276f63e2-cb36-11ed-af9d-0242ac13xxxx",
"campaign_name": "rmluxxx1-3",
"campaign_status": "done",
"campaign_type": "generalized",
"delivered": 2,
"failed": 1,
"message_payload": {
"country_code": "+91",
"media": {
"lang_code": "en",
"template_name": "testing_16_03",
"type": "media_template"
},
"phone": "704527xxxx"
},
"message_type": "media_template",
"process_end_timestamp": "2023-03-25 17:55:02.815756",
"process_start_timestamp": "2023-03-25 17:55:00.051162",
"read": 1,
"scheduled_time": "string",
"sent": 3,
"submit": 3,
"user_name": "RMLxxx11"
},
{
"campaign_id": "1fd39188-cb2e-11ed-9866-0242acxxxxx5",
"campaign_name": "testuxxx1-2",
"campaign_status": "done",
"campaign_type": "generalized",
"delivered": 2,
"failed": 1,
"message_payload": {
"country_code": "+91",
"media": {
"lang_code": "en",
"template_name": "testing_16_03",
"type": "media_template"
},
"phone": "704527xxxx"
},
"message_type": "media_template",
"process_end_timestamp": "2023-03-25 16:58:45.853958",
"process_start_timestamp": "2023-03-25 16:58:43.181214",
"read": 1,
"scheduled_time": "string",
"sent": 3,
"submit": 3,
"user_name": "RMLUxxxx"
}
]
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| result | Array of objects (inline_response_200_5_result) | The campaign summary result. |
401 Authentication Failure
Response
{
"message": "Unable to process request",
"status": "Failed",
"reason": "Please check the integrity or validity of the token sent."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| status | string | The status of the view campaign summary. |
| reason | string | The reason for not generating the generating the view campaign summary. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
500 Internal Server Error
Response
{
"message": "Exception in Fetch Campaign Manager",
"reason": "'Request' object has no attribute 'username'"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the request or not generating the report. |
View Report Summary
View report summary for the WhatsApp Business account.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/fetch_reports |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| start_date | Yes | string | The start date in "YYYY-MM-DD" order followed by the time in the "HH:MM:SS" format, that specifies the beginning of the date range for which to fetch reports. |
| end_date | Yes | string | The end date in "YYYY-MM-DD" order followed by the time in the "HH:MM:SS" format, that specifies the end of the date range for which to fetch reports. |
| page_number | No | string | The page number of the paginated results to return. The default value is 1. |
| page_size | No | string | The number of results to return per page. The default value is 5. |
View Report Summary responses
200 Success
Response
{
"result": [
{
"file_path": "fa15c156-8dba-11ed-bc2b-0242acxxxxx5.zip",
"id": "107xxx",
"msisdn": "string",
"payload": {
"csv_max_lines": 100000,
"filters": {
"end_date": "2023-01-06",
"start_date": "2023-01-06"
},
"projections": [
"country_code",
"msisdn",
"message_type",
"message_payload",
"request_id",
"conversation_id",
"message_id",
"submit_timestamp",
"sent_timestamp",
"delivery_timestamp",
"read_timestamp",
"failed_timestamp",
"deleted_timestamp",
"extra",
"pricing_model",
"pricing_category",
"expiration_timestamp"
],
"request_source": "support_panel"
},
"status": "deleted",
"timestamp": "Fri, 06 Jan 2023 12:09:31 GMT",
"username": "dxxxxhatsapp"
}
]
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| result | Array of objects | An array of objects representing the result or response of the operation. Array |
| file_path | string | The file path or name associated with the result. |
| id | integer | The identifier associated with the result. |
| msisdn | string or null | The mobile phone number associated with the result. |
| payload | object | Additional payload information related to the result. |
| status | string | The status of the result. |
| timestamp | string | The timestamp of the result. |
| username | string | The username associated with the result. |
401 Authentication Failure
Response
{
"status": "Unauthorized"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the message. |
404 Page Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
Optin Create Report
The Optin Create Report endpoint is used to report user opt-ins for receiving messages from a business.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/optin-download |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
Query parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| from_date | Yes | string <date> | from_date=2023-08-07 | The starting date of the user opt-ins for receiving messages. |
| to_date | Yes | string <date> | to_date=2023-08-07 | The end date of the user opt-ins for receiving messages. |
Optin Create Report responses
200 Success
Response
{
"status": "success",
"id": 5748
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the optin create report. |
| id | integer | The unique identifier that represents the report. |
401 Unauthorized
Response
{
"message": "unable to process campaign request",
"reason": "jwt token expired",
"status": "failure"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not generating the optin create report. |
| status | string | The status of the report. |
404 Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
500 Internal Server Error
Response
{
"status": "failure",
"message": "unable to process request",
"reason": "internal server error"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not generating the option create report. |
| status | string | The status of the report. |
Download Optin Report
The Download Optin Report endpoint is used to download the user opt-ins report for receiving messages from a business.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/summary/download_optin_report |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
Query parameters
| Parameter | Required | Type | Example | Description |
|---|---|---|---|---|
| from_date | Yes | string | from_date=2023-08-07 | The starting date of the user opt-ins for receiving messages. |
| to_date | Yes | string | to_date=2023-08-07 | The end date of the user opt-ins for receiving messages. |
Download Optin Report responses
200 Success
Response
{
"country_code": "91",
"msisdn": "973905xxxx",
"timestamp": "2022 - 09 - 06 10: 47: 01.198255",
"channel": "whatsapp-api",
"status": "optin",
"extra": ""
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| country_code | string | The country code of the phone number. |
| msisdn | string | The phone number of the customer. |
| timestamp | string | The timestamp of the message. |
| channel | string | The channel through which the user opted in. |
| status | string | The status of the optin report download. |
| extra | string | Any additional information related to the optin process. |
401 Unauthorized
Response
{
"message": "unable to process campaign request",
"reason": "jwt token expired",
"status": "failure"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the download optin report request. |
| status | string | The status of the optin report download. |
404 Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
500 Internal Server Error
Response
{
"status": "failure",
"message": "unable to process request",
"reason": "internal server error"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| status | string | The status of the optin report download. |
| message | string | The response message. |
| reason | string | The reason for not processing the download optin report request. |
Template Wise Count
The Template Wise Count endpoint is used to count approved templates associated with a WhatsApp Business account.
Endpoint details
| Field | Value |
|---|---|
| URL | https://apis.rmlconnect.net/whatsapp/report/v1/template-count |
| Authorization | jwt |
| API Key | jwt |
| Header parameter name | Authorization |
Query parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| start_date | Yes | string | The start date for the template count in "YYYY-MM-DD" format. |
| end_date | Yes | string | The end date for the template count in "YYYY-MM-DD" format. |
Template Wise Count responses
200 Success
Response
{
"result": [
{
"template_count": 8,
"template_name": "bilan"
},
{
"template_count": 3,
"template_name": "bmntest12"
},
{
"template_count": 1,
"template_name": "delhi_metro_english_quick_n"
},
{
"template_count": 4,
"template_name": "demo202"
},
{
"template_count": 7,
"template_name": "xyzz888"
}
]
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| result | Array of objects | Array of template count objects. |
| template_count | integer | The template count number. |
| template_name | string | The template name. |
401 Unauthorized
Response
{
"message": "unable to process campaign request",
"reason": "jwt token expired",
"status": "failure"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
| reason | string | The reason for not processing the template count request. |
| status | string | The status of the template count request. |
404 Not Found
Response
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again."
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The response message. |
500 Internal Server Error
Response
{
"status": "failure",
"message": "unable to process request",
"reason": "internal server error"
}Response Schema: application/json
| Field | Type | Description |
|---|---|---|
| message | string | The message response. |
| reason | string | The reason for not processing the template count request. |
| status | string | The status of the template count request. |
Updated 4 days ago