sitegpt-ai Tokens API

The Tokens API from sitegpt-ai — 3 operation(s) for tokens.

Operations 4

GET /api/v2/tokens List tokens #
POST /api/v2/tokens Create token #
DELETE /api/v2/tokens/{tokenId} Revoke token #
POST /api/v2/tokens/{tokenId}/rotate Rotate token #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sitegpt-ai:sitegpt-ai-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sitegpt-ai-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SiteGPT Agent Tokens API
  version: 2.0.0
  description: Agent-facing API for managing SiteGPT chatbots, dashboard summaries, appearance media, knowledge, settings, conversations, leads, members, account profiles, usage, billing reads, and API tokens.
servers:
- url: https://sitegpt.ai
security:
- bearerAuth: []
tags:
- name: Tokens
paths:
  /api/v2/tokens:
    get:
      operationId: listTokens
      summary: List tokens
      description: 'List API tokens for the authenticated user.


        Required scope: `tokens:read`.


        Dashboard sessions can call this route, and API tokens must include the listed scope.


        On success, `data` contains: `tokens`.'
      tags:
      - Tokens
      security:
      - bearerAuth:
        - tokens:read
      x-sitegpt-auth: dashboard-or-bearer
      x-sitegpt-scopes:
      - tokens:read
      x-mint:
        title: List tokens
        description: List API tokens for the authenticated user.
      parameters:
      - name: includeRevoked
        in: query
        required: false
        description: Include revoked tokens. Revoked tokens are hidden by default.
        schema:
          type: boolean
          default: false
      responses:
        '200':
          description: Successful SiteGPT API v2 response.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - data
                - meta
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    type: object
                    additionalProperties: true
                    properties:
                      tokens:
                        type: array
                        items:
                          $ref: '#/components/schemas/ApiToken'
                  meta:
                    $ref: '#/components/schemas/AgentResponseMeta'
                additionalProperties: false
              example:
                ok: true
                data:
                  tokens:
                  - id: token-id
                    name: Knowledge updater
                meta:
                  requestId: request-id
        '400':
          $ref: '#/components/responses/AgentError'
        '401':
          $ref: '#/components/responses/AgentError'
        '403':
          $ref: '#/components/responses/AgentError'
        '404':
          $ref: '#/components/responses/AgentError'
        '405':
          $ref: '#/components/responses/AgentError'
    post:
      operationId: createToken
      summary: Create token
      description: 'Create a scoped API token.


        Required scope: `tokens:write`.


        Dashboard sessions can call this route, and API tokens must include the listed scope.


        On success, `data` contains: `token`.'
      tags:
      - Tokens
      security:
      - bearerAuth:
        - tokens:write
      x-sitegpt-auth: dashboard-or-bearer
      x-sitegpt-scopes:
      - tokens:write
      x-mint:
        title: Create token
        description: Create a scoped API token.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - name
              additionalProperties: false
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                scopes:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    enum:
                    - account:read
                    - account:write
                    - tokens:read
                    - tokens:write
                    - chatbots:read
                    - chatbots:write
                    - chatbots:delete
                    - knowledge:read
                    - knowledge:write
                    - knowledge:delete
                    - personas:read
                    - personas:write
                    - personas:delete
                    - instructions:read
                    - instructions:write
                    - instructions:delete
                    - settings:read
                    - settings:write
                    - starters:read
                    - starters:write
                    - starters:delete
                    - followups:read
                    - followups:write
                    - followups:delete
                    - conversations:read
                    - conversations:write
                    - conversations:delete
                    - leads:read
                    - leads:write
                    - leads:delete
                    - members:read
                    - members:write
                    - members:delete
                    - integrations:read
                    - integrations:write
                    - billing:read
                    - billing:write
                chatbotIds:
                  type: array
                  items:
                    type: string
                  description: Optional chatbot IDs to restrict this token to. Omit for all accessible chatbots.
                expiresInDays:
                  type: integer
                  minimum: 1
                  maximum: 365
                  default: 90
                expiresAt:
                  type: string
                  format: date-time
                  description: Absolute token expiration. Cannot be combined with expiresInDays.
            example:
              name: Knowledge updater
              scopes:
              - account:read
              - chatbots:read
              - knowledge:read
              - knowledge:write
              expiresInDays: 90
      responses:
        '201':
          description: Successful SiteGPT API v2 response.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - data
                - meta
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    type: object
                    additionalProperties: true
                    properties:
                      token:
                        $ref: '#/components/schemas/ApiTokenWithSecret'
                  meta:
                    $ref: '#/components/schemas/AgentResponseMeta'
                additionalProperties: false
              example:
                ok: true
                data:
                  token:
                    id: token-id
                    name: Knowledge updater
                    scopes:
                    - account:read
                    - chatbots:read
                    - knowledge:write
                    token: sgpt_xxxxxxxxx
                meta:
                  requestId: request-id
        '400':
          $ref: '#/components/responses/AgentError'
        '401':
          $ref: '#/components/responses/AgentError'
        '403':
          $ref: '#/components/responses/AgentError'
        '404':
          $ref: '#/components/responses/AgentError'
        '405':
          $ref: '#/components/responses/AgentError'
  /api/v2/tokens/{tokenId}:
    delete:
      operationId: revokeToken
      summary: Revoke token
      description: 'Revoke an API token.


        Required scope: `tokens:write`.


        Dashboard sessions can call this route, and API tokens must include the listed scope.


        On success, `data` contains: `token`.'
      tags:
      - Tokens
      security:
      - bearerAuth:
        - tokens:write
      x-sitegpt-auth: dashboard-or-bearer
      x-sitegpt-scopes:
      - tokens:write
      x-mint:
        title: Revoke token
        description: Revoke an API token.
      parameters:
      - name: tokenId
        in: path
        required: true
        description: API token ID.
        schema:
          type: string
      responses:
        '200':
          description: Successful SiteGPT API v2 response.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - data
                - meta
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    type: object
                    additionalProperties: true
                    properties:
                      token:
                        $ref: '#/components/schemas/ApiToken'
                  meta:
                    $ref: '#/components/schemas/AgentResponseMeta'
                additionalProperties: false
              example:
                ok: true
                data:
                  token:
                    id: token-id
                    name: Example token
                    createdAt: '2026-05-13T00:00:00.000Z'
                meta:
                  requestId: request-id
        '400':
          $ref: '#/components/responses/AgentError'
        '401':
          $ref: '#/components/responses/AgentError'
        '403':
          $ref: '#/components/responses/AgentError'
        '404':
          $ref: '#/components/responses/AgentError'
        '405':
          $ref: '#/components/responses/AgentError'
  /api/v2/tokens/{tokenId}/rotate:
    post:
      operationId: rotateToken
      summary: Rotate token
      description: 'Rotate an active API token and return the new plaintext token once.


        Required scope: `tokens:write`.


        Dashboard sessions can call this route, and API tokens must include the listed scope.


        On success, `data` contains: `token`, `revokedToken`.'
      tags:
      - Tokens
      security:
      - bearerAuth:
        - tokens:write
      x-sitegpt-auth: dashboard-or-bearer
      x-sitegpt-scopes:
      - tokens:write
      x-mint:
        title: Rotate token
        description: Rotate an active API token and return the new plaintext token once.
      parameters:
      - name: tokenId
        in: path
        required: true
        description: API token ID.
        schema:
          type: string
      responses:
        '200':
          description: Successful SiteGPT API v2 response.
          content:
            application/json:
              schema:
                type: object
                required:
                - ok
                - data
                - meta
                properties:
                  ok:
                    type: boolean
                    const: true
                  data:
                    type: object
                    additionalProperties: true
                    properties:
                      token:
                        $ref: '#/components/schemas/ApiTokenWithSecret'
                      revokedToken:
                        $ref: '#/components/schemas/ApiToken'
                  meta:
                    $ref: '#/components/schemas/AgentResponseMeta'
                additionalProperties: false
              example:
                ok: true
                data:
                  token:
                    id: new-token-id
                    name: Knowledge updater
                    token: sgpt_xxxxxxxxx
                  revokedToken:
                    id: token-id
                    revokedReason: ROTATED
                meta:
                  requestId: request-id
        '400':
          $ref: '#/components/responses/AgentError'
        '401':
          $ref: '#/components/responses/AgentError'
        '403':
          $ref: '#/components/responses/AgentError'
        '404':
          $ref: '#/components/responses/AgentError'
        '405':
          $ref: '#/components/responses/AgentError'
