> ## Documentation Index
> Fetch the complete documentation index at: https://docs.useselo.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify an authorization

> Selo fetches `<origin>/.well-known/selo-verification.txt` with `GET` (10 second timeout, at most 4096 bytes, redirects followed only within the same origin, at most 3) and looks for a line equal to `expectedContent`. On success the authorization becomes `VERIFIED` for 24 hours. Calling it again on a verified authorization returns it unchanged without fetching. No request body.



## OpenAPI

````yaml /openapi.json post /v1/authorizations/{authorizationId}/verify
openapi: 3.1.0
info:
  title: Selo API
  version: 1.0.0
  summary: CI for x402. It pays your endpoint before your users do.
  description: >-
    Selo is a release gate for paid x402 APIs on Algorand. You authorize your
    endpoint, run a free preflight, then pay Selo 1.00 USDC over x402. Only
    after that payment settles does Selo pay your endpoint as a real x402
    client, run five release checks and return a deterministic PASS, FAIL or
    INCONCLUSIVE verdict with an Ed25519-signed attestation.


    There are no API keys. Access to a target is granted per target by
    authorization; the only paid route is `POST /v1/release-test`, paid with
    x402. Bodies are JSON, at most 64 KiB.
  contact:
    name: Selo
    url: https://useselo.xyz
servers:
  - url: https://api.useselo.xyz
    description: Production, Algorand Mainnet
security: []
tags:
  - name: Authorizations
    description: Prove you control the target before Selo sends it anything.
  - name: Preflight
    description: Check for free that a target can be tested and is within budget.
  - name: Release tests
    description: The paid x402 route that runs the release checks.
  - name: Reports
    description: Private, token-addressed reports of finished release tests.
  - name: Attestation keys
    description: Public keys that verify signed verdicts.
  - name: Discovery
    description: Machine-readable descriptions of Selo.
  - name: Health
    description: Liveness.
paths:
  /v1/authorizations/{authorizationId}/verify:
    post:
      tags:
        - Authorizations
      summary: Verify an authorization
      description: >-
        Selo fetches `<origin>/.well-known/selo-verification.txt` with `GET` (10
        second timeout, at most 4096 bytes, redirects followed only within the
        same origin, at most 3) and looks for a line equal to `expectedContent`.
        On success the authorization becomes `VERIFIED` for 24 hours. Calling it
        again on a verified authorization returns it unchanged without fetching.
        No request body.
      operationId: verifyAuthorization
      parameters:
        - name: authorizationId
          in: path
          required: true
          description: >-
            Authorization ID returned by `POST /v1/authorizations`. A value that
            is not a well-formed ID returns 404.
          schema:
            type: string
            pattern: ^auth_[0-9A-HJKMNP-TV-Z]{26}$
          example: auth_…
      responses:
        '200':
          description: The authorization is verified.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Authorization'
              examples:
                verified:
                  summary: Verified
                  value:
                    authorizationId: auth_…
                    status: VERIFIED
                    origin: https://api.example.com
                    routePath: /v1/orders
                    method: POST
                    type: well_known_file
                    verifiedAt: '2026-10-26T12:00:00.000Z'
                    expiresAt: '2026-10-27T12:00:00.000Z'
        '404':
          description: No authorization with this ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                NOT_FOUND:
                  summary: Unknown ID
                  value:
                    error: NOT_FOUND
                    message: Authorization auth_… does not exist
        '409':
          description: >-
            The token was not found, or the authorization can no longer be
            verified.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                VERIFICATION_FAILED:
                  summary: Token missing
                  value:
                    error: VERIFICATION_FAILED
                    message: >-
                      https://api.example.com/.well-known/selo-verification.txt
                      does not contain the expected selo-verification line
                CHALLENGE_EXPIRED:
                  summary: Challenge older than one hour
                  value:
                    error: CHALLENGE_EXPIRED
                    message: The verification challenge expired; create a new one
                AUTHORIZATION_EXPIRED:
                  summary: Verified authorization lapsed
                  value:
                    error: AUTHORIZATION_EXPIRED
                    message: The authorization expired; create a new one
                AUTHORIZATION_REVOKED:
                  summary: Revoked
                  value:
                    error: AUTHORIZATION_REVOKED
                    message: Authorization auth_… was revoked
        '422':
          description: >-
            Selo refused to fetch the verification file. `error` is the block
            reason: `TARGET_URL_INVALID`, `TARGET_NOT_HTTPS`,
            `TARGET_ADDRESS_BLOCKED` (the name resolves to a non-public
            address), `ORIGIN_NOT_ALLOWED` (a redirect left the origin) or
            `TOO_MANY_REDIRECTS`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                TARGET_ADDRESS_BLOCKED:
                  summary: Resolves to a private address
                  value:
                    error: TARGET_ADDRESS_BLOCKED
                    message: >-
                      Selo refused to fetch
                      https://api.example.com/.well-known/selo-verification.txt
                ORIGIN_NOT_ALLOWED:
                  summary: Redirect to another origin
                  value:
                    error: ORIGIN_NOT_ALLOWED
                    message: >-
                      Selo refused to fetch
                      https://api.example.com/.well-known/selo-verification.txt
        '500':
          $ref: '#/components/responses/InternalError'
        '502':
          description: >-
            The verification file could not be fetched (timeout or network
            error).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
              examples:
                VERIFICATION_UNREACHABLE:
                  summary: Unreachable
                  value:
                    error: VERIFICATION_UNREACHABLE
                    message: >-
                      Could not reach
                      https://api.example.com/.well-known/selo-verification.txt
