Create an endpoint
POST/v1/webhooksKey scope write
Registers a URL that receives events as signed POST requests. The response carries the signing secret once: store it, because it cannot be read again, only rotated. Every delivery has the header Infrared-Signature: t=<unix seconds>,v1=<hex>, where v1 is the HMAC-SHA256 of <t>.<raw body> with the secret; reject a t older than 5 minutes.
Needs a key with the write scope. Authentication
Request body
urlURLRequiredThe URL to deliver to, up to 2,048 characters. It must use HTTPS and resolve to a public address.
descriptionstringA note on what the endpoint is for, up to 500 characters.
event_typesarray of enumsThe event types to deliver, up to 50. An empty array, the default, subscribes the endpoint to every event.
One of
moderation.completedmoderation.failedqueue_item.createdqueue_item.allowedqueue_item.rejectedqueue_item.actionedqueue_item.reopenedauthor.blockedauthor.suspendedauthor.enabledauthor.trust_level_changedaction.executed
Returns
The new endpoint, including secret, with status 201.
- 201 CreatedA webhook endpoint object
Errors
- 403
plan_limitThe project already has as many webhook endpoints as the organisation's plan allows.
- 422
validation_errorurlis not a valid HTTPS URL or resolves to a private, loopback or link-local address, an event type is unknown, 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.