---
title: "Remove Calling Plan for a given reference"
method: DELETE
path: "/v2/partition/{partitionId}/account/{accountId}/callingplan"
tags: ["Calling Plan"]
---

# Remove Calling Plan for a given reference

`DELETE /v2/partition/{partitionId}/account/{accountId}/callingplan`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/account/{accountId}/callingplan`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/account/:accountId/callingplan/delete.ts> (a function with typed inputs; its response is checked against the schema)

will remove a callingplan

## Path parameters

- `accountId` string, required
- `partitionId` string, required

## Request body

- ModifyCallingPlanX
  - `referenceType` 'SIP_TRUNK' | 'END_USER' | 'IVR' | 'ACCOUNT' | 'SPECIALTY_LINE' | 'CONTACT_CENTER'
  - `referenceId` string
  - `callingPlanProductId` string: Deprecated. Use the callingPlanReferenceId
  - `callingPlanReferenceId` string: When modifying an existing calling plan list, this is the calling plan product id. When opting to share an existing calling plan list, this is the the reference id that has the calling plan list that the new reference would share.
  - `callingPlanType` 'SHARED_CALLING_PLAN' | 'NEW_CALLING_PLAN' | 'UNSHARED_CALLING_PLAN': Indicates if the request is for a change to an existing calling plan list, share a calling plan list with another reference, or stop sharing the configured list with other references.
  - `pending` boolean: If false then the calling plan change will apply immediately. If true then the change will take place at the account billing date. Does not apply when the request is to share a calling plan.
  - `minutesUsed` integer: Only used on add. Will only be applied to new plans. Will not be applied to pending plans plans. Does not apply when the request is to share a calling plan.

## Response `200`

Successful operation

- CallingPlanX
  - `id` string
  - `referenceId` string
  - `referenceType` 'SIP_TRUNK' | 'END_USER' | 'IVR' | 'ACCOUNT' | 'SPECIALTY_LINE' | 'CONTACT_CENTER'
  - `callingPlanProductId` string
  - `endDate` string, date-time
  - `startDate` string, date-time
  - `planMinutes` integer
  - `secondsRemaining` integer

## Other responses

- `400`: Invalid request parameters
- `401`: Unauthorized
- `404`: Not found

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
