Documentation menu

Webhooks

API reference

Update a webhook

PATCH/webhook/{webhook}

The updated webhook. Fields left out are unchanged.

retry_policy and event_type each replace the whole value rather than merging: anything omitted from a retry_policy returns to its default, and event_type is the complete subscription, not an addition. Send the ETag you read as If-Match; a stale one is 409. The signing secret is not affected.

Parameters

path

webhookrequiredstring
A whk_ id.

header

If-Matchstring | null
The ETag you last read. A stale one is 409.

Request body

urlstring | null
Where deliveries go from now on. Queued deliveries go to the new URL.
namestring | null
What this endpoint is for. Null clears it.
event_typestring[] | null
Replaces the whole subscription rather than adding to it. Send every event type you want delivered.
activeboolean | null
False holds deliveries until it's true again.
retry_policyRetryPolicy | null
Replaces the whole policy: anything left out goes back to its default. Null restores every default.
Show its fields
max_attemptinteger
Calls made before giving up.
backoff"exponential" | "linear" | "fixed"
How the wait grows: doubling, adding base_seconds, or not at all. No wait exceeds six hours.
base_secondsinteger
The wait after the first failed call.
jitterboolean
Wait a random half to all of each interval.
dead_letter_after_hoursinteger
Stop retrying this long after the event was created.

Responses

200
Webhook
Successful Response
401
ProblemDetail
credential_missing, credential_invalid or credential_expired: send a live API key as Authorization: Bearer <key>.
402
ProblemDetail
quota_exhausted: the balance can't cover the call. Nothing was charged and nothing was returned.
403
ProblemDetail
scope_missing, person_required or entitlement_missing: this credential or plan can't do this. detail says which.
404
ProblemDetail
no_such_resource: nothing has that id.
409
ProblemDetail
version_conflict: the record changed since you read it. Read it again and resend.
422
ProblemDetail
parameter_invalid, id_malformed or a cursor code: a parameter's value isn't one this operation takes.
429
ProblemDetail
rate_limited: wait for Retry-After, then send it again. Not charged.

Example request

curl -X PATCH 'https://api.placestack.com/webhook/webhook_123' \
  -H 'Authorization: Bearer $PLACESTACK_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "string",
  "name": "string",
  "event_type": [
    "ping"
  ],
  "active": true,
  "retry_policy": {
    "max_attempt": 12,
    "backoff": "exponential",
    "base_seconds": 60,
    "jitter": true,
    "dead_letter_after_hours": 24
  }
}'

Example response

{
  "object": "webhook",
  "id": "whk_01h455vb4pex5vsknk084sn02q",
  "name": "string",
  "url": "<Url>",
  "event_type": [
    "ping"
  ],
  "active": true,
  "secret_fingerprint": "<Secret Fingerprint>",
  "retry_policy": {
    "max_attempt": 12,
    "backoff": "exponential",
    "base_seconds": 60,
    "jitter": true,
    "dead_letter_after_hours": 24
  },
  "created_at": "2026-09-13T12:00:00Z",
  "updated_at": "2026-09-13T12:00:00Z",
  "href": "<Href>"
}

The rest of webhook.

Next

DELETE /webhook/{webhook}

Delete a webhook