Description

Use a HTTP POST request to create a user.

Request

HTTP Method: POST

Query Parameter Description
email User email.
first_name User first name.
last_name User last name.
admin Optional Boolean flag indicating whether user should be admin. Default is false.
Path Parameter Description
N/A  

Sample request


curl -X POST \
  https://<tenant-name>.tines.io/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

Parameter Description
id User ID.
email User email.
admin Boolean flag indicating whether user is an admin.
created_at Timestamp describing when the user was created.
updated_at Timestamp describing when the user was last updated.
story_count Number of stories created by the user.
first_name User first name.
last_name User last name.
last_seen Tinestamp 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,
    "story_count": 0,
    "first_name": "Alice",
    "last_name": "Smith",
    "last_seen": null
}