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

# Submit verification code



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/verified-numbers.yml post /verified_numbers/{phone_number}/actions/verify
openapi: 3.1.0
info:
  title: Telnyx Verified Numbers API
  version: 2.0.0
  description: API for Verified numbers.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /verified_numbers/{phone_number}/actions/verify:
    post:
      tags:
        - Verified Numbers
      summary: Submit verification code
      operationId: VerifyVerificationCode
      parameters:
        - required: true
          description: The phone number being verified.
          schema:
            example: '+15551234567'
            type: string
            description: +E164 formatted phone number.
          name: phone_number
          in: path
      requestBody:
        content:
          application/json:
            schema:
              title: Verify Verification Code Request
              type: object
              required:
                - verification_code
              properties:
                verification_code:
                  example: '123456'
                  type: string
        required: true
      responses:
        '200':
          description: Expected response to a valid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VerifiedNumberResponseDataWrapper'
        '400':
          $ref: '#/components/responses/verified-numbers_GenericErrorResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedRequestErrorResponse'
        '404':
          $ref: '#/components/responses/verified-numbers_NotFoundErrorResponse'
        '422':
          $ref: >-
            #/components/responses/verified-numbers_UnprocessableEntityErrorResponse
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const verifiedNumberDataWrapper = await
            client.verifiedNumbers.actions.submitVerificationCode(
              '+15551234567',
              { verification_code: '123456' },
            );


            console.log(verifiedNumberDataWrapper.data);
        - lang: Python
          source: >-
            import os

            from telnyx import Telnyx


            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )

            verified_number_data_wrapper =
            client.verified_numbers.actions.submit_verification_code(
                phone_number="+15551234567",
                verification_code="123456",
            )

            print(verified_number_data_wrapper.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tverifiedNumberDataWrapper, err := client.VerifiedNumbers.Actions.SubmitVerificationCode(\n\t\tcontext.TODO(),\n\t\t\"+15551234567\",\n\t\ttelnyx.VerifiedNumberActionSubmitVerificationCodeParams{\n\t\t\tVerificationCode: \"123456\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", verifiedNumberDataWrapper.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.verifiednumbers.VerifiedNumberDataWrapper;

            import
            com.telnyx.sdk.models.verifiednumbers.actions.ActionSubmitVerificationCodeParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    ActionSubmitVerificationCodeParams params = ActionSubmitVerificationCodeParams.builder()
                        .phoneNumber("+15551234567")
                        .verificationCode("123456")
                        .build();
                    VerifiedNumberDataWrapper verifiedNumberDataWrapper = client.verifiedNumbers().actions().submitVerificationCode(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            verified_number_data_wrapper =
            telnyx.verified_numbers.actions.submit_verification_code("+15551234567",
            verification_code: "123456")


            puts(verified_number_data_wrapper)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $verifiedNumberDataWrapper = $client
                ->verifiedNumbers
                ->actions
                ->submitVerificationCode('+15551234567', verificationCode: '123456');

              var_dump($verifiedNumberDataWrapper);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx verified-numbers:actions submit-verification-code \
              --api-key 'My API Key' \
              --phone-number +15551234567 \
              --verification-code 123456
components:
  schemas:
    VerifiedNumberResponseDataWrapper:
      title: VerifiedNumberResponseDataWrapper
      type: object
      properties:
        data:
          $ref: '#/components/schemas/VerifiedNumberResponse'
          type: object
          additionalProperties: true
    VerifiedNumberResponse:
      title: VerifiedNumberResponse
      type: object
      properties:
        phone_number:
          example: '+15551234567'
          type: string
        record_type:
          $ref: '#/components/schemas/VerifiedNumberRecordType'
        verified_at:
          example: '2020-09-14T17:03:32.965812'
          type: string
    verified-numbers_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/verified-numbers_Error'
      type: object
    VerifiedNumberRecordType:
      title: VerifiedNumberRecordType
      enum:
        - verified_number
      type: string
      example: verified_number
      description: The possible verified numbers record types.
    verified-numbers_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
              description: URL with additional information on the error.
      type: object
  responses:
    verified-numbers_GenericErrorResponse:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/verified-numbers_Errors'
    UnauthorizedRequestErrorResponse:
      description: Unauthorized Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/verified-numbers_Errors'
    verified-numbers_NotFoundErrorResponse:
      description: Resource Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/verified-numbers_Errors'
    verified-numbers_UnprocessableEntityErrorResponse:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/verified-numbers_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````