Skip to content

Update webhook

Request

Security
authJWT
Path
hookIdstringrequired

Webhook ID

Bodyapplication/jsonrequired
namestring

Human-readable name for this webhook

Example:"Stripe Payment Webhook"
descriptionstring

Optional description

Example:"Handles payment confirmations from Stripe"
targetUrlstring

Target URL where requests will be forwarded

Example:"https://internal-api.example.com/payments/webhook"
isActiveboolean

Whether webhook is active

Default:true
allowedMethodsArray of strings

Allowed HTTP methods (defaults to POST only)

Default:["POST"]
Items Enum:"GET""POST""PUT""PATCH""DELETE"
Example:
[ "POST" ]
outboundAuthTypestring

Outbound authentication type

Default:"NONE"
Enum:"NONE""BEARER""JWT""HMAC"
outboundAuthCredentialsstring

Outbound authentication credentials (Bearer token)

inboundAllowedSourcesArray of strings

Allowed inbound sources

Items Enum:"USER""BUSINESS""TENANT""INTERNAL""STRIPE""ANY"
Example:
[ "STRIPE" ]
inboundSecretstring

Secret for external source verification (e.g., Stripe signing secret)

timeoutMsnumber, [ 1000 .. 120000 ]

Request timeout in milliseconds

Default:30000
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
  }'

Responses

Webhook updated successfully

Bodyapplication/json
idstringrequired

Webhook ID

namestringrequired

Human-readable name

descriptionstring

Optional description

targetUrlstringrequired

Target URL where requests are forwarded

urlstringrequired

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"
isActivebooleanrequired

Whether webhook is active

allowedMethodsArray of stringsrequired

Allowed HTTP methods

Items Enum:"GET""POST""PUT""PATCH""DELETE"
outboundAuthTypestringrequired

Outbound authentication type

Enum:"NONE""BEARER""JWT""HMAC"
hasOutboundCredentialsbooleanrequired

Whether outbound credentials are configured

inboundAllowedSourcesArray of stringsrequired

Allowed inbound sources

Items Enum:"USER""BUSINESS""TENANT""INTERNAL""STRIPE""ANY"
hasInboundSecretbooleanrequired

Whether inbound secret is configured

timeoutMsnumberrequired

Request timeout in milliseconds

createdAtstring, (date-time)required

Creation timestamp

updatedAtstring, (date-time)required

Last update timestamp

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" }