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

# Get verification code for a test phone number

> Returns the verification code for a given test phone number. Only
accepts numbers in the reserved test ranges. Works without
authentication (unauthenticated access is heavily rate limited).
Also accepts demo/sandbox API keys.




## OpenAPI

````yaml /v2/openapi.yaml post /v2/sandbox/verification-code
openapi: 3.1.0
info:
  title: VerifyYou V2 API
  version: 2.1.0
  description: |
    Two API calls to verify a user is a real, unique human.

    1. Create a verification: get back a URL to send your user to.
    2. Check the status: confirm the result with the token from the redirect.
servers:
  - url: https://api.connect.verifyyou.com
    description: Production
  - url: http://localhost:8083
    description: Local
security:
  - apiKey: []
paths:
  /v2/sandbox/verification-code:
    post:
      summary: Get verification code for a test phone number
      description: |
        Returns the verification code for a given test phone number. Only
        accepts numbers in the reserved test ranges. Works without
        authentication (unauthenticated access is heavily rate limited).
        Also accepts demo/sandbox API keys.
      operationId: sandboxGetVerificationCode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetVerificationCodeRequest'
      responses:
        '200':
          description: Verification code returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetVerificationCodeResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
      security:
        - apiKey: []
        - {}
components:
  schemas:
    GetVerificationCodeRequest:
      type: object
      required:
        - phone_number
      properties:
        phone_number:
          type: string
          description: A test phone number in E.164 format.
          example: '+12105550142'
    GetVerificationCodeResponse:
      type: object
      properties:
        verification_code:
          type: string
          description: The verification code for this test number (last 6 digits).
          example: '550142'
    ErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - failure
        failure_code:
          type: string
          description: Machine-readable error code.
        failure_reason:
          type: string
          description: Human-readable error message.
  responses:
    BadRequest:
      description: Invalid request parameters.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: failure
            failure_code: INVALID_API_ACCESS
            failure_reason: token or external_id required
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: failure
            failure_code: INVALID_API_KEY
            failure_reason: API key is missing or invalid
    Forbidden:
      description: Demo/sandbox API key required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            status: failure
            failure_code: DEMO_ACCOUNT_REQUIRED
            failure_reason: Sandbox endpoints are only available for demo accounts
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: API-KEY
      description: Your VerifyYou API key.

````