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" \
-d '{
"name": "Sales Agent"
}'
import requests
import json
url = "https://api.sendkit.ai/v1/agents"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
data = {
"name": "Sales Agent"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.sendkit.ai/v1/agents", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "Sales Agent"
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "Sales Agent"
}`)
req, err := http.NewRequest("POST", "https://api.sendkit.ai/v1/agents", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.sendkit.ai/v1/agents')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"name": "Sales Agent"
}'
response = http.request(request)
puts response.body
{
"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"
}
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Error",
"message": "Insufficient credits (agent creation costs 0.5 credits)",
"code": 402
}
/v1/agents
Platform API key (sk_user_...) or Workspace API key (sk_...)
The media type of the request body
Agent name (required, trimmed)
Company context for the agent
Agent personality configuration
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)
Body
Agent name (required, trimmed)
Company context for the agent
Company name
Company description for prompt context
Agent personality configuration
Communication tone (e.g. "professional", "friendly", "casual")
Role the agent plays (e.g. "sales representative", "account executive")
Writing style (e.g. "concise", "detailed")
Custom instructions appended to the system prompt
Responses
Last updated 5 days ago
Built with Documentation.AI