Create channel endpoint for a resource

Create a new channel endpoint for a resource.

POST
/v1/channel-endpoints

Authorization

Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

In: header

Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

In: header

Request Body

application/jsonRequired

Channel endpoint creation request. The structure varies based on the type field.

bodyRequiredobject | object | object | object | object | object

Header Parameters

idempotency-keystring

A header for idempotency purposes

Response Body

Created

identifierRequiredstring

The unique identifier of the channel endpoint.

channelRequiredstring | null

The channel type (email, sms, push, chat, etc.).

Value in: "in_app" | "email" | "sms" | "chat" | "push"
providerIdRequiredstring | null

The provider identifier (e.g., sendgrid, twilio, slack, etc.).

Value in: "emailjs" | "mailgun" | "mailjet" | "mandrill" | "nodemailer" | "postmark" | "sendgrid" | "sendinblue" | "ses" | "netcore" | "infobip-email" | "resend" | "plunk" | "mailersend" | "mailtrap" | "clickatell" | "outlook365" | "novu-email" | "sparkpost" | "email-webhook" | "braze" | "nexmo" | "plivo" | "sms77" | "sms-central" | "sns" | "telnyx" | "twilio" | "gupshup" | "firetext" | "infobip-sms" | "burst-sms" | "bulk-sms" | "isend-sms" | "forty-six-elks" | "kannel" | "maqsam" | "termii" | "africas-talking" | "novu-sms" | "sendchamp" | "generic-sms" | "clicksend" | "bandwidth" | "messagebird" | "simpletexting" | "azure-sms" | "ring-central" | "brevo-sms" | "eazy-sms" | "mobishastra" | "afro-message" | "unifonic" | "smsmode" | "imedia" | "sinch" | "isendpro-sms" | "fcm" | "apns" | "expo" | "one-signal" | "pushpad" | "push-webhook" | "pusher-beams" | "appio" | "novu" | "slack" | "discord" | "msteams" | "mattermost" | "ryver" | "zulip" | "grafana-on-call" | "getstream" | "rocket-chat" | "whatsapp-business" | "chat-webhook" | "novu-slack"
integrationIdentifierRequiredstring | null

The identifier of the integration to use for this channel endpoint.

connectionIdentifierRequiredstring | null

The identifier of the channel connection used for this endpoint.

subscriberIdRequiredstring | null

The subscriber ID to which the channel endpoint is linked

contextKeysRequiredarray<string>

The context of the channel connection

typeRequiredstring

Type of channel endpoint

Value in: "slack_channel" | "slack_user" | "webhook" | "phone" | "ms_teams_channel" | "ms_teams_user"
endpointRequiredobject | object | object | object

Endpoint data specific to the channel type

createdAtRequiredstring

The timestamp indicating when the channel endpoint was created, in ISO 8601 format.

updatedAtRequiredstring

The timestamp indicating when the channel endpoint was last updated, in ISO 8601 format.

export interface Response {
  /**
   * The unique identifier of the channel endpoint.
   */
  identifier: string;
  /**
   * The channel type (email, sms, push, chat, etc.).
   */
  channel: ("in_app" | "email" | "sms" | "chat" | "push") | null;
  /**
   * The provider identifier (e.g., sendgrid, twilio, slack, etc.).
   */
  providerId:
    | (
        | "emailjs"
        | "mailgun"
        | "mailjet"
        | "mandrill"
        | "nodemailer"
        | "postmark"
        | "sendgrid"
        | "sendinblue"
        | "ses"
        | "netcore"
        | "infobip-email"
        | "resend"
        | "plunk"
        | "mailersend"
        | "mailtrap"
        | "clickatell"
        | "outlook365"
        | "novu-email"
        | "sparkpost"
        | "email-webhook"
        | "braze"
        | "nexmo"
        | "plivo"
        | "sms77"
        | "sms-central"
        | "sns"
        | "telnyx"
        | "twilio"
        | "gupshup"
        | "firetext"
        | "infobip-sms"
        | "burst-sms"
        | "bulk-sms"
        | "isend-sms"
        | "forty-six-elks"
        | "kannel"
        | "maqsam"
        | "termii"
        | "africas-talking"
        | "novu-sms"
        | "sendchamp"
        | "generic-sms"
        | "clicksend"
        | "bandwidth"
        | "messagebird"
        | "simpletexting"
        | "azure-sms"
        | "ring-central"
        | "brevo-sms"
        | "eazy-sms"
        | "mobishastra"
        | "afro-message"
        | "unifonic"
        | "smsmode"
        | "imedia"
        | "sinch"
        | "isendpro-sms"
        | "fcm"
        | "apns"
        | "expo"
        | "one-signal"
        | "pushpad"
        | "push-webhook"
        | "pusher-beams"
        | "appio"
        | "novu"
        | "slack"
        | "discord"
        | "msteams"
        | "mattermost"
        | "ryver"
        | "zulip"
        | "grafana-on-call"
        | "getstream"
        | "rocket-chat"
        | "whatsapp-business"
        | "chat-webhook"
        | "novu-slack"
      )
    | null;
  /**
   * The identifier of the integration to use for this channel endpoint.
   */
  integrationIdentifier: string | null;
  /**
   * The identifier of the channel connection used for this endpoint.
   */
  connectionIdentifier: string | null;
  /**
   * The subscriber ID to which the channel endpoint is linked
   */
  subscriberId: string | null;
  /**
   * The context of the channel connection
   */
  contextKeys: string[];
  /**
   * Type of channel endpoint
   */
  type: "slack_channel" | "slack_user" | "webhook" | "phone" | "ms_teams_channel" | "ms_teams_user";
  /**
   * Endpoint data specific to the channel type
   */
  endpoint: SlackChannelEndpointDto | SlackUserEndpointDto | WebhookEndpointDto | PhoneEndpointDto;
  /**
   * The timestamp indicating when the channel endpoint was created, in ISO 8601 format.
   */
  createdAt: string;
  /**
   * The timestamp indicating when the channel endpoint was last updated, in ISO 8601 format.
   */
  updatedAt: string;
}
export interface SlackChannelEndpointDto {
  /**
   * Slack channel ID
   */
  channelId: string;
}
export interface SlackUserEndpointDto {
  /**
   * Slack user ID
   */
  userId: string;
}
export interface WebhookEndpointDto {
  /**
   * Webhook URL
   */
  url: string;
  /**
   * Optional channel identifier
   */
  channel?: string;
}
export interface PhoneEndpointDto {
  /**
   * Phone number in E.164 format
   */
  phoneNumber: string;
}
 
curl -X POST "https://api.novu.co/v1/channel-endpoints" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "slack-channel-user123-abc4",
    "subscriberId": "subscriber-123",
    "context": {
      "property1": "org-acme",
      "property2": "org-acme"
    },
    "integrationIdentifier": "slack-prod",
    "connectionIdentifier": "slack-connection-abc123",
    "type": "slack_channel",
    "endpoint": {
      "channelId": "C123456789"
    }
  }'
{
  "identifier": "string",
  "channel": "in_app",
  "providerId": "slack",
  "integrationIdentifier": "slack-prod",
  "connectionIdentifier": "slack-connection-abc123",
  "subscriberId": "subscriber-123",
  "contextKeys": [
    "tenant:org-123",
    "region:us-east-1"
  ],
  "type": "slack_channel",
  "endpoint": {
    "channelId": "C123456789"
  },
  "createdAt": "string",
  "updatedAt": "string"
}

On this page

No Headings
Edit this page on GitHub