> ## 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 Assignment Task Status

> Check the status of the task associated with assigning all phone numbers on a messaging profile to a campaign by `taskId`.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/messaging-10dlc/phone-number-campaigns.yml get /10dlc/phoneNumberAssignmentByProfile/{taskId}
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}:
    get:
      tags:
        - Bulk Phone Number Campaigns
      summary: Get Assignment Task Status
      description: >-
        Check the status of the task associated with assigning all phone numbers
        on a messaging profile to a campaign by `taskId`.
      operationId: GetAssignmentTaskStatus
      parameters:
        - required: true
          schema:
            title: Taskid
            type: string
          name: taskId
          in: path
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssignmentTaskStatusResponse'
        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.retrieveStatus(
              'taskId',
            );


            console.log(response.status);
        - 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.retrieve_status(
                "taskId",
            )

            print(response.status)
        - 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.GetStatus(context.TODO(), \"taskId\")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Status)\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.PhoneNumberAssignmentByProfileRetrieveStatusParams;

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


            public final class Main {
                private Main() {}

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

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


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


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


            puts(response)
        - lang: CLI
          source: >-
            telnyx messaging-10dlc:phone-number-assignment-by-profile
            retrieve-status \
              --api-key 'My API Key' \
              --task-id taskId
components:
  schemas:
    AssignmentTaskStatusResponse:
      title: AssignmentTaskStatusResponse
      required:
        - taskId
        - status
      type: object
      properties:
        taskId:
          title: Taskid
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/10dlc_TaskStatus'
          type: string
          description: >-
            The status of the task associated with assigning a messaging profile
            to a campaign.
          example: pending
        createdAt:
          title: Createdat
          type: string
          format: date-time
        updatedAt:
          title: Updatedat
          type: string
          format: date-time
    10dlc_TaskStatus:
      title: TaskStatus
      enum:
        - pending
        - processing
        - completed
        - failed
      type: string
      description: An enumeration.
    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

````