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

# Get Phone Number Status

> Check the status of the individual phone number/campaign assignments associated with the supplied `taskId`.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/messaging-10dlc/phone-number-campaigns.yml get /10dlc/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers
openapi: 3.1.0
info:
  title: Telnyx 10DLC Phone Number Campaigns API
  version: 2.0.0
  description: API for 10DLC phone number campaign assignments.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /10dlc/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers:
    get:
      tags:
        - Bulk Phone Number Campaigns
      summary: Get Phone Number Status
      description: >-
        Check the status of the individual phone number/campaign assignments
        associated with the supplied `taskId`.
      operationId: GetPhoneNumberStatus
      parameters:
        - required: true
          schema:
            title: Taskid
            type: string
          name: taskId
          in: path
        - required: false
          schema:
            title: Recordsperpage
            default: 20
            type: integer
          name: recordsPerPage
          in: query
        - required: false
          schema:
            title: Page
            default: 1
            type: integer
          name: page
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PhoneNumberStatusResponsePaginated'
        '422':
          $ref: '#/components/responses/10dlc_GenericErrorResponse'
        4XX:
          $ref: '#/components/responses/10dlc_GenericErrorResponse'
      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.messaging10dlc.phoneNumberAssignmentByProfile.listPhoneNumberStatus(
              'taskId',
            );


            console.log(response.records);
        - 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.messaging_10dlc.phone_number_assignment_by_profile.list_phone_number_status(
                task_id="taskId",
            )

            print(response.records)
        - 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.Messaging10dlc.PhoneNumberAssignmentByProfile.ListPhoneNumberStatus(\n\t\tcontext.TODO(),\n\t\t\"taskId\",\n\t\ttelnyx.Messaging10dlcPhoneNumberAssignmentByProfileListPhoneNumberStatusParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Records)\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.messaging10dlc.phonenumberassignmentbyprofile.PhoneNumberAssignmentByProfileListPhoneNumberStatusParams;

            import
            com.telnyx.sdk.models.messaging10dlc.phonenumberassignmentbyprofile.PhoneNumberAssignmentByProfileListPhoneNumberStatusResponse;


            public final class Main {
                private Main() {}

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

                    PhoneNumberAssignmentByProfileListPhoneNumberStatusResponse response = client.messaging10dlc().phoneNumberAssignmentByProfile().listPhoneNumberStatus("taskId");
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.messaging_10dlc.phone_number_assignment_by_profile.list_phone_number_status("taskId")


            puts(response)
        - lang: CLI
          source: >-
            telnyx messaging-10dlc:phone-number-assignment-by-profile
            list-phone-number-status \
              --api-key 'My API Key' \
              --task-id taskId
components:
  schemas:
    PhoneNumberStatusResponsePaginated:
      title: PhoneNumberStatusResponsePaginated
      required:
        - records
      type: object
      properties:
        records:
          title: Records
          type: array
          items:
            $ref: '#/components/schemas/ProfileAssignmentPhoneNumbers'
    ProfileAssignmentPhoneNumbers:
      title: ProfileAssignmentPhoneNumbers
      required:
        - taskId
        - phoneNumber
        - status
      type: object
      properties:
        taskId:
          title: Taskid
          type: string
          description: The ID of the task associated with the phone number.
          example: 667a80f8-b0a9-49d0-b9ab-a7a1bcc45086
        phoneNumber:
          title: Phonenumber
          type: string
          description: The phone number that the status is being checked for.
          example: '+12024567890'
        status:
          title: Status
          type: string
          description: The status of the associated phone number assignment.
          example: pending
    10dlc_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/10dlc_Error'
      type: object
    10dlc_Error:
      required:
        - code
        - title
      type: object
      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
  responses:
    10dlc_GenericErrorResponse:
      description: Generic response error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/10dlc_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````