POST
/webhooksCreate Webhook
Create webhook
Implementation Notes
This endpoint is used to create a webhook.
Parameters:
- endpoint: Target URL where the webhook will send HTTP POST requests.
- authType: Authentication method to use (
none,basic,querystring,authheader,header,bearer). - userName: Required when
authTypeisbasic. Ignored ifauthTypeisnone. - password: Required when
authTypeisbasic. Ignored ifauthTypeisnone. - token: Required when
authTypeis any token-based type (querystring,authheader,header,bearer). Ignored ifauthTypeisnone.
Important Notes:
- If
authTypeisnone, thenuserName,password, andtokenmust not be provided. - If
authTypeisbasic, bothuserNameandpasswordare mandatory. - If
authTypeisquerystringorauthheaderorheaderorbearertoken must be provided. - You must provide either user credentials (
userName/password) or atoken, but not both.
Example Request:
{ "isAlertHook": true, "endpoint": "https://example.com/webhook", "authType": "bearer", "token": "********" }
POST
/webhooksParameter Details
| Name | In | Type | Required | Description |
|---|---|---|---|---|
body | body | object | Required | none |
» isAlertHook | body | boolean | Optional | Indicates if this webhook is used for alerts. |
» endpoint | body | string | Required | URL that will receive the webhook payloads. |
» authType | body | string | Required | Authentication method to use for the webhook. |
» userName | body | string | Optional | Required if authType is basic. |
» password | body | string | Optional | Required if authType is basic. |
» token | body | string | Optional | Required if using token-based authType (querystring, authheader, header, bearer). |
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 201 | Created | Webhook created successfully. | |
| 400 | Bad Request | Bad Request – Validation failed or incorrect parameters. | None |
| 401 | Unauthorized | Unauthorized – Authentication credentials are invalid or missing. | None |
| 429 | Too Many Requests | Too Many Requests – Rate limiting in effect. | None |
| 500 | Internal Server Error | Internal Server Error – An unexpected issue occurred on the server. | None |
Example Request
# You can also use wget
curl -X POST /webhooks \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {access-token}'
Example responses
201 Response
{
"isAlertHook": true,
"endpoint": "https://example.com/webhook",
"authType": "bearer",
"token": "********"
}Body parameter
{
"isAlertHook": true,
"endpoint": "https://example.com/webhook",
"authType": "none",
"userName": "admin",
"password": "securepassword123",
"token": "********"
}
Example responses
201 Response
{
"message": "Webhook created successfully"
}
Need Support?
Our team is here to help you integrate and make the most of our APIs. Get in touch for technical support, custom solutions, or any questions.