xhostd Tokens API

The Tokens API from xhostd — 4 operation(s) for tokens.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 5

POST /tokens Create Token #
GET /tokens Tokens Page #
DELETE /tokens/{token_id} Delete Token #
POST /tokens/new Create Token #
POST /tokens/keys/{label}/revoke Revoke Token Key #

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/xhostd-com:xhostd-com-tokens-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

xhostd-com-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Xhostd Com Tokens API
  version: 0.1.0
  description: 'Operations tagged Tokens across 2 of this provider''s published API definitions: api.xhostd.com-openapi.json, console.xhostd.com-openapi.json. Each path carries the servers of the definition it was published in.'
tags:
- name: Tokens
paths:
  /tokens:
    post:
      summary: Create Token
      description: 'Mint a token for the caller with the default granted scopes.


        A mint never grants more than the caller already holds, so a caller

        that does not hold the whole default set cannot mint it here (403

        ``scope_denied``). The grant is fixed, so the gate is the whole rule

        on this route; the remedy is ``POST /credentials``, which grants the

        caller''s own set or less.


        The label is display text, so the route accepts any label. A token

        never carries ``console:session`` from here, so a label that matches

        a console session''s still leaves the token listed and capped

        (``auth/tokens.py::is_console_session``).


        A mint never outlives the caller either, so the caller''s remaining

        life is the ceiling on ``expires_in`` and the child''s expiry when the

        request names none. A caller with no expiry keeps the route''s

        historical behaviour: no ceiling, and no expiry on the child.'
      operationId: create_token_tokens_post
      parameters:
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tokens
    get:
      summary: Tokens Page
      operationId: tokens_page_tokens_get
      parameters:
      - name: label
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Label
      responses:
        '200':
          description: Successful Response
          content:
            text/html:
              schema:
                type: string
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tokens
  /tokens/{token_id}:
    delete:
      summary: Delete Token
      operationId: delete_token_tokens__token_id__delete
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Token Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tokens
  /tokens/new:
    post:
      summary: Create Token
      operationId: create_token_tokens_new_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
      tags:
      - Tokens
  /tokens/keys/{label}/revoke:
    post:
      summary: Revoke Token Key
      operationId: revoke_token_key_tokens_keys__label__revoke_post
      parameters:
      - name: label
        in: path
        required: true
        schema:
          type: string
          title: Label
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      tags:
      - Tokens
components:
  schemas:
    CreateTokenRequest:
      properties:
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        expires_in:
          anyOf:
          - type: integer
          - type: 'null'
          title: Expires In
      type: object
      title: CreateTokenRequest
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CreateTokenResponse:
      properties:
        token_id:
          type: string
          format: uuid
          title: Token Id
        plaintext:
          type: string
          title: Plaintext
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        label:
          anyOf:
          - type: string
          - type: 'null'
          title: Label
        created_at:
          type: string
          format: date-time
          title: Created At
        expires_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Expires At
      type: object
      required:
      - token_id
      - plaintext
      - scopes
      - label
      - created_at
      - expires_at
      title: CreateTokenResponse
x-refined-from:
- api.xhostd.com-openapi.json
- console.xhostd.com-openapi.json