Webhooks let your Cookifed instance notify another service when an event happens.
Cookifed sends an HTTP request containing a JSON payload to the configured url.
The receiving service can use that payload to trigger an action, such as notifying
moderators about a new report or updating an integration when content changes.
Each payload identifies the event, the object type, and the object
itself.
The reference below describes the available events and their output, using the
webhook OpenAPI
specification.
Delivery
Cookifed sends one POST request to each matching enabled webhook.
Event deliveries are asynchronous; the administrative test action sends a
synchronous ping event. A delivery succeeds when the receiver returns
any 2xx status code.
Requests use RFC 9421 HTTP Message Signatures. The signature covers
@method, @target-uri, host, date, and content-digest. The signing
key is the managed instance’s RSA key and its public key identifier is the
instance ActivityPub main key.
Configurable events and their object types:
account.created, account.updated: account
content.created, content.updated, content.published: recipe,
preparation, or status
report.created: report
ping: account (administrative test only)
Request headers
Header
Type
Required
Description
Date
string
yes
Content-Digest
string
yes
Signature
string
yes
Signature-Input
string
yes
Acknowledgement
2XX: Any 2xx response acknowledges the delivery.
Events
Content-Type:application/json
The webhook envelope. The event and type constants identify the exact
schema used for each delivery.
Follow the links in the Type column for nested object fields. For nested objects,
the Required column applies when the containing object is present.
account_webhook_output
Field
Type
Required
Description
id
integer
yes
username
string
yes
name
string
yes
summary
string
yes
summary_html
string
yes
instance
string
yes
avatar
object
yes
avatar.original
string
yes
avatar.small
string
yes
avatar.medium
string
yes
state
string: "unknown", "loading", "loaded"
yes
The account’s current sync status. - unknown: We don’t know anything about this account. It may not even exist. - loading: We have loaded this account’s direct information, and are currently loading the statuses. - loaded: We have loaded the data from this account. Note that this doesn’t mean we actually have 100% of the data. There could be new data we haven’t loaded yet, or that wasn’t delivered to us. Local and managed accounts always have a state of loaded.
The account’s current sync status. - unknown: We don’t know anything about this account. It may not even exist. - loading: We have loaded this account’s direct information, and are currently loading the statuses. - loaded: We have loaded the data from this account. Note that this doesn’t mean we actually have 100% of the data. There could be new data we haven’t loaded yet, or that wasn’t delivered to us. Local and managed accounts always have a state of loaded.