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

# Add a sandbox phone number

> Register a phone number as a sandbox number and associate it with a fixed attempt code. Subsequent verification attempts against this number will not trigger a real SMS/call and will validate against the configured attempt code.

This operation is idempotent - re-adding the same phone number will overwrite the existing attempt code.

In order to get access to this endpoint, contact our support team.




## OpenAPI

````yaml put /v2/verification/management/phone-numbers/sandbox
openapi: 3.1.0
info:
  title: Prelude API
  version: 2.0.0
  description: The Prelude API allows you to send messages to your users.
  contact:
    email: support@prelude.so
servers:
  - url: https://api.prelude.dev
    description: Production server
security:
  - apiToken: []
tags:
  - name: Notify
    description: Send transactional and marketing messages with compliance enforcement.
  - name: Transactional
    description: Send transactional messages (deprecated - use Notify API instead).
  - name: Verify
    description: Verify phone numbers.
  - name: Watch
    description: Evaluate email addresses and phone numbers for trustworthiness.
  - name: Lookup
    description: >-
      Retrieve detailed information about a phone number including carrier data,
      line type, and portability status.
paths:
  /v2/verification/management/phone-numbers/sandbox:
    put:
      tags:
        - Verify
      summary: Add a sandbox phone number
      description: >
        Register a phone number as a sandbox number and associate it with a
        fixed attempt code. Subsequent verification attempts against this number
        will not trigger a real SMS/call and will validate against the
        configured attempt code.


        This operation is idempotent - re-adding the same phone number will
        overwrite the existing attempt code.


        In order to get access to this endpoint, contact our support team.
      operationId: addSandboxPhoneNumber
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddSandboxPhoneNumberRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddSandboxPhoneNumberResponse'
        '400':
          description: KO
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    AddSandboxPhoneNumberRequest:
      type: object
      required:
        - phone_number
        - attempt_code
      properties:
        phone_number:
          type: string
          format: phone_number
          description: An E.164 formatted phone number to add to the sandbox list.
          examples:
            - '+30123456789'
        attempt_code:
          type: string
          description: >-
            The fixed attempt code that will validate verification attempts for
            this phone number.
          examples:
            - '123456'
    AddSandboxPhoneNumberResponse:
      type: object
      required:
        - phone_number
        - attempt_code
      properties:
        phone_number:
          type: string
          format: phone_number
          description: The E.164 formatted phone number that was added to the sandbox list.
          examples:
            - '+30123456789'
        attempt_code:
          type: string
          description: The fixed attempt code associated with the sandbox phone number.
          examples:
            - '123456'
    Error:
      type: object
      properties:
        code:
          type: string
          description: The error code.
          examples:
            - invalid_phone_number
        message:
          type: string
          examples:
            - >-
              The provided phone number is invalid. Provide a valid E.164 phone
              number.
          description: A human-readable message describing the error.
        type:
          type: string
          examples:
            - bad_request
          description: The error type.
        request_id:
          type: string
          examples:
            - 3d19215e-2991-4a05-a41a-527314e6ff6a
          description: >-
            A string that identifies this specific request. Report it back to us
            to help us diagnose your issues.
      required:
        - code
        - message
        - type
  securitySchemes:
    apiToken:
      type: http
      scheme: bearer

````