Chatspark
K

API Reference

v1
K

Get Agent

Retrieve a single agent by ID. Returns full configuration including personality, colors, and settings. Requires Pro plan or higher.

GET

/api/v1/agents/{id}

Pro+

Path Parameters

NameTypeRequiredDescription
idintegerRequired

Agent ID

Response Schema

NameTypeRequiredDescription
idinteger

Agent ID

namestring

Display name

botNamestring

Bot name shown to users

botAvatarstring

Avatar URL

botPersonalitystring

System prompt / personality

botNoAnswerstring

Fallback when no context match

welcomeMessagestring

Initial message

websiteUrlstring

Associated website

primaryColorstring

Theme color

statusstring

e.g. listed

chatbotTypestring

chatbot type

removeBrandingboolean

Hide ChatSpark branding

gaIDstring

Google Analytics ID

createdAtstring

ISO 8601

updatedAtstring

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",
    "createdAt": "2025-01-15T10:00:00.000Z",
    "updatedAt": "2025-02-20T14:30:00.000Z"
  }
}

cURL

bash

curl -X GET "https://chatspark.io/api/v1/agents/123" \
  -H "Authorization: Bearer cs_live_..."

Node.js

javascript

const res = await fetch(`${API_BASE}/agents/123`, {
  headers: { "Authorization": "Bearer cs_live_..." },
});
const { agent } = await res.json();

Previous

List Agents

Next

Update Agent