AiFinPay Me Auth API

me-auth router — see backend/routes/me-auth.js

Operations 20

POST /api/auth/request-link POST /api/auth/request-link #
GET /api/auth/verify GET /api/auth/verify #
POST /api/auth/verify `redirect` with a full navigation. */ #
POST /api/auth/claim Redeem a one-time agent claim link for a ten-minute agent-claim grant #
POST /api/auth/link-info link opens. The token is the proof of the mailbox, so its holder may see #
POST /api/auth/logout POST /api/auth/logout #
POST /api/auth/signup POST /api/auth/signup #
POST /api/auth/login POST /api/auth/login #
POST /api/auth/login/2fa POST /api/auth/login/2fa #
POST /api/auth/resend-verification POST /api/auth/resend-verification #
POST /api/me/claim-url POST /api/me/claim-url #
POST /api/me/persona Remember which side of the protocol this account works on #
POST /api/me/password POST /api/me/password #
POST /api/me/step-up/email-code POST /api/me/step-up/email-code #
POST /api/me/sessions/revoke-all POST /api/me/sessions/revoke-all #
POST /api/me/2fa/setup POST /api/me/2fa/setup #
POST /api/me/2fa/confirm POST /api/me/2fa/confirm #
POST /api/me/2fa/recovery-codes POST /api/me/2fa/recovery-codes #
POST /api/me/2fa/disable POST /api/me/2fa/disable #
GET /api/me GET /api/me #

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/aifinpay-io:aifinpay-io-me-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

aifinpay-io-me-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: AiFinPay Me Auth API
  version: 5.3.0
  description: HTTP 402 payment gate where autonomous AI agents authenticate with Ed25519 signatures and pay on Polygon and Solana. This document is generated from backend/routes/*.js — do not hand-edit. Regenerate with `node backend/scripts/build-openapi.mjs`.
servers:
- url: https://api.aifinpay.io
  description: Production (api)
- url: https://bridge.aifinpay.io
  description: Production (bridge)
tags:
- name: me_auth
  description: me-auth router — see backend/routes/me-auth.js
paths:
  /api/auth/request-link:
    post:
      tags:
      - me_auth
      summary: POST /api/auth/request-link
      operationId: post_api_auth_request-link
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/verify:
    get:
      tags:
      - me_auth
      summary: GET /api/auth/verify
      operationId: get_api_auth_verify
      responses:
        '302':
          description: Redirect
          headers:
            Location:
              schema:
                type: string
                description: Target URL
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
    post:
      tags:
      - me_auth
      summary: '`redirect` with a full navigation. */'
      operationId: post_api_auth_verify
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/claim:
    post:
      tags:
      - me_auth
      summary: Redeem a one-time agent claim link for a ten-minute agent-claim grant
      operationId: post_api_auth_claim
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/link-info:
    post:
      tags:
      - me_auth
      summary: link opens. The token is the proof of the mailbox, so its holder may see
      operationId: post_api_auth_link-info
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/logout:
    post:
      tags:
      - me_auth
      summary: POST /api/auth/logout
      operationId: post_api_auth_logout
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/signup:
    post:
      tags:
      - me_auth
      summary: POST /api/auth/signup
      operationId: post_api_auth_signup
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/login:
    post:
      tags:
      - me_auth
      summary: POST /api/auth/login
      operationId: post_api_auth_login
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/login/2fa:
    post:
      tags:
      - me_auth
      summary: POST /api/auth/login/2fa
      operationId: post_api_auth_login_2fa
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/auth/resend-verification:
    post:
      tags:
      - me_auth
      summary: POST /api/auth/resend-verification
      operationId: post_api_auth_resend-verification
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security: []
  /api/me/claim-url:
    post:
      tags:
      - me_auth
      summary: POST /api/me/claim-url
      operationId: post_api_me_claim-url
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/persona:
    post:
      tags:
      - me_auth
      summary: Remember which side of the protocol this account works on
      operationId: post_api_me_persona
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/password:
    post:
      tags:
      - me_auth
      summary: POST /api/me/password
      operationId: post_api_me_password
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/step-up/email-code:
    post:
      tags:
      - me_auth
      summary: POST /api/me/step-up/email-code
      operationId: post_api_me_step-up_email-code
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/sessions/revoke-all:
    post:
      tags:
      - me_auth
      summary: POST /api/me/sessions/revoke-all
      operationId: post_api_me_sessions_revoke-all
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/2fa/setup:
    post:
      tags:
      - me_auth
      summary: POST /api/me/2fa/setup
      operationId: post_api_me_2fa_setup
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/2fa/confirm:
    post:
      tags:
      - me_auth
      summary: POST /api/me/2fa/confirm
      operationId: post_api_me_2fa_confirm
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/2fa/recovery-codes:
    post:
      tags:
      - me_auth
      summary: POST /api/me/2fa/recovery-codes
      operationId: post_api_me_2fa_recovery-codes
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me/2fa/disable:
    post:
      tags:
      - me_auth
      summary: POST /api/me/2fa/disable
      operationId: post_api_me_2fa_disable
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
  /api/me:
    get:
      tags:
      - me_auth
      summary: GET /api/me
      operationId: get_api_me
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                additionalProperties: true
        '400':
          $ref: '#/components/responses/AifpError'
        '401':
          $ref: '#/components/responses/AifpError'
        '403':
          $ref: '#/components/responses/AifpError'
        '404':
          $ref: '#/components/responses/AifpError'
        '429':
          $ref: '#/components/responses/AifpError'
        5XX:
          $ref: '#/components/responses/AifpError'
      security:
      - userSession: []
