Invite Agents
Invite one or more teammates to Chatway with POST /agents/invite. Put each teammate in the agents array and provide their email address. Add a name and role when needed.
Choose the invitation role deliberately: CHAT_AGENT_MEMBER requests member access; CHAT_AGENT_ADMIN requests administrator access. Set the role explicitly when the intended access level matters. Check every address before sending a batch, and use an address you control when testing invitations.
POST https://developers.chatway.app/api/v1/agents/inviteExample request
curl -X POST "https://developers.chatway.app/api/v1/agents/invite" \
-H "X-API-KEY: your_api_key" \
-H "Content-Type: application/json" \
-d '{
"agents": [
{
"email": "[email protected]",
"name": "John Doe",
"role": "CHAT_AGENT_ADMIN"
}
]
}'Request body
application/json
agents (array<object>, required)— Agents to invite. Each item is an object with a required `email`, an optional `name` and an optional `role` (`CHAT_AGENT_MEMBER` or `CHAT_AGENT_ADMIN`).email (string, required)name (string|null)role (string|null enum: CHAT_AGENT_MEMBER, CHAT_AGENT_ADMIN, null)
Responses
200
Invitations sent
application/json
message (string, required)
422
Examples
Request body example
{
"agents": [
{
"email": "[email protected]",
"name": "John Doe",
"role": "CHAT_AGENT_ADMIN"
}
]
}Response 200 example
{
"message": "Invite sent to agent."
}