RomM Client Tokens API

The client-tokens API from RomM — 8 operation(s) for client-tokens.

GitHub OpenAPI

Operations 9

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/client-tokens List my client tokens · List Tokens #
Ask an LLM
“Which client tokens do I have?”
“Can I see all the tokens I've issued?”
Tell an agent
List my client tokens.
Show every client token I own.
POST /api/client-tokens Create a client token · Create Token #
Ask an LLM
“How do I create a client token with a scope?”
“Can I set an expiry on a new client token?”
Tell an agent
Create a client token named {name} with scopes {scopes}.
Issue a new client token {name} scoped to {scopes} that expires in {expires_in}.
DELETE /api/client-tokens/{token_id} Delete a client token · Delete Token #
Ask an LLM
“How do I revoke a client token I issued?”
“Can I delete a client token myself?”
Tell an agent destructive · confirm first
Delete client token {token_id}.
Revoke my own client token {token_id}.
PUT /api/client-tokens/{token_id}/regenerate Regenerate a client token · Regenerate Token #
Ask an LLM
“How do I rotate a client token's secret?”
“Can I get a new value for a client token?”
Tell an agent destructive · confirm first
Regenerate client token {token_id}.
Rotate the secret of client token {token_id}.
POST /api/client-tokens/{token_id}/pair Pair a client token · Pair Token #
Ask an LLM
“How do I pair a client token with a device?”
“Can I activate a client token on a device?”
Tell an agent
Pair client token {token_id}.
Activate client token {token_id} on a device.
GET /api/client-tokens/pair/{code}/status Check a client token pairing status · Pair Status #
Ask an LLM
“Has my client token been paired yet?”
“What is the status of a client token pairing code?”
Tell an agent
Check the pairing status of code {code}.
Tell me whether client token pairing code {code} succeeded.
POST /api/client-tokens/exchange Exchange a client token pairing code · Exchange Pair Code #
Ask an LLM
“How do I redeem a client token pairing code?”
“Can I turn a pairing code into a client token?”
Tell an agent
Exchange pairing code {code}.
Redeem client token pairing code {code}.
GET /api/client-tokens/all List every client token · List All Tokens #
Ask an LLM
“Which client tokens exist across all users?”
“Can an admin see all client tokens?”
Tell an agent
List all client tokens.
Show every client token in the system.
DELETE /api/client-tokens/{token_id}/admin Admin delete a client token · Admin Delete Token #
Ask an LLM
“How do I delete a client token as an admin?”
“Can an admin revoke any client token?”
Tell an agent destructive · confirm first
Admin delete client token {token_id}.
As an admin, revoke client token {token_id}.

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/romm:romm-client-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

romm-client-tokens-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: RomM Client Tokens API
  version: 5.4.0
