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

# Verify the verification code for a list of phone numbers

> Verifies the verification code for a list of phone numbers.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-requirements.yml post /porting_orders/{id}/verification_codes/verify
openapi: 3.1.0
info:
  title: Telnyx Porting Requirements API
  version: 2.0.0
  description: API for porting requirements, verification, and UK carriers.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting_orders/{id}/verification_codes/verify:
    post:
      tags:
        - Porting Orders
      summary: Verify the verification code for a list of phone numbers
      description: Verifies the verification code for a list of phone numbers.
      operationId: VerifyPortingVerificationCodes
      parameters:
        - $ref: '#/components/parameters/PathPortingOrderID'
      requestBody:
        $ref: '#/components/requestBodies/VerifyPortingVerificationCodes'
      responses:
        '200':
          $ref: '#/components/responses/VerifyPortingVerificationCodes'
        '401':
          description: Unauthorized
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity. Check message field in response for details.
      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 response = await
            client.portingOrders.verificationCodes.verify(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            );


            console.log(response.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
            )
            response = client.porting_orders.verification_codes.verify(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.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\tresponse, err := client.PortingOrders.VerificationCodes.Verify(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\ttelnyx.PortingOrderVerificationCodeVerifyParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.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.portingorders.verificationcodes.VerificationCodeVerifyParams;

            import
            com.telnyx.sdk.models.portingorders.verificationcodes.VerificationCodeVerifyResponse;


            public final class Main {
                private Main() {}

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

                    VerificationCodeVerifyResponse response = client.portingOrders().verificationCodes().verify("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.porting_orders.verification_codes.verify("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")


            puts(response)
        - 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 {
              $response = $client->portingOrders->verificationCodes->verify(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                verificationCodes: [
                  ['code' => '12345', 'phoneNumber' => '+61424000001'],
                  ['code' => '54321', 'phoneNumber' => '+61424000002'],
                ],
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx porting-orders:verification-codes verify \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  parameters:
    PathPortingOrderID:
      name: id
      description: Porting Order id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  requestBodies:
    VerifyPortingVerificationCodes:
      description: A list of phone numbers and their verification codes
      required: true
      content:
        application/json:
          schema:
            type: object
            properties:
              verification_codes:
                type: array
                maxItems: 100
                items:
                  type: object
                  properties:
                    phone_number:
                      type: string
                    code:
                      type: string
            example:
              verification_codes:
                - phone_number: '+61424000001'
                  code: '12345'
                - phone_number: '+61424000002'
                  code: '54321'
  responses:
    VerifyPortingVerificationCodes:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/PortingVerificationCode'
            example:
              data:
                - id: 52090326-6533-4421-bcf4-bd0117cf3954
                  phone_number: '+61424000001'
                  verified: true
                  porting_order_id: f28e6ecc-29a8-430b-bd0b-d93055f70604
                  created_at: '2020-10-22T15:00:00.000Z'
                  updated_at: '2020-10-22T15:00:00.000Z'
                - id: cf076b8e-645b-4040-8209-543c5909775f
                  phone_number: '+61424000002'
                  verified: false
                  porting_order_id: f28e6ecc-29a8-430b-bd0b-d93055f70604
                  created_at: '2020-10-22T15:00:00.000Z'
                  updated_at: '2020-10-22T15:00:00.000Z'
  schemas:
    PortingVerificationCode:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies this porting verification code
          format: uuid
          example: f1486bae-f067-460c-ad43-73a92848f902
        phone_number:
          type: string
          description: E164 formatted phone number
          example: '+13035550987'
        verified:
          type: boolean
          description: Indicates whether the verification code has been verified
          example: true
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the associated porting order
          example: f1486bae-f067-460c-ad43-73a92848f902
        record_type:
          type: string
          example: porting_verification_code
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527000Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2021-03-19T10:07:15.527000Z'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````