Documentation Index
Fetch the complete documentation index at: https://sitegpt.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
API v2 is the recommended SiteGPT API for new integrations, AI agents, and CLI-backed automation. It uses scoped sgpt_... bearer tokens and mirrors the customer-facing dashboard permissions.
If you are using older /api/v0 endpoints, switch the API Reference version selector to v0 Legacy.
Base URL
Use this base URL for API v2:
https://sitegpt.ai/api/v2
Example:
curl https://sitegpt.ai/api/v2/me \
-H "Authorization: Bearer sgpt_..."
Authentication
API v2 uses scoped SiteGPT API tokens:
Authorization: Bearer sgpt_...
You can get a token in two ways:
- Create a token from the SiteGPT dashboard under Agents.
- Use OAuth device login from the SiteGPT CLI or an agent-compatible client.
For CLI login and local AI agents, SiteGPT uses OAuth Device Authorization Grant with this public client ID:
See API v2 authentication for token creation, OAuth device login, scopes, and security notes.
Response shape
API v2 responses use an ok field.
Successful responses:
{
"ok": true,
"data": {},
"meta": {
"requestId": "req-id"
}
}
Error responses:
{
"ok": false,
"error": {
"code": "TOKEN_SCOPE_NOT_ALLOWED",
"message": "Token does not have the required scope"
},
"meta": {
"requestId": "req-id"
}
}
OpenAPI
The machine-readable OpenAPI document is available at:
https://sitegpt.ai/api/v2/openapi.json
Use the endpoint reference in this version of the docs for the full list of supported API v2 routes, request bodies, query parameters, and response examples.
Discovery for agents
Most developers do not need these endpoints directly. They are public metadata endpoints for AI agents and tools that discover API authentication automatically:
https://sitegpt.ai/.well-known/oauth-authorization-server
https://sitegpt.ai/.well-known/oauth-protected-resource
https://sitegpt.ai/.well-known/oauth-protected-resource/api/v2
Recommended first calls
Verify the token:
curl https://sitegpt.ai/api/v2/me \
-H "Authorization: Bearer sgpt_..."
List accessible chatbots:
curl https://sitegpt.ai/api/v2/chatbots \
-H "Authorization: Bearer sgpt_..."
Then use the endpoint reference for chatbot creation, knowledge ingestion, conversations, settings, members, leads, billing reads, and account operations.