Proof Holdings 2 FA API

Two-factor authentication for sensitive operations

GitHub OpenAPI

Operations 5

POST /api/v1/me/2fa/start Start 2FA #
GET /api/v1/me/2fa/{sessionId} Get 2FA status #
GET /api/v1/me/2fa/{sessionId}/events Stream 2FA events (SSE) #
POST /api/v1/me/2fa/{sessionId}/verify Verify 2FA code #
POST /api/v1/me/2fa/magic/{token} Verify 2FA via magic link #

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/proof-holdings:proof-holdings-2-fa-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

proof-holdings-2-fa-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: proof.holdings 2 FA API
  version: 1.0.0
  description: '**Multi-Surface Proof of Control**


    Cryptographic proofs of digital asset control. proof.holdings issues signed JWT proofs that a user controls a digital asset (phone, email, domain, social, wallet) by completing a challenge from that asset. Proofs are offline-verifiable using the public keys published at `/.well-known/jwks.json` (ES256).


    ## Core Concepts


    - **Verification**: A challenge-response flow to prove control of an asset

    - **Proof Token**: Signed JWT issued after successful verification (ES256)

    - **JWKS**: Public keys for offline verification at `/.well-known/jwks.json`


    ## Authentication


    Most endpoints require API key authentication via Bearer token:

    ```

    Authorization: Bearer pk_live_...

    ```


    Dashboard endpoints use JWT authentication via httpOnly cookies.


    ## Rate Limits


    All authenticated endpoints include rate limit headers:

    - `X-RateLimit-Limit`: Maximum requests per window

    - `X-RateLimit-Remaining`: Requests remaining in current window

    - `X-RateLimit-Reset`: Unix timestamp when window resets


    ## The 7 Proofs


    proof.holdings is built around seven verification primitives. Four are live today; three are coming soon. This API exposes endpoints for the live primitives only.


    1. **Proof of Control** (live) — verify control of a phone, email, domain, social account, or wallet. Endpoints: `/api/v1/verifications`, `/api/v1/verification-requests`.

    2. **Proof of Delegation** (live) — a control-proven domain authorizes a typed url/purl artifact, with an independently revocable signed token. The attestation is that the domain''s controller authorized the artifact — nothing more. Endpoints: `/api/v1/delegations`.

    3. **Proof of Action** (live) — human-in-the-loop approval for irreversible actions, cryptographically signed; authorizations are its consent layer. Endpoints: `/api/v1/hitl`, `/api/v1/confirmations`, `/api/v1/authorizations`.

    4. **Proof of Me** (live) — anti-impersonation reverse verification via trusted Circle members. Endpoints: `/api/v1/circles`, `/api/v1/identity-challenges`.

    5. **Proof of Agreement** (coming soon) — continuous witnessing for group conversations; no API endpoints yet.

    6. **Proof of Development** (coming soon) — verifiable development provenance via the team.management integration; no API endpoints yet.

    7. **Proof of Enforcement** (coming soon) — proof that mandated processes actually ran; no API endpoints yet.'
  contact:
    name: proof.holdings Support
    email: hello@proof.holdings
    url: https://proof.holdings
  license:
    name: Proprietary
    url: https://proof.holdings/terms
servers:
- url: https://api.proof.holdings
  description: Production server
tags:
- name: 2 FA
  description: Two-factor authentication for sensitive operations
paths:
  /api/v1/me/2fa/start:
    post:
      tags:
      - 2 FA
      summary: Start 2FA
      description: Start a 2FA verification for a sensitive operation.
      security:
      - CookieAuth: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Start2FARequest'
        required: true
      responses:
        '200':
          description: 'No session started: the email channel was chosen, the account has several addresses and no `email_id` was given. The body carries `requires_email_selection: true` and `available_emails`; call again with one of their ids.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwoFactorEmailSelectionResponse'
        '201':
          description: 2FA session started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwoFactorSessionResponse'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postApiV1Me2faStart
      x-operation-id-source: derived
  /api/v1/me/2fa/{sessionId}:
    get:
      tags:
      - 2 FA
      summary: Get 2FA status
      description: Poll for the status of a 2FA verification session.
      security:
      - CookieAuth: []
      parameters:
      - schema:
          type: string
          minLength: 1
          description: Auth session ID
        required: true
        description: Auth session ID
        name: sessionId
        in: path
      responses:
        '200':
          description: 2FA session status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwoFactorStatusResponse'
        '404':
          description: Session not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getApiV1Me2faBySessionId
      x-operation-id-source: derived
  /api/v1/me/2fa/{sessionId}/events:
    get:
      tags:
      - 2 FA
      summary: Stream 2FA events (SSE)
      description: Subscribe to real-time 2FA session status updates via Server-Sent Events. Sends `connected` event on open, then `update` events when the 2FA session status changes (e.g., verified). Includes heartbeat to keep connection alive through Cloudflare.
      security:
      - CookieAuth: []
      parameters:
      - schema:
          type: string
          minLength: 1
          description: Auth session ID
        required: true
        description: Auth session ID
        name: sessionId
        in: path
      responses:
        '200':
          description: SSE event stream
          content:
            text/event-stream:
              schema:
                type: string
                description: Server-Sent Events stream with `connected` and `update` events
                example: 'event: update

                  data: {"status":"verified","timestamp":"2024-01-01T00:00:00Z"}


                  '
        '404':
          description: Session not found or not owned by user
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Too many concurrent SSE connections
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: getApiV1Me2faBySessionIdEvents
      x-operation-id-source: derived
  /api/v1/me/2fa/{sessionId}/verify:
    post:
      tags:
      - 2 FA
      summary: Verify 2FA code
      description: Submit OTP code to complete 2FA verification.
      security:
      - CookieAuth: []
      parameters:
      - schema:
          type: string
          minLength: 1
          description: Auth session ID
        required: true
        description: Auth session ID
        name: sessionId
        in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VerifyCodeRequest'
        required: true
      responses:
        '200':
          description: 2FA verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwoFactorVerifyResponse'
        '400':
          description: '`invalid_code`; or `session_locked` — the fifth wrong code ended this step-up session (code and link alike), so a new one must be started. A later request for the same session answers 404.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: '`twofa_unavailable` — the step-up could not be completed (its store did not answer); no code was checked and no grant was stored. Retry'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postApiV1Me2faBySessionIdVerify
      x-operation-id-source: derived
  /api/v1/me/2fa/magic/{token}:
    post:
      tags:
      - 2 FA
      summary: Verify 2FA via magic link
      description: Verify 2FA via magic link (no body required — token is in URL).
      security:
      - CookieAuth: []
      parameters:
      - schema:
          type: string
          minLength: 1
          description: Magic link or callback token
        required: true
        description: Magic link or callback token
        name: token
        in: path
      responses:
        '200':
          description: 2FA verified
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwoFactorMagicLinkResponse'
        '401':
          description: Not signed in
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: '`forbidden` — the link belongs to another account'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: '`invalid_token` — no such link, or it expired; `session_expired` — the link outlived its 2FA session. Start a new step-up'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: '`twofa_unavailable` — the step-up could not be completed (its store did not answer); no grant was stored. Retry'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      operationId: postApiV1Me2faMagicByToken
      x-operation-id-source: derived
components:
  schemas:
    TwoFactorVerifyResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - verified
        verified_at:
          type: string
          format: date-time
        grant_expires_at:
          type: string
          format: date-time
          description: When the grant this step-up stored stops being accepted
        grant_single_use:
          type: boolean
          description: Whether the grant is spent by the first act it allows
      required:
      - status
      - verified_at
      - grant_expires_at
      - grant_single_use
      description: The step-up is complete and its grant stored
    TwoFactorStatusResponse:
      type: object
      properties:
        session_id:
          type: string
        status:
          type: string
          enum:
          - pending
          - verified
          - expired
        action_type:
          type: string
          description: 'The action the session was started for: one of `TwoFAActionType` for sessions started through this API; admin-console sessions carry internal values.'
          example: api_key_create
        verified_at:
          type: string
          format: date-time
        grant_expires_at:
          type: string
          format: date-time
          description: When the grant this step-up stored stops being accepted
        grant_single_use:
          type: boolean
          description: Whether the grant is spent by the first act it allows
      required:
      - session_id
      - status
      - action_type
      description: A 2FA session's state; the grant fields are present once `status` is `verified`
    TwoFactorEmailSelectionResponse:
      type: object
      properties:
        requires_email_selection:
          type: boolean
          description: 'Always `true`: no session was started, pick an address and start again'
        available_emails:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              email:
                type: string
                format: email
              is_primary:
                type: boolean
            required:
            - id
            - email
            - is_primary
          description: The addresses the code may go to; call again with one of their ids as `email_id`
        message:
          type: string
      required:
      - requires_email_selection
      - available_emails
      - message
      description: 'No session started: choose which address the code goes to'
    TwoFactorSessionResponse:
      type: object
      properties:
        session_id:
          type: string
          example: 2fa_0f3a9c2e7b1d4f6a8c0e2b4d6f8a0c2e
        channel:
          type: string
          enum:
          - telegram
          - whatsapp
          - sms
          - email
        status:
          type: string
          enum:
          - pending
        expires_at:
          type: string
          format: date-time
        second_method_recommended:
          type: boolean
          description: Present (true) when the step-up uses the channel the account signed in with, because the account has no other; adding a second channel is recommended
        deep_link:
          type: string
          description: Opens Telegram or WhatsApp with what the person sends (`telegram`, `whatsapp`)
        qr_code:
          type: string
          description: Base64-encoded PNG QR code for `deep_link`
        qr_text:
          type: string
          description: UTF-8 text QR for `deep_link`, for terminal/agent rendering
        instructions:
          type: string
          description: One line telling the person what to do
        sms_code:
          type: string
          description: The short code the person texts (`sms` only)
          example: ACEFGH
        sms_message:
          type: string
          description: The message to send (`sms` only)
        sms_dids:
          $ref: '#/components/schemas/SmsNumbersByRegion'
        email:
          type: string
          description: The address the code went to, masked (`email` only)
          example: st***@team.management
        email_sent:
          type: boolean
          description: '`true` when the code was emailed (`email` only)'
      required:
      - session_id
      - channel
      - status
      - expires_at
      - instructions
      description: A started 2FA session
    ErrorDetail:
      type: object
      properties:
        field:
          type: string
          example: identifier
        message:
          type: string
          example: Invalid phone number format
        code:
          type: string
          example: invalid_string
      required:
      - field
      - message
      - code
      description: Field-level validation error detail
    SessionSmsNumber:
      type: object
      properties:
        did:
          type: string
          description: Our number the short code is texted to
          example: '+19294568714'
        label:
          type: string
          example: Americas
        flag:
          type: string
          example: 🇺🇸
        qr_code:
          type: string
          description: 'Base64-encoded PNG QR code: opens the messaging app on this number with the message pre-filled'
        qr_text:
          type: string
          description: UTF-8 text QR of the same link, for terminal/agent rendering
      required:
      - did
      - label
      - flag
      description: One of our SMS numbers, for one region
    TwoFactorMagicLinkResponse:
      type: object
      properties:
        status:
          type: string
          enum:
          - verified
        action_type:
          type: string
          description: 'The action the session was started for: one of `TwoFAActionType` for sessions started through this API; admin-console sessions carry internal values.'
          example: api_key_create
        already_verified:
          type: boolean
          description: Present (true) when the session had already been verified, by its code or another open of the link; no grant is stored by this call and the grant fields are absent
        verified_at:
          type: string
          format: date-time
        grant_expires_at:
          type: string
          format: date-time
          description: When the grant this step-up stored stops being accepted
        grant_single_use:
          type: boolean
          description: Whether the grant is spent by the first act it allows
      required:
      - status
      - action_type
      description: The step-up is complete
    VerifyCodeRequest:
      type: object
      properties:
        code:
          type: string
          minLength: 1
          maxLength: 10
          description: OTP verification code
          example: '123456'
      required:
      - code
      description: OTP code submission
    TwoFAActionType:
      type: string
      enum:
      - api_key_view
      - api_key_create
      - api_key_revoke
      - api_key_regenerate
      - phone_add
      - phone_remove
      - phone_primary
      - email_add
      - email_remove
      - email_primary
      - account_access
      - account_delete
      - master_key_change
      - hitl_key_rotate
      - revocation_bulk
      - settings_write
      - profile_update
      - templates_write
      - webhook_write
      - delegation_lifecycle
      - company_update
      - domain_remove
      - profile_delete
      - account_delete_cancel
      - plan_change
      - auto_top_up_change
      description: Action type requiring 2FA. Destructive actions (api_key_*, account_delete, account_delete_cancel, phone_remove, phone_primary, email_remove, email_primary, domain_remove, profile_delete, master_key_change, hitl_key_rotate, revocation_bulk, delegation_lifecycle, plan_change, auto_top_up_change) are capped at 5 min TTL and forced single-use by server policy. `revocation_bulk` is the ONE action type for every proof revocation by the owner — phone, email or domain, one proof or a batch of up to 25, from the assets routes or a signed-in call on the proofs API; a grant is bound to the `targets` named at start and is refused for any other ids. `domain_remove` gates `DELETE /me/domains/{id}`, `profile_delete` gates `DELETE /me/profiles/{profileId}` for a session, `account_delete` gates scheduling the account deletion and `account_delete_cancel` gates cancelling it; each takes the single target id as its one `targets` entry. Configuration scopes (settings_write, profile_update, templates_write, webhook_write) allow up to 24h TTL with caller-chosen single_use. `master_key_change` gates a change of the HITL account encryption password. `plan_change` gates a dashboard session UPGRADING the plan (`POST /me/billing/plan/change`), which charges the saved payment method at once; its one `targets` entry is the plan asked for (a downgrade or keeping the plan charges nothing and takes no grant). `auto_top_up_change` gates a dashboard session switching automatic top-ups on or changing their amount (`PATCH /me/billing/auto-top-up`), which lets the saved card be charged later with no one present; its one `targets` entry is `amount_eur:<amount>` (switching off takes no grant). `company_update` gates a dashboard session changing the account's company profile (`PATCH /me/company`) once one is saved — the first profile takes none; like the configuration scopes it allows up to 24h TTL with caller-chosen single_use. `hitl_key_rotate` gates a JWT dashboard session replacing the encryption keypair (a new `kid`) of an active HITL config — an API-key caller is unaffected, and the owner is emailed about every rotation from either path. `delegation_lifecycle` gates a JWT dashboard session revoking, suspending, or unsuspending a delegation (`ph_dlg_*` handle) — an API-key caller is unaffected, gated instead by the `delegations:write` scope. `phone_primary` / `email_primary` gate a dashboard session making a phone or email the primary one. `phone_add` / `email_add` are preserved for backwards-compat with existing dashboard flows but no longer gate any backend route — the add-phone / add-email flows self-authenticate via reverse-OTP / OTP verification. `api_key_view` is reserved for UI surfaces that re-reveal an API key secret; `webhook_write` gates a JWT dashboard session creating, updating, rotating the secret of, or deleting a webhook endpoint (`/webhook-endpoints`), and rotating a sub-account's callback signing secret — an API-key caller is unaffected, gated instead by the `webhooks:write` scope.
      example: api_key_create
    Start2FARequest:
      type: object
      properties:
        action_type:
          $ref: '#/components/schemas/TwoFAActionType'
        channel:
          type: string
          enum:
          - telegram
          - whatsapp
          - sms
          - email
          example: email
        email_id:
          type: string
          description: 'Optional: specify which email to use for email 2FA'
        phone_id:
          type: string
          description: 'Optional: specify which phone to use for phone-channel 2FA'
        ttl_seconds:
          type: integer
          minimum: 60
          maximum: 86400
          description: Requested grant lifetime in seconds (60-86400). Server clamps to per-action-type maximum (300s for destructive actions, 86400s for config mutations). Defaults to 300s if omitted.
          example: 300
        single_use:
          type: boolean
          description: Whether the grant is consumed on first use. Server forces true for destructive actions regardless of this value. Defaults to true.
          example: true
        targets:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 256
          minItems: 1
          maxItems: 25
          description: 'The ids this step-up is for (1-25): asset ids for the assets routes, `ph_ctl_*` handles for the proofs API, the domain / profile / account id for a single-target action. For the types bound to an act as well as an item, the act rides as a prefixed string beside the id: `delegation_lifecycle` takes `["act:<revoke|suspend|unsuspend|renew>", "<ph_dlg_* handle>"]`, `webhook_write` takes `["act:<update|delete|rotate_secret>", "<endpoint id>"]`, plus the `sha256:` target of the address when the change sends a `url` (a new endpoint, a change of address and a callback secret: the `targets` the refusal lists); `api_key_revoke`, `api_key_regenerate`, `phone_primary` and `email_primary` take the one id. A gated route that refuses for a missing or mismatched grant lists the exact `targets` it needs in its `2fa_required` answer. The grant is bound to a digest of exactly these ids and the gated route refuses it with `2fa_required` (`reason: target_mismatch`) when the request names different ids. `settings_write` takes `["act:webhook_url", "sha256:<hash of the address>"]` when `PATCH /me/settings` sends a string `webhook.url`; any other settings change, and removing the address, takes none. Omit for an untargeted action such as templates_write.'
          example:
          - 68d4f3a2b1c9e7f0a1b2c3d4
        destination:
          type: string
          maxLength: 2000
          description: The address a `webhook_write` (a new endpoint, or a change of an endpoint's address) or a `settings_write` that sets the settings webhook address is for. Shown in the confirmation prompt only when it hashes to the address the `targets` bind; never part of the grant. 2000 is the endpoint URL cap.
      required:
      - action_type
      - channel
      description: Request body for starting 2FA verification
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: Request validation failed
            details:
              type: array
              items:
                $ref: '#/components/schemas/ErrorDetail'
            request_id:
              type: string
              description: Correlation id of this request — the same value as the `X-Request-Id` response header. Present on every error envelope; quote it when contacting support. A well-formed `X-Request-Id` sent with the request is reused.
              example: req_4f1c2a9b7e3d4c5b8a6f0e1d2c3b4a59
            moved_to:
              type: string
              description: 'The username a profile now lives at (404 `profile_moved` on `GET /api/v1/profiles/u/{username}` only): the requested name was an assigned default its owner replaced. Sent only while that profile is public.'
              example: team_mgmt_hq
            remaining_attempts:
              type: number
              description: Number of remaining attempts before lockout (auth endpoints only)
              example: 3
            retryAfter:
              type: number
              description: Seconds to wait before retrying (rate limit and lockout errors)
              example: 3600
            top_up_url:
              type: string
              description: Where to top up the prepaid balance (402 balance_empty only)
              example: https://proof.holdings/billing
            used:
              type: number
              description: This period's production proofs (402 balance_empty only)
              example: 312
            included:
              type: number
              description: Proofs the account's plan includes per period (402 balance_empty only)
              example: 300
            balance:
              type: number
              description: The prepaid balance in euro cents, at or below zero (402 balance_empty only)
              example: 0
          required:
          - code
          - message
      required:
      - error
      description: Standard error response format
    SmsNumbersByRegion:
      type: object
      properties:
        americas:
          $ref: '#/components/schemas/SessionSmsNumber'
        europe:
          $ref: '#/components/schemas/SessionSmsNumber'
        israel:
          $ref: '#/components/schemas/SessionSmsNumber'
      required:
      - americas
      - europe
      - israel
      description: Our SMS numbers, one entry per region and always all three. A region with no number configured carries an empty `did` and no QR code.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API key authentication. Use format: `pk_live_...` or `pk_test_...`'
    CookieAuth:
      type: apiKey
      in: cookie
      name: auth_token
      description: JWT authentication via httpOnly cookie (dashboard only)