Add Webhook
Use this API to add or update the webhook destination for a specific event code.
Endpoint
Section titled “Endpoint”POST /api/v1/integrations/erp/webhooksRequest
Section titled “Request”curl -X POST 'https://[base_url]/api/v1/integrations/erp/webhooks' \ -H 'Content-Type: application/json' \ -H 'Authorization: Basic <token>' \ -d '{ "event_code": "cred.loan.final_approved", "url": "https://example.com/jodo-webhooks", "failure_notification_email": "you@example.com", "secret_key": "my-secret-key", "header_key": "my-custom-header", "header_value": "my-custom-header-value" }'Request Body
Section titled “Request Body”| Attribute | Type | Required | Description |
|---|---|---|---|
collector_code | string | Conditional | Branch code. Required if the institute has more than one branch. |
event_code | string | Yes | Webhook event code. |
url | string | Yes | Destination URL where Jodo sends POST requests when the event is triggered. |
failure_notification_email | string | Yes | Comma-separated email list for failure notifications. |
secret_key | string | No | Secret key used for signature generation. |
header_key | string | No | Custom header key. |
header_value | string | No | Custom header value. |
Response
Section titled “Response”HTTP 201
{ "status": "success", "data": { "id": "21d8f41b-aefd-4463-8179-55144f5f1ea5", "event_code": "cred.loan.final_approved", "failure_notification_email": "you@example.com", "url": "https://example.com/jodo-webhooks" }}Errors
Section titled “Errors”| Code | HTTP Code | Description |
|---|---|---|
HUE00000 | 400 | Bad request error. |
Important Notes
Section titled “Important Notes”- A webhook event can be subscribed to only one URL.
- Calling this API again for the same
event_codeupdates the existing subscription. - Only
secret_key,header_key, andheader_valuecan be updated after creation.