Skip to content

SDK method

tools.addSubscriberChannel

Add a subscriber notification channel. Convenience alias for add_subscriber_channel, forwarding to tinbox.api.notifications.addChannel.mutate.

Signature

ts
addSubscriberChannel(input: Parameters<TinboxTools["addSubscriberChannel"]>[0]): ReturnType<TinboxTools["addSubscriberChannel"]>

Parameters

NameTypeRequiredDescription
contactIdstringyes—
type"email" | "push" | "webhook"yes—
endpointstringyesEmail address, push token, or webhook URL.
topicsstring[]noOptional topic filters; blank = all topics.

Returns

ReturnType<TinboxTools["addSubscriberChannel"]>

Example

ts
await tinbox.tools.addSubscriberChannel({
  "contactId": "<contactId>",
  "type": "email",
  "endpoint": "<endpoint>"
});