Compresr OAuth Authorization API

The OAuth Authorization API from Compresr — 3 operation(s) for oauth authorization.

Operations 3

POST /api/authorize/cli-token Get Cli Token #
POST /api/authorize/logout Logout #
POST /api/authorize/ws-callback Ws Callback #

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/compresr-oauth-authorization-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 email required.

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

OpenAPI Specification

compresr-oauth-authorization-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Compresr Platform Admin OAuth Authorization API
  version: 1.0.0
servers:
- url: https://api.compresr.ai
  description: Base URL declared by the provider in apis.yml (roadmap#122).
tags:
- name: OAuth Authorization
paths:
  /api/authorize/cli-token:
    post:
      tags:
      - OAuth Authorization
      summary: Get Cli Token
      description: 'Get or create the user''s CLI Key for Context Gateway CLI.


        Key scope matches user''s account_type (user=prepaid, enterprise=postpaid).

        SEC-001: key_plain is not stored, so existing keys are rotated.'
      operationId: get_cli_token_api_authorize_cli_token_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CLIKeyResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - HTTPBearer: []
      - HTTPBearer: []
  /api/authorize/logout:
    post:
      tags:
      - OAuth Authorization
      summary: Logout
      description: Revoke the calling API key. Idempotent — 200 whether the key was ACTIVE or already gone.
      operationId: logout_api_authorize_logout_post
      parameters:
      - name: X-API-Key
        in: header
        required: true
        schema:
          type: string
          title: X-Api-Key
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LogoutResponse'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/authorize/ws-callback:
    post:
      tags:
      - OAuth Authorization
      summary: Ws Callback
      description: 'Deliver a CLI key to a waiting WebSocket session.


        Called by the frontend after the user authorizes in the browser.

        Gets or rotates the user''s CLI Key (scope matches account_type),

        then pushes it over the WebSocket to the CLI.'
      operationId: ws_callback_api_authorize_ws_callback_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WsCallbackRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WsCallbackResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - HTTPBearer: []
      - HTTPBearer: []
components:
  schemas:
    ErrorResponse:
      properties:
        success:
          type: boolean
          title: Success
          default: false
        error:
          type: string
          title: Error
        code:
          type: string
          title: Code
        detail:
          anyOf:
          - type: string
          - type: 'null'
          title: Detail
        retry_after:
          anyOf:
          - type: integer
          - type: 'null'
          title: Retry After
        field:
          anyOf:
          - type: string
          - type: 'null'
          title: Field
      type: object
      required:
      - error
      - code
      title: ErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LogoutResponse:
      properties:
        success:
          type: boolean
          title: Success
        revoked_key_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Revoked Key Id
        message:
          type: string
          title: Message
      type: object
      required:
      - success
      - message
      title: LogoutResponse
    WsCallbackResponse:
      properties:
        success:
          type: boolean
          title: Success
        message:
          type: string
          title: Message
      type: object
      required:
      - success
      - message
      title: WsCallbackResponse
    CLIKeyResponse:
      properties:
        success:
          type: boolean
          title: Success
        token:
          type: string
          title: Token
        message:
          type: string
          title: Message
      type: object
      required:
      - success
      - token
      - message
      title: CLIKeyResponse
    WsCallbackRequest:
      properties:
        ws_session:
          type: string
          title: Ws Session
        state:
          type: string
          title: State
      type: object
      required:
      - ws_session
      - state
      title: WsCallbackRequest
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer