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

Get Agent

Retrieves detailed information about a specific agent.

Request

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

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, or insufficient permissions
  • 500 Internal Server Error: Server error

Example

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

Authorizations

X-Authorization
string
header
required

Body

application/json
uid
string
required

User ID

agentId
string
required

Agent ID

Response

Successful response

uid
string

User ID

agentId
string

Agent ID

name
string

Agent name

country
string | null

Country code

businessPhoneNumber
string | null

Business phone number

I