Notification Handlers: Create

This documentation entry provides a clear guide for developers on how to create a new notification handler using the API, including the necessary parameters, headers, and expected response.

Endpoint

POST /api/notification-handlers

Create a new notification handler with the specified parameters.

Request

HTTP Request

POST https://uptimekeep.com/api/notification-handlers

Headers

Header
Type
Description

Authorization

String

Bearer token for API authentication.

Content-Type

String

Must be set to multipart/form-data for file uploads.

Parameters

Parameter
Type
Required
Description

name

String

Yes

Name of the notification handler.

type

String

Yes

Type of the notification handler. Allowed values: email, webhook, slack, discord, telegram, microsoft_teams, twilio, twilio_call.

email

String

No

Email address for notifications. Required when type = email.

webhook

String

No

Webhook URL for notifications. Required when type = webhook.

slack

String

No

Slack webhook URL for notifications. Required when type = slack.

discord

String

No

Discord webhook URL for notifications. Required when type = discord.

telegram

String

No

Telegram API Token for notifications. Required when type = telegram.

telegram_chat_id

String

No

Telegram Chat ID for notifications. Required when type = telegram.

twilio

String

No

Phone number for Twilio SMS notifications. Required when type = twilio.

Example of a request:

Response

A successful response returns a JSON object containing the unique identifier of the newly created notification handler.

Response Example

Fields

Data Object

Field
Type
Description

id

Integer

Unique identifier for the new notification handler.

Errors

If the request fails, the API will return an error message with an appropriate HTTP status code, such as 400 Bad Request if required parameters are missing or invalid.

Last updated