smartchat

Unsubscribe webhook endpoint

Removes a webhook endpoint and its delivery log, so no more events are sent to it. This is the only deletion allowed with an API key in this area. Sends no messages to contacts.

DELETE /v1/webhook-endpoints/{endpoint_id}

Permissionwebhooks:write (all permissions)
RiskWrite (no outside effect)
Idempotency-KeyNot needed (how it works)
Safe to repeatSafe by nature: the end state is the same when you repeat it, so no key is needed. A second call finds nothing to remove and answers with its not-found error.
Rate limit classwrite (120 requests per minute per key)
ConfirmationNone
MCP toolNot available in MCP
Since version2026-10-25

#What it does

  • Changes data in your account. It does not send messages to contacts.
  • Removes data. Only allowed for the few removals that keys may do (remove a tag, unsubscribe a webhook endpoint).
  • Safe to repeat by nature; it needs no Idempotency-Key. A second call finds nothing to remove and answers with its not-found error.

#Request

Path parameters

NameTypeDescription
endpoint_idstringWebhook endpoint ID.

#Examples

curl -X DELETE "https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234" \
  -H "Authorization: Bearer $SMARTCHAT_API_KEY"
import os
import requests

response = requests.delete(
    "https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
    headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234", {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
  },
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Response (200):

{
  "object": "webhook_endpoint",
  "id": "whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
  "deleted": true
}

#Response

Status 200. Every response has the headers Request-Id, SmartChat-Version and X-RateLimit-*.

NameTypeDescription
objectstringAlways "webhook_endpoint". always webhook_endpoint
idstringID of the deleted object. up to 64 characters
deletedbooleanAlways true. always true

#Errors

CodeStatusWhen
api_key_expired401This API key has expired.
api_key_invalid401This API key is not valid.
api_key_revoked401This API key was revoked.
authentication_required401No API key was sent. Send 'Authorization: Bearer <key>'.
insufficient_scope403This key lacks a required permission.
ip_not_allowed403This IP address is not allowed for this key.
endpoint_not_found404No webhook endpoint with this ID exists in this account.
validation_failed422A field is not valid.
rate_limited429Too many requests. Wait and try again.
internal_error500Something went wrong on our side.

All errors use one format.