List agents

Retrieve all agents for the business associated with your API key.

GET/api/external/v2/agents

Authentication

This endpoint authenticates with an API key via the X-API-Key header (ek_live_... format), instead of the bearer token used in the rest of the reference.

Authentication

ParameterTypeRequiredDescription
X-API-KeyStringRequiredBusiness API key sent in the X-API-Key header.

Example request

bash
curl -X GET "https://eclectic-api-537143970188.us-central1.run.app/api/external/v2/agents" \
  -H "X-API-Key: ek_live_your_api_key_here"

Example response

json
{
  "agents": [
    {
      "id": "4b2f7a1e-0e88-4aa7-bf67-7d0a3e0f5b91",
      "name": "Support Agent",
      "type": "BASIC",
      "system_prompt": "Help customers with clear and concise answers.",
      "tools": {
        "handoff_to_human_control": {
          "enabled": true,
          "instructions": "..."
        }
      }
    }
  ],
  "business_id": "2a4b8d4b-23fa-420a-94c2-cb9a4d2c7fb8"
}

Notes

  • The response only includes agents from the business authenticated by the API key.
  • Each agent uses the same full shape returned by the detail and update endpoints.