sealgate-ai Device Auth API

The device-auth API from sealgate-ai — 6 operation(s) for device-auth.

Operations 6

POST /api/v1/auth/device/code Issue Device Code #
POST /api/v1/auth/device/token Redeem Device Code #
GET /api/v1/auth/device/requests/{user_code} Get Device Request #
POST /api/v1/auth/device/requests/{user_code}/approve Approve Device Request #
POST /api/v1/auth/device/requests/{user_code}/deny Deny Device Request #
POST /api/v1/auth/device/revoke Revoke Client Credential #

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/sealgate-ai:sealgate-ai-device-auth-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

sealgate-ai-device-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SealGate Device Auth API
  description: Open-source MCP security, aggregation, and monitoring. Self-hosted MCP proxy.
  version: 0.19.0
tags:
- name: device-auth
paths:
  /api/v1/auth/device/code:
    post:
      tags:
      - device-auth
      summary: Issue Device Code
      description: Issue a short-lived device grant that always requires human approval.
      operationId: issue_device_code_api_v1_auth_device_code_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceCodeRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceCodeResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTokenErrorResponse'
        '429':
          description: Rate limit exceeded. The response is JSON and includes a Retry-After header; the grant's interval and slow_down responses remain authoritative.
        '503':
          description: A unique device authorization code could not be allocated
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.
        schema:
          type: string
          maxLength: 255
  /api/v1/auth/device/token:
    post:
      tags:
      - device-auth
      summary: Redeem Device Code
      description: Poll a device grant and atomically exchange an approval once.
      operationId: redeem_device_code_api_v1_auth_device_token_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceTokenRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/DeviceTokenResponse'
                - $ref: '#/components/schemas/CliTokenResponse'
                title: Response Redeem Device Code Api V1 Auth Device Token Post
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceTokenErrorResponse'
        '429':
          description: Rate limit exceeded. The response is JSON and includes a Retry-After header; the grant's interval and slow_down responses remain authoritative.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.
        schema:
          type: string
          maxLength: 255
  /api/v1/auth/device/requests/{user_code}:
    get:
      tags:
      - device-auth
      summary: Get Device Request
      description: Look up a device grant by its human-entered code without exposing secrets.
      operationId: get_device_request_api_v1_auth_device_requests__user_code__get
      security:
      - HTTPBearer: []
      parameters:
      - name: user_code
        in: path
        required: true
        schema:
          type: string
          title: User Code
      - name: domain
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Org to view (Super-Owner only, read-only)
          title: Domain
        description: Org to view (Super-Owner only, read-only)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAuthorizationStatusResponse'
        '401':
          description: A valid human API key is required
        '403':
          description: The authenticated user is not authorized for this organization
        '404':
          description: Device authorization request not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/device/requests/{user_code}/approve:
    post:
      tags:
      - device-auth
      summary: Approve Device Request
      description: Bind a pending grant to the authenticated human and their organization.
      operationId: approve_device_request_api_v1_auth_device_requests__user_code__approve_post
      security:
      - HTTPBearer: []
      parameters:
      - name: user_code
        in: path
        required: true
        schema:
          type: string
          title: User Code
      - name: domain
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Org to view (Super-Owner only, read-only)
          title: Domain
        description: Org to view (Super-Owner only, read-only)
      - name: Idempotency-Key
        in: header
        required: false
        description: Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.
        schema:
          type: string
          maxLength: 255
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAuthorizationStatusResponse'
        '401':
          description: A valid human API key is required
        '403':
          description: The authenticated user is not authorized for this organization
        '404':
          description: Device authorization request not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/device/requests/{user_code}/deny:
    post:
      tags:
      - device-auth
      summary: Deny Device Request
      description: Deny a pending grant; denial never creates or binds a client credential.
      operationId: deny_device_request_api_v1_auth_device_requests__user_code__deny_post
      security:
      - HTTPBearer: []
      parameters:
      - name: user_code
        in: path
        required: true
        schema:
          type: string
          title: User Code
      - name: domain
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Org to view (Super-Owner only, read-only)
          title: Domain
        description: Org to view (Super-Owner only, read-only)
      - name: Idempotency-Key
        in: header
        required: false
        description: Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.
        schema:
          type: string
          maxLength: 255
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAuthorizationStatusResponse'
        '401':
          description: A valid human API key is required
        '403':
          description: The authenticated user is not authorized for this organization
        '404':
          description: Device authorization request not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /api/v1/auth/device/revoke:
    post:
      tags:
      - device-auth
      summary: Revoke Client Credential
      description: Revoke the client installation represented by the bearer credential.
      operationId: revoke_client_credential_api_v1_auth_device_revoke_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RevocationResponse'
        '401':
          description: A valid, active client installation credential is required
        '403':
          description: The client credential lacks the required scope
      security:
      - ClientBearer: []
      parameters:
      - name: Idempotency-Key
        in: header
        required: false
        description: Optional client-generated key that makes this write operation safe to retry. Reusing the same key returns the original response instead of performing the operation a second time. Keys are scoped to the caller and expire after 24 hours.
        schema:
          type: string
          maxLength: 255
components:
  schemas:
    DeviceTokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
        token_type:
          type: string
          const: Bearer
          title: Token Type
          default: Bearer
        client_installation_id:
          type: string
          title: Client Installation Id
        device_id:
          type: string
          title: Device Id
        scope:
          items:
            type: string
          type: array
          title: Scope
        user_id:
          type: string
          title: User Id
        org_id:
          type: string
          title: Org Id
        api_key:
          anyOf:
          - type: string
          - type: 'null'
          title: Api Key
          description: The approving user's SealGate API key. Present only for clients that sign the human in on their behalf (desktop); always null for stdiod.
      type: object
      required:
      - access_token
      - client_installation_id
      - device_id
      - scope
      - user_id
      - org_id
      title: DeviceTokenResponse
    RevocationResponse:
      properties:
        status:
          type: string
          const: revoked
          title: Status
          default: revoked
      type: object
      title: RevocationResponse
    DeviceCodeRequest:
      properties:
        client_id:
          type: string
          maxLength: 50
          title: Client Id
          description: 'Device client identifier: stdiod, desktop, mobile, or sealgate-cli'
        scope:
          items:
            type: string
          type: array
          maxItems: 4
          minItems: 1
          title: Scope
        code_challenge:
          type: string
          maxLength: 43
          minLength: 43
          pattern: ^[A-Za-z0-9_-]{43}$
          title: Code Challenge
          description: Base64url-encoded SHA-256 PKCE challenge
        code_challenge_method:
          type: string
          const: S256
          title: Code Challenge Method
        device_label:
          anyOf:
          - type: string
            maxLength: 200
          - type: 'null'
          title: Device Label
        platform:
          anyOf:
          - type: string
            maxLength: 50
          - type: 'null'
          title: Platform
        client_version:
          anyOf:
          - type: string
            maxLength: 50
          - type: 'null'
          title: Client Version
        client_installation_id:
          anyOf:
          - type: string
            maxLength: 36
            minLength: 1
          - type: 'null'
          title: Client Installation Id
      type: object
      required:
      - client_id
      - scope
      - code_challenge
      - code_challenge_method
      title: DeviceCodeRequest
    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
    DeviceCodeResponse:
      properties:
        device_code:
          type: string
          title: Device Code
        user_code:
          type: string
          title: User Code
        verification_uri:
          type: string
          title: Verification Uri
        verification_uri_complete:
          type: string
          title: Verification Uri Complete
        expires_in:
          type: integer
          title: Expires In
        interval:
          type: integer
          title: Interval
      type: object
      required:
      - device_code
      - user_code
      - verification_uri
      - verification_uri_complete
      - expires_in
      - interval
      title: DeviceCodeResponse
    DeviceTokenRequest:
      properties:
        client_id:
          type: string
          maxLength: 50
          title: Client Id
        device_code:
          type: string
          maxLength: 256
          minLength: 32
          title: Device Code
        code_verifier:
          type: string
          maxLength: 128
          minLength: 43
          pattern: ^[A-Za-z0-9._~-]+$
          title: Code Verifier
      type: object
      required:
      - client_id
      - device_code
      - code_verifier
      title: DeviceTokenRequest
    DeviceTokenErrorResponse:
      properties:
        error:
          type: string
          enum:
          - authorization_pending
          - slow_down
          - access_denied
          - expired_token
          - invalid_grant
          - invalid_client
          - invalid_scope
          title: Error
      type: object
      required:
      - error
      title: DeviceTokenErrorResponse
    DeviceAuthorizationStatusResponse:
      properties:
        client_id:
          type: string
          title: Client Id
        scope:
          items:
            type: string
          type: array
          title: Scope
        status:
          type: string
          enum:
          - pending
          - approved
          - denied
          - consumed
          - expired
          title: Status
        device_label:
          anyOf:
          - type: string
          - type: 'null'
          title: Device Label
        platform:
          anyOf:
          - type: string
          - type: 'null'
          title: Platform
        client_version:
          anyOf:
          - type: string
          - type: 'null'
          title: Client Version
        created_at:
          type: string
          format: date-time
          title: Created At
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
      - client_id
      - scope
      - status
      - device_label
      - platform
      - client_version
      - created_at
      - expires_at
      title: DeviceAuthorizationStatusResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CliTokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
          description: An Org API account token (sgt_acct_...).
        token_type:
          type: string
          const: Bearer
          title: Token Type
          default: Bearer
        expires_in:
          type: integer
          title: Expires In
          description: Seconds until access_token expires.
        scope:
          items:
            type: string
          type: array
          title: Scope
        token_id:
          type: string
          title: Token Id
          description: Its id on the API tokens page, where it revokes.
        user_id:
          type: string
          title: User Id
        org_id:
          type: string
          title: Org Id
      type: object
      required:
      - access_token
      - expires_in
      - scope
      - token_id
      - user_id
      - org_id
      title: CliTokenResponse
      description: 'What sealgate-cli redeems for: an Org API account token, and no installation.'
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
    ClientBearer:
      type: http
      description: Opaque ewc_ client installation credential
      scheme: bearer
    ServiceToken:
      type: http
      description: 'A SealGate service token: `sgt_acct_...` (account token) or `sgt_org_...` (org token). Mint an account token in the dashboard.'
      scheme: bearer
    MCPGatewayOAuth:
      type: oauth2
      description: OAuth 2.1 authorization-code flow (PKCE required) against the SealGate MCP gateway's authorization server. Request only the scopes an agent needs; unrequested scopes are not granted.
      flows:
        authorizationCode:
          authorizationUrl: /oauth/authorize
          tokenUrl: /oauth/token
          refreshUrl: /oauth/token
          scopes:
            mcp: Connect to the MCP gateway and call the tools exposed by your enabled servers. Every call is still evaluated by the policy engine.
            offline_access: Issue a refresh token so the client can renew access without a new browser sign-in.