Create AI agent
curl --request POST \
--url https://api.craftcx.com/v1/agents \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "agent_123",
"name": "My OpenClaw Agent",
"type": "custom"
}
'import requests
url = "https://api.craftcx.com/v1/agents"
payload = {
"external_id": "agent_123",
"name": "My OpenClaw Agent",
"type": "custom"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({external_id: 'agent_123', name: 'My OpenClaw Agent', type: 'custom'})
};
fetch('https://api.craftcx.com/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": 1756692778077,
"external_id": "agent_123",
"id": "pfh0haxfpzowht3oi213cqos",
"name": "My OpenClaw Agent",
"type": "custom"
}{
"status": 400,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 401,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 409,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 500,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}Agents
Create AI agent
Create a custom AI agent that can be referenced by /assess.
POST
/
v1
/
agents
Create AI agent
curl --request POST \
--url https://api.craftcx.com/v1/agents \
--header 'Content-Type: application/json' \
--data '
{
"external_id": "agent_123",
"name": "My OpenClaw Agent",
"type": "custom"
}
'import requests
url = "https://api.craftcx.com/v1/agents"
payload = {
"external_id": "agent_123",
"name": "My OpenClaw Agent",
"type": "custom"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({external_id: 'agent_123', name: 'My OpenClaw Agent', type: 'custom'})
};
fetch('https://api.craftcx.com/v1/agents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"created_at": 1756692778077,
"external_id": "agent_123",
"id": "pfh0haxfpzowht3oi213cqos",
"name": "My OpenClaw Agent",
"type": "custom"
}{
"status": 400,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 401,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 409,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}{
"status": 500,
"title": "<string>",
"detail": "<string>",
"type": "about:blank"
}Body
application/json
Your stable external ID from the source system for this AI agent.
Minimum string length:
1Example:
"agent_123"
Display name for the AI agent.
Minimum string length:
1Example:
"My OpenClaw Agent"
Agent type. Only custom agents are supported for now.
Available options:
custom Example:
"custom"
Response
Created AI agent
Created at as epoch timestamp (ms).
Example:
1756692778077
Your stable external ID from the source system for this AI agent.
Example:
"agent_123"
CraftCX AI Agent ID.
Example:
"pfh0haxfpzowht3oi213cqos"
Display name for the AI agent.
Example:
"My OpenClaw Agent"
Agent type.
Available options:
custom Example:
"custom"