Skip to main content
POST
/
users
Create a User
curl --request POST \
  --url https://playground.answeringagent.com/api/v1/users \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "external_id": "<string>",
  "email": "[email protected]",
  "name": "<string>",
  "team_name": "<string>",
  "organization_id": 123,
  "role": "owner"
}
'
{
  "embed_token": "MTIzNDV8ZDgyZDk3Mzg1OTAxNTkzNA",
  "user": {
    "id": 123,
    "external_id": "<string>",
    "email": "[email protected]",
    "name": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "organizations": [
      {
        "id": 123,
        "name": "<string>",
        "role": "owner"
      }
    ]
  },
  "team": {
    "id": 123,
    "name": "<string>"
  },
  "locations": [
    {
      "location": "<string>",
      "phone_id": 123
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

Query Parameters

organization_id
integer
required

Organization to assign the user to

Body

application/json
external_id
string
required

Unique identifier in your database. This key is unique across your partner account.

email
string<email>
required

Email address of the user.

name
string | null

Customer's display name.

team_name
string | null

Name of a new team to create for this user (if not adding to existing organization).

organization_id
integer | null

ID of an existing organization to add the user to (alternative to query parameter). Required if role is provided.

role
enum<string> | null

Role to assign to the user in the organization. If provided, organization_id is required.

Available options:
owner,
manager,
user

Response

User created successfully.

embed_token
string

Secure, compact embed token for dashboard authentication

Example:

"MTIzNDV8ZDgyZDk3Mzg1OTAxNTkzNA"

user
object
team
object
locations
object[]