Contacts
WhatsApp Users' contact details
The Inbox does not keep or manage your contacts. Instead, you can connect your existing contact books or databases, using Contact Providers.
When one or more Contact Providers are successfully connected to your inbox, you will be able to request related contact data from endpoints described here.
In the /contacts/ section, there are also WhatsApp Business API provided endpoints like: verifying the Contact, blocking WhatsApp number, reporting WhatsApp user to Meta.
List contacts. Use search to filter by name or WhatsApp ID.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
Number of results to return per page.
The initial index from which to return the results.
Filter Contacts by string query.
Searching is expensive, so when implementing this functionality on the frontend, make sure the user really finished typing the search query before calling this endpoint.
123http://api.example.org/accounts/?offset=400&limit=100http://api.example.org/accounts/?offset=200&limit=100GET /api/v1/contacts/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
{
"count": 123,
"next": "http://api.example.org/accounts/?offset=400&limit=100",
"previous": "http://api.example.org/accounts/?offset=200&limit=100",
"results": [
{
"name": "text",
"initials": "text",
"phone_numbers": [
{
"phone_number": "text"
}
],
"email_addresses": [],
"urls": [],
"contact_provider": null
}
]
}Retrieves Contact details. You should try to use this endpoint as little as possible, for example:
when a detailed view of one Person is displayed
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
^[^/]+$GET /api/v1/contacts/{wa_id}/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
{
"person": {
"wa_id": "text",
"bsuid": "text",
"phone_number": "text",
"waba_payload": {
"profile": {
"name": "text"
},
"wa_id": "text"
},
"initials": "text",
"last_message_timestamp": 1,
"messaging_window_expires_at": 1,
"messaging_window_origin": "text",
"resolved": true
},
"contact_provider_results": [
{
"name": "text",
"initials": "text",
"avatar": "https://example.com",
"large_avatar": "https://example.com",
"phone_numbers": [
{
"phone_number": "text",
"description": "text"
}
],
"email_addresses": [
{
"email_address": "name@gmail.com",
"description": "text"
}
],
"urls": [
{
"url": "https://example.com",
"description": "text"
}
],
"contact_provider": {
"type": "google",
"name": "text",
"id": "123e4567-e89b-12d3-a456-426614174000"
}
}
]
}Block contacts due to spam and abuse of WhatsApp. To block a contact they had to have sent you a message in the last 24 hours.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
^[^/]+$Optional string with max length 60. Free form block reason. Will be used when another business account is being blocked.
""No response body
No content
User error. Please check your request and API response.
POST /api/v1/contacts/{wa_id}/block/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"reason": ""
}No content
Report contacts due to spam and abuse of WhatsApp. Before reporting a contact, they had to have sent you a message in the last 24 hours.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
^[^/]+$Optional string with max length 60. Free form block reason. Will be used when another business account is being blocked.
""True or false optional boolean with default of false
falseOptional reported message id
No response body
No content
POST /api/v1/contacts/{wa_id}/report/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 47
{
"reason": "",
"block": false,
"message_id": "text"
}No content
Unblock contacts which were blocked or reported to block previously.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
^[^/]+$Optional string with max length 60. Free form block reason. Will be used when another business account is being blocked.
""No response body
No content
User error. Please check your request and API response.
POST /api/v1/contacts/{wa_id}/unblock/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 13
{
"reason": ""
}No content
View blocked contacts list. These phone numbers are blocked by the user due to spam and abuse of WhatsApp.
A user token, sent as Token <token>. Create a user in the admin panel (group App integration) and get its token from POST /api/v1/auth/token/. The channel API key (D360-Api-Key) is not supported.
Number of results to return per page.
The initial index from which to return the results.
GET /api/v1/contacts/blocklist/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
{
"contacts": [
{
"wa_id": "16315551000@s.whatsapp.net"
}
],
"pagination": {
"limit": 10,
"offset": 0,
"total": 1
}
}Last updated
Was this helpful?