---
title: "Assign Messaging Profile To Campaign"
method: POST
path: "/10dlc/phoneNumberAssignmentByProfile"
tags: ["Bulk Phone Number Campaigns"]
---

# Assign Messaging Profile To Campaign

`POST /10dlc/phoneNumberAssignmentByProfile`

This endpoint allows you to link all phone numbers associated with a Messaging Profile to a campaign. **Please note:** if you want to assign phone numbers to a campaign that you did not create with Telnyx 10DLC services, this endpoint allows that provided that you've shared the campaign with Telnyx. In this case, only provide the parameter, `tcrCampaignId`, and not `campaignId`. In all other cases (where the campaign you're assigning was created with Telnyx 10DLC services), only provide `campaignId`, not `tcrCampaignId`.

## Request body

- AssignProfileToCampaignRequest
  - `messagingProfileId` string, required — The ID of the messaging profile that you want to link to the specified campaign.
  - `tcrCampaignId` string — The TCR ID of the shared campaign you want to link to the specified messaging profile (for campaigns not created using Telnyx 10DLC services only). If you supply this ID in the request, do not also include a campaignId.
  - `campaignId` string — The ID of the campaign you want to link to the specified messaging profile. If you supply this ID in the request, do not also include a tcrCampaignId.

## Response `202`

Successful Response

- AssignProfileToCampaignResponse
  - `messagingProfileId` string, required — The ID of the messaging profile that you want to link to the specified campaign.
  - `tcrCampaignId` string — The TCR ID of the shared campaign you want to link to the specified messaging profile (for campaigns not created using Telnyx 10DLC services only). If you supply this ID in the request, do not also include a campaignId.
  - `campaignId` string — The ID of the campaign you want to link to the specified messaging profile. If you supply this ID in the request, do not also include a tcrCampaignId.
  - `taskId` string, required — The ID of the task associated with assigning a messaging profile to a campaign.

## Other responses

- `500` — Error searching for phone numbers
- `4XX` — Generic response error

## Changes

> 73 revisions in range; 1 not diffed.

- **2026-09-16** `a6a61a29ecdd` — 1 breaking, 1 info
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `4XX`
  - added the optional property `errors/items/meta` to the response with the `4XX` status
- **2026-08-17** `1571b0380bd7` — 1 breaking, 1 warning
  - the `errors/items/code` response's property type changed from `integer` to `string`, and format from `int32` to no format for status `4XX`
  - removed the optional property `errors/items/meta` from the response with the `4XX` status
- **2026-08-04** `8f5f4e537994` — 1 breaking, 1 info
  - the `errors/items/code` response's property type changed from `string` to `integer`, and format from no format to `int32` for status `4XX`
  - added the optional property `errors/items/meta` to the response with the `4XX` status

[Change history](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/changes/10dlc/phoneNumberAssignmentByProfile/post.md)

---

[API](https://skmtc.dev/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/team-telnyx/apis/telnyx-api-2/revisions/673109139443?raw)
