Skip to main content

Webhook Subscriptions

This section contains 1 subgroups.

Endpoints for managing webhook subscriptions. These APIs allow you to set up, view, update, and delete subscriptions to receive webhook notifications for various system events.

List Webhook Subscriptions​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
GET/webhooks/subscriptions

Get a paginated list of webhook subscriptions for the current tenant. Requires view:tenant permission.

Query parameters

ParameterTypeDescription
pagestring

Page number for pagination

Example: 1

limitstring

Number of items per page

Example: 10

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/webhooks/subscriptions?page=1&limit=10&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook subscriptions retrieved successfully",4  "subscriptions": [5    {6      "id": "uuid",7      "module_id": "DELIVERY",8      "webhook_url": "https://example.com/webhook",9      "secret_header_key": "X-Webhook-Secret",10      "is_active": true,11      "created_at": "2023-08-01T10:00:00Z",12      "updated_at": "2023-08-01T10:00:00Z"13    }14  ],15  "page": 1,16  "limit": 10,17  "total": 118}

List User Webhook Subscriptions​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
GET/webhooks/users/:user_id/subscriptions

Get a paginated list of webhook subscriptions for a specific user. Requires view:tenant permission.

Path parameters

ParameterTypeDescription
user_idRequiredstring

ID of the user to list webhook subscriptions for

Example: uuid

Query parameters

ParameterTypeDescription
pagestring

Page number for pagination

Example: 1

limitstring

Number of items per page

Example: 10

languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/webhooks/users/${USER_ID}/subscriptions?page=1&limit=10&language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook subscriptions retrieved successfully",4  "subscriptions": [5    {6      "id": "uuid",7      "module_id": "DELIVERY",8      "webhook_url": "https://example.com/webhook",9      "secret_header_key": "X-Webhook-Secret",10      "is_active": true,11      "user_id": "uuid",12      "created_at": "2023-08-01T10:00:00Z",13      "updated_at": "2023-08-01T10:00:00Z"14    }15  ],16  "page": 1,17  "limit": 10,18  "total": 1,19  "user_id": "uuid"20}

Create Webhook Subscription​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
POST/webhooks/subscriptions

Create a new webhook subscription for the current tenant. Requires manage:webhooks:tenant permission.

Required Fields

  • module_id: Identifier for the module generating events (e.g., 'DELIVERY')

  • webhook_url: HTTPS URL to receive webhook events

Optional Fields

  • secret_header_key: Name of header to include webhook secret in

  • secret_header_value: Secret value for webhook authentication

  • is_active: Whether the subscription is active. An explicit false is preserved; when omitted, it defaults to true.

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
module_idstring—
webhook_urlstring—
secret_header_keystring—
secret_header_valuestring—
is_activeboolean—
Staging
Request
curl
1curl --globoff --request POST "https://staging-api.ondi.io/functions/v1/webhooks/subscriptions?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "module_id": "DELIVERY",6  "webhook_url": "https://example.com/webhook",7  "secret_header_key": "X-Webhook-Secret",8  "secret_header_value": "your-secret-key-here",9  "is_active": false10}'

Response examples

201Created
Response body
json
1{2  "success": true,3  "message": "Webhook subscription created successfully",4  "subscription": {5    "id": "uuid",6    "tenant_id": "uuid",7    "module_id": "DELIVERY",8    "webhook_url": "https://example.com/webhook",9    "secret_header_key": "X-Webhook-Secret",10    "is_active": false,11    "created_at": "2023-08-01T10:00:00Z",12    "updated_at": "2023-08-01T10:00:00Z"13  }14}

Get Webhook Subscription​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
GET/webhooks/subscriptions/:subscriptionId

Get details of a specific webhook subscription by ID. Requires view:tenant permission.

Path parameters

ParameterTypeDescription
subscriptionIdRequiredstring

ID of the webhook subscription to retrieve

Example: uuid

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/webhooks/subscriptions/${SUBSCRIPTIONID}?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook subscription retrieved successfully",4  "subscription": {5    "id": "uuid",6    "module_id": "DELIVERY",7    "webhook_url": "https://example.com/webhook",8    "secret_header_key": "X-Webhook-Secret",9    "is_active": true,10    "created_at": "2023-08-01T10:00:00Z",11    "updated_at": "2023-08-01T10:00:00Z"12  }13}

Get User Webhook Subscription​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
GET/webhooks/users/:user_id/subscriptions/:subscriptionId

Get details of a specific webhook subscription by ID for a specific user. Requires view:tenant permission.

Path parameters

ParameterTypeDescription
user_idRequiredstring

ID of the user

Example: uuid

subscriptionIdRequiredstring

ID of the webhook subscription to retrieve

Example: uuid

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request GET "https://staging-api.ondi.io/functions/v1/webhooks/users/${USER_ID}/subscriptions/${SUBSCRIPTIONID}?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook subscription retrieved successfully",4  "subscription": {5    "id": "uuid",6    "module_id": "DELIVERY",7    "webhook_url": "https://example.com/webhook",8    "secret_header_key": "X-Webhook-Secret",9    "is_active": true,10    "user_id": "uuid",11    "created_at": "2023-08-01T10:00:00Z",12    "updated_at": "2023-08-01T10:00:00Z"13  },14  "user_id": "uuid"15}

Update Webhook Subscription​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
PUT/webhooks/subscriptions/:subscriptionId

Partially updates the tenant-owned webhook subscription identified by subscriptionId. Requires manage:webhooks:tenant permission. module_id is not required and is not updated. Send only is_active: true to activate and is_active: false to deactivate. Updating webhook_url performs the existing reachability test before saving.

Updatable Fields

  • webhook_url: HTTPS URL to receive webhook events

  • secret_header_key: Name of the webhook authentication header

  • secret_header_value: Value of the webhook authentication header

  • is_active: Boolean active state

  • user_id: Optional business-user scope

Frontend contract

Use the subscription id from GET /webhooks/subscriptions as subscriptionId. Show an Activate action when is_active is false and a Deactivate action when it is true. Submit an is_active-only body, disable the action while pending, and replace the row with the returned subscription after HTTP 200. A module-only list entry without an id is not an existing subscription and cannot be activated. Important errors: 400 for invalid input or a rejected updated URL, 404 when the tenant-owned subscription is not found, and 500 for an unexpected update failure.

Path parameters

ParameterTypeDescription
subscriptionIdRequiredstring

ID of the webhook subscription to update

Example: uuid

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
is_activeboolean—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/webhooks/subscriptions/${SUBSCRIPTIONID}?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "is_active": true6}'

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook Subscription Updated Successfully",4  "subscription": {5    "id": "uuid",6    "module_id": "DELIVERY",7    "webhook_url": "https://example.com/webhook",8    "secret_header_key": "X-Webhook-Secret",9    "is_active": true,10    "user_id": null,11    "created_at": "2023-08-01T10:00:00Z",12    "updated_at": "2023-08-01T11:00:00Z"13  }14}

Update User Webhook Subscription​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
PUT/webhooks/users/:user_id/subscriptions/:subscriptionId

Partially updates an existing webhook subscription for the business user identified in the path. Requires manage:webhooks:tenant permission. module_id is not required and is not updated. Send only is_active: true to activate and is_active: false to deactivate.

Updatable Fields

  • webhook_url: HTTPS URL to receive webhook events

  • secret_header_key: Name of the webhook authentication header

  • secret_header_value: Value of the webhook authentication header

  • is_active: Boolean active state

Path parameters

ParameterTypeDescription
user_idRequiredstring

ID of the user

Example: uuid

subscriptionIdRequiredstring

ID of the webhook subscription to update

Example: uuid

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Content-Typestring

Example: application/json

Body parameters

ParameterTypeDescription
is_activeboolean—
Staging
Request
curl
1curl --globoff --request PUT "https://staging-api.ondi.io/functions/v1/webhooks/users/${USER_ID}/subscriptions/${SUBSCRIPTIONID}?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}" \3  --header "Content-Type: application/json" \4  --data-raw '{5  "is_active": true6}'

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook Subscription Updated Successfully",4  "subscription": {5    "id": "uuid",6    "module_id": "DELIVERY",7    "webhook_url": "https://example.com/webhook",8    "secret_header_key": "X-Webhook-Secret",9    "is_active": true,10    "user_id": "uuid",11    "created_at": "2023-08-01T10:00:00Z",12    "updated_at": "2023-08-01T11:00:00Z"13  }14}

Delete Webhook Subscription​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
DELETE/webhooks/subscriptions/:subscriptionId

Delete a webhook subscription by ID. Requires manage:webhooks:tenant permission.

Path parameters

ParameterTypeDescription
subscriptionIdRequiredstring

ID of the webhook subscription to delete

Example: uuid

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/webhooks/subscriptions/${SUBSCRIPTIONID}?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook subscription deleted successfully"4}

Delete User Webhook Subscription​

Reporting, Audit & Webhooks / Webhooks / Webhook Subscriptions
DELETE/webhooks/users/:user_id/subscriptions/:subscriptionId

Delete a webhook subscription by ID for a specific user. Requires manage:webhooks:tenant permission.

Path parameters

ParameterTypeDescription
user_idRequiredstring

ID of the user

Example: uuid

subscriptionIdRequiredstring

ID of the webhook subscription to delete

Example: uuid

Query parameters

ParameterTypeDescription
languagestring

Preferred language for response messages

Example: en

Headers

ParameterTypeDescription
Authorizationstring

Example: Bearer {{access_token}}

Staging
Request
curl
1curl --globoff --request DELETE "https://staging-api.ondi.io/functions/v1/webhooks/users/${USER_ID}/subscriptions/${SUBSCRIPTIONID}?language=en" \2  --header "Authorization: Bearer ${ONDI_ACCESS_TOKEN}"

Response examples

200OK
Response body
json
1{2  "success": true,3  "message": "Webhook subscription deleted successfully"4}