GetOTP Documentation

Webhooks

The Webhooks API provides a way to get your custom Webhooks.

Request for Webhooks API

To get your Webhooks, make a GET request to our Webhooks endpoint.

https://api.otp.dev/v1/webhooks

With the following Basic HTTP verification method:

DescriptionRequiredData TypeExample
Your API KeyYesStringmtbi2w4hlendfpxa1igthcu5p6mzxf7k

Note

Examples

Below is an example request using cURL:

curl --request GET \
    --url https://api.otp.dev/v1/webhooks \
    --header 'X-OTP-Key: {YOUR_API_KEY}' \
    --header 'accept: application/json'

The response would be a JSON structure, returned with HTTP 200 Codestatus code:

{
    "data": [
        {
            "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
            "url": "https://example.com",
            "secret": "1234567890",
            "event": "DELIVERY",
            "name": "My Webhook",
            "channel": "SMS",
            "create_date": "2025-10-13 05:34:59",
            "update_date": "2025-10-13 05:34:59"
        }
    ]
}

Response data details:

NameDescriptionData TypeExample
data[].idThe unique identifier of the webhookString (UUID)3fa85f64-5717-4562-b3fc-2c963f66afa6
data[].account_idThe unique identifier of the accountString (UUID)3fa85f64-5717-4562-b3fc-2c963f66afa6
data[].urlThe URL of the webhookStringhttps://example.com
data[].secretThe secret of the webhookString1234567890
data[].eventThe event of the webhookStringDELIVERY
data[].nameHuman-friendly webhook nameStringMy Webhook
data[].create_dateCreation date of the webhook in UTC, formatted as yyyy-mm-dd hh:mm:ssString (datetime)2025-09-24 07:09:20
data[].update_dateUpdated date of the webhook in UTC, formatted as yyyy-mm-dd hh:mm:ssString (datetime)2025-09-24 07:09:20

If there is an error with the API call, you will receive a JSON response with 400+ status code, error code and message.

{
    "errors": [{
        "timestamp": "2025-08-18 00:00:00",
        "path": "/v1/webhooks",
        "method": "GET",
        "status": 401,
        "message": "User Not Authorized",
        "code": "1136"
    }]
}

Please refer to this table for details:

Error CodeDescriptionHTTP Code
1136User Not Authorized401