Skip to main content
PATCH
/
users
/
{external_id}
Update a User
curl --request PATCH \
  --url https://playground.answeringagent.com/api/v1/users/{external_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "<string>",
  "email": "[email protected]",
  "team_name": "<string>",
  "organization_id": 123,
  "role": "owner"
}
'
{
  "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"
    }
  ]
}

Authorizations

X-API-KEY
string
header
required

Path Parameters

external_id
string
required

The external ID of the user to update

Query Parameters

organization_id
integer

Organization to assign the user to (alternative to body parameter)

Body

application/json
name
string

User's display name

email
string<email>

User's email address

team_name
string

Name of the user's team

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 updated successfully.

id
integer

Internal user ID

external_id
string

External identifier provided by the reseller

email
string<email>

User's email address

name
string

User's display name

created_at
string<date-time>

When the user was created

updated_at
string<date-time>

When the user was last updated

organizations
object[]

Organizations this user belongs to with their role