POST/webhooks

Create Webhook

This endpoint is used to create a webhook.
POST/webhooks

Important Notes

Validation Rules:

  • If authType is none, then userName, password, and token must not be present.
  • If authType is basic, both userName and password are mandatory.
  • If authType is querystring or authheader or header or bearer token must be provided.
  • You must provide either user credentials or a token, but not both.

Example Request:

{
  "endpoint": "https://example.com/updated-hook",
  "authType": "querystring",
  "token": "new-token-1234"
}

Parameter Details

NameInTypeRequiredDescription
» isAlertHookbodybooleanOptionalIndicates if this webhook is used for alerts.
» endpointbodystringRequiredTarget URL where the webhook will send HTTP POST requests.
» authTypebodystringRequiredAuthentication method to use (none, basic, querystring, authheader, header, bearer)
» userNamebodystringOptionalRequired when authType is basic. Ignored if authType is none.
» passwordbodystringOptionalRequired when authType is basic. Ignored if authType is none.
» tokenbodystringOptionalRequired when authType is any token-based type (querystring, authheader, header, bearer).

Responses

StatusMeaningDescriptionSchema
201CreatedWebhook created successfully.
400Bad RequestBad Request – Validation failed or incorrect parameters.None
401UnauthorizedUnauthorized – Authentication credentials are invalid or missing.None
429Too Many RequestsToo Many Requests – Rate limiting in effect.None
500Internal Server ErrorInternal 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}' \
  -d '{"isAlertHook":"string","endpoint":"string","authType":"string","userName":"string","password":"string","token":"string"}'

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.