components:
  schemas:
    Authorization:
      type: object
      description: >-
        Current state of an authorization. Reading it moves a lapsed `PENDING`
        or `VERIFIED` authorization to `EXPIRED`.
      required:
        - authorizationId
        - status
        - origin
        - routePath
        - method
        - type
        - verifiedAt
        - expiresAt
      properties:
        authorizationId:
          type: string
          description: '`auth_` plus 26 Crockford base32 characters.'
        status:
          $ref: '#/components/schemas/AuthorizationStatus'
        origin:
          type: string
        routePath:
          type: string
        method:
          $ref: '#/components/schemas/HttpMethod'
        type:
          $ref: '#/components/schemas/AuthorizationType'
        verifiedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: When Selo verified the token, or `null` while pending.
        expiresAt:
          type: string
          format: date-time
          description: >-
            While `PENDING`, when the challenge closes (one hour after
            creation). Once `VERIFIED`, when the authorization lapses (24 hours
            after verification).
    ApiError:
      type: object
      description: Error body returned by every failing request.
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Stable machine-readable error code, for example `VALIDATION_FAILED`.
        message:
          type: string
          description: Human-readable explanation. Do not parse it.
    AuthorizationStatus:
      type: string
      enum:
        - PENDING
        - VERIFIED
        - EXPIRED
        - REVOKED
      description: >-
        `PENDING`: challenge issued, not yet verified. `VERIFIED`: Selo found
        the token and may test the target until `expiresAt`. `EXPIRED`: the
        challenge or the authorization lapsed. `REVOKED`: the authorization was
        withdrawn.
    HttpMethod:
      type: string
      enum:
        - GET
        - POST
      description: HTTP method Selo uses to call the target.
    AuthorizationType:
      type: string
      enum:
        - well_known_file
        - manual_owner_consent
      description: >-
        `well_known_file`: verified through `/.well-known/selo-verification.txt`
        on the target origin. `manual_owner_consent`: an explicit consent
        recorded by the Selo operator.
  responses:
    InternalError:
      description: Unexpected server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          examples:
            INTERNAL:
              summary: Unexpected server error
              value:
                error: INTERNAL
                message: Internal server error

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.