List agents
curl --request GET \
--url https://api.getkarta.ai/public/v1/client/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getkarta.ai/public/v1/client/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getkarta.ai/public/v1/client/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"agent_code": "agentexample",
"name": "Support agent"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"nextOffset": null,
"hasMore": false
}
}
Agents
List agents
List your agents with pagination.
GET
/
client
/
agents
List agents
curl --request GET \
--url https://api.getkarta.ai/public/v1/client/agents \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getkarta.ai/public/v1/client/agents"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getkarta.ai/public/v1/client/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": [
{
"agent_code": "agentexample",
"name": "Support agent"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"nextOffset": null,
"hasMore": false
}
}
Use
agent_code as agent_id in call and session requests.
For the next page, use pagination.nextOffset while pagination.hasMore is true.