Answers to the most frequently asked questions about the use of API endpoints
1. How to find out АРІ key?
АРІ key can be provided only by your Customer Success Manager.
2. Where can the client find the client_id on their own?
Currently, the client_id can only be provided by the Customer Success Manager.
3. How to pass authorization for work with API?
To start working with API, it is necessary to find out the API key and client_id from the Customer Success Manager. Then encode the string in the format {clientId}:{api_key} in base64 and send it to the authorization header. More information in Getting Started With Your API.
4. How do API endpoints work, and how is data updated after a request is sent?
All API points work asynchronously. If you get a 200 OK response, it means that we received and processed your request, and it was validated.
5. How to find out the status of the email sending?
You can find out the status of sending the email in the admin panel in the User profile section or with the help of Webhooks.
6. Is it possible to create a user through АРІ endpoint Add and update user data by user_id before sending the first email?
No, the user is created when you send them the first email through the API endpoint Send system / trigger email.
You can update data for an already created user through API point Add and update user data by user_id. In case there is no user record in the system yet, it will be created when loading the CSV file while launching a marketing campaign.
7. How to provide additional user parameters through the API?
You can update user data or add new parameters in two ways:
- by the project identifier and the user's email through the API point Add and update user data by project id and email;
- by the user identifier (user_id) through the API point Add and update user data by user_id.
8. How to create a user?
The user is automatically created when sending a system / trigger email through API point Send system / trigger email. The user parameters, listed in the table below, are stored in the system and updated during future sendings if the data differs:
Parameter | Description |
---|---|
name | User name |
gender | User gender |
platform_id | 0 - 'Unknown', 1 - 'Desktop', 3 - 'Mobile', 4 - 'Android App', 5 - 'iOS App' |
country_id | Country code |
list_id | User group identifier |
client_user_id | User identifier on the product side |
ak | Auth key - key for user authorization/autologin on the product |
age | User age |
photo | Link to the user's photo |
language_id | Language code |
9. How to fix a mistake in the user's email address?
When processing an API request (to send a system or trigger email, for example), the system checks the validity of the email address and, if necessary, brings it to the correct format, such as: from [email protected] to [email protected].
A separate АPI endpoint Check email validates the email address and brings it to the correct format. This API point can be used to validate the email address before the actual request to send the email.
10. Where to find an example of the response that is received after sending an API request?
On the right side, under the request example, there is a window Response. By selecting a response example of interest (200 or 400, or other measures of possible responses if available), you can see the response example and copy it if needed.
12. What must be done to change the API endpoint for webhooks?
To change the URL address for receiving webhooks for a separate Project, you need to go to the admin panel: in the list of Projects, select the required one, click Edit , go to the Additional tab, and enter the necessary value in the Webhooks field. Don't forget to save the changes by clicking on Save.
If you need to change the API point to receive webhooks for the entire account, then you need to contact CSM.