For the complete documentation index, see llms.txt. This page is also available as Markdown.

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.

get

List contacts. Use search to filter by name or WhatsApp ID.

Authorizations
AuthorizationstringRequired

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.

Query parameters
limitintegerOptional

Number of results to return per page.

offsetintegerOptional

The initial index from which to return the results.

searchstringOptional

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.

Responses
200Success
application/json
countintegerRequiredExample: 123
nextstring · uri · nullableOptionalExample: http://api.example.org/accounts/?offset=400&limit=100
previousstring · uri · nullableOptionalExample: http://api.example.org/accounts/?offset=200&limit=100
get/api/v1/contacts/
GET /api/v1/contacts/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
200Success
{
  "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
    }
  ]
}
get

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

Authorizations
AuthorizationstringRequired

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.

Path parameters
wa_idstringRequiredPattern: ^[^/]+$
Responses
200Success
application/json
get/api/v1/contacts/{wa_id}/
GET /api/v1/contacts/{wa_id}/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
200Success
{
  "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"
      }
    }
  ]
}
post

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.

Authorizations
AuthorizationstringRequired

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.

Path parameters
wa_idstringRequiredPattern: ^[^/]+$
Body
reasonstring · max: 60Optional

Optional string with max length 60. Free form block reason. Will be used when another business account is being blocked.

Default: ""
Responses
200

No response body

No content

post/api/v1/contacts/{wa_id}/block/
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

post

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.

Authorizations
AuthorizationstringRequired

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.

Path parameters
wa_idstringRequiredPattern: ^[^/]+$
Body
reasonstring · max: 60Optional

Optional string with max length 60. Free form block reason. Will be used when another business account is being blocked.

Default: ""
blockbooleanOptional

True or false optional boolean with default of false

Default: false
message_idstringOptional

Optional reported message id

Responses
200

No response body

No content

post/api/v1/contacts/{wa_id}/report/
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

post

Unblock contacts which were blocked or reported to block previously.

Authorizations
AuthorizationstringRequired

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.

Path parameters
wa_idstringRequiredPattern: ^[^/]+$
Body
reasonstring · max: 60Optional

Optional string with max length 60. Free form block reason. Will be used when another business account is being blocked.

Default: ""
Responses
200

No response body

No content

post/api/v1/contacts/{wa_id}/unblock/
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

get

View blocked contacts list. These phone numbers are blocked by the user due to spam and abuse of WhatsApp.

Authorizations
AuthorizationstringRequired

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.

Query parameters
limitintegerOptional

Number of results to return per page.

offsetintegerOptional

The initial index from which to return the results.

Responses
200Success
application/json
get/api/v1/contacts/blocklist/
GET /api/v1/contacts/blocklist/ HTTP/1.1
Host: your-stack.inbox.getchat.360dialog.io/
Authorization: Token YOUR_TOKEN
Accept: */*
200Success
{
  "contacts": [
    {
      "wa_id": "16315551000@s.whatsapp.net"
    }
  ],
  "pagination": {
    "limit": 10,
    "offset": 0,
    "total": 1
  }
}

Last updated

Was this helpful?