Skip to main content

Create

Description

Use a HTTP POST request to create a user.

Request

HTTP Method: POST

Query ParameterDescription
emailUser email.
first_nameOptional User first name.
last_nameOptional User last name.
adminOptional Boolean flag indicating whether user should be admin. Default is false.
Path ParameterDescription
N/A

Sample request


curl -X POST \
https://<tenant-domain>/api/v1/admin/users \
-H 'content-type: application/json' \
-H 'x-user-email: <email-address>' \
-H 'x-user-token: <api-token>'
-d '{
"email": "alice@tines.xyz",
"first_name": "Alice",
"last_name": "Smith",
"admin": false
}'
}

Response

A successful request will return a JSON object describing the created user.

Field description

ParameterDescription
idUser ID.
emailUser email.
adminBoolean flag indicating whether user is an admin.
created_atTimestamp describing when the user was created.
updated_atTimestamp describing when the user was last updated.
first_nameUser first name.
last_nameUser last name.
last_seenTimestamp describing when the user was last seen in the platform.

Sample response

{
"id": 276,
"email": "alice@tines.xyz",
"created_at": "2019-11-03T09:57:49.537Z",
"updated_at": "2019-11-03T09:57:49.537Z",
"admin": false,
"first_name": "Alice",
"last_name": "Smith",
"last_seen": null
}