API Reference
Retrieve a single agent by ID. Returns full configuration including personality, colors, and settings. Requires Pro plan or higher.
/api/v1/agents/{id}
Pro+| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Required | Agent ID |
| Name | Type | Required | Description |
|---|---|---|---|
| id | integer | Agent ID | |
| name | string | Display name | |
| botName | string | Bot name shown to users | |
| botAvatar | string | Avatar URL | |
| botPersonality | string | System prompt / personality | |
| botNoAnswer | string | Fallback when no context match | |
| welcomeMessage | string | Initial message | |
| websiteUrl | string | Associated website | |
| primaryColor | string | Theme color | |
| status | string | e.g. listed | |
| chatbotType | string | chatbot type | |
| gpt4 | boolean | Use GPT-4 when true | |
| removeBranding | boolean | Hide ChatSpark branding | |
| gaID | string | Google Analytics ID | |
| createdAt | string | ISO 8601 | |
| updatedAt | string | ISO 8601 |
json
{
"agent": {
"id": 123,
"name": "Support Bot",
"botName": "Support Bot",
"botPersonality": "You are a helpful support assistant.",
"websiteUrl": "https://example.com",
"status": "listed",
"gpt4": false,
"createdAt": "2025-01-15T10:00:00.000Z",
"updatedAt": "2025-02-20T14:30:00.000Z"
}
}bash
curl -X GET "https://chatspark.io/api/v1/agents/123" \
-H "Authorization: Bearer cs_live_..."javascript
const res = await fetch(`${API_BASE}/agents/123`, {
headers: { "Authorization": "Bearer cs_live_..." },
});
const { agent } = await res.json();