Webhooks
Create a project webhook subscription
Creates an active webhook subscription starting at the current project journal sequence. The generated signing secret is returned once in the response.
POST
header
AuthorizationBearer <Postdot API key>A user-owned Postdot API key sent as Authorization: Bearer <token>. Its project scope is limited by the creator’s current access.
projectId*stringLength
1 <= length- body
url*stringDestination HTTPS URL for webhook deliveries. Private, loopback, and link-local destinations are rejected unless explicitly permitted by instance network policy.
Length
1 <= length <= 2048events*array<>Project event types this subscription listens to.
Items
1 <= itemsResponse for status 201
application/json- response
webhook*secret*stringThe signing secret for this webhook. It is returned only once on creation.
Length
1 <= lengthcurl -X POST 'https://postdot.example/api/projects/string/webhooks' \
-H 'Content-Type: application/json' \
-d '{
"url": "string",
"events": [
"post.created"
]
}'Example Response
{
"webhook": {
"id": "string",
"projectId": "string",
"url": "string",
"events": [
"post.created"
],
"state": "active",
"pausedReason": "string",
"cursorSequence": 0,
"secretVersion": 1,
"previousSecretExpiresAt": 0,
"createdByActorId": "string",
"updatedByActorId": "string",
"createdAt": 0,
"updatedAt": 0
},
"secret": "string"
}