POST
/
api
/
v1
/
accounts
/
{account_id}
/
teams
/
{team_id}
/
team_members
Add a New Agent
curl --request POST \
  --url https://app.chatwoot.com/api/v1/accounts/{account_id}/teams/{team_id}/team_members \
  --header 'Content-Type: application/json' \
  --header 'api_access_token: <api-key>' \
  --data '{
  "user_ids": [
    1
  ]
}'
[
  {
    "id": 123,
    "account_id": 123,
    "availability_status": "available",
    "auto_offline": true,
    "confirmed": true,
    "email": "<string>",
    "available_name": "<string>",
    "name": "<string>",
    "role": "agent",
    "thumbnail": "<string>",
    "custom_role_id": 123
  }
]

Authorizations

api_access_token
string
header
required

This token can be obtained by visiting the profile page or via rails console. Provides access to endpoints based on the user permissions levels. This token can be saved by an external system when user is created via API, to perform activities on behalf of the user.

Path Parameters

account_id
integer
required

The numeric ID of the account

team_id
integer
required

The ID of the team to be updated

Body

application/json
user_ids
integer[]
required

IDs of users to be added to the team

Example:
[1]

Response

Success

Array of all active agents

id
integer
account_id
integer
availability_status
enum<string>

The availability status of the agent computed by Chatwoot.

Available options:
available,
busy,
offline
auto_offline
boolean

Whether the availability status of agent is configured to go offline automatically when away.

confirmed
boolean

Whether the agent has confirmed their email address.

email
string

The email of the agent

available_name
string

The available name of the agent

name
string

The name of the agent

role
enum<string>

The role of the agent

Available options:
agent,
administrator
thumbnail
string

The thumbnail of the agent

custom_role_id
integer

The custom role id of the agent