Analytics
Get messaging analytics
POST
/
v1
/
channels
/
{channelID}
/
analytics
/
messaging
Get messaging analytics
curl --request POST \
--url https://api.wazapin.com/v1/channels/{channelID}/analytics/messaging \
--header 'Content-Type: application/json' \
--data '
{
"end": 123,
"start": 123,
"country_codes": [
"<string>"
],
"phone_numbers": [
"<string>"
],
"product_types": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
end: 123,
start: 123,
country_codes: ['<string>'],
phone_numbers: ['<string>'],
product_types: ['<string>']
})
};
fetch('https://api.wazapin.com/v1/channels/{channelID}/analytics/messaging', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/channels/{channelID}/analytics/messaging"
payload = {
"end": 123,
"start": 123,
"country_codes": ["<string>"],
"phone_numbers": ["<string>"],
"product_types": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"country_codes": [
"<string>"
],
"data_points": [
{
"conversation": 123,
"conversation_category": "<string>",
"conversation_direction": "<string>",
"conversation_type": "<string>",
"cost": 123,
"country": "<string>",
"delivered": 123,
"end": 123,
"phone_number": "<string>",
"pricing_category": "<string>",
"pricing_type": "<string>",
"sent": 123,
"start": 123,
"volume": 123
}
],
"granularity": "<string>",
"phone_numbers": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}Path Parameters
Channel ID
Body
application/json
End timestamp (Unix epoch)
Data granularity
Available options:
DAY, HOUR, HALF_HOUR Start timestamp (Unix epoch)
Filter by country codes
Filter by phone numbers
Filter by product types
⌘I
Get messaging analytics
curl --request POST \
--url https://api.wazapin.com/v1/channels/{channelID}/analytics/messaging \
--header 'Content-Type: application/json' \
--data '
{
"end": 123,
"start": 123,
"country_codes": [
"<string>"
],
"phone_numbers": [
"<string>"
],
"product_types": [
"<string>"
]
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
end: 123,
start: 123,
country_codes: ['<string>'],
phone_numbers: ['<string>'],
product_types: ['<string>']
})
};
fetch('https://api.wazapin.com/v1/channels/{channelID}/analytics/messaging', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.wazapin.com/v1/channels/{channelID}/analytics/messaging"
payload = {
"end": 123,
"start": 123,
"country_codes": ["<string>"],
"phone_numbers": ["<string>"],
"product_types": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"country_codes": [
"<string>"
],
"data_points": [
{
"conversation": 123,
"conversation_category": "<string>",
"conversation_direction": "<string>",
"conversation_type": "<string>",
"cost": 123,
"country": "<string>",
"delivered": 123,
"end": 123,
"phone_number": "<string>",
"pricing_category": "<string>",
"pricing_type": "<string>",
"sent": 123,
"start": 123,
"volume": 123
}
],
"granularity": "<string>",
"phone_numbers": [
"<string>"
]
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"message": "<string>",
"code": "<string>",
"field": "<string>",
"location": "<string>"
}
],
"request_id": "<string>"
}
}