---
title: "Remove a publishing destination from the org"
method: POST
path: "/org/destinations/{publisherId}/remove"
tags: ["Destinations"]
---

# Remove a publishing destination from the org

`POST /org/destinations/{publisherId}/remove`

## Request

- Base URL: `https://apiv2.senso.ai/api/v1`
- URL: `https://apiv2.senso.ai/api/v1/org/destinations/{publisherId}/remove`
- Auth: API key in header `X-API-Key`

Removes a destination assignment from the organization, choosing what to do with content already published there via `action`.

## Path parameters

- `publisherId` string, uuid, required

## Request body

- RemoveOrgDestinationRequest
  - `action` 'leave' | 'unpublish' | 'delete', required: What to do with content already published to this destination — `leave` it as-is, `unpublish` it, or `delete` it.
  - `also_remove_destination` boolean: Also hard-delete the destination row after the content action completes (org scope only).
  - `keep_domain` boolean: For a custom domain, keep the domain reachable instead of deregistering it.

## Response `200`

Summary of what the removal changed.

- RemoveOrgDestinationResponse
  - `affected_record_count` integer, required: Number of publish records (live or failed) on this destination that the removal acted on.
  - `unpublished_count` integer, required: How many publish records were unpublished.
  - `deleted_content_count` integer, required: How many content items were deleted (only for the `delete` action).
  - `destination_removed` boolean, required: Whether the destination (publisher) record itself was hard-deleted — true only when `also_remove_destination` is set. The org's assignment to the destination is always removed on success, regardless of this flag.
  - `domain_deregistered` boolean, required: Whether the custom domain was deregistered (citeables custom domains only).
  - `partial_failures` string[]: Any per-item failures that occurred during removal.

## Other responses

- `400`: The request was malformed — a bad path/query parameter or an invalid value.
- `401`: Missing or invalid credentials — supply a valid org API key in the `X-API-Key` header.
- `404`: The requested resource does not exist or is not visible to this key.
- `502`: An upstream dependency failed or rejected the request.

---

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