CLI
Webhooks
Register, list, test and delete webhooks from the terminal, and keep the signing secret that is shown only once at creation.
A webhook makes Sofia call your server when a post is published or fails. The events and the signature are described in Webhooks.
Register a webhook
-u, --url is required and must be a public https address. --events lists the events to receive, separated by commas; by default post.published,post.failed.
sofia webhooks:create -u https://app.example.com/hooks/sofia
sofia webhooks:create -u https://app.example.com/hooks/sofia --events post.published,post.failedList, test, delete
webhooks:test <id> sends a test event to your address. webhooks:delete <id> removes the webhook.
sofia webhooks:list
sofia webhooks:test $WEBHOOK_ID
sofia webhooks:delete $WEBHOOK_IDVerify each delivery with its signature before trusting it: see Webhooks.
Was this page helpful?