components:
  schemas:
    ApiToken:
      type: object
      description: An API token record. The secret is only present in the create and rotate responses.
      additionalProperties: true
      properties:
        id:
          type: string
        userId:
          type: string
        name:
          type: string
        tokenPrefix:
          type: string
        scopes:
          type: array
          items:
            type: string
        chatbotIds:
          type: array
          items:
            type: string
          description: Empty means the token can reach every chatbot.
        source:
          type: string
        createdVia:
          type: string
        rotatedFromTokenId:
          type:
          - string
          - 'null'
        revokedReason:
          type:
          - string
          - 'null'
        lastUsedAt:
          type:
          - string
          - 'null'
          format: date-time
        expiresAt:
          type:
          - string
          - 'null'
          format: date-time
        revokedAt:
          type:
          - string
          - 'null'
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    ApiTokenWithSecret:
      description: An API token record plus its plaintext secret.
      allOf:
      - $ref: '#/components/schemas/ApiToken'
      - type: object
        required:
        - token
        properties:
          token:
            type: string
            description: Plaintext token, returned once. Store it immediately.
    AgentResponseMeta:
      type: object
      required:
      - requestId
      properties:
        requestId:
          type: string
        warnings:
          type: array
          items:
            type: string
        nextCursor:
          type:
          - string
          - 'null'
      additionalProperties: true
    AgentError:
      type: object
      required:
      - ok
      - error
      - meta
      properties:
        ok:
          type: boolean
          const: false
        error:
          type: object
          required:
          - code
          - message
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          additionalProperties: false
        meta:
          type: object
          required:
          - requestId
          properties:
            requestId:
              type: string
          additionalProperties: true
      additionalProperties: false
  responses:
    AgentError:
      description: SiteGPT agent API error response.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AgentError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: SiteGPT API token