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

# Run a portability check

> Runs a portability check, returning the results immediately.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting.yml post /portability_checks
openapi: 3.1.0
info:
  title: Telnyx Phone Number Porting API
  version: 2.0.0
  description: API for Phone number porting.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /portability_checks:
    post:
      tags:
        - Phone Number Porting
      summary: Run a portability check
      description: Runs a portability check, returning the results immediately.
      operationId: PostPortabilityCheck
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                phone_numbers:
                  type: array
                  items:
                    type: string
                  description: >-
                    The list of +E.164 formatted phone numbers to check for
                    portability
                  example:
                    - '+13035550000'
                    - '+13035550001'
                    - '+13035550002'
      responses:
        '201':
          $ref: '#/components/responses/PortabilityCheckResponse'
        '401':
          description: Unauthorized
        '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.portabilityChecks.run();

            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.portability_checks.run()
            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.PortabilityChecks.Run(context.TODO(), telnyx.PortabilityCheckRunParams{})\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.portabilitychecks.PortabilityCheckRunParams;

            import
            com.telnyx.sdk.models.portabilitychecks.PortabilityCheckRunResponse;


            public final class Main {
                private Main() {}

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

                    PortabilityCheckRunResponse response = client.portabilityChecks().run();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            response = telnyx.portability_checks.run

            puts(response)
        - lang: CLI
          source: |-
            telnyx portability-checks run \
              --api-key 'My API Key'
components:
  responses:
    PortabilityCheckResponse:
      description: PortabilityCheck Response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/PortabilityCheckDetails'
  schemas:
    PortabilityCheckDetails:
      type: object
      properties:
        record_type:
          type: string
          description: Identifies the type of the resource.
          readOnly: true
          example: portability_check_result
        fast_portable:
          type: boolean
          description: Indicates whether this phone number is FastPort eligible
          example: true
          readOnly: true
        not_portable_reason:
          type: string
          description: >-
            If this phone number is not portable, explains why. Empty string if
            the number is portable.
          example: No coverage
          readOnly: true
        phone_number:
          type: string
          description: The +E.164 formatted phone number this result is about
          example: '+13125550123'
          readOnly: true
        portable:
          type: boolean
          description: Indicates whether this phone number is portable
          example: true
          readOnly: true
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````