GET /api/v1/agents
Returns a list of all Zams agents in your account with their associated ids.
| Header | Value |
|---|---|
| X-API-Key | ******** |
| Content-Type | application/json |
curl --location '<https://api.zams.com/api/v1/agents>' \\
--header 'X-API-Key: 1369a4a9902b33dd0309c765f7b2af7c8ed05b2449f61811caef94534b282416' \\
--header 'Content-Type: application/json'
import requests
import json
def list_agents():
url = "<https://api.zams.com/api/v1/agents>"
headers = {
"X-API-Key": "**********",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
if response.status_code == 200:
return response.json()
else:
raise Exception(f"Error: {response.status_code}")
# Example usage
agents = list_agents()
print(agents)
The response returns a JSON array with the following structure:
| Field | Description |
|---|---|
| Agent name | The key in each object representing the agent's name |
| Unique identifier | The value in each object representing the agent's ID |
| actions | List of action names and IDs |
| files | List of file names and IDs |
| databases | List of DB names and IDs |
| shortcuts | List of shortcut names and IDs |
[
{
"id": "c3a5d1d24e7a4aa09f3d12ab34cd56ef",
"name": "Growth Outreach Agent",
"actions": [
{ "id": "068f9896eee4f0868ac4d3270954ae5b", "name": "Gmail" },
{ "id": "151a57da5dfbc5ea39a58151f728c78e", "name": "HubSpot" },
{ "id": "ea8e8ca9379b920cc3f04e71f0f7d0a0", "name": "Salesforce" }
],
"databases": [
{ "id": "b671d0cfa6d945c1afc133d0e49099c6", "name": "crm_core" }
],
"files": [
{ "id": "9b2cf1d43e8d4eb181a24e166c1f3b0c", "name": "pl-tam-playbook.pdf" },
{ "id": "f47ac10b58cc4372a5670e02b2c3d479", "name": "pricing-leads.csv" }
],
"shortcuts": [
{ "id": "1bae105cc37a00a208f6cc82ca0d5d6d", "name": "Get My Calls" },
{ "id": "b256a5c3aad4631ebbbfc1d712fe4048", "name": "Save HubSpot Data" }
]
},
{
"id": "5e6544279c124ad880d179f6f0d8e0a1",
"name": "Marketing Intel Agent",
"actions": [
{ "id": "d651ce601e2552eeba83ca68d6c49a86", "name": "Get News" },
{ "id": "94e11ad8c2884f008b9d279c2f57855a", "name": "Google Sheets" }
],
"databases": [],
"files": [
{ "id": "8c8dbcb241814ba3823999a9eefaa2e4", "name": "ad-spend-overview.csv" }
],
"shortcuts": []
},
{
"id": "4f9a3a602bfc42d1bf7e0f76e2d1c9b0",
"name": "Customer Success Agent",
"actions": [],
"databases": [],
"files": [],
"shortcuts": []
}
]