API Endpoints

Overview & Getting Started
Agent ManagementCreate Agent

Create Agent

Create a new AI agent with specific purpose and instructions.

POST
https://api.sparkco.ai/api/v1/agents

Body Parameters

NameTypeDescription
agent_name
Required
stringThe name of the agent
agent_purpose
Required
stringThe primary purpose or role of the agent
initial_instructions
Required
stringInitial setup instructions for the agent
agent_instructions
Required
stringOngoing behavioral instructions for the agent
agent_type
Required
stringType of agent (professional/companion/custom)
communication_type
Required
stringPrimary communication method (phonecall/sms)
gender
Required
stringAgent's voice gender (male/female)

Example Request

curl -X POST https://api.sparkco.ai/api/v1/agents \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
  "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"
}'

Response

{
  "success": true,
  "data": {
    "message": "Agent created successfully",
    "agent": {
      "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"
    }
  }
}