Webhooks

Use these operations to manage webhooks. Webhooks notify your systems in real-time when certain events occur. For example, when a new transaction occurs or a new subscription is created. Webhooks enable you to collect information about events. Rebilly can send this information by HTTP POST request to a defined URL of your choice.

Send a test webhook

Request

Sends a test webhook.

Security
SecretApiKey or JWT
Bodyapplication/jsonrequired

Webhook to create or update.

eventsFilterArray of any

Event types that trigger the webhook. If empty, all event types trigger the webhook.

Default:[]
statusstring
Default:"active"
Enum:"active""inactive"
methodstringrequired
Enum:"GET""POST""PUT""PATCH""DELETE"
urlstring, (uri)required

URL that receives requests when a specified event occurs.

headersArray of objects

Headers to include in the webhook request.

credentialHashstringrequired

Credential hash for authenticating requests to the URL.

bodystring or null

Webhook request body. If this value is null, the default payload for the specified event is used. Template placeholders are permitted.

Invalid placeholders render as empty strings. For example, Hello {{invalid.placeholder}}! is rendered as Hello !.

For more information, see Placeholders.

filterstring or null

Filter that determines whether to send the webhook. This field requires a special format. Use , for multiple allowed values. Use ; for multiple fields.

For more information, see Using filters.

curl -i -X POST \
  https://www.rebilly.com/_mock/catalog/all/previews/webhooks \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "eventsFilter": [],
    "status": "active",
    "method": "GET",
    "url": "http://example.com",
    "headers": [
      {
        "name": "Content-Type",
        "status": "active",
        "value": "value1"
      }
    ],
    "credentialHash": "string",
    "body": "string",
    "filter": "string"
  }'

Responses

Test webhook sent.

Headers
Rate-Limit-Limitinteger

Maximum number of requests available at one time for this rate limit. For more information, see Rate limits.

Example:500
Rate-Limit-Remaininginteger

Number of requests still available for this rate limit. For more information, see Rate limits.

Example:499
Response
No content