logo
AgentsCreate agent
Agents

Create agent

Creates a new AI agent. Costs 0.5 credits per agent. Maximum 3 agents per workspace. The first agent created becomes the default agent automatically.

curl -X POST "https://api.sendkit.ai/v1/agents" \
  -H "Content-Type: application/json" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{
  "name": "Sales Agent"
}'
{
  "success": true,
  "data": {
    "_id": "664a1b2c3d4e5f6a7b8c9d10",
    "name": "Enterprise Sales Agent",
    "userId": "user_123",
    "workspaceId": "ws_123",
    "companyInfo": {
      "name": "Acme Inc",
      "description": "B2B SaaS platform for sales automation"
    },
    "persona": {
      "tone": "professional",
      "role": "senior account executive",
      "communicationStyle": "concise",
      "customInstructions": "Always mention our free trial. Focus on ROI and time savings."
    },
    "isDefault": false,
    "isActive": true,
    "createdAt": "2024-06-05T10:00:00.000Z",
    "updatedAt": "2024-06-05T10:00:00.000Z"
  }
}
POST
/v1/agents
POST
API Key (header: X-Api-Key)
X-Api-Keystring
Required

Platform API key (sk_user_...) or Workspace API key (sk_...)

Platform API key (sk_user_...) or Workspace API key (sk_...)
Bearer Token
Bearer Tokenstring
Required

API key as Bearer token

API key as Bearer token
Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Required

Agent name (required, trimmed)

Min length: 1
companyInfoobject

Company context for the agent

personaobject

Agent personality configuration

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-Api-Keystring
Required

API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)

header
Authorizationstring
Required

Bearer token. API key as Bearer token

Body

application/json
namestring
Required

Agent name (required, trimmed)

companyInfoobject

Company context for the agent

personaobject

Agent personality configuration

Responses