> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# 撤銷推廣委派

> 撤銷一組擁有者、付款方與平台的推廣委派。新的推廣會停止，但已在投放的廣告會繼續運行。

撤銷單一推廣委派，即一組擁有者、付款方與平台。該擁有者在其他平台上的委派不會受到影響。請使用您 Primary Profile（主要個人檔案）的 API Key 傳送請求，且不要附帶 `Profile-Key`。

撤銷只會停止新的推廣。已在投放中的廣告會持續投放至結束日期，付款方仍可將其暫停。撤銷已被撤銷的委派會回傳成功，但不會做任何變更。

委派也會在以下情況下自動結束：

* 擁有者或付款方的個人檔案被刪除時（`revokedReason` 為 `ownerDeleted` 或 `payerDeleted`）。
* 擁有者取消連結某個社群網路時。該擁有者在該網路上的委派會被撤銷（`revokedReason` 為 `ownerUnlinked`）。其他網路上的委派不會受到影響。
* 社群網路拒絕擁有者的權限時。委派仍保持有效，但其 `permission` 會變為 `refused`，基於該委派的推廣會被拒絕。擁有者重新連結後，請重新建立委派。

擁有者也可以隨時直接在社群網路上撤回權限。

## 請求頭參數

**Authorization** `string` *required*

[API Key](https://www.ayrshare.com/docs/apis/overview.md#authorization) of the Primary Profile.

Format: `Authorization: Bearer API_KEY`

## 路徑參數

**id** `string` *required*

建立或列出委派時返回的委派 `id`。

```bash cURL theme={"system"}
curl \
-H "Authorization: Bearer API_KEY" \
-X DELETE https://api.ayrshare.com/api/ads/delegations/Kx3v9QpL2mZ7tR1wYb4N
```

```json 200 theme={"system"}
{
  "status": "success",
  "delegation": {
    "id": "Kx3v9QpL2mZ7tR1wYb4N",
    "owner": { "refId": "140b8709bd6ade099b242d895e268fb886130c53", "title": "Agent One" },
    "payer": { "refId": "9f1c3e7a2b4d", "title": "Agency" },
    "platform": "instagram",
    "permission": "unknown",
    "status": "revoked",
    "revokedReason": "api"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.