Skip to main content
POST
/
webhooks
Register a webhook
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({url: 'https://example.com/webhooks/prudra', events: ['*'], secret: '<string>'})
};

fetch('https://api.prudra.dev/webhooks', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "id": "wh_abc123",
  "url": "https://example.com/webhook",
  "events": [
    "*"
  ],
  "isActive": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "secret": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.prudra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Your Prudra API key. Get one at dashboard.prudra.com/settings/api-keys

Body

application/json
url
string
required
Example:

"https://example.com/webhooks/prudra"

events
string[]
required
Example:
["*"]
secret
string

Optional custom signing secret (min length enforced by API)

Response

Webhook registered

id
string
required
Example:

"wh_abc123"

url
string
required
Example:

"https://example.com/webhook"

events
string[]
required
Example:
["*"]
isActive
boolean
required
createdAt
string<date-time>
secret
string