---
title: "Detach Campaign"
method: DELETE
path: "/phone-numbers/detach-campaign"
tags: ["phoneNumbers > campaign"]
---

# Detach Campaign

`DELETE /phone-numbers/detach-campaign`

## Request

- Base URL: `https://api.pinnacle.sh`
- URL: `https://api.pinnacle.sh/phone-numbers/detach-campaign`
- Auth: API key in header `PINNACLE-API-KEY`

Remove the association between a phone number and its attached campaign.

## Request body

- DetachCampaignSchema
  - `phones` string[], required: List of phone numbers (E.164 format). <br><br> **Limit:** 1 to 10

## Response `200`

Successfully detached the campaign.

- PhoneNumberCampaignDetach
  - `phoneNumbers` PhoneNumberCampaignDetachPhoneNumbersItems[], required: List of phone numbers.
    - `phoneNumber` string, required: Phone number (E.164 format).
    - `campaign` PhoneNumberCampaignDetachPhoneNumbersItemsCampaign, required: Campaign that the phone is now detached from.
      - `id` string, required: Id of the campaign. For `TOLL_FREE` campaigns, it will begin with the prefix `tf_`, for example: `tf_1234567890`. For `10DLC` campaigns, it will begin with the prefix `dlc_`, for example: `dlc_1234567890`.
      - `name` string, required: Campaign's name.
      - `type` 'TOLL_FREE' | '10DLC', required: Type of messaging profile associated with the phone number.
  - `failed` PhoneNumberCampaignDetachFailedItems[], required: List of numbers that were not failed to be detached.
    - `number` string, required: Phone number (E.164 format).
    - `error` string, required: Error related to why the number was not detached.

## Other responses

- `400`: Validation failed. The payload has missing required fields and/or invalid types. <br> See https://zod.dev/error-formatting for more information.
- `401`: The request lacks valid authentication credentials or the provided credentials are invalid. <br> Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.
- `403`: Your subscription does not include access to this feature. <br> This occurs when attempting to use functionality that requires a higher subscription tier. Please upgrade your subscription to access this feature.
- `404`: The requested resource could not be found. <br> This may occur if the identifier is incorrect, the resource has been deleted, or you don't have permission to access it.
- `500`: An unexpected error occurred on Pinnacle's servers while processing your request. <br> If this error persists, please contact support with the request details.
- `501`: The requested functionality is not implemented on the server. <br> This typically indicates that the feature or endpoint you attempted to access is unavailable or not yet supported.

---

[API](https://skmtc.dev/pinnacle/apis/pinnacle-2.md) - [All operations](https://skmtc.dev/pinnacle/apis/pinnacle-2/llms.txt) - [OpenAPI document](https://skmtc.dev/pinnacle/apis/pinnacle-2/revisions/45416dadab79?raw)
