---
title: "Deprovision Organization Channels"
method: POST
path: "/admin/organizations/{organization_id}/deprovision-channels"
tags: ["admin", "organizations"]
---

# Deprovision Organization Channels

`POST /admin/organizations/{organization_id}/deprovision-channels`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/admin/organizations/{organization_id}/deprovision-channels`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Soft-delete an offboarded organization's live channels (agent links, region rows and
number bindings go with them, each audited).

Separate from the platform flag, which is a pause: the org must already be off the
agent platform, and no unpaused agent may still be linked to its channels. Defaults to a
dry run listing what would go; POST ``{"dry_run": false}`` to apply. Re-runnable.

The numbers stay leased — only their messaging bindings are cleared, so they return to
the eligible pool. A channel reported with ``has_messaging_number: false`` is the only
record of that number on our side; note it down before applying.

## Path parameters

- `organization_id` string, required

## Headers

- `organization-id` string, nullable
- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable

## Request body

- BodyDeprovisionOrganizationChannelsAdminOrganizationsOrganizationIdDeprovisionChannelsPost
  - `dry_run` boolean

## Response `200`

Successful Response

- OrganizationChannelDeprovision
  - `organization_id` string, required
  - `dry_run` boolean, required
  - `channels` DeprovisionedChannel[], required
    - `id` string, required
    - `provider` string, required
    - `phone_number` string, nullable
    - `reference_id` string, nullable
    - `agent_ids` string[]
    - `has_messaging_number` boolean, required
  - `channels_deleted` integer, required
  - `channels_without_messaging_number` integer, required

## Other responses

- `422`: Validation Error

---

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