Skip to main content
POST
/
management
/
v1
/
projects
/
{projectId}
/
users
Assign User
curl --request POST \
  --url https://{cluster}.voucherify.io/management/v1/projects/{projectId}/users \
  --header 'Content-Type: application/json' \
  --header 'X-Management-Id: <api-key>' \
  --header 'X-Management-Token: <api-key>' \
  --data '{
  "id": "<string>",
  "login": "<string>",
  "role": "<string>"
}'
{
  "id": "user_FgEAjOV6RiObJdy36sYynXdqZNiA5gjM",
  "login": "name@youremaildomain.com",
  "email": "name@youremaildomain.com",
  "first_name": "Sammy",
  "last_name": "Jones",
  "projects": {
    "proj_9KeAhZB1": "USER",
    "proj_npnFzPr9": "USER",
    "proj_pEP3NO9s": "USER",
    "proj_zsPdrUIw": "ADMIN"
  },
  "is_owner": false
}

Authorizations

X-Management-Id
string
header
required
X-Management-Token
string
header
required

Path Parameters

projectId
string
required

Provide the unique identifier of the project.

Example:

"proj_TrlkLiH4"

Body

application/json

Defines the user details.

role
string
required

The role of the user to be added. It can be one of the following predefined roles: ADMIN, USER, VIEWER, MERCHANT, or an ID of a custom role.

id
string

The unique identifier of the user who will be assigned to the project. It can be found in Team Settings > Team > Edit member. Required with the role string.

Do not use with the login string.

login
string

The login data of the user who will be assigned to the project. Required with the role string.

Do not use with the id string.

Response

Returns the details about the user assigned to the project.

Details about the user assigned to the project. Details about the user.

id
string
required

The unique identifier of the user who has been assigned to the project.

login
string
required

The login data of the user who has been assigned to the project.

email
string
required

The email address of the user who has been assigned to the project.

first_name
string
required

The first name of the user who has been assigned to the project.

last_name
string
required

The last name of the user who has been assigned to the project.

projects
object
required

Lists key-value pairs, where the key is the project to which the user is assigned. The value is the role assigned in a given project. The predefined Voucherify roles are: ADMIN, USER, VIEWER, MERCHANT, USER_RESTRICTED (for the Areas and Stores, an Enterprise feature).

is_owner
boolean
required

Determines if the user is the owner for the organization in Voucherify.

I