components:
  responses:
    AifpError:
      description: AIFP-* error envelope. See backend/server.js safe error handler.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/AifpError'
  schemas:
    AifpError:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: AIFP-{status} code, or domain-specific string (e.g. csrf_origin_denied)
        detail:
          type: string
        request_id:
          type: string
          description: AIFP-Request-Id for log correlation
  securitySchemes:
    reportingCapability:
      type: apiKey
      in: header
      name: AIFP-Reporting-Token
      description: Observation/identity-removal capability only; no spending, access or ownership authority.
    reportingOwnerSession:
      type: apiKey
      in: cookie
      name: __aifinpay_user_session
      description: Existing owner session, current tenant/site and session-epoch validation. Browser writes also require CSRF Origin checks.
    agentEd25519:
      type: apiKey
      in: header
      name: x-agent-pubkey
      description: 'Ed25519-signed native-auth v2 request. Companion headers: x-nonce, x-signature, x-aifinpay-auth-version. The proof binds canonical origin, method, resource, body hash, and expiry. GET /nonce provides migration diagnostics only; start with an unauthenticated request to receive a v2 challenge.'
    x402Payment:
      type: apiKey
      in: header
      name: X-PAYMENT-RESPONSE
      description: x402 payment proof, base64 JSON envelope. Issued by the paying agent's wallet after broadcasting the on-chain tx. See /.well-known/x402.json.
    userSession:
      type: apiKey
      in: cookie
      name: aifinpay_session
      description: Browser session cookie for /api/me/* — sameSite=Lax, CSRF-guarded.
    agentClaim:
      type: apiKey
      in: cookie
      name: __aifinpay_agent_claim
      description: Set by redeeming a one-time claim link (POST /api/me/claim-url). Valid 10 minutes, accepted only by /api/me/agents/challenge and /api/me/agents/claim.
    adminSession:
      type: apiKey
      in: cookie
      name: aifinpay_admin_session
      description: Admin session cookie. ADMIN_ALLOWED_IPS allowlist in effect.
    partnerSession:
      type: apiKey
      in: cookie
      name: aifinpay_partner_session
      description: Partner session cookie for /api/partners/me/*.
    merchantSecret:
      type: apiKey
      in: header
      name: AIFP-Merchant-Secret
      description: Per-merchant API key for /v1/merchants/* writes.
    ingestHmac:
      type: apiKey
      in: header
      name: x-ingest-signature
      description: HMAC signature for /api/internal/* and /api/telemetry.