Skip to main content

Wati APIs overview

Updated today

Summary

Wati provides a set of APIs that help you interact with WhatsApp programmatically. You can use these APIs to send and receive messages, manage contacts, handle media, and integrate Wati with your existing systems. This guide gives you a clear overview of the available APIs and what each one does, so you can get started quickly.

Instructions

Available APIs

With Wati, you can access multiple APIs grouped by functionality.

Messaging APIs

Use these APIs to send and receive messages on WhatsApp.

  • Get messages from WhatsApp number - Retrieve messages received on your WhatsApp number.

  • Send session message - Send a message within an active WhatsApp session.

  • Send session file - Send a file attachment within an active session.

  • Send template message - Send a pre-approved WhatsApp template message.

  • Send template messages (bulk) - Send multiple template messages at once.

  • Send template message using CSV - Upload a CSV file to send template messages in bulk.

  • Send interactive button message - Send messages with clickable buttons for quick responses.

  • Send interactive list message - Send messages with a selectable list of options.

Contact management APIs

Use these APIs to manage your contact database.

  • Get contact list - Retrieve all contacts stored in Wati.

  • Add contact - Create a new contact.

  • Update contact attributes - Modify details of an existing contact.

Media and authentication APIs

Use these APIs to manage files and secure access.

  • Get media by file name - Retrieve media files using their file names.

  • Rotate token - Refresh your authentication token to maintain secure API access.

Operator and assignment APIs

Use these APIs to manage chat ownership and routing.

  • Assign operator - Assign a WhatsApp conversation to a specific operator.

Where can I find the API endpoint and access token?

To access your API details in Wati:

1. Log in to your Wati account.

2. In the navigation menu, click API, or go to: Connector → API → Create API Token

3. On the API Tokens page, click Generate new token.

4. Enter a token name and select the required scopes (permissions), such as:

  • contacts:read

  • contacts:write

  • messagetemplate:read

5. (Optional) Set an expiry date for the token. For security, rotating tokens every 6 months is recommended.

6. Copy and securely store the generated token.

Note:

  • The new Create New Token option removes user-level dependencies and will remain valid until it is manually updated or reaches its expiry date.

  • When you use Create New Token option - the token is displayed only once at the time of generation, so be sure to copy and store it securely.

Additional resources

These APIs help you automate WhatsApp communication, streamline messaging workflows, and manage customer interactions more efficiently. Refer to the documentation for implementation details and best practices.

Frequently Asked Questions (FAQs)

Messaging APIs

1. What are Wati messaging APIs used for?

Wati messaging APIs allow you to send and receive WhatsApp messages programmatically. These APIs enable actions such as retrieving messages received on your WhatsApp number, sending messages or files within an active WhatsApp session, sending pre-approved template messages, sending bulk template messages, and sending interactive messages with buttons or selectable lists.

2. How can you retrieve messages received on your WhatsApp number using Wati APIs?

You can retrieve messages received on your WhatsApp number by using the Get messages from WhatsApp number API. This API returns messages that have been received on the connected WhatsApp number in Wati.

3. What types of messages can be sent using Wati messaging APIs?

Wati messaging APIs allow you to send several types of messages, including session messages during an active WhatsApp session, file attachments within an active session, pre-approved WhatsApp template messages, bulk template messages, interactive button messages, and interactive list messages.

Contact management APIs

4. What are Wati contact management APIs used for?

Wati contact management APIs allow you to manage the contact database stored in Wati. These APIs allow you to retrieve the contact list, create new contacts, and update the attributes of existing contacts.

5. How can you retrieve or update contacts using Wati APIs?

You can retrieve contacts using the Get contact list API, create a new contact using the Add contact API, and modify contact details using the Update contact attributes API.

Media, authentication, and conversation management

6. What are media and authentication APIs in Wati used for?

Media and authentication APIs allow you to retrieve media files stored in Wati and maintain secure API access. For example, the Get media by file name API retrieves stored media files, and the Rotate token API refreshes the authentication token used to access Wati APIs.

7. How can you assign a WhatsApp conversation to an operator using Wati APIs?

You can assign a WhatsApp conversation to a specific operator using the Assign operator API. This API routes the conversation to the selected operator so they can manage the chat.

API access and setup

8. Where can you find the API endpoint and access token in Wati?

You can find the API endpoint and access token by logging in to your Wati account and navigating to API in the navigation menu, or by going to Connector → API → Create API Token.

9. How do you generate a new API token in Wati?

To generate a new API token, open the API Tokens page in Wati, click Generate new token, enter a token name, select the required scopes such as contacts:read, contacts:write, or messagetemplate:read, optionally set an expiry date, and then copy and securely store the generated token. Rotating tokens every six months is recommended for security.

Did this answer your question?