Skip to main content
These rules apply to every endpoint in SiteGPT API v2.

Base URL

  • Send and receive JSON. Set Content-Type: application/json on requests with a body.
  • Send your API token in the Authorization: Bearer header. See API v2 authentication.
  • GET /api/v2/health needs no token. Use it to check that the API is reachable.
  • The OpenAPI document is at https://sitegpt.ai/api/v2/openapi.json.

Response envelope

Every response uses the same envelope. Success:
Error:
The OpenAPI error schema does not list error.hint, but the API sends it. Allow extra fields in your error parser.

Pagination

List endpoints that can return many items use cursor pagination. The response has the cursor in two places:
  • meta.nextCursor
  • data.pagination, which has limit, hasNextPage, and nextCursor
nextCursor is null on the last page.
These endpoints use cursor pagination: A limit outside the allowed range returns 400 VALIDATION_FAILED.

Errors

The HTTP status tells you the kind of error. error.code tells you the exact cause. A 401 response includes a WWW-Authenticate header that points to the OAuth metadata at https://sitegpt.ai/.well-known/oauth-protected-resource/api/v2. Some errors come with a hint. For example, CHATBOT_LIMIT_REACHED and CHATBOT_PAGES_LIMIT_REACHED suggest how to free space or where to see plans.

Conversation state conflicts

A conversation can be resolved (closed), or a person on your team can take it over. The API checks these states at the moment it saves your change. If the state changes while your request runs, the new state wins. See Conversations and handoff. The OpenAPI document marks each operation that can return 409. This includes POST /chatbots/{chatbotId}/messages, which starts a new conversation.

Deletes need confirmation

Delete endpoints that remove account or chatbot data need confirm=true in the query string. The endpoint pages show a confirm parameter where it applies. Example:
Without it, the API returns 400 CONFIRMATION_REQUIRED and deletes nothing. Bulk deletes also need confirmation. Send "confirm": true in the request body of POST /chatbots/{chatbotId}/documents/delete, and with the delete action of POST /chatbots/{chatbotId}/conversations/bulk and POST /chatbots/{chatbotId}/leads/actions. The documents endpoint also accepts confirm=true in the query string.

Rate limits and quotas

  • The API sends no rate-limit headers, and there is no published per-request rate limit.
  • 429 means that a plan quota is used up, for example the pages quota for content. Do not retry a 429 in a loop. Remove content or change your plan. See Plans and limits.

Model names

API v2 uses the public model names gpt-4.1 and gpt-4.1-mini in requests and responses.