Zenvia Customer Cloud allows you to automate processes using our available channel APIs.
To use these features, you only need to be registered in the solution and obtain the necessary credentials, as explained in this article.
Then, you'll be able to integrate our Multichannel API with your system and communicate with your customers through various channels.
Suppose a customer places an order and provides their phone number and email address during checkout. With the SMS API, for example, you can send a message informing them that the product has been received and is being processed. Or, with the Email API, automatically send tracking details once the order has been shipped.
API integration requires advanced technical knowledge, so it's important to have a developer's assistance. You can consult the technical information in the Zenvia APIs.
How to access
The Tokens and Webhooks screen allows you to use the multichannel APIs.
To access it, follow the instructions:
In the side menu, click on Settings > Tokens and Webhooks.
Create new token
A Token is an authentication key used with our APIs. You will use it to perform integrations and other requests. To create one, follow these steps on the Tokens and Webhooks screen:
- Click on the Create New option under Tokens;
- Enter a Name for identification;
- Choose the authentication type:
- Standard: Uses only the token to validate the connection between systems.
- With signature: Adds a digital signature to the token, providing an extra layer of security.
- Finish by clicking Save.
Done. A new screen will appear with your key. Save this code securely, as it will only be shown this one time.
💡 Tip: If you prefer, click the Download .CSV button to save the file containing the key.
If you want to delete the Token, go back to the Tokens and Webhooks screen and click on the Delete option.
Create new Webhook
Webhooks are optional and allow you to receive events at the configured URL to capture the desired information.
Follow the instructions on the Tokens & Webhooks screen:
- Click on Create New under Webhookand select the following options:
- URL: Provide a valid URL to receive automatic notifications.
- Status: Choose between Active or Inactive. The difference determines whether automatic event notifications will be sent.
- Version: Select the version type, referring to a specific iteration of the webhook service to indicate updates or improvements.
- Event type: Indicate the desired event type: Message or Message status. Message events notify about content, while status events focus on delivery or processing updates.
- Channel: Choose the channel to receive automatic notifications only for events related to it.
- Headers: Fill in the Key and Value fields to configure HTTP headers, such as "Content-Type: application/json". Customize them according to the destination’s authentication requirements.
- URL: Provide a valid URL to receive automatic notifications.
If you prefer, you can save the Webhook right away after filling out the basic information, without configuring OAuth2 authentication. OAuth2 is optional and can be set up later to add more security to your event handling.
Webhooks with OAuth2
To ensure greater security when sending notifications, use OAuth2 authentication. With it, Zenvia automatically obtains a valid access token before sending each webhook, protecting your system from unauthorized access.
- When creating or editing a Webhook, enable the OAuth Authentication option.
- Fill in the following authentication fields:
- Authentication Type: Provide the URL where the OAuth2 request will be made to obtain the access token.
- Headers: Add key-value pairs to be sent with the authentication request, if needed (e.g., Content-Type: application/json).
- Query Params: If your authentication requires additional URL parameters, enter them in the key and value fields.
- Grant type: Fixed field with the value Client Credentials, used for system-to-system authentication.
- Client ID and Client Secret: Credentials provided by the authentication service to validate your integration.
- Refresh token (optional): Fill in this field if your OAuth2 implementation uses a refresh token.
- Expiration time in seconds (optional): If needed, define the token's validity duration. Enter a number in seconds (e.g., 3600 = 1 hour).
After filling out the OAuth2 fields, make sure the main Webhook fields have already been configured (such as channel, event type, delivery URL, and HTTP headers). If not, complete that information before clicking Save.
If you want to delete a Webhook, go back to the Tokens & Webhooks screen and click on the Delete option.Done! With the Webhook configured using OAuth2, you can now receive secure notifications and integrate them with Zenvia’s channels. Check our technical documentation for more details or run tests in the Sandbox.