Skip to main content
POST
/
get-agents
Get agents information
curl --request POST \
  --url https://app.phonely.ai/api/get-agents \
  --header 'Content-Type: application/json' \
  --header 'X-Authorization: <api-key>' \
  --data '{
  "uid": "<string>"
}'
[
  {
    "orgId": "<string>",
    "name": "<string>"
  }
]

Get Agents

Retrieves a list of all agents accessible to the authenticated user.

Request

Method: POST
Endpoint: /api/get-agents
Headers:
  • X-Authorization: Your API key (required)
  • Content-Type: application/json
Request Body:
{
  "uid": "string"
}
Parameters:
  • uid (string, required): Your user ID

Response

Success Response (200):
[
  {
    "uid": "string",
    "agentId": "string",
    "name": "string",
    "country": "string",
    "businessPhoneNumber": "string"
  }
]
Error Responses:
  • 400 Bad Request: Invalid request body
  • 401 Unauthorized: Invalid or missing API key
  • 500 Internal Server Error: Server error

Example

curl -X POST https://app.phonely.ai/api/get-agents \
  -H "X-Authorization: your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "uid": "user123"
  }'

Authorizations

X-Authorization
string
header
required

Body

application/json
uid
string
required

User ID

Response

Successful response

orgId
string

Organization ID

name
string

Organization name

I