Create channel connection for a resource and integration

Create a new channel connection for a resource for given integration. Only one channel connection is allowed per resource and integration.

POST
/v1/channel-connections

Authorization

Authorization<token>

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

In: header

Request Body

application/jsonRequired
identifierstring

The unique identifier for the channel connection. If not provided, one will be generated automatically.

subscriberIdstring

The subscriber ID to link the channel connection to

contextobject
integrationIdentifierRequiredstring

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

workspaceRequiredobject
authRequiredobject

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.

subscriberIdRequiredstring | null

The subscriber ID to which the channel connection is linked

contextKeysRequiredarray<string>

The context of the channel connection

workspaceRequiredobject
authRequiredobject
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 subscriber ID to which the channel connection is linked
   */
  subscriberId: string | null;
  /**
   * The context of the channel connection
   */
  contextKeys: string[];
  workspace: WorkspaceDto;
  auth: AuthDto;
  /**
   * 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 WorkspaceDto {
  id: string;
  name?: string;
}
export interface AuthDto {
  accessToken: string;
}
 
curl -X POST "https://api.novu.co/v1/channel-connections" \
  -H "idempotency-key: string" \
  -H "Authorization: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "identifier": "slack-prod-user123-abc4",
    "subscriberId": "subscriber-123",
    "context": {
      "property1": "org-acme",
      "property2": "org-acme"
    },
    "integrationIdentifier": "slack-prod",
    "workspace": {
      "id": "T123456",
      "name": "Acme HQ"
    },
    "auth": {
      "accessToken": "Workspace access token"
    }
  }'
{
  "identifier": "string",
  "channel": "in_app",
  "providerId": "slack",
  "integrationIdentifier": "slack-prod",
  "subscriberId": "subscriber-123",
  "contextKeys": [
    "tenant:org-123",
    "region:us-east-1"
  ],
  "workspace": {
    "id": "T123456",
    "name": "Acme HQ"
  },
  "auth": {
    "accessToken": "Workspace access token"
  },
  "createdAt": "string",
  "updatedAt": "string"
}

On this page

No Headings
Edit this page on GitHub