How to create a new user via API?

Time to read: 3 min

topic.pngThe article covers the following topics:

General Info

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'. 


 import.png Only the General manager has permission to get the 'User edit page'.

 click__1_.pngFind out more about How to Create New User here, and How to Grant Specific Permissions to the General Manager here, to the Affiliate Manager here, and the Account Manager here.

Next thing you need is API URL, you can find it in the 'Settings' Tab -> 'Settings' -> 'Tracking domains' -> 'URLs' section.

Markup 2020-07-22 at 13.29.20.png

click__1_.pngFind 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] Add user

To create a new user via API, you need to navigate to the 'User managing (admin methods)' section in the API Doc and choose the 'Add user' method (follow the link):


Here you may see a lot of parameters that can be used to create a new user. 

These parameters are required:

  • email - [REQUIRED] User's Email
  • password - [REQUIRED] User's password (Available: at least 6 characters)
  • first_name - [REQUIRED] User's first name
  • last_name - [REQUIRED] User's last name
  • roles[] - [REQUIRED] Array of allowed roles.

The required parameter 'roles[]' includes one of the user types: General manager / Affiliate manager / Sales manager, and may includes section visibility. Some roles include others, e.g: 


Below you can find an example on how to create a new user via API:

1) First of all, make sure that headers are entered correctly: 


2) Enter the required and all needed parameters in the body section: 


If everything is entered correctly, you will receive the status '1' response.

cURL Request

The example of user creation via cURL request:

curl --location --request POST '' \
--header 'api-key: c057faba8779ef56bdc493' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode '' \
--data-urlencode 'password=88888888' \
--data-urlencode 'first_name=Api' \
--data-urlencode 'last_name=User' \
--data-urlencode 'roles[0]=ROLE_MANAGER_AFFILIATE' \
--data-urlencode 'roles[1]=ROLE_SECTION_SUPPLIER' \
--data-urlencode 'roles[2]=ROLE_SECTION_PARTNER' \
--data-urlencode 'skype=api_user' \
--data-urlencode 'work_hours=8-8'

article.pngYou may also find the following articles helpful:

 If you have more questions on how to create a new user via API, feel free to contact the Affise Support Team via or your Dedicated Account Manager. 

 Written by Anastasia Deryugina 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request


Please sign in to leave a comment.