Time to read: 3 min
The article covers the following topics:
First of all, to get started with API, you need to find your API-key. To do it, just navigate to the 'Users' Tab - > 'Users management' -> 'User edit page'.
Only the General manager has permission to get the 'User edit page'.
Next thing you need is API URL, you can find it in the 'Settings' Tab -> 'Settings' -> 'Tracking domains' -> 'URLs' section.
Find out more about where you can find your/Affiliate's API-key and API URL here.
API Request Structure: GET/POST + api domain + path + ? + api-key=189471975956279174174.
It should be noted that header content-type - application/x-www-form-urlencoded is used on an ongoing basis, and content-type - multipart/form-data is used for uploading files (logo, creative files).
[POST] Edit user
Some user data can be changed by this method:
- email - User's Email
- password - User's password (Available: at least 6 characters)
- first_name - User's first name
- last_name - User's last name
- roles - Array of allowed roles.
- skype - User's skype
- work_hours - User's working time
- type - User type
There is no need to rewrite all parameters, only those parameters that need to be changed.
Below you can find an example on how to edit the user via API:
1) First of all, make sure that headers are entered correctly:
2) Enter the needed parameters in the body section:
If everything is entered correctly, you will receive the status '1' response.
The example of user editing via cURL request:
curl --location --request POST 'http://api.affise.com/3.0/admin/user/5f17ed6b3e10795af' \
--header 'api-key: c057faba8779ef56bdc493c' \
--header 'Content-Type: application/x-www-form-urlencoded' \
You may also find the following articles helpful:
If you have more questions on how to edit the user via API, feel free to contact the Affise Support Team via firstname.lastname@example.org or your Dedicated Account Manager.
Written by Anastasia Deryugina