Webhooks
Deploy hooks through the API. Needs the manage_webhooks permission (agents and management keys have it). What Pluma sends and how to verify it: Generic webhook deploy.
List
GET /api/v1/spaces/:space_id/webhooks
Create
POST /api/v1/spaces/:space_id/webhooks
curl -X POST https://pluma.so/api/v1/spaces/acton-estero/webhooks \
-H "Authorization: Bearer $PLUMA_KEY" -H "Content-Type: application/json" \
-d '{ "name": "Netlify", "kind": "netlify", "url": "https://api.netlify.com/build_hooks/abc123" }'
{ "webhook": { "id": "1", "name": "Netlify", "kind": "netlify", "url": "https://api.netlify.com/build_hooks/abc123",
"target": "production", "events": ["entry.published", "entry.unpublished", "content_type.changed"], "last_delivery": null },
"secret": "whsec_…" }
kind:netlify,vercelorgeneric.eventsis optional.target:production(default) rebuilds the live site when something is published.previewis for a staging site: it also rebuilds on every save (entry.saved), so drafts show up there.- Events:
entry.published,entry.unpublished,content_type.changed,asset.replaced(a file that something published uses got a new version) andentry.saved. Aproductionhook listens to all butentry.savedunless you say otherwise; apreviewhook always includesentry.saved. - The
secretto verify the signature is shown only once. - The URL must be
https://and public.
Test
POST /api/v1/spaces/:space_id/webhooks/:id/test
Sends a test hook right away and returns what the destination answered:
{ "delivery": { "id": "7", "status_code": 200, "ok": true, "response_ms": 184, "error": null, "test": true } }
A hook with a 2xx response checks off step 5 of the checklist.
Delete
DELETE /api/v1/spaces/:space_id/webhooks/:id