tags:
- name: client-tokens
paths:
  /api/client-tokens:
    get:
      tags:
      - client-tokens
      summary: List Tokens
      operationId: list_tokens_api_client_tokens_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ClientTokenSchema'
                type: array
                title: Response List Tokens Api Client Tokens Get
      security:
      - OAuth2PasswordBearer:
        - me.read
      - HTTPBasic: []
    post:
      tags:
      - client-tokens
      summary: Create Token
      operationId: create_token_api_client_tokens_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientTokenCreatePayload'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientTokenCreateSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - OAuth2PasswordBearer:
        - me.write
      - HTTPBasic: []
  /api/client-tokens/{token_id}:
    delete:
      tags:
      - client-tokens
      summary: Delete Token
      operationId: delete_token_api_client_tokens__token_id__delete
      security:
      - OAuth2PasswordBearer:
        - me.write
      - HTTPBasic: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: integer
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/client-tokens/{token_id}/regenerate:
    put:
      tags:
      - client-tokens
      summary: Regenerate Token
      operationId: regenerate_token_api_client_tokens__token_id__regenerate_put
      security:
      - OAuth2PasswordBearer:
        - me.write
      - HTTPBasic: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: integer
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientTokenCreateSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/client-tokens/{token_id}/pair:
    post:
      tags:
      - client-tokens
      summary: Pair Token
      operationId: pair_token_api_client_tokens__token_id__pair_post
      security:
      - OAuth2PasswordBearer:
        - me.write
      - HTTPBasic: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: integer
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientTokenPairSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/client-tokens/pair/{code}/status:
    get:
      tags:
      - client-tokens
      summary: Pair Status
      operationId: pair_status_api_client_tokens_pair__code__status_get
      parameters:
      - name: code
        in: path
        required: true
        schema:
          type: string
          title: Code
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/client-tokens/exchange:
    post:
      tags:
      - client-tokens
      summary: Exchange Pair Code
      operationId: exchange_pair_code_api_client_tokens_exchange_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientTokenExchangePayload'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ClientTokenCreateSchema'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/client-tokens/all:
    get:
      tags:
      - client-tokens
      summary: List All Tokens
      operationId: list_all_tokens_api_client_tokens_all_get
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/ClientTokenAdminSchema'
                type: array
                title: Response List All Tokens Api Client Tokens All Get
      security:
      - OAuth2PasswordBearer:
        - users.read
      - HTTPBasic: []
  /api/client-tokens/{token_id}/admin:
    delete:
      tags:
      - client-tokens
      summary: Admin Delete Token
      operationId: admin_delete_token_api_client_tokens__token_id__admin_delete
      security:
      - OAuth2PasswordBearer:
        - users.write
      - HTTPBasic: []
      parameters:
      - name: token_id
        in: path
        required: true
        schema:
          type: integer
          title: Token Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ClientTokenCreateSchema:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        expires_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires At
        last_used_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Used At
        created_at:
          type: string
          title: Created At
        user_id:
          type: integer
          title: User Id
        device_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Device Id
        raw_token:
          type: string
          title: Raw Token
      type: object
      required:
      - id
      - name
      - scopes
      - expires_at
      - last_used_at
      - created_at
      - user_id
      - raw_token
      title: ClientTokenCreateSchema
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ClientTokenPairSchema:
      properties:
        code:
          type: string
          title: Code
        expires_in:
          type: integer
          title: Expires In
      type: object
      required:
      - code
      - expires_in
      title: ClientTokenPairSchema
    ClientTokenAdminSchema:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        expires_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires At
        last_used_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Used At
        created_at:
          type: string
          title: Created At
        user_id:
          type: integer
          title: User Id
        device_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Device Id
        username:
          type: string
          title: Username
        user_avatar_path:
          type: string
          title: User Avatar Path
        user_updated_at:
          type: string
          title: User Updated At
      type: object
      required:
      - id
      - name
      - scopes
      - expires_at
      - last_used_at
      - created_at
      - user_id
      - username
      - user_avatar_path
      - user_updated_at
      title: ClientTokenAdminSchema
    ClientTokenCreatePayload:
      properties:
        name:
          type: string
          title: Name
        scopes:
          items:
            type: string
          type: array
          minItems: 1
          title: Scopes
        expires_in:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires In
      type: object
      required:
      - name
      - scopes
      title: ClientTokenCreatePayload
    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
    ClientTokenSchema:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
        scopes:
          items:
            type: string
          type: array
          title: Scopes
        expires_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Expires At
        last_used_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Last Used At
        created_at:
          type: string
          title: Created At
        user_id:
          type: integer
          title: User Id
        device_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Device Id
      type: object
      required:
      - id
      - name
      - scopes
      - expires_at
      - last_used_at
      - created_at
      - user_id
      title: ClientTokenSchema
    ClientTokenExchangePayload:
      properties:
        code:
          type: string
          title: Code
      type: object
      required:
      - code
      title: ClientTokenExchangePayload
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes:
            me.read: View your profile
            roms.read: View ROMs
            platforms.read: View platforms
            assets.read: View assets
            devices.read: View devices
            firmware.read: View firmware
            roms.user.read: View user-rom properties
            collections.read: View collections
            playlists.read: View music playlists
            me.write: Modify your profile
            assets.write: Modify assets
            devices.write: Modify devices
            roms.user.write: Modify user-rom properties
            collections.write: Modify collections
            playlists.write: Modify music playlists
            roms.write: Modify ROMs
            platforms.write: Modify platforms
            firmware.write: Modify firmware
            users.read: View users
            users.write: Modify users
            tasks.run: Run tasks
            logs.read: View backend logs
          tokenUrl: /token
    HTTPBasic:
      type: http
      scheme: basic