Archal Auth API

CLI and device authentication.

Operations 3

GET /auth/me Get the authenticated CLI user #
POST /auth/device Start CLI device authentication #
POST /auth/device/token Poll a device authentication request #

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/archal-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

archal-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Archal Auth API
  summary: Public API for Archal CLI, session, trace, result, and runtime clone integrations.
  description: Archal provisions service-shaped clones of third-party services so AI agents can be tested before they touch production. This spec covers Archal-owned control-plane endpoints and the runtime proxy shape agents use to call clone APIs.
  version: 0.3.0
servers:
- url: https://archal.ai
  description: Archal web and CLI API
- url: https://api.archal.ai
  description: Hosted runtime proxy
security:
- archalToken: []
tags:
- name: Auth
  description: CLI and device authentication.
paths:
  /auth/me:
    get:
      operationId: getCurrentCliUser
      summary: Get the authenticated CLI user
      tags:
      - Auth
      responses:
        '200':
          description: Authenticated user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuthMeResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /auth/device:
    post:
      operationId: createDeviceAuthRequest
      summary: Start CLI device authentication
      tags:
      - Auth
      security: []
      responses:
        '200':
          description: Device-code authentication challenge.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeviceAuthCreateResponse'
        '429':
          $ref: '#/components/responses/RateLimited'
        '503':
          $ref: '#/components/responses/Unavailable'
  /auth/device/token:
    post:
      operationId: pollDeviceAuthToken
      summary: Poll a device authentication request
      tags:
      - Auth
      security: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceAuthTokenRequest'
      responses:
        '200':
          description: Token response when the device flow has been approved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonObject'
        '400':
          $ref: '#/components/responses/BadRequest'
        '428':
          description: Device authorization is still pending.
components:
  responses:
    BadRequest:
      description: Request is malformed or failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing, invalid, or expired Archal token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    RateLimited:
      description: Rate limit exceeded.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unavailable:
      description: Required backing service is unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    DeviceAuthTokenRequest:
      type: object
      required:
      - device_code
      properties:
        device_code:
          type: string
      additionalProperties: false
    JsonObject:
      type: object
      additionalProperties: true
    DeviceAuthCreateResponse:
      type: object
      required:
      - device_code
      - user_code
      - verification_uri
      - verification_uri_complete
      - expires_in
      - interval
      properties:
        device_code:
          type: string
        user_code:
          type: string
        verification_uri:
          type: string
          format: uri
        verification_uri_complete:
          type: string
          format: uri
        expires_in:
          type: integer
          examples:
          - 600
        interval:
          type: integer
      additionalProperties: false
    AuthMeResponse:
      type: object
      required:
      - userId
      - plan
      - selectedCloneIds
      - managedEvaluatorAvailable
      properties:
        userId:
          type: string
        email:
          type:
          - string
          - 'null'
          format: email
        plan:
          type: string
        selectedCloneIds:
          type: array
          items:
            type: string
        managedEvaluatorAvailable:
          type: boolean
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
        message:
          type: string
        detail:
          type: string
      additionalProperties: true
  securitySchemes:
    archalToken:
      type: http
      scheme: bearer
      bearerFormat: Archal API token
    routeAuthorization:
      type: apiKey
      in: header
      name: x-route-authorization