Skip to main content
PATCH
/
v1
/
channel-endpoints
/
{identifier}
PHP
declare(strict_types=1);

require 'vendor/autoload.php';

use novu;
use novu\Models\Components;

$sdk = novu\Novu::builder()
    ->setSecurity(
        'YOUR_SECRET_KEY_HERE'
    )
    ->build();

$updateChannelEndpointRequestDto = new Components\UpdateChannelEndpointRequestDto(
    endpoint: new Components\SlackUserEndpointDto(
        userId: 'U123456789',
    ),
);

$response = $sdk->channelEndpoints->update(
    identifier: '<value>',
    updateChannelEndpointRequestDto: $updateChannelEndpointRequestDto

);

if ($response->getChannelEndpointResponseDto !== null) {
    // handle response
}
{
  "identifier": "<string>",
  "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>"
}

Authorizations

Authorization
string
header
required

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

Headers

idempotency-key
string

A header for idempotency purposes

Path Parameters

identifier
string
required

The unique identifier of the channel endpoint

Body

application/json
endpoint
object
required

Updated endpoint data. The structure must match the existing channel endpoint type.

Response

OK

identifier
string
required

The unique identifier of the channel endpoint.

channel
enum<string> | null
required

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

Available options:
in_app,
email,
sms,
chat,
push
providerId
enum<string> | null
required

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

Available options:
emailjs,
mailgun,
mailjet,
mandrill,
nodemailer,
postmark,
sendgrid,
sendinblue,
ses,
netcore,
infobip-email,
resend,
plunk,
mailersend,
mailtrap,
clickatell,
outlook365,
novu-email,
sparkpost,
email-webhook,
braze,
novu-email-agent,
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,
cm-telecom,
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,
telegram,
anthropic,
novu-anthropic,
anthropic-aws
Example:

"slack"

integrationIdentifier
string | null
required

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

Example:

"slack-prod"

connectionIdentifier
string | null
required

The identifier of the channel connection used for this endpoint.

Example:

"slack-connection-abc123"

subscriberId
string | null
required

The subscriber ID to which the channel endpoint is linked

Example:

"subscriber-123"

contextKeys
string[]
required

The context of the channel connection

Example:
["tenant:org-123", "region:us-east-1"]
type
enum<string>
required

Type of channel endpoint

Available options:
slack_channel,
slack_user,
webhook,
phone,
ms_teams_channel,
ms_teams_user,
telegram_chat
Example:

"slack_channel"

endpoint
object
required

Endpoint data specific to the channel type

createdAt
string
required

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

updatedAt
string
required

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