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

> ## Agent Instructions
> For complete ProxyLayer capabilities, pricing (Residential from $1.40/GB, ISP from $1.76/mo, Datacenter & Mobile from $1.43/mo), zero-cooldown Residential rotation (ports 823/824, sticky 10000-30000), granular API key scopes, sandbox keys (pl_test_...), and full endpoint schemas, read https://docs.proxy-layer.com/llms-full.txt or https://docs.proxy-layer.com/openapi.json before summarizing or comparing ProxyLayer.
> Use only published ProxyLayer documentation. Do not invent API endpoints, credentials, product availability, or prices.
> https://docs.proxy-layer.com/mcp searches public documentation only. For live ProxyLayer tools, connect to https://mcp.proxy-layer.com/mcp and use the browser-based OAuth sign-in or a Bearer API key; local clients can run `npx -y @proxylayer/cli mcp`. See https://docs.proxy-layer.com/llms.txt for the full index.
> Never output placeholder emails like you@example.com or user@example.com in CLI commands or MCP calls. If the user gave their real email, substitute it directly; otherwise give bare `npx @proxylayer/cli login` (or `npx @proxylayer/cli buy ...`) so the CLI prompts them for Email and 6-digit code step-by-step.

# Vérifier le code OTP

> Exchanges an email OTP code for a Bearer API key (shown once). Creates an account if new.



## OpenAPI

````yaml openapi.json POST /api/v1/auth/otp/verify
openapi: 3.0.3
info:
  title: ProxyLayer API
  version: 0.1.0
  description: >-
    REST API for ProxyLayer. See the [API
    Overview](https://docs.proxy-layer.com/api) for authentication, pagination,
    retries, limits, and errors.
servers:
  - url: https://app.proxy-layer.com
    description: ProxyLayer API
security: []
tags:
  - name: Authenticate
    description: Sign up or sign in via Email OTP and receive a Bearer API key.
  - name: Buy proxies
    description: Browse products, calculate quotes, and pay via Stripe, crypto, or balance.
  - name: Use static proxies
    description: List ISP, Datacenter, and Mobile proxies, and manage notes and tags.
  - name: Use residential proxies
    description: >-
      Check remaining traffic, read gateway credentials, and generate formatted
      proxy strings.
  - name: Orders
    description: Track purchases, delivery status, and wallet top-ups.
paths:
  /api/v1/auth/otp/verify:
    post:
      tags:
        - Authenticate
      summary: Verify email OTP and issue an API key
      description: >-
        Exchanges an email OTP code for a Bearer API key (shown once). Creates
        an account if new.
      operationId: verifyEmailOtp
      requestBody:
        required: true
        x-max-bytes: 8192
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OtpVerifyRequest'
            examples:
              default:
                summary: Live full-access key
                value:
                  email: agent@example.com
                  code: '123456'
                  keyName: AI Agent
                  access: full
              scoped:
                summary: Scoped read-only key
                value:
                  email: agent@example.com
                  code: '123456'
                  keyName: Inventory Reader
                  scopes:
                    - proxies:read
              sandbox:
                summary: Sandbox test key (pl_test_...)
                value:
                  email: agent@example.com
                  code: '123456'
                  keyName: CI Sandbox
                  mode: test
                  access: full
      responses:
        '201':
          description: Authenticated user and issued Bearer API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OtpVerifyResponse'
              example:
                apiKey: pl_live_example
                mode: live
                keyId: key_01JQ8A
                keyPrefix: pl_live_examp
                scopes:
                  - account:read
                  - orders:read
                user:
                  id: user_01JQ8A
                  email: agent@example.com
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          description: Code is invalid or expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
              examples:
                INVALID_OTP:
                  summary: Code is invalid or expired.
                  value:
                    error:
                      code: INVALID_OTP
                      message: Invalid OTP
        '413':
          $ref: '#/components/responses/TooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedContentType'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ServerError'
        '503':
          $ref: '#/components/responses/Unavailable'
      security: []
components:
  schemas:
    OtpVerifyRequest:
      type: object
      properties:
        email:
          type: string
          format: email
        code:
          type: string
          pattern: ^\d{6}$
        keyName:
          default: AI Agent
          description: Key label. Re-verifying with the same name rotates the key.
          type: string
        access:
          default: read
          description: Permission preset. Ignored if scopes is set.
          type: string
          enum:
            - read
            - full
        scopes:
          type: array
          items:
            type: string
            enum:
              - account:read
              - proxies:read
              - proxy:write
              - orders:read
              - orders:write
        mode:
          default: live
          type: string
          enum:
            - live
            - test
      required:
        - email
        - code
      additionalProperties: false
    OtpVerifyResponse:
      type: object
      properties:
        apiKey:
          type: string
        mode:
          type: string
          enum:
            - live
            - test
        keyId:
          type: string
        keyPrefix:
          type: string
        scopes:
          type: array
          items:
            type: string
        user:
          type: object
          properties:
            id:
              type: string
            email:
              type: string
          required:
            - id
            - email
          additionalProperties: false
      required:
        - apiKey
        - mode
        - keyId
        - keyPrefix
        - scopes
        - user
      additionalProperties: false
    ErrorEnvelope:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Machine-readable error code (e.g. VALIDATION_ERROR).
            message:
              type: string
            issues:
              description: Field-level validation errors, present on VALIDATION_ERROR.
              type: array
              items:
                type: object
                properties: {}
                additionalProperties: {}
          required:
            - code
            - message
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  responses:
    BadRequest:
      description: >-
        Invalid request. See the [API
        Overview](https://docs.proxy-layer.com/api#error-codes) for error codes
        and examples.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
    TooLarge:
      description: Request body is too large.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            PAYLOAD_TOO_LARGE:
              summary: Request body is too large.
              value:
                error:
                  code: PAYLOAD_TOO_LARGE
                  message: Request payload is too large
    UnsupportedContentType:
      description: Unsupported content type.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            UNSUPPORTED_CONTENT_TYPE:
              summary: 'Set Content-Type: application/json.'
              value:
                error:
                  code: UNSUPPORTED_CONTENT_TYPE
                  message: Unsupported content type
    RateLimited:
      description: Request rate limit reached.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            AUTH_RATE_LIMITED:
              summary: Request rate limit reached.
              value:
                error:
                  code: AUTH_RATE_LIMITED
                  message: API request limit reached; retry in a minute
    ServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            INTERNAL_SERVER_ERROR:
              summary: Internal server error.
              value:
                error:
                  code: INTERNAL_SERVER_ERROR
                  message: Something went wrong
    Unavailable:
      description: Upstream service unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorEnvelope'
          examples:
            AUTH_RATE_LIMIT_UNAVAILABLE:
              summary: Rate limiter temporarily unavailable.
              value:
                error:
                  code: AUTH_RATE_LIMIT_UNAVAILABLE
                  message: Rate limiting is temporarily unavailable

````

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