API Endpoints

Overview & Getting Started
Agent ManagementGet Agent

Get Agent

Retrieve details of a specific agent by its ID.

GET
https://api.sparkco.ai/api/v1/agents/:id

Path Parameters

NameTypeDescription
id
Required
integerThe unique identifier of the agent

Example Request

curl https://api.sparkco.ai/api/v1/agents/1 \
-H "X-API-Key: your-api-key"

Success Response

{
  "success": true,
  "data": {
    "id": 1,
    "agent_name": "Customer Service Bot",
    "agent_purpose": "Handle customer inquiries",
    "initial_instructions": "You are a helpful customer service agent",
    "agent_instructions": "Always greet customers warmly",
    "agent_type": "professional",
    "communication_type": "phonecall",
    "gender": "female",
    "created_at": "2024-01-01T00:00:00Z",
    "updated_at": "2024-01-01T00:00:00Z",
    "created_by": "user_id",
    "updated_by": "user_id"
  }
}

Error Responses

Agent Not Found

{
  "success": false,
  "error": {
    "code": "AGENT_NOT_FOUND",
    "message": "Agent not found"
  }
}

Access Denied

{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "Agent not found or access denied"
  }
}