> ## 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.

# Check a code (V1 API)

> This page presents how to check a code with our Legacy API, V1.

<Warning>
  The V1 API is **deprecated**. Starting November 1st 2025, no support will be provided for the V1 API and it will be **removed by April 2026**. No new features nor functionality will be added to the V1 API. Please use the [V2 Verify API](/verify/v2/documentation/introduction) instead. For more information refer to the [V2 Migration Guide](/verify/v2/documentation/v2-migration-guide).
</Warning>

<Info>
  **V2 equivalent:** [Check a code](/verify/v2/api-reference/check-a-code). The V2 endpoint no longer requires a verification ID — you check with the phone number and the code directly.
</Info>


## OpenAPI

````yaml post /check
openapi: 3.1.0
info:
  title: Ding
  version: 1.0.0
  description: >-
    The OTP API allows you to send authentication codes to your users using
    their phone numbers. The V1 API is **deprecated**. Technical support will
    end by **October 2025** and will be **removed by April 2026**. No new
    features and functionality will be added to the V1 API.
  contact:
    email: support@prelude.so
servers:
  - url: https://api.ding.live/v1
    description: The production Ding API server
security:
  - APIKey: []
tags:
  - name: OTP
    description: Send OTP codes to your users using their phone numbers.
  - name: Lookup
    description: Retrieve up-to-date metadata about a specific phone number
paths:
  /check:
    post:
      tags:
        - OTP
      summary: Check a code
      description: Check that a code entered by a user is valid.
      operationId: check
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCheckRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCheckResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: true
components:
  schemas:
    CreateCheckRequest:
      type: object
      required:
        - customer_uuid
        - authentication_uuid
        - check_code
      properties:
        customer_uuid:
          type: string
          format: uuid
          description: >-
            Your customer UUID, which can be found in the API settings in the
            Dashboard.
        authentication_uuid:
          type: string
          format: uuid
          description: >-
            The authentication UUID that was returned when you created the
            authentication.
        check_code:
          type: string
          examples:
            - '123456'
          description: The code that the user entered.
    CreateCheckResponse:
      type: object
      properties:
        authentication_uuid:
          type: string
          format: uuid
          description: The UUID of the corresponding authentication.
        status:
          allOf:
            - $ref: '#/components/schemas/CheckStatus'
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          examples:
            - invalid_phone_number
          description: A machine-readable code that describes the error.
          enum:
            - account_invalid
            - app_realm_require_device_type
            - bad_request
            - blocked_number
            - internal_server_error
            - invalid_app_realm
            - invalid_app_version
            - invalid_auth_uuid
            - invalid_device_id
            - invalid_device_model
            - invalid_line
            - invalid_os_version
            - invalid_phone_number
            - invalid_sender_id
            - invalid_template_id
            - negative_balance
            - no_associated_auth_found
            - suspended_account
            - unauthorized_sender_id
            - unsupported_app_realm_device_type
            - unsupported_region
        message:
          type: string
          examples:
            - +0 is not a valid phone number
          description: A human-readable message that describes the error.
        doc_url:
          type: string
          description: A link to the documentation that describes the error.
          examples:
            - >-
              https://docs.prelude.so/verify/v1/documentation/errors#invalid_phone_number
    CheckStatus:
      type: string
      examples:
        - valid
      description: |
        The status of the check. Possible values are:
          * `unknown` - The status is unknown.
          * `valid` - The code is valid.
          * `invalid` - The code is invalid.
          * `without_attempt` - No attempt was sent yet, so a check cannot be completed.
          * `rate_limited` - The authentication was rate limited and cannot be checked.
          * `already_validated` - The authentication has already been validated.
          * `expired_auth` - The authentication has expired and cannot be checked.
      enum:
        - unknown
        - valid
        - invalid
        - without_attempt
        - rate_limited
        - already_validated
        - expired_auth
  securitySchemes:
    APIKey:
      name: x-api-key
      type: apiKey
      in: header
      x-speakeasy-example: YOUR_API_KEY

````