smartchat

Enable webhook endpoint

Switches a paused or disabled webhook endpoint back to active and resets its failure counter. With replay_since it also queues the events of that time again (up to 7 days). Sends no messages.

POST /v1/webhook-endpoints/{endpoint_id}/enable

Permissionwebhooks:write (all permissions)
RiskWrite (no outside effect)
Idempotency-KeyOptional (how it works)
Safe to repeatWith the same Idempotency-Key the first answer comes back and nothing is done twice. Without a key a repeat is done again.
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.
  • Acts on a connected outside system.

#Request

Header

NameRequiredDescription
AuthorizationyesBearer <key>
Idempotency-KeynoA unique value for this operation, for example a UUID (1 to 255 visible ASCII characters).

Path parameters

NameTypeDescription
endpoint_idstringWebhook endpoint ID.

Body (JSON)

NameTypeRequiredDescription
replay_sincestringnoQueue the events since this time again (at most 7 days back). up to 40 characters; format date-time

#Examples

curl -X POST "https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234/enable" \
  -H "Authorization: Bearer $SMARTCHAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "replay_since": "2026-10-24T00:00:00Z"
}'
import os
import requests

response = requests.post(
    "https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234/enable",
    headers={"Authorization": "Bearer " + os.environ["SMARTCHAT_API_KEY"]},
    json={
        "replay_since": "2026-10-24T00:00:00Z",
    },
)
response.raise_for_status()
print(response.json())
const response = await fetch("https://api.smartchat.marketing/v1/webhook-endpoints/whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234/enable", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.SMARTCHAT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "replay_since": "2026-10-24T00:00:00Z"
  }),
});
if (!response.ok) throw new Error(await response.text());
console.log(await response.json());

Response (200):

{
  "object": "webhook_endpoint",
  "id": "whe_0f8c1a2e4b7d4c3e9a5b6d7e8f901234",
  "url": "https://example.com/hooks/smartchat",
  "description": "Order system",
  "enabled_events": [
    "contact.created",
    "message.received"
  ],
  "status": "active",
  "disabled_reason": null,
  "secret_hint": "whsec_...x9Qa",
  "consecutive_failures": 0,
  "last_success_at": "2026-10-25T09:45:00Z",
  "last_failure_at": null,
  "secret_previous_expires_at": null,
  "created_at": "2026-10-25T09:41:07Z",
  "updated_at": "2026-10-25T09:45:00Z",
  "replay": {
    "queued": 12,
    "truncated": false
  }
}

#Response

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

NameTypeDescription
objectstringAlways "webhook_endpoint". always webhook_endpoint
idstringWebhook endpoint ID.
urlstringHTTPS address that receives the events. up to 2000 characters
descriptionstringYour own note about this endpoint. up to 200 characters
enabled_eventsarray of stringEvent types this endpoint receives, or ["*"] for all available events. up to 30 items
statusstringactive and degraded receive events. paused and disabled do not; call enable_webhook_endpoint. one of: active, degraded, paused, disabled
disabled_reasonstring or nullWhy the endpoint was paused or disabled. Null while it is working. up to 60 characters
secret_hintstringLast 4 characters of the signing secret, for example whsec_...abcd. up to 20 characters
consecutive_failuresintegerFailed delivery attempts in a row since the last success. 0 to 1000000
last_success_atstring or nullTime of the last successful delivery. up to 40 characters; format date-time
last_failure_atstring or nullTime of the last failed delivery attempt. up to 40 characters; format date-time
secret_previous_expires_atstring or nullWhile a secret rotation is running: when the old secret stops signing. Otherwise null. up to 40 characters; format date-time
created_atstringWhen the endpoint was created. up to 40 characters; format date-time
updated_atstringWhen the endpoint was last changed. up to 40 characters; format date-time
replayobjectResult of the replay requested with replay_since.
replay.queuedintegerNumber of events queued for delivery. 0 to 10000
replay.truncatedbooleanTrue if more than 10000 events matched; the oldest 10000 were queued.

#Errors

CodeStatusWhen
idempotency_key_invalid400The 'Idempotency-Key' header must be 1 to 255 visible ASCII characters.
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.
conflict409The state of the object does not allow this.
idempotency_in_progress409A request with this idempotency key is still running.
idempotency_key_reused422This idempotency key was already used with a different request.
validation_failed422A field is not valid.
webhook_url_invalid422The URL is not allowed. Only https, port 443 and no internal networks.
rate_limited429Too many requests. Wait and try again.
internal_error500Something went wrong on our side.

All errors use one format.