Skip to content

Update an endpoint

PATCH/v1/webhooks/{id}Key scope write

Updates the properties sent and leaves the others unchanged. Setting status to active re-enables an endpoint that was disabled, by you or after repeated failures, and resets its failure counter.

Needs a key with the write scope. Authentication

curl -X PATCH https://api.useinfrared.com/v1/webhooks/whe_2HLyVEWQelwo16welH16NM \
  -H "Authorization: Bearer $INFRARED_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_types": [
      "moderation.completed",
      "moderation.failed",
      "queue_item.created"
    ]
  }'
200 OKResponse
{
  "object": "webhook_endpoint",
  "id": "whe_2HLyVEWQelwo16welH16NM",
  "project_id": "prj_0TBAgHGtdMketrbltGFHuk",
  "url": "https://example.com/webhooks/infrared",
  "description": "Marketplace backend",
  "event_types": [
    "moderation.completed",
    "moderation.failed",
    "queue_item.created"
  ],
  "status": "active",
  "api_version": "2026-09-01",
  "consecutive_failures": 0,
  "disabled_at": null,
  "disabled_reason": null,
  "last_delivery_at": "2026-10-08T09:29:11.086Z",
  "last_success_at": "2026-10-08T09:29:11.086Z",
  "created_at": "2026-10-08T09:28:59.023Z",
  "updated_at": "2026-10-08T09:29:12.929Z"
}

Path parameters

idstringRequired

Id of the endpoint: whe_ plus 22 base62 characters.

Request body

urlURL

The URL to deliver to, up to 2,048 characters. It must use HTTPS and resolve to a public address.

descriptionstring

A note on what the endpoint is for, up to 500 characters. Null clears it.

event_typesarray of enums

The event types to deliver, up to 50. The array replaces the stored one; an empty array subscribes the endpoint to every event.

One ofmoderation.completedmoderation.failedqueue_item.createdqueue_item.allowedqueue_item.rejectedqueue_item.actionedqueue_item.reopenedauthor.blockedauthor.suspendedauthor.enabledauthor.trust_level_changedaction.executed

statusenum

disabled stops deliveries: no new ones are created and those still pending end as failed. active resumes them and sets consecutive_failures to 0.

One ofactivedisabled

Returns

The updated endpoint, without secret.

Errors

404
not_found

The key's project has no webhook endpoint with this id.

422
validation_error

url is not a valid HTTPS URL or resolves to a private address, an event type is unknown, status is not active or disabled, or the body has an unknown key.

Every endpoint can also answer the errors any request can meet: a missing key, a rate limit, a malformed body. Errors

Something missing or unclear on this page? Write to support@useinfrared.com.