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.

account.created

Field Type Required Description
event "account.created" yes
type "account" yes
created_at string (date-time) yes
object account_webhook_output yes

account.updated

Field Type Required Description
event "account.updated" yes
type "account" yes
created_at string (date-time) yes
object account_webhook_output yes

content.created

recipe

Field Type Required Description
event "content.created" yes
type "recipe" yes
created_at string (date-time) yes
object recipe_output yes

preparation

Field Type Required Description
event "content.created" yes
type "preparation" yes
created_at string (date-time) yes
object preparation_output yes

status

Field Type Required Description
event "content.created" yes
type "status" yes
created_at string (date-time) yes
object status_output yes

content.published

recipe

Field Type Required Description
event "content.published" yes
type "recipe" yes
created_at string (date-time) yes
object recipe_output yes

preparation

Field Type Required Description
event "content.published" yes
type "preparation" yes
created_at string (date-time) yes
object preparation_output yes

status

Field Type Required Description
event "content.published" yes
type "status" yes
created_at string (date-time) yes
object status_output yes

content.updated

recipe

Field Type Required Description
event "content.updated" yes
type "recipe" yes
created_at string (date-time) yes
object recipe_output yes

preparation

Field Type Required Description
event "content.updated" yes
type "preparation" yes
created_at string (date-time) yes
object preparation_output yes

status

Field Type Required Description
event "content.updated" yes
type "status" yes
created_at string (date-time) yes
object status_output yes

report.created

Field Type Required Description
event "report.created" yes
type "report" yes
created_at string (date-time) yes
object report_output yes

ping

Field Type Required Description
event "ping" yes
type "account" yes
created_at string (date-time) yes
object account_webhook_output yes

Output objects

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.
following_count integer yes
followers_count integer yes
like_id integer yes
ips array of object yes
ips[].ip string yes

recipe_output

Field Type Required Description
id integer yes
slug string yes
name string yes
description string yes
description_html string yes
locale string: "en", "fr", "de" yes
serving integer yes
serving_type string yes
visibility string: "public", "unlisted", "followers", "private" yes
account account_output yes
likes_count integer yes
boosts_count integer yes
liked boolean yes
boosted boolean yes
collection_ids array of integer yes
created_at string yes
published_at string yes
ingredients array of ingredient_output yes
steps array of step_content_output or step_link_output or step_wait_output yes

preparation_output

Field Type Required Description
id integer yes
name string yes
description string yes
description_html string yes
locale string: "en", "fr", "de" yes
status string: "unmanaged", "planning", "shopping", "preparing", "eating", "done" yes
serving integer yes
prepared_at string yes
recipe_id integer no
serving_type string or null no
likes_count integer yes
boosts_count integer yes
liked boolean yes
boosted boolean yes
collection_ids array of integer yes
created_at string yes
published_at string or null yes
account account_output yes
ingredients array of ingredient_output yes
steps array of step_content_output or step_link_output or step_wait_output yes
media array of medium_output yes

status_output

Field Type Required Description
id integer yes
content string yes
content_html string yes
locale string yes
likes_count integer yes
boosts_count integer yes
liked boolean yes
boosted boolean yes
collection_ids array of integer yes
created_at string yes
published_at string yes
account account_output yes
media array of medium_output yes

report_output

Field Type Required Description
id integer yes
comment string yes
forwarded boolean yes
created_at string (date-time) yes
account account_output yes
target account_output yes
reported_eventable_ids array of integer yes

account_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.
following_count integer yes
followers_count integer yes
like_id integer yes

ingredient_output

Field Type Required Description
id integer yes
position integer yes
name string yes
quantity number yes
unit string: "", "mg", "g", "kg", "ml", "cl", "l", "pinch", "tablespoon", "teaspoon", "sachet", "slice" yes

step_content_output

Field Type Required Description
id integer yes
position integer yes
type string: "content" yes
content string yes
content_html string yes
Field Type Required Description
id integer yes
position integer yes
type string: "link" yes
link_id integer yes
serving integer yes

step_wait_output

Field Type Required Description
id integer yes
position integer yes
type string: "wait" yes
content string yes
duration integer yes

medium_output

Field Type Required Description
id integer yes
description string yes
created_at string yes
original string yes
medium string yes
small string yes