List all agents
curl --request GET \
--url https://api.inya.ai/platform/v1/agents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.inya.ai/platform/v1/agents"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.inya.ai/platform/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agents retrieved successfully",
"response": {
"pageNo": 1,
"pageSize": 10,
"totalCount": 1,
"totalPages": 1,
"bots": [
{
"botId": "fb79920229d144608ebf665a10e50275",
"botName": "Support Agent",
"botInfo": {
"botDescription": "Handles inbound customer support calls.",
"botLanguage": [
"en-IN"
],
"botRegion": "asia",
"botTimezone": "Asia/Kolkata"
},
"createdAt": "2026-04-01T10:00:00Z",
"updatedAt": "2026-07-01T12:00:00Z"
}
]
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Agents API
List Agents
List all agents in your organization and find botId values
GET
/
v1
/
agents
List all agents
curl --request GET \
--url https://api.inya.ai/platform/v1/agents \
--header 'x-api-key: <api-key>'import requests
url = "https://api.inya.ai/platform/v1/agents"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.inya.ai/platform/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agents retrieved successfully",
"response": {
"pageNo": 1,
"pageSize": 10,
"totalCount": 1,
"totalPages": 1,
"bots": [
{
"botId": "fb79920229d144608ebf665a10e50275",
"botName": "Support Agent",
"botInfo": {
"botDescription": "Handles inbound customer support calls.",
"botLanguage": [
"en-IN"
],
"botRegion": "asia",
"botTimezone": "Asia/Kolkata"
},
"createdAt": "2026-04-01T10:00:00Z",
"updatedAt": "2026-07-01T12:00:00Z"
}
]
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}What it does: Returns a paginated list of every voice agent in your organization. Use it to find
botId values before calling Get Agent, Update Agent, or Trigger Call.
Required Permission
agents
Minimum working example
curl "https://api.inya.ai/platform/v1/agents?pageNo=1&pageSize=10" \
-H "x-api-key: <your_api_key>"
Additional examples
Search by name
curl "https://api.inya.ai/platform/v1/agents?search=support&pageNo=1&pageSize=10" \
-H "x-api-key: <your_api_key>"
Query parameters
| Name | Required | Default | Description |
|---|---|---|---|
pageNo | No | 1 | Page number. Must be 1 or higher — pageNo=0 returns HTTP 500. |
pageSize | No | 10 | Agents per page. |
search | No | — | Partial match on agent name. |
Response
Success (200)
{
"status": "success",
"message": "Agents retrieved successfully",
"response": {
"pageNo": 1,
"pageSize": 10,
"totalCount": 25,
"totalPages": 3,
"bots": [
{
"botId": "fb79920229d144608ebf665a10e50275",
"botName": "Support Agent",
"botInfo": {
"botDescription": "Handles inbound customer support calls.",
"botLanguage": ["en-IN"],
"botRegion": "asia",
"botTimezone": "Asia/Kolkata"
},
"createdAt": "2026-07-30T16:07:46.636000",
"updatedAt": "2026-07-30T16:07:46.636000"
}
]
},
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
What each field means
| Field | What it is |
|---|---|
bots[].botId | Copy this. Use in Get, Update, Trigger Call, and FAQ endpoints. |
bots[].botName | Display name shown in the dashboard and conversation logs. |
bots[].botInfo | Summary only — language, region, timezone, description. |
bots[].createdAt / updatedAt | ISO 8601 timestamps. |
totalCount / totalPages | Use to paginate — increment pageNo until it exceeds totalPages. |
List vs Get — which one do I need?
| Need | Use List | Use Get |
|---|---|---|
Find botId by name | Yes | No |
| Full prompt, ASR, TTS, webhook config | No | Yes |
Check hasPostCallTrigger | No | Yes |
| Build an agent picker UI | Yes | No |
Edge cases
| Scenario | What happens |
|---|---|
pageNo: 0 | HTTP 500 — always start at 1 |
search with no matches | totalCount: 0, empty bots array |
| Large org | Set pageSize: 100 and loop pages |
Errors
500 Internal Server Error - Invalid page number SendingpageNo=0 (or any value below 1) returns HTTP 500. Always start pagination at pageNo=1.
{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Internal server error"
}
Use
search to locate an agent by name instead of paginating through every page manually.Save the
requestId from every response. You will need it if you contact Gnani support to trace a specific request.Authorizations
API key with 'agents' permission
Query Parameters
Filter results by agent name (partial match)
Page number to retrieve. Default 1.
Required range:
x >= 1Number of agents per page. Default 10.
Required range:
1 <= x <= 100Was this page helpful?