{
  "openapi": "3.1.0",
  "info": {
    "title": "Humanless API",
    "version": "1.0.0",
    "summary": "Verification inboxes for E2E tests and AI browser agents: disposable email, TOTP, long-poll wait for parsed OTP codes and magic links.",
    "description": "Humanless gives each test run or agent task a disposable **email inbox**, a **TOTP authenticator** secret and (coming soon) a dedicated receive-only US **SMS number**. A push-based long-poll `wait` returns the OTP code or magic link, already parsed, the moment the message arrives.\n\n**Use policy.** Use Humanless only for applications you own or are authorized to test. Do not use it to create accounts on, or bypass verification of, third-party services. Full terms: https://usehumanless.com/terms\n\n**Flow.** `createIdentity` -> take `since = Date.now()` -> submit the form in the app you are testing -> `waitForMessage?since=<since>` (a `408 timeout` is normal: call again) -> optional `getTotpCode` -> `deleteIdentity` in a finally block.\n\n**Errors.** Every non-2xx response is `{ \"error\": { \"code\", \"message\", \"details\"? } }`. Each code has a stable anchor at https://usehumanless.com/docs/errors#<code> with its next action (also in `x-error-catalog` on the ErrorCode schema).\n\n**MCP.** The same operations are exposed as MCP tools at https://api.usehumanless.com/mcp (Streamable HTTP, stateless, same Bearer key): create_verification_identity, wait_for_verification_code, get_totp_code, delete_verification_identity. See https://usehumanless.com/docs/mcp.\n\n**Pricing.** $0.01 per email/TOTP identity from prepaid credits (top-ups $20 to $5,000, no subscription). SMS numbers: coming soon.",
    "termsOfService": "https://usehumanless.com/terms",
    "license": {
      "name": "Proprietary: Humanless Terms of Service",
      "url": "https://usehumanless.com/terms"
    },
    "contact": {
      "name": "Humanless (Ninety Nine Oranges)",
      "url": "https://usehumanless.com/",
      "email": "hello@usehumanless.com"
    },
    "x-logo": {
      "url": "https://usehumanless.com/logo-512.png",
      "altText": "Humanless"
    }
  },
  "externalDocs": {
    "description": "Humanless docs (Markdown twins at /docs/*.md, index at /llms.txt)",
    "url": "https://usehumanless.com/docs/"
  },
  "servers": [
    {
      "url": "https://api.usehumanless.com",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Identities",
      "description": "Disposable verification identities (email inbox, TOTP secret, SMS number)."
    },
    {
      "name": "Messages",
      "description": "Long-poll for the next email or SMS, parsed into code / url."
    },
    {
      "name": "TOTP",
      "description": "Current authenticator code for an identity's TOTP secret."
    },
    {
      "name": "Waitlist",
      "description": "Public sign-up for products that are coming soon (dedicated SMS numbers). No API key."
    }
  ],
  "paths": {
    "/v1/identities": {
      "post": {
        "operationId": "createIdentity",
        "tags": [
          "Identities"
        ],
        "summary": "Create an identity",
        "description": "Creates a disposable identity in one transaction: an email address (`email`), a TOTP secret (`totp`) and/or a lease on one of the account's dedicated receive-only US numbers (`sms`, coming soon). Charged here: $0.01 per identity from credits. Always delete it when finished. Use Humanless only for applications you own or are authorized to test. Do not use it to create accounts on, or bypass verification of, third-party services.",
        "requestBody": {
          "required": false,
          "description": "Optional. An empty body is treated as `{}` (one email inbox, server-default TTL).",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateIdentityRequest"
              },
              "examples": {
                "email": {
                  "summary": "Email inbox (default)",
                  "value": {
                    "channels": [
                      "email"
                    ]
                  }
                },
                "emailTotp": {
                  "summary": "Email + TOTP for 2FA enrollment, 15 min",
                  "value": {
                    "channels": [
                      "email",
                      "totp"
                    ],
                    "ttl_seconds": 900
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Identity created.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                },
                "example": {
                  "identity_id": "5b0d7c1e-8f2a-4c1b-9a63-2f1d0e7c4b11",
                  "channels": [
                    "email",
                    "totp"
                  ],
                  "email": "hl-k3j9x2m1qa@inbox.example",
                  "phone": null,
                  "totp_secret": "JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP",
                  "status": "active",
                  "expires_at": "2026-12-03T13:00:00.000Z",
                  "created_at": "2026-12-03T12:00:00.000Z",
                  "ended_at": null
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_json`, `invalid_domain`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_request": {
                    "summary": "400 invalid_request",
                    "description": "Next action: Fix the arguments and call the tool again. Docs: https://usehumanless.com/docs/errors#invalid_request",
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "channels.0: Invalid option: expected one of \"email\"|\"sms\"|\"totp\""
                      }
                    }
                  },
                  "invalid_json": {
                    "summary": "400 invalid_json",
                    "description": "Next action: Send a valid JSON body with `Content-Type: application/json` (or an empty body to use the defaults), then retry. Docs: https://usehumanless.com/docs/errors#invalid_json",
                    "value": {
                      "error": {
                        "code": "invalid_json",
                        "message": "Request body must be valid JSON"
                      }
                    }
                  },
                  "invalid_domain": {
                    "summary": "400 invalid_domain",
                    "description": "Next action: Omit `domain` to use the default domain, or pass a verified domain on this account. Docs: https://usehumanless.com/docs/errors#invalid_domain",
                    "value": {
                      "error": {
                        "code": "invalid_domain",
                        "message": "Domain \"example.org\" is not a verified domain on this account or a platform domain"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "402": {
            "description": "`credits_exhausted`, `payment_required`, `sms_quota_exceeded`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "credits_exhausted": {
                    "summary": "402 credits_exhausted",
                    "description": "Next action: This account has no credits left to pay for new identities. Do not retry: ask the account owner to top up credits (from $20, one-off) at error.details.billing_url. Existing identities keep working. Docs: https://usehumanless.com/docs/errors#credits_exhausted",
                    "value": {
                      "error": {
                        "code": "credits_exhausted",
                        "message": "The credit balance ($0.00) can't pay for another identity ($0.01 each). Top up credits (from $20) at https://api.usehumanless.com/app/billing.",
                        "details": {
                          "credit_balance_cents": 0,
                          "identity_price_cents": 1,
                          "billing_url": "https://api.usehumanless.com/app/billing"
                        }
                      }
                    }
                  },
                  "payment_required": {
                    "summary": "402 payment_required",
                    "description": "Next action: SMS identities aren't available on this account (SMS numbers may still be coming soon: see error.details.sms_waitlist_url). Retry with channels [\"email\"] or [\"totp\"], or ask the account owner. Docs: https://usehumanless.com/docs/errors#payment_required",
                    "value": {
                      "error": {
                        "code": "payment_required",
                        "message": "SMS identities aren't available yet: SMS numbers are coming soon. Use email or TOTP identities meanwhile. SMS numbers are coming soon — join the waitlist at https://usehumanless.com/#sms-waitlist (or POST /v1/waitlist).",
                        "details": {
                          "credit_balance_cents": 0,
                          "open_sms_identities": 1,
                          "sms_unit_cents": 10,
                          "billing_url": "https://api.usehumanless.com/app/billing"
                        }
                      }
                    }
                  },
                  "sms_quota_exceeded": {
                    "summary": "402 sms_quota_exceeded",
                    "description": "Next action: This account's SMS quota is used up and its credits can't pay for more SMS. Do not retry SMS: use channels [\"email\"] or [\"totp\"], or ask the account owner to top up credits (error.details.billing_url). Existing SMS identities keep receiving messages. Docs: https://usehumanless.com/docs/errors#sms_quota_exceeded",
                    "value": {
                      "error": {
                        "code": "sms_quota_exceeded",
                        "message": "SMS quota exhausted: 500/500 included SMS used this period (resets 2027-01-01T00:00:00.000Z) and the credit balance ($0.00) is below $0.08 ($0.08 per extra SMS for each open SMS identity). Top up credits, end unused SMS identities, or upgrade at https://api.usehumanless.com/app/billing.",
                        "details": {
                          "credit_balance_cents": 0,
                          "open_sms_identities": 1,
                          "sms_used": 500,
                          "sms_included": 500,
                          "sms_unit_cents": 10,
                          "required_cents": 10,
                          "period_end": "2027-01-01T00:00:00.000Z",
                          "billing_url": "https://api.usehumanless.com/app/billing"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "`all_numbers_busy`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "all_numbers_busy": {
                    "summary": "409 all_numbers_busy",
                    "description": "Next action: Every one of this account's dedicated SMS numbers is held by an active identity. Call delete_verification_identity on identities you have finished with (or wait for them to expire), then retry; or ask the account owner to upgrade for more numbers. Docs: https://usehumanless.com/docs/errors#all_numbers_busy",
                    "value": {
                      "error": {
                        "code": "all_numbers_busy",
                        "message": "All 1 of this account's SMS numbers are in use by active identities (or cooling down for a few seconds). Delete identities you no longer need (DELETE /v1/identities/:id), or upgrade the plan for more numbers."
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, `sms_limit_reached`. See https://usehumanless.com/docs/errors",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "X-RateLimit-Reset": {
                "$ref": "#/components/headers/X-RateLimit-Reset"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limited": {
                    "summary": "429 rate_limited",
                    "description": "Next action: Too many requests. Wait for the retry-after period, then try again. Docs: https://usehumanless.com/docs/errors#rate_limited",
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "API rate limit exceeded for this key"
                      }
                    }
                  },
                  "sms_limit_reached": {
                    "summary": "429 sms_limit_reached",
                    "description": "Next action: Daily SMS identity limit reached. Use an email identity, or try again tomorrow. Docs: https://usehumanless.com/docs/errors#sms_limit_reached",
                    "value": {
                      "error": {
                        "code": "sms_limit_reached",
                        "message": "Daily SMS identity limit reached for this account"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/E500"
          },
          "503": {
            "description": "`numbers_provisioning`, `phone_pool_exhausted`, `email_domain_not_configured`. See https://usehumanless.com/docs/errors",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "numbers_provisioning": {
                    "summary": "503 numbers_provisioning",
                    "description": "Next action: This account's dedicated SMS numbers are still being set up (just after an upgrade). Wait for the retry-after period, then retry; or use an email identity meanwhile. Docs: https://usehumanless.com/docs/errors#numbers_provisioning",
                    "value": {
                      "error": {
                        "code": "numbers_provisioning",
                        "message": "This account's dedicated SMS numbers are still being provisioned. Retry shortly."
                      }
                    }
                  },
                  "phone_pool_exhausted": {
                    "summary": "503 phone_pool_exhausted",
                    "description": "Next action: No phone numbers are free right now. Retry later or use an email identity. Docs: https://usehumanless.com/docs/errors#phone_pool_exhausted",
                    "value": {
                      "error": {
                        "code": "phone_pool_exhausted",
                        "message": "No phone numbers available to lease; try again shortly"
                      }
                    }
                  },
                  "email_domain_not_configured": {
                    "summary": "503 email_domain_not_configured",
                    "description": "Next action: The server operator has not configured an email domain. Tell the user; retrying will not help. Docs: https://usehumanless.com/docs/errors#email_domain_not_configured",
                    "value": {
                      "error": {
                        "code": "email_domain_not_configured",
                        "message": "No email domain configured; run `npm run admin -- domain:add <domain> --default` to add a platform domain"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "x-mcp-tool": "create_verification_identity",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -s -X POST https://api.usehumanless.com/v1/identities \\\n  -H \"Authorization: Bearer $HUMANLESS_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"channels\":[\"email\"]}'"
          },
          {
            "lang": "TypeScript",
            "label": "TypeScript SDK",
            "source": "import { Humanless } from \"humanless\"; // npm i -D humanless\nconst hl = new Humanless({ apiKey: process.env.HUMANLESS_API_KEY! });\nconst id = await hl.createIdentity({ channels: [\"email\"] });\nconsole.log(id.email);"
          }
        ]
      }
    },
    "/v1/identities/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "`identity_id` returned by createIdentity. A malformed, unknown or other account's id returns 404 `not_found` (not 400).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "5b0d7c1e-8f2a-4c1b-9a63-2f1d0e7c4b11"
        }
      ],
      "get": {
        "operationId": "getIdentity",
        "tags": [
          "Identities"
        ],
        "summary": "Read an identity",
        "description": "Returns the identity, including deleted or expired ones (with `status` and `ended_at`). `status` reads `expired` as soon as `expires_at` passes.",
        "responses": {
          "200": {
            "description": "The identity.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Identity"
                },
                "example": {
                  "identity_id": "5b0d7c1e-8f2a-4c1b-9a63-2f1d0e7c4b11",
                  "channels": [
                    "email",
                    "totp"
                  ],
                  "email": "hl-k3j9x2m1qa@inbox.example",
                  "phone": null,
                  "totp_secret": "JBSWY3DPEHPK3PXPJBSWY3DPEHPK3PXP",
                  "status": "active",
                  "expires_at": "2026-12-03T13:00:00.000Z",
                  "created_at": "2026-12-03T12:00:00.000Z",
                  "ended_at": null
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "description": "`not_found`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "404 not_found",
                    "description": "Next action: Check the identity_id (it must come from create_verification_identity with the same API key). Docs: https://usehumanless.com/docs/errors#not_found",
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Identity not found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -s https://api.usehumanless.com/v1/identities/$ID \\\n  -H \"Authorization: Bearer $HUMANLESS_API_KEY\""
          },
          {
            "lang": "TypeScript",
            "label": "TypeScript SDK",
            "source": "import { Humanless } from \"humanless\"; // npm i -D humanless\nconst hl = new Humanless({ apiKey: process.env.HUMANLESS_API_KEY! });\nconst id = await hl.getIdentity(identityId);"
          }
        ]
      },
      "delete": {
        "operationId": "deleteIdentity",
        "tags": [
          "Identities"
        ],
        "summary": "Delete an identity (idempotent)",
        "description": "Ends the identity: its address stops receiving mail and its phone number returns to the account (after a ~30 s cooldown). Deleting an identity that is already deleted or expired returns the same 200 result. Call it in a `finally` block.",
        "responses": {
          "200": {
            "description": "Deleted (or already ended).",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteResult"
                },
                "example": {
                  "identity_id": "5b0d7c1e-8f2a-4c1b-9a63-2f1d0e7c4b11",
                  "status": "deleted"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "description": "`not_found`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "404 not_found",
                    "description": "Next action: Check the identity_id (it must come from create_verification_identity with the same API key). Docs: https://usehumanless.com/docs/errors#not_found",
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Identity not found"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          }
        },
        "x-mcp-tool": "delete_verification_identity",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -s -X DELETE https://api.usehumanless.com/v1/identities/$ID \\\n  -H \"Authorization: Bearer $HUMANLESS_API_KEY\""
          },
          {
            "lang": "TypeScript",
            "label": "TypeScript SDK",
            "source": "import { Humanless } from \"humanless\"; // npm i -D humanless\nconst hl = new Humanless({ apiKey: process.env.HUMANLESS_API_KEY! });\nawait hl.deleteIdentity(identityId);"
          }
        ]
      }
    },
    "/v1/identities/{id}/wait": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "`identity_id` returned by createIdentity. A malformed, unknown or other account's id returns 404 `not_found` (not 400).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "5b0d7c1e-8f2a-4c1b-9a63-2f1d0e7c4b11"
        }
      ],
      "get": {
        "operationId": "waitForMessage",
        "tags": [
          "Messages"
        ],
        "summary": "Long-poll for the next email or SMS",
        "description": "Blocks until the next matching message arrives (push-based: it returns the moment the message is received), then returns it with the OTP `code` and/or magic-link `url` extracted.\n\n- **408 `timeout` is normal.** No message arrived within `timeout` seconds: call again immediately. Never sleep-poll.\n- **Without `since`**: returns the oldest *unconsumed* message and marks it consumed (each message is handed out once).\n- **With `since`** (Unix ms taken just *before* you submit the form): returns the oldest message received at or after it, consumed or not, so it is race-free and repeatable. To get the next message, advance `since` past the previous `received_at`.\n- Check `type`/`code`/`url`: the first message may be a welcome email (`type: raw`). Wait again in that case.\n- **SSE**: send `Accept: text/event-stream` to get one `message` event (data: Message JSON) or one `timeout` event (data: ErrorResponse), then the stream closes. `: ping` comments are sent every 15 s. 404/409/410 are returned as real HTTP statuses before the stream starts; later failures arrive as an `error` event.\n- The request can stay open up to 60 s; set proxy read timeouts above that.",
        "parameters": [
          {
            "name": "channel",
            "in": "query",
            "required": false,
            "description": "Only return messages from this channel.",
            "schema": {
              "type": "string",
              "enum": [
                "any",
                "email",
                "sms"
              ],
              "default": "any"
            }
          },
          {
            "name": "timeout",
            "in": "query",
            "required": false,
            "description": "Seconds to wait for this round (fractions allowed).",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 60,
              "default": 30
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "Unix time in milliseconds. Only messages received at or after it are eligible (consumed or not).",
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "example": 1764763200000
          }
        ],
        "responses": {
          "200": {
            "description": "The next matching message. With `Accept: text/event-stream`, a stream with exactly one `message`, `timeout` or `error` event.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Message"
                },
                "example": {
                  "type": "otp",
                  "code": "482913",
                  "url": null,
                  "channel": "email",
                  "sender": "no-reply@localhost.test",
                  "subject": "Your verification code",
                  "received_at": "2026-12-03T12:00:04.512Z",
                  "raw_snippet": "Your verification code is 482913. It expires in 10 minutes."
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE stream. Events: `message` (data: Message JSON), `timeout` (data: ErrorResponse with code `timeout`), `error` (data: ErrorResponse). Keep-alive `: ping` comments every 15 s."
                },
                "example": "event: message\ndata: {\"type\":\"otp\",\"code\":\"482913\",\"url\":null,\"channel\":\"email\",\"sender\":\"no-reply@localhost.test\",\"subject\":\"Your verification code\",\"received_at\":\"2026-12-03T12:00:04.512Z\",\"raw_snippet\":\"Your verification code is 482913. It expires in 10 minutes.\"}\n\n"
              }
            }
          },
          "400": {
            "description": "`invalid_request`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_request": {
                    "summary": "400 invalid_request",
                    "description": "Next action: Fix the arguments and call the tool again. Docs: https://usehumanless.com/docs/errors#invalid_request",
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "channels.0: Invalid option: expected one of \"email\"|\"sms\"|\"totp\""
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "description": "`not_found`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "404 not_found",
                    "description": "Next action: Check the identity_id (it must come from create_verification_identity with the same API key). Docs: https://usehumanless.com/docs/errors#not_found",
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Identity not found"
                      }
                    }
                  }
                }
              }
            }
          },
          "408": {
            "description": "No message yet: call again. Not a failure. `timeout` is returned when no matching message arrived within `timeout` seconds.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "example": {
                  "error": {
                    "code": "timeout",
                    "message": "No matching message arrived before the timeout"
                  }
                }
              }
            },
            "x-next-action": "Nothing is wrong yet: make sure the form was submitted, then call wait again with the same identity_id (and the same `since`). Do not sleep between calls; the wait is push-based."
          },
          "409": {
            "description": "`channel_not_enabled`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "channel_not_enabled": {
                    "summary": "409 channel_not_enabled",
                    "description": "Next action: This identity does not have that channel. Use channel \"any\", or create a new identity that includes it. Docs: https://usehumanless.com/docs/errors#channel_not_enabled",
                    "value": {
                      "error": {
                        "code": "channel_not_enabled",
                        "message": "This identity was not created with the totp channel"
                      }
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`identity_ended`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "identity_ended": {
                    "summary": "410 identity_ended",
                    "description": "Next action: This identity was deleted or expired. Call create_verification_identity to get a new one. Docs: https://usehumanless.com/docs/errors#identity_ended",
                    "value": {
                      "error": {
                        "code": "identity_ended",
                        "message": "Identity has expired"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          }
        },
        "x-mcp-tool": "wait_for_verification_code",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# loop on 408 (normal: nothing arrived yet)\nwhile :; do\n  code=$(curl -s -o msg.json -w '%{http_code}' \\\n    \"https://api.usehumanless.com/v1/identities/$ID/wait?channel=email&timeout=60&since=$SINCE\" \\\n    -H \"Authorization: Bearer $HUMANLESS_API_KEY\")\n  [ \"$code\" != 408 ] && break\ndone\ncat msg.json"
          },
          {
            "lang": "TypeScript",
            "label": "TypeScript SDK",
            "source": "import { Humanless } from \"humanless\"; // npm i -D humanless\nconst hl = new Humanless({ apiKey: process.env.HUMANLESS_API_KEY! });\nconst since = Date.now();          // just BEFORE submitting the form\n// ...submit the sign-up form with id.email...\nconst { code } = await hl.waitForCode({ identityId: id.identity_id, since, timeout: 60 }); // re-polls on 408"
          }
        ]
      }
    },
    "/v1/waitlist": {
      "post": {
        "operationId": "joinWaitlist",
        "tags": [
          "Waitlist"
        ],
        "summary": "Join the SMS numbers waitlist",
        "description": "Public sign-up (no API key) for dedicated SMS numbers, which are coming soon. Idempotent per email and product: a repeat sign-up returns 201 with the same `waitlist_id` and `status: \"already_joined\"`, and fills in any details sent this time. Rate-limited to 10 sign-ups per hour per client IP. Browsers may call it cross-origin from https://usehumanless.com.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WaitlistRequest"
              },
              "example": {
                "email": "qa@acme.dev",
                "product": "sms",
                "use_case": "Sign-up + 2FA flows in Playwright",
                "monthly_volume": 500,
                "countries": [
                  "US",
                  "GB"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "On the waitlist (new or repeat sign-up).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WaitlistResponse"
                },
                "example": {
                  "waitlist_id": "0c6f4c58-8f1b-4c43-9c3e-3a6d2a1f5b10",
                  "product": "sms",
                  "email": "qa@acme.dev",
                  "status": "joined",
                  "message": "Thanks — we'll email you when SMS numbers are live."
                }
              }
            }
          },
          "400": {
            "description": "`invalid_request`, `invalid_json`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "invalid_request": {
                    "summary": "400 invalid_request",
                    "description": "Next action: Fix the arguments and call the tool again. Docs: https://usehumanless.com/docs/errors#invalid_request",
                    "value": {
                      "error": {
                        "code": "invalid_request",
                        "message": "channels.0: Invalid option: expected one of \"email\"|\"sms\"|\"totp\""
                      }
                    }
                  },
                  "invalid_json": {
                    "summary": "400 invalid_json",
                    "description": "Next action: Send a valid JSON body with `Content-Type: application/json` (or an empty body to use the defaults), then retry. Docs: https://usehumanless.com/docs/errors#invalid_json",
                    "value": {
                      "error": {
                        "code": "invalid_json",
                        "message": "Request body must be valid JSON"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`. See https://usehumanless.com/docs/errors",
            "headers": {
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "rate_limited": {
                    "summary": "429 rate_limited",
                    "description": "Next action: Too many requests. Wait for the retry-after period, then try again. Docs: https://usehumanless.com/docs/errors#rate_limited",
                    "value": {
                      "error": {
                        "code": "rate_limited",
                        "message": "API rate limit exceeded for this key"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/E500"
          }
        },
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -s -X POST https://api.usehumanless.com/v1/waitlist \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\":\"qa@acme.dev\",\"product\":\"sms\",\"monthly_volume\":500,\"countries\":[\"US\"]}'"
          }
        ]
      }
    },
    "/v1/identities/{id}/totp": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "description": "`identity_id` returned by createIdentity. A malformed, unknown or other account's id returns 404 `not_found` (not 400).",
          "schema": {
            "type": "string",
            "format": "uuid"
          },
          "example": "5b0d7c1e-8f2a-4c1b-9a63-2f1d0e7c4b11"
        }
      ],
      "get": {
        "operationId": "getTotpCode",
        "tags": [
          "TOTP"
        ],
        "summary": "Current TOTP code",
        "description": "Returns the current 6-digit RFC 6238 code (SHA-1, 30 s period) for the identity's `totp_secret`. If `seconds_remaining` is 3 or less, wait for the next window and call again before typing the code.",
        "responses": {
          "200": {
            "description": "Current code.",
            "headers": {
              "X-RateLimit-Limit": {
                "$ref": "#/components/headers/X-RateLimit-Limit"
              },
              "X-RateLimit-Remaining": {
                "$ref": "#/components/headers/X-RateLimit-Remaining"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TotpCode"
                },
                "example": {
                  "code": "159026",
                  "seconds_remaining": 17
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/E401"
          },
          "404": {
            "description": "`not_found`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "not_found": {
                    "summary": "404 not_found",
                    "description": "Next action: Check the identity_id (it must come from create_verification_identity with the same API key). Docs: https://usehumanless.com/docs/errors#not_found",
                    "value": {
                      "error": {
                        "code": "not_found",
                        "message": "Identity not found"
                      }
                    }
                  }
                }
              }
            }
          },
          "409": {
            "description": "`channel_not_enabled`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "channel_not_enabled": {
                    "summary": "409 channel_not_enabled",
                    "description": "Next action: This identity does not have that channel. Use channel \"any\", or create a new identity that includes it. Docs: https://usehumanless.com/docs/errors#channel_not_enabled",
                    "value": {
                      "error": {
                        "code": "channel_not_enabled",
                        "message": "This identity was not created with the totp channel"
                      }
                    }
                  }
                }
              }
            }
          },
          "410": {
            "description": "`identity_ended`. See https://usehumanless.com/docs/errors",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                },
                "examples": {
                  "identity_ended": {
                    "summary": "410 identity_ended",
                    "description": "Next action: This identity was deleted or expired. Call create_verification_identity to get a new one. Docs: https://usehumanless.com/docs/errors#identity_ended",
                    "value": {
                      "error": {
                        "code": "identity_ended",
                        "message": "Identity has expired"
                      }
                    }
                  }
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/E429"
          },
          "500": {
            "$ref": "#/components/responses/E500"
          }
        },
        "x-mcp-tool": "get_totp_code",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "curl -s https://api.usehumanless.com/v1/identities/$ID/totp \\\n  -H \"Authorization: Bearer $HUMANLESS_API_KEY\""
          },
          {
            "lang": "TypeScript",
            "label": "TypeScript SDK",
            "source": "import { Humanless } from \"humanless\"; // npm i -D humanless\nconst hl = new Humanless({ apiKey: process.env.HUMANLESS_API_KEY! });\nlet t = await hl.getTotp(identityId);\nif (t.seconds_remaining <= 3) { await new Promise((r) => setTimeout(r, (t.seconds_remaining + 1) * 1000)); t = await hl.getTotp(identityId); }"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "hl_live_<secret>",
        "description": "API key from https://api.usehumanless.com/app, sent as `Authorization: Bearer hl_live_...`. Read it from the HUMANLESS_API_KEY environment variable; never hard-code or commit it."
      }
    },
    "headers": {
      "X-RateLimit-Limit": {
        "description": "Requests allowed per key per minute (120 pay-as-you-go, 600 Builder, 1,800 Pro).",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Remaining": {
        "description": "Requests left in the current window.",
        "schema": {
          "type": "integer"
        }
      },
      "X-RateLimit-Reset": {
        "description": "Seconds until the per-key window resets (on per-key 429s).",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying.",
        "schema": {
          "type": "integer",
          "minimum": 1
        }
      }
    },
    "responses": {
      "E401": {
        "description": "`unauthorized`. See https://usehumanless.com/docs/errors",
        "headers": {},
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "unauthorized": {
                "summary": "401 unauthorized",
                "description": "Next action: Send `Authorization: Bearer hl_live_...` with a valid key. Read it from the HUMANLESS_API_KEY environment variable; if it is missing, ask the user to create a key at https://api.usehumanless.com/app and set HUMANLESS_API_KEY. Never invent or hard-code a key. Docs: https://usehumanless.com/docs/errors#unauthorized",
                "value": {
                  "error": {
                    "code": "unauthorized",
                    "message": "Missing or invalid API key. Send `Authorization: Bearer hl_live_...`."
                  }
                }
              }
            }
          }
        }
      },
      "E429": {
        "description": "`rate_limited`. See https://usehumanless.com/docs/errors",
        "headers": {
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          },
          "X-RateLimit-Reset": {
            "$ref": "#/components/headers/X-RateLimit-Reset"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "rate_limited": {
                "summary": "429 rate_limited",
                "description": "Next action: Too many requests. Wait for the retry-after period, then try again. Docs: https://usehumanless.com/docs/errors#rate_limited",
                "value": {
                  "error": {
                    "code": "rate_limited",
                    "message": "API rate limit exceeded for this key"
                  }
                }
              }
            }
          }
        }
      },
      "E500": {
        "description": "`internal_error`. See https://usehumanless.com/docs/errors",
        "headers": {},
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorResponse"
            },
            "examples": {
              "internal_error": {
                "summary": "500 internal_error",
                "description": "Next action: Retry once after a short pause. If it persists, stop and tell the user (status: hello@usehumanless.com). Docs: https://usehumanless.com/docs/errors#internal_error",
                "value": {
                  "error": {
                    "code": "internal_error",
                    "message": "Internal server error"
                  }
                }
              }
            }
          }
        }
      }
    },
    "schemas": {
      "CreateIdentityRequest": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdentityChannel"
            },
            "minItems": 1,
            "maxItems": 3,
            "default": [
              "email"
            ],
            "description": "Channels to provision. Duplicates are ignored. `sms` is coming soon (402 `payment_required` until then)."
          },
          "ttl_seconds": {
            "type": "integer",
            "minimum": 1,
            "maximum": 86400,
            "default": 3600,
            "description": "Lifetime before the identity expires (server defaults: 3600, max 86400)."
          },
          "domain": {
            "type": "string",
            "minLength": 1,
            "maxLength": 253,
            "description": "Email domain: a platform domain or one of the account's verified domains. Only valid with the `email` channel. Omit to use the default."
          }
        }
      },
      "WaitlistRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "maxLength": 254
          },
          "product": {
            "type": "string",
            "enum": [
              "sms"
            ],
            "default": "sms"
          },
          "use_case": {
            "type": "string",
            "maxLength": 1000,
            "description": "What you want to test (optional)."
          },
          "monthly_volume": {
            "type": "integer",
            "minimum": 0,
            "description": "Expected SMS per month (optional)."
          },
          "countries": {
            "oneOf": [
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "maxLength": 64
                },
                "maxItems": 50
              },
              {
                "type": "string",
                "maxLength": 500
              }
            ],
            "description": "Countries you need numbers in: an array, or a comma-separated string (optional)."
          },
          "source": {
            "type": "string",
            "enum": [
              "site",
              "dashboard",
              "api",
              "mcp"
            ],
            "description": "Where the sign-up came from (optional; inferred)."
          }
        }
      },
      "WaitlistResponse": {
        "type": "object",
        "required": [
          "waitlist_id",
          "product",
          "email",
          "status"
        ],
        "properties": {
          "waitlist_id": {
            "type": "string",
            "format": "uuid"
          },
          "product": {
            "type": "string",
            "enum": [
              "sms"
            ]
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "status": {
            "type": "string",
            "enum": [
              "joined",
              "already_joined"
            ]
          },
          "message": {
            "type": "string"
          }
        }
      },
      "IdentityChannel": {
        "type": "string",
        "enum": [
          "email",
          "sms",
          "totp"
        ]
      },
      "Identity": {
        "type": "object",
        "required": [
          "identity_id",
          "channels",
          "email",
          "phone",
          "totp_secret",
          "status",
          "expires_at",
          "created_at",
          "ended_at"
        ],
        "properties": {
          "identity_id": {
            "type": "string",
            "format": "uuid"
          },
          "channels": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/IdentityChannel"
            }
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "format": "email",
            "description": "Disposable address when `email` is enabled (local part `hl-` + 10 base32 chars)."
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "description": "E.164 US number when `sms` is enabled. Receive-only, dedicated to the account."
          },
          "totp_secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "Base32 secret when `totp` is enabled. Enter it where the app offers \"can't scan the QR code?\"."
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "deleted",
              "expired"
            ]
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "ended_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Message": {
        "type": "object",
        "required": [
          "type",
          "code",
          "url",
          "channel",
          "sender",
          "subject",
          "received_at",
          "raw_snippet"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "otp",
              "magic_link",
              "raw"
            ],
            "description": "`otp`: a code was found (`url` may also be set). `magic_link`: only a link. `raw`: neither; read `raw_snippet`."
          },
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Extracted one-time code."
          },
          "url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Extracted verification / sign-in link."
          },
          "channel": {
            "type": "string",
            "enum": [
              "email",
              "sms"
            ]
          },
          "sender": {
            "type": "string",
            "description": "Email From or SMS sender number."
          },
          "subject": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email subject; null for SMS."
          },
          "received_at": {
            "type": "string",
            "format": "date-time"
          },
          "raw_snippet": {
            "type": "string",
            "maxLength": 280,
            "description": "Message as whitespace-collapsed plain text, truncated to 280 characters."
          }
        }
      },
      "TotpCode": {
        "type": "object",
        "required": [
          "code",
          "seconds_remaining"
        ],
        "properties": {
          "code": {
            "type": "string",
            "pattern": "^[0-9]{6}$"
          },
          "seconds_remaining": {
            "type": "integer",
            "minimum": 1,
            "maximum": 30,
            "description": "Seconds until this code rolls over."
          }
        }
      },
      "DeleteResult": {
        "type": "object",
        "required": [
          "identity_id",
          "status"
        ],
        "properties": {
          "identity_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "const": "deleted"
          }
        }
      },
      "ErrorCode": {
        "type": "string",
        "enum": [
          "invalid_request",
          "invalid_json",
          "invalid_domain",
          "unauthorized",
          "payment_required",
          "credits_exhausted",
          "sms_quota_exceeded",
          "forbidden",
          "not_found",
          "route_not_found",
          "timeout",
          "conflict",
          "channel_not_enabled",
          "all_numbers_busy",
          "identity_ended",
          "rate_limited",
          "sms_limit_reached",
          "internal_error",
          "phone_pool_exhausted",
          "numbers_provisioning",
          "email_domain_not_configured"
        ],
        "description": "Stable machine-readable error code. Docs and next action for each: https://usehumanless.com/docs/errors#<code>.",
        "x-error-catalog": {
          "invalid_request": {
            "status": 400,
            "title": "Invalid request",
            "next_action": "Fix the arguments and call the tool again.",
            "retry": "After fixing the request.",
            "doc_url": "https://usehumanless.com/docs/errors#invalid_request"
          },
          "invalid_json": {
            "status": 400,
            "title": "Invalid JSON body",
            "next_action": "Send a valid JSON body with `Content-Type: application/json` (or an empty body to use the defaults), then retry.",
            "retry": "After fixing the body.",
            "doc_url": "https://usehumanless.com/docs/errors#invalid_json"
          },
          "invalid_domain": {
            "status": 400,
            "title": "Invalid email domain",
            "next_action": "Omit `domain` to use the default domain, or pass a verified domain on this account.",
            "retry": "After removing or fixing `domain`.",
            "doc_url": "https://usehumanless.com/docs/errors#invalid_domain"
          },
          "unauthorized": {
            "status": 401,
            "title": "Missing or invalid API key",
            "next_action": "Send `Authorization: Bearer hl_live_...` with a valid key. Read it from the HUMANLESS_API_KEY environment variable; if it is missing, ask the user to create a key at https://api.usehumanless.com/app and set HUMANLESS_API_KEY. Never invent or hard-code a key.",
            "retry": "No, not with the same key.",
            "doc_url": "https://usehumanless.com/docs/errors#unauthorized"
          },
          "payment_required": {
            "status": 402,
            "title": "SMS not available",
            "next_action": "SMS identities aren't available on this account (SMS numbers may still be coming soon: see error.details.sms_waitlist_url). Retry with channels [\"email\"] or [\"totp\"], or ask the account owner.",
            "retry": "Not for SMS. Retry with email or TOTP.",
            "doc_url": "https://usehumanless.com/docs/errors#payment_required"
          },
          "credits_exhausted": {
            "status": 402,
            "title": "No credits left",
            "next_action": "This account has no credits left to pay for new identities. Do not retry: ask the account owner to top up credits (from $20, one-off) at error.details.billing_url. Existing identities keep working.",
            "retry": "No. Retrying will not help until the owner tops up.",
            "doc_url": "https://usehumanless.com/docs/errors#credits_exhausted"
          },
          "sms_quota_exceeded": {
            "status": 402,
            "title": "SMS quota or credits exhausted",
            "next_action": "This account's SMS quota is used up and its credits can't pay for more SMS. Do not retry SMS: use channels [\"email\"] or [\"totp\"], or ask the account owner to top up credits (error.details.billing_url). Existing SMS identities keep receiving messages.",
            "retry": "Not for SMS until the owner tops up, upgrades or you delete open SMS identities.",
            "doc_url": "https://usehumanless.com/docs/errors#sms_quota_exceeded"
          },
          "forbidden": {
            "status": 403,
            "title": "Forbidden",
            "next_action": "Do not retry. Tell the user the API key is not allowed to perform this action.",
            "retry": "No.",
            "doc_url": "https://usehumanless.com/docs/errors#forbidden",
            "reserved": true
          },
          "not_found": {
            "status": 404,
            "title": "Identity not found",
            "next_action": "Check the identity_id (it must come from create_verification_identity with the same API key).",
            "retry": "No, not with the same id.",
            "doc_url": "https://usehumanless.com/docs/errors#not_found"
          },
          "route_not_found": {
            "status": 404,
            "title": "No such API route",
            "next_action": "Use one of the documented routes: POST /v1/identities, GET /v1/identities/{id}, GET /v1/identities/{id}/wait, GET /v1/identities/{id}/totp, DELETE /v1/identities/{id}. The full description is at https://usehumanless.com/openapi.json.",
            "retry": "No.",
            "doc_url": "https://usehumanless.com/docs/errors#route_not_found"
          },
          "timeout": {
            "status": 408,
            "title": "No message yet (call again)",
            "next_action": "Nothing is wrong yet: make sure the form was submitted, then call wait again with the same identity_id (and the same `since`). Do not sleep between calls; the wait is push-based.",
            "retry": "Yes, immediately.",
            "doc_url": "https://usehumanless.com/docs/errors#timeout"
          },
          "conflict": {
            "status": 409,
            "title": "Conflict",
            "next_action": "Read error.message, fix the state it describes, then retry.",
            "retry": "After fixing the state.",
            "doc_url": "https://usehumanless.com/docs/errors#conflict",
            "reserved": true
          },
          "channel_not_enabled": {
            "status": 409,
            "title": "Channel not enabled",
            "next_action": "This identity does not have that channel. Use channel \"any\", or create a new identity that includes it.",
            "retry": "No, not on this identity.",
            "doc_url": "https://usehumanless.com/docs/errors#channel_not_enabled"
          },
          "all_numbers_busy": {
            "status": 409,
            "title": "All SMS numbers busy",
            "next_action": "Every one of this account's dedicated SMS numbers is held by an active identity. Call delete_verification_identity on identities you have finished with (or wait for them to expire), then retry; or ask the account owner to upgrade for more numbers.",
            "retry": "Yes, after deleting finished SMS identities (plus about 30 s cooldown).",
            "doc_url": "https://usehumanless.com/docs/errors#all_numbers_busy"
          },
          "identity_ended": {
            "status": 410,
            "title": "Identity deleted or expired",
            "next_action": "This identity was deleted or expired. Call create_verification_identity to get a new one.",
            "retry": "No. Create a new identity.",
            "doc_url": "https://usehumanless.com/docs/errors#identity_ended"
          },
          "rate_limited": {
            "status": 429,
            "title": "Rate limited",
            "next_action": "Too many requests. Wait for the retry-after period, then try again.",
            "retry": "Yes, after `Retry-After` seconds.",
            "doc_url": "https://usehumanless.com/docs/errors#rate_limited"
          },
          "sms_limit_reached": {
            "status": 429,
            "title": "Daily SMS identity limit",
            "next_action": "Daily SMS identity limit reached. Use an email identity, or try again tomorrow.",
            "retry": "After `Retry-After` seconds, or use email now.",
            "doc_url": "https://usehumanless.com/docs/errors#sms_limit_reached"
          },
          "internal_error": {
            "status": 500,
            "title": "Internal error",
            "next_action": "Retry once after a short pause. If it persists, stop and tell the user (status: hello@usehumanless.com).",
            "retry": "Once.",
            "doc_url": "https://usehumanless.com/docs/errors#internal_error"
          },
          "phone_pool_exhausted": {
            "status": 503,
            "title": "No phone numbers available",
            "next_action": "No phone numbers are free right now. Retry later or use an email identity.",
            "retry": "After `Retry-After` seconds, or use email now.",
            "doc_url": "https://usehumanless.com/docs/errors#phone_pool_exhausted"
          },
          "numbers_provisioning": {
            "status": 503,
            "title": "SMS numbers being provisioned",
            "next_action": "This account's dedicated SMS numbers are still being set up (just after an upgrade). Wait for the retry-after period, then retry; or use an email identity meanwhile.",
            "retry": "After `Retry-After` seconds.",
            "doc_url": "https://usehumanless.com/docs/errors#numbers_provisioning"
          },
          "email_domain_not_configured": {
            "status": 503,
            "title": "No email domain configured",
            "next_action": "The server operator has not configured an email domain. Tell the user; retrying will not help.",
            "retry": "No.",
            "doc_url": "https://usehumanless.com/docs/errors#email_domain_not_configured"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "$ref": "#/components/schemas/ErrorCode"
              },
              "message": {
                "type": "string",
                "description": "Human-readable explanation."
              },
              "details": {
                "$ref": "#/components/schemas/ErrorDetails"
              }
            }
          }
        }
      },
      "ErrorDetails": {
        "type": "object",
        "description": "Machine-readable extras on 402 errors. Ask the account owner to open `billing_url`.",
        "additionalProperties": true,
        "properties": {
          "billing_url": {
            "type": "string",
            "format": "uri"
          },
          "credit_balance_cents": {
            "type": "integer"
          },
          "identity_price_cents": {
            "type": "integer"
          },
          "open_sms_identities": {
            "type": "integer"
          },
          "sms_used": {
            "type": "integer"
          },
          "sms_included": {
            "type": "integer"
          },
          "sms_unit_cents": {
            "type": "integer"
          },
          "required_cents": {
            "type": "integer"
          },
          "period_end": {
            "type": "string",
            "format": "date-time"
          }
        }
      }
    }
  },
  "x-use-policy": "Use Humanless only for applications you own or are authorized to test. Do not use it to create accounts on, or bypass verification of, third-party services.",
  "x-llms-txt": "https://usehumanless.com/llms.txt",
  "x-arazzo": "https://usehumanless.com/arazzo.yaml"
}
