Docs

Type a word or a question. Esc closes the search.

Sign in Start free

Create a webhook subscription

Creates a webhook subscription with event types and receiver URL, returning its signing secret once.

POST https://app.upfour.io/v1/webhook-subscriptions
POST https://app.upfour.io/v1/webhook-subscriptions

A real request. Sending it changes data in your up4 account.

Authorization
AuthorizationA pls_ key. It stays in this browser tab. Needs webhook.write.
Body
More fields1
active Defaults to true, also on update: a PUT without active switches a disabled subscription back on.

1 more field is only available in JSON.

Headers

Sent directly from your browser to https://app.upfour.io/v1. Mutating calls get an automatic Idempotency-Key when the field is empty.

Request
Responsenot sent yet
Fill in a key and press Send request (⌘↵).
The answer appears here.
scope webhook.write beta Idempotency-Key supported returns 201

Body

application/json required 3 fields

eventsstring[]required

Event types to deliver, at least one; blanks and duplicates are dropped. The service does not check the names, an event that is never published simply never arrives. Published: monitor.created, monitor.updated, monitor.deleted, monitor.status_changed, monitor.degraded_changed, monitor.unstable, monitors.bulk_updated, incident.opened, incident.acknowledged, incident.resolved, incident.reopened, incident.escalated, incident.propagated, incident.partially_recovered, heartbeat.missed, heartbeat.recovered, status_page.update_published, status_page.report_published, webhook.test.

urlstring (uri)required

http or https URL of the receiver. A host that resolves to a private or otherwise blocked address range is refused.

All other fields1 fields
activeboolean · nullable

Defaults to true, also on update: a PUT without active switches a disabled subscription back on.

Returns

A successful request returns 201 with application/json.

Response fields 1 top-level fields
FieldTypeDescription
data WebhookSubscriptionCreated
WebhookSubscriptionCreated · 11 fields
FieldTypeDescription
active boolean
created_at string (date-time)
events string[] · nullable
failure_count integer
id uuid
org_id uuid
secret string Signing secret of the subscription, whsec_ plus 64 hex characters. Returned by this call only; list, update and read calls never include it. Store it now: a lost secret cannot be read back, only replaced with POST /webhook-subscriptions/{subscriptionID}/rotate-secret. The old secret stops signing at once.
updated_at string (date-time)
url string
disabled_at string (date-time) Set while the subscription is switched off, by active: false or by the delivery worker after repeated failures.
last_delivery_at string (date-time)

Errors

Only the errors this operation can return. Every error uses the same envelope.

Status Code Meaning
400 bad_request The request is malformed or fails validation.
402 billing_action_unavailable The Company's billing state does not allow this action. When: A metered or limited action while the billing state, such as paused or without credit, blocks it; details holds the action and billing_state. Fix: Top up the credit or change the plan, then retry.
403 permission_denied The credentials do not permit this action.
503 quota_gate_unavailable The limit check itself failed, so the action was not carried out. When: The quota service could not decide while the request ran. Fix: Retry in a moment; nothing was changed.
403 / 429 quota_limit_reached The Company already holds the most webhook subscriptions it may have; error.details carries purpose and limit. When: Counters and concurrency limits answer 429 with Retry-After, inventory and capacity limits answer 403; details holds purpose, limit and window. Fix: On 429 wait Retry-After seconds; on 403 free something up, request a higher limit where details.raise_request is true, or buy an extension. quota_limit_reached (window total): the Company already holds the most of these it may have. error.details carries purpose and limit; remove one or ask support for a higher limit.

Every call can also return unauthorized (401), rate_limit_exceeded (429) or internal_error (500 / 502). See Responses and errors.