Skip to main content

List Agents

List the agents (team members) in your organisation. Use this to discover who you can hand a conversation to — each agent's user_id is what you pass to Assign Conversation.

GET /api/v1/agents/
Keep the trailing slash

The path is /api/v1/agents/ with a trailing slash. Without it the server issues a redirect, and some HTTP clients drop the Authorization header when they follow a redirect — which looks like a 401.

Query parameters

ParameterTypeRequiredDefaultDescription
pagenumberNo1Page number (starts at 1)
limitnumberNo50Agents per page (max 100)
rolestringNoFilter by role: owner, admin, manager, or agent
statusstringNoactiveFilter by membership status: active or deactivated
searchstringNoCase-insensitive match on name or email (max 100 chars)

Example request

curl -X GET "https://server.waplify.io/api/v1/agents/?page=1&limit=50" \
-H "Authorization: Bearer wapl_your_api_key"

Example response

{
"status": "success",
"agents": [
{
"user_id": "665f1c2e8a1b2c3d4e5f6a7b",
"full_name": "Priya Sharma",
"email": "priya@acme.com",
"role": "agent",
"status": "active"
},
{
"user_id": "665f1c2e8a1b2c3d4e5f6a7c",
"full_name": "Rahul Verma",
"email": "rahul@acme.com",
"role": "admin",
"status": "active"
}
],
"total": 2,
"page": 1,
"limit": 50
}

Agent fields

FieldTypeDescription
user_idstringThe agent's user ID. Pass this as user_id when assigning a conversation.
full_namestringDisplay name
emailstringEmail address
rolestringowner, admin, manager, or agent
statusstringactive or deactivated

The agents array is filtered, then sorted by name, then paginated. total is the full count matching your filter (not just the current page).

Errors

StatusWhen
400Invalid role or status filter value, or the key has no organisation (a legacy solo account with no team)
401Invalid or missing API key
429Rate limit exceeded