curl --location 'https://api.nomba.com/v1/webhooks/events' \
--header 'Authorization: Bearer <token> \
--header 'Content-Type: application/json' \
--header 'accountId: <accountId>'\
--data '{
    "accountId": "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
    "limit": 20
  }'
{
    "code": "200",
    "description": "Webhook events fetched successfully",
    "data": {
        "list": [
            {
                "webHookId": 782,
                "eventURL": "https://hip-guinea-supr.net",
                "description": "new",
                "eventType": "order_success",
                "enabled": true
            },
            {
                "webHookId": 257,
                "eventURL": "https://hip-guinea-supr.net",
                "description": "new",
                "eventType": "payment_success",
                "enabled": true
            }
        ],
        "pageToken": ""
    }
}
When a business or user subscribes to an event type on the dashboard, they can use this endpoint to fetch the webhook event types that they subscribe to.

POST /v1/webhooks/events

Request Body

accountId
string
required
The unique identifier of the user or business whose webhook events are to be retrieved.
limit
integer
The number of records to return. Default is 20.

Response Body

code
string
required
Response code indicating the status of the request.
description
string
required
Description of the response.
data
object
curl --location 'https://api.nomba.com/v1/webhooks/events' \
--header 'Authorization: Bearer <token> \
--header 'Content-Type: application/json' \
--header 'accountId: <accountId>'\
--data '{
    "accountId": "6703XXXd1-158a-42XX-8f0b-XXXXXXXXX",
    "limit": 20
  }'
{
    "code": "200",
    "description": "Webhook events fetched successfully",
    "data": {
        "list": [
            {
                "webHookId": 782,
                "eventURL": "https://hip-guinea-supr.net",
                "description": "new",
                "eventType": "order_success",
                "enabled": true
            },
            {
                "webHookId": 257,
                "eventURL": "https://hip-guinea-supr.net",
                "description": "new",
                "eventType": "payment_success",
                "enabled": true
            }
        ],
        "pageToken": ""
    }
}