/
Update webhook
Security
authJWT
Target URL where requests will be forwarded
Example:"https://internal-api.example.com/payments/webhook"
Allowed HTTP methods (defaults to POST only)
Default:["POST"]
Items Enum:"GET""POST""PUT""PATCH""DELETE"
Example:
[ "POST" ]
Allowed inbound sources
Items Enum:"USER""BUSINESS""TENANT""INTERNAL""STRIPE""ANY"
Example:
[ "STRIPE" ]
- Mock serverhttps://docs.pers.ninja/_mock/swagger/hooks/{hookId}
- https://api.pers.ninja/v2https://api.pers.ninja/v2/hooks/{hookId}
curl -i -X PUT \
'https://docs.pers.ninja/_mock/swagger/hooks/{hookId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "Stripe Payment Webhook",
"description": "Handles payment confirmations from Stripe",
"targetUrl": "https://internal-api.example.com/payments/webhook",
"isActive": true,
"allowedMethods": [
"POST"
],
"outboundAuthType": "NONE",
"outboundAuthCredentials": "string",
"inboundAllowedSources": [
"STRIPE"
],
"inboundSecret": "string",
"timeoutMs": 30000
}'Webhook updated successfully
Public URL to receive webhook requests (format: {baseUrl}/{apiVersion}/hooks/{projectKey}/{hookId})
Example:"https://api.pers.ninja/v2/hooks/b3245237f5e658af.../550e8400-e29b-41d4-a716-446655440000"
Allowed HTTP methods
Items Enum:"GET""POST""PUT""PATCH""DELETE"
Allowed inbound sources
Items Enum:"USER""BUSINESS""TENANT""INTERNAL""STRIPE""ANY"
Response
{ "id": "string", "name": "string", "description": "string", "targetUrl": "string", "url": "https://api.pers.ninja/v2/hooks/b3245237f5e658af.../550e8400-e29b-41d4-a716-446655440000", "isActive": true, "allowedMethods": [ "GET" ], "outboundAuthType": "NONE", "hasOutboundCredentials": true, "inboundAllowedSources": [ "USER" ], "hasInboundSecret": true, "timeoutMs": 0, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }