---
title: "Detach Webhook"
method: POST
path: "/webhooks/detach"
tags: ["Webhooks"]
---

# Detach Webhook

`POST /webhooks/detach`

## Request

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

Detach a webhook from one or more senders (phone numbers or RCS agent IDs) to stop receiving event notifications. <br>

The webhook itself is not deleted and remains available for use with other senders. Works regardless of webhook status. Supports bulk operations with up to 50 senders per request.

## Request body

- DetachWebhookRequest
  - `webhookId` string, required: Webhook ID to detach (starts with `wh_`). Must be a webhook owned by your team.
  - `senders` string[], required: Array of senders to detach the webhook from. Can be phone numbers in E.164 format or RCS agent IDs.

## Response `200`

Successfully detached webhook from the specified senders. <br>

Senders that could not be found are returned in the `failed` array with error details.

- DetachWebhookResponse
  - `webhookId` string, required: The webhook that was detached from the senders.
  - `senders` string[], required: Senders that were successfully detached (phone numbers in E.164 format or RCS agent IDs).
  - `failed` FailedSender[], required: Senders that could not be detached, with error details.
    - `sender` string, required: The sender that failed.
    - `error` string, required: Reason for the failure.

## 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.
- `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.

---

[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)
