Skip to content
v2.7

Messaging

Messaging: email, SMS and push providers, topics, subscribers and sending email, SMS and push.

Messaging: email, SMS and push providers, topics, subscribers and sending email, SMS and push.

Class Messaging: 54 methods (2 in @owbase/web, 54 in @owbase/node). The examples use the object form of the parameters; replace the values between < and > with your own.

List messages

GET /messaging/messages · method page

SDK: @owbase/node only

Get a list of all messages from the current Owbase project.

Parameter Type Required Description
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: scheduledAt, deliveredAt, deliveredTotal, status, description, providerType, users, targets
search string no Search term to filter your list results. Max length: 256 chars.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the messages.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.listMessages({
queries: [], // optional
search: '<SEARCH>', // optional
total: false, // optional
});

Create email

POST /messaging/messages/email · method page

SDK: @owbase/node only

Create a new email message.

Parameter Type Required Description
messageId string yes Message ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
subject string yes Email Subject.
content string yes Email Content.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
cc string[] no Array of target IDs to be added as CC.
bcc string[] no Array of target IDs to be added as BCC.
attachments string[] no Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
draft boolean no Is message a draft
html boolean no Is content of type HTML
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.
replyToEmail string no Email address to reply to. If not set, defaults to the sender email address.
replyToName string no Name of the reply to recipient. If not set, defaults to the sender name.
emails string[] no List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Owbase user, target, or topic.

Access: API key with the messages.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createEmail({
messageId: '<MESSAGE_ID>',
subject: '<SUBJECT>',
content: '<CONTENT>',
topics: [], // optional
users: [], // optional
targets: [], // optional
cc: [], // optional
bcc: [], // optional
attachments: [], // optional
draft: false, // optional
html: false, // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
replyToEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
emails: [], // optional
});

Update email

PATCH /messaging/messages/email/{messageId} · method page

SDK: @owbase/node only

Update an email message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.

Parameter Type Required Description
messageId string yes Message ID.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
subject string no Email Subject.
content string no Email Content.
draft boolean no Is message a draft
html boolean no Is content of type HTML
cc string[] no Array of target IDs to be added as CC.
bcc string[] no Array of target IDs to be added as BCC.
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.
attachments string[] no Array of compound ID strings of bucket IDs and file IDs to be attached to the email. They should be formatted as <BUCKET_ID>:<FILE_ID>.
replyToEmail string no Email address to reply to. Pass an empty string to restore the provider or sender default.
replyToName string no Name of the reply to recipient. Pass an empty string to restore the provider or sender default.
emails string[] no List of email addresses to send the message to. Use this to deliver to recipients that are not backed by an Owbase user, target, or topic.

Access: API key with the messages.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateEmail({
messageId: '<MESSAGE_ID>',
topics: [], // optional
users: [], // optional
targets: [], // optional
subject: '<SUBJECT>', // optional
content: '<CONTENT>', // optional
draft: false, // optional
html: false, // optional
cc: [], // optional
bcc: [], // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
attachments: [], // optional
replyToEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
emails: [], // optional
});

Create push notification

POST /messaging/messages/push · method page

SDK: @owbase/node only

Create a new push notification.

Parameter Type Required Description
messageId string yes Message ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
title string no Title for push notification.
body string no Body for push notification.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
data object no Additional key-value pair data for push notification.
action string no Action for push notification.
image string no Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Owbase Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
icon string no Icon for push notification. Available only for Android and Web Platform.
sound string no Sound for push notification. Available only for Android and iOS Platform.
color string no Color for push notification. Available only for Android Platform.
tag string no Tag for push notification. Available only for Android Platform.
badge number no Badge for push notification. Available only for iOS Platform.
draft boolean no Is message a draft
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.
contentAvailable boolean no If set to true, the notification will be delivered in the background. Available only for iOS Platform.
critical boolean no If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
priority MessagePriority no Set the notification priority. “normal” will consider device state and may not deliver notifications immediately. “high” will always attempt to immediately deliver the notification. Values: normal, high.
channelId string no ID of the notification channel to deliver the notification on. The app must have already created a channel with this ID, otherwise the channel from the app manifest is used. Available only for Android Platform.

Access: API key with the messages.write scope.

@owbase/node
import { Client, Messaging, MessagePriority } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createPush({
messageId: '<MESSAGE_ID>',
title: '<TITLE>', // optional
body: '<BODY>', // optional
topics: [], // optional
users: [], // optional
targets: [], // optional
data: {}, // optional
action: '<ACTION>', // optional
image: '<ID1:ID2>', // optional
icon: '<ICON>', // optional
sound: '<SOUND>', // optional
color: '<COLOR>', // optional
tag: '<TAG>', // optional
badge: 1, // optional
draft: false, // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
contentAvailable: false, // optional
critical: false, // optional
priority: MessagePriority.Normal, // optional
channelId: '<CHANNEL_ID>', // optional
});

Update push notification

PATCH /messaging/messages/push/{messageId} · method page

SDK: @owbase/node only

Update a push notification by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.

Parameter Type Required Description
messageId string yes Message ID.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
title string no Title for push notification.
body string no Body for push notification.
data object no Additional Data for push notification.
action string no Action for push notification.
image string no Image for push notification. Must be a compound bucket ID to file ID of a jpeg, png, or bmp image in Owbase Storage. It should be formatted as <BUCKET_ID>:<FILE_ID>.
icon string no Icon for push notification. Available only for Android and Web platforms.
sound string no Sound for push notification. Available only for Android and iOS platforms.
color string no Color for push notification. Available only for Android platforms.
tag string no Tag for push notification. Available only for Android platforms.
badge number no Badge for push notification. Available only for iOS platforms.
draft boolean no Is message a draft
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.
contentAvailable boolean no If set to true, the notification will be delivered in the background. Available only for iOS Platform.
critical boolean no If set to true, the notification will be marked as critical. This requires the app to have the critical notification entitlement. Available only for iOS Platform.
priority MessagePriority no Set the notification priority. “normal” will consider device battery state and may send notifications later. “high” will always attempt to immediately deliver the notification. Values: normal, high.
channelId string no ID of the notification channel to deliver the notification on. The app must have already created a channel with this ID, otherwise the channel from the app manifest is used. Pass an empty string to clear it. Available only for Android platforms.

Access: API key with the messages.write scope.

@owbase/node
import { Client, Messaging, MessagePriority } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updatePush({
messageId: '<MESSAGE_ID>',
topics: [], // optional
users: [], // optional
targets: [], // optional
title: '<TITLE>', // optional
body: '<BODY>', // optional
data: {}, // optional
action: '<ACTION>', // optional
image: '<ID1:ID2>', // optional
icon: '<ICON>', // optional
sound: '<SOUND>', // optional
color: '<COLOR>', // optional
tag: '<TAG>', // optional
badge: 1, // optional
draft: false, // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
contentAvailable: false, // optional
critical: false, // optional
priority: MessagePriority.Normal, // optional
channelId: '<CHANNEL_ID>', // optional
});

Create SMS

POST /messaging/messages/sms · method page

SDK: @owbase/node only

Create a new SMS message.

Parameter Type Required Description
messageId string yes Message ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
content string yes SMS Content.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
draft boolean no Is message a draft
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.

Access: API key with the messages.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createSMS({
messageId: '<MESSAGE_ID>',
content: '<CONTENT>',
topics: [], // optional
users: [], // optional
targets: [], // optional
draft: false, // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
});

Create SMS

POST /messaging/messages/sms · method page

SDK: @owbase/node only

Create a new SMS message.

Parameter Type Required Description
messageId string yes Message ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
content string yes SMS Content.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
draft boolean no Is message a draft
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.

Access: API key with the messages.write scope.

No example of its own: see the one for the method that replaces it.

Update SMS

PATCH /messaging/messages/sms/{messageId} · method page

SDK: @owbase/node only

Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.

Parameter Type Required Description
messageId string yes Message ID.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
content string no Email Content.
draft boolean no Is message a draft
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.

Access: API key with the messages.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateSMS({
messageId: '<MESSAGE_ID>',
topics: [], // optional
users: [], // optional
targets: [], // optional
content: '<CONTENT>', // optional
draft: false, // optional
scheduledAt: '2020-10-15T06:38:00.000+00:00', // optional
});

Update SMS

PATCH /messaging/messages/sms/{messageId} · method page

SDK: @owbase/node only

Update an SMS message by its unique ID. This endpoint only works on messages that are in draft status. Messages that are already processing, sent, or failed cannot be updated.

Parameter Type Required Description
messageId string yes Message ID.
topics string[] no List of Topic IDs.
users string[] no List of User IDs.
targets string[] no List of Targets IDs.
content string no Email Content.
draft boolean no Is message a draft
scheduledAt string no Scheduled delivery time for message in ISO 8601 format. DateTime value must be in future.

Access: API key with the messages.write scope.

No example of its own: see the one for the method that replaces it.

Get message

GET /messaging/messages/{messageId} · method page

SDK: @owbase/node only

Get a message by its unique ID.

Parameter Type Required Description
messageId string yes Message ID.

Access: API key with the messages.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.getMessage({
messageId: '<MESSAGE_ID>',
});

Delete message

DELETE /messaging/messages/{messageId} · method page

SDK: @owbase/node only

Delete a message. If the message is not a draft or scheduled, but has been sent, this will not recall the message.

Parameter Type Required Description
messageId string yes Message ID.

Access: API key with the messages.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.delete({
messageId: '<MESSAGE_ID>',
});

List message targets

GET /messaging/messages/{messageId}/targets · method page

SDK: @owbase/node only

Get a list of the targets associated with a message.

Parameter Type Required Description
messageId string yes Message ID.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: userId, providerId, identifier, providerType
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the messages.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.listTargets({
messageId: '<MESSAGE_ID>',
queries: [], // optional
total: false, // optional
});

List providers

GET /messaging/providers · method page

SDK: @owbase/node only

Get a list of all providers from the current Owbase project.

Parameter Type Required Description
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, provider, type, enabled
search string no Search term to filter your list results. Max length: 256 chars.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the providers.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.listProviders({
queries: [], // optional
search: '<SEARCH>', // optional
total: false, // optional
});

Create APNS provider

POST /messaging/providers/apns · method page

SDK: @owbase/node only

Create a new Apple Push Notification service provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
authKey string no APNS authentication key.
authKeyId string no APNS authentication key ID.
teamId string no APNS team ID.
bundleId string no APNS bundle ID.
sandbox boolean no Use APNS sandbox environment.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createAPNSProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
authKey: '<AUTH_KEY>', // optional
authKeyId: '<AUTH_KEY_ID>', // optional
teamId: '<TEAM_ID>', // optional
bundleId: '<BUNDLE_ID>', // optional
sandbox: false, // optional
enabled: false, // optional
});

Create APNS provider

POST /messaging/providers/apns · method page

SDK: @owbase/node only

Create a new Apple Push Notification service provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
authKey string no APNS authentication key.
authKeyId string no APNS authentication key ID.
teamId string no APNS team ID.
bundleId string no APNS bundle ID.
sandbox boolean no Use APNS sandbox environment.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

No example of its own: see the one for the method that replaces it.

Update APNS provider

PATCH /messaging/providers/apns/{providerId} · method page

SDK: @owbase/node only

Update a Apple Push Notification service provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
authKey string no APNS authentication key.
authKeyId string no APNS authentication key ID.
teamId string no APNS team ID.
bundleId string no APNS bundle ID.
sandbox boolean no Use APNS sandbox environment.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateAPNSProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
authKey: '<AUTH_KEY>', // optional
authKeyId: '<AUTH_KEY_ID>', // optional
teamId: '<TEAM_ID>', // optional
bundleId: '<BUNDLE_ID>', // optional
sandbox: false, // optional
});

Update APNS provider

PATCH /messaging/providers/apns/{providerId} · method page

SDK: @owbase/node only

Update a Apple Push Notification service provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
authKey string no APNS authentication key.
authKeyId string no APNS authentication key ID.
teamId string no APNS team ID.
bundleId string no APNS bundle ID.
sandbox boolean no Use APNS sandbox environment.

Access: API key with the providers.write scope.

No example of its own: see the one for the method that replaces it.

Create FCM provider

POST /messaging/providers/fcm · method page

SDK: @owbase/node only

Create a new Firebase Cloud Messaging provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
serviceAccountJSON object no FCM service account JSON.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createFCMProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
serviceAccountJSON: {}, // optional
enabled: false, // optional
});

Create FCM provider

POST /messaging/providers/fcm · method page

SDK: @owbase/node only

Create a new Firebase Cloud Messaging provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
serviceAccountJSON object no FCM service account JSON.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

No example of its own: see the one for the method that replaces it.

Update FCM provider

PATCH /messaging/providers/fcm/{providerId} · method page

SDK: @owbase/node only

Update a Firebase Cloud Messaging provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
serviceAccountJSON object no FCM service account JSON.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateFCMProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
serviceAccountJSON: {}, // optional
});

Update FCM provider

PATCH /messaging/providers/fcm/{providerId} · method page

SDK: @owbase/node only

Update a Firebase Cloud Messaging provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
serviceAccountJSON object no FCM service account JSON.

Access: API key with the providers.write scope.

No example of its own: see the one for the method that replaces it.

Create Mailgun provider

POST /messaging/providers/mailgun · method page

SDK: @owbase/node only

Create a new Mailgun provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
apiKey string no Mailgun API Key.
domain string no Mailgun Domain.
isEuRegion boolean no Set as EU region.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the reply to field for the mail. Default value is sender name. Reply to name must have reply to email as well.
replyToEmail string no Email set in the reply to field for the mail. Default value is sender email. Reply to email must have reply to name as well.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createMailgunProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
apiKey: '<API_KEY>', // optional
domain: 'example.com', // optional
isEuRegion: false, // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '[email protected]', // optional
enabled: false, // optional
});

Update Mailgun provider

PATCH /messaging/providers/mailgun/{providerId} · method page

SDK: @owbase/node only

Update a Mailgun provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
apiKey string no Mailgun API Key.
domain string no Mailgun Domain.
isEuRegion boolean no Set as EU region.
enabled boolean no Set as enabled.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the reply to field for the mail. Default value is sender name.
replyToEmail string no Email set in the reply to field for the mail. Default value is sender email.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateMailgunProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
apiKey: '<API_KEY>', // optional
domain: 'example.com', // optional
isEuRegion: false, // optional
enabled: false, // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '<REPLY_TO_EMAIL>', // optional
});

Create Msg91 provider

POST /messaging/providers/msg91 · method page

SDK: @owbase/node only

Create a new MSG91 provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
templateId string no Msg91 template ID
senderId string no Msg91 sender ID.
authKey string no Msg91 auth key.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createMsg91Provider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
templateId: '<TEMPLATE_ID>', // optional
senderId: '<SENDER_ID>', // optional
authKey: '<AUTH_KEY>', // optional
enabled: false, // optional
});

Update Msg91 provider

PATCH /messaging/providers/msg91/{providerId} · method page

SDK: @owbase/node only

Update a MSG91 provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
templateId string no Msg91 template ID.
senderId string no Msg91 sender ID.
authKey string no Msg91 auth key.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateMsg91Provider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
templateId: '<TEMPLATE_ID>', // optional
senderId: '<SENDER_ID>', // optional
authKey: '<AUTH_KEY>', // optional
});

Create Resend provider

POST /messaging/providers/resend · method page

SDK: @owbase/node only

Create a new Resend provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
apiKey string no Resend API key.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the reply to field for the mail. Default value is sender name.
replyToEmail string no Email set in the reply to field for the mail. Default value is sender email.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createResendProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
apiKey: '<API_KEY>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '[email protected]', // optional
enabled: false, // optional
});

Update Resend provider

PATCH /messaging/providers/resend/{providerId} · method page

SDK: @owbase/node only

Update a Resend provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
apiKey string no Resend API key.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the Reply To field for the mail. Default value is Sender Name.
replyToEmail string no Email set in the Reply To field for the mail. Default value is Sender Email.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateResendProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
apiKey: '<API_KEY>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '<REPLY_TO_EMAIL>', // optional
});

Create Sendgrid provider

POST /messaging/providers/sendgrid · method page

SDK: @owbase/node only

Create a new Sendgrid provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
apiKey string no Sendgrid API key.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the reply to field for the mail. Default value is sender name.
replyToEmail string no Email set in the reply to field for the mail. Default value is sender email.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createSendgridProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
apiKey: '<API_KEY>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '[email protected]', // optional
enabled: false, // optional
});

Update Sendgrid provider

PATCH /messaging/providers/sendgrid/{providerId} · method page

SDK: @owbase/node only

Update a Sendgrid provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
apiKey string no Sendgrid API key.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the Reply To field for the mail. Default value is Sender Name.
replyToEmail string no Email set in the Reply To field for the mail. Default value is Sender Email.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateSendgridProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
apiKey: '<API_KEY>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '<REPLY_TO_EMAIL>', // optional
});

Create Amazon SES provider

POST /messaging/providers/ses · method page

SDK: @owbase/node only

Create a new Amazon SES provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
accessKey string no AWS access key ID.
secretKey string no AWS secret access key.
region string no AWS region, for example us-east-1.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the reply to field for the mail. Default value is sender name.
replyToEmail string no Email set in the reply to field for the mail. Default value is sender email.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createSesProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
accessKey: '<ACCESS_KEY>', // optional
secretKey: '<SECRET_KEY>', // optional
region: '<REGION>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '[email protected]', // optional
enabled: false, // optional
});

Update Amazon SES provider

PATCH /messaging/providers/ses/{providerId} · method page

SDK: @owbase/node only

Update an Amazon SES provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
accessKey string no AWS access key ID.
secretKey string no AWS secret access key.
region string no AWS region, for example us-east-1.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the Reply To field for the mail. Default value is Sender Name.
replyToEmail string no Email set in the Reply To field for the mail. Default value is Sender Email.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateSesProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
accessKey: '<ACCESS_KEY>', // optional
secretKey: '<SECRET_KEY>', // optional
region: '<REGION>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '<REPLY_TO_EMAIL>', // optional
});

Create SMTP provider

POST /messaging/providers/smtp · method page

SDK: @owbase/node only

Create a new SMTP provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
host string yes SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as smtp1.example.com:25;smtp2.example.com. You can also specify encryption type, for example: tls://smtp1.example.com:587;ssl://smtp2.example.com:465". Hosts will be tried in order.
port number no The default SMTP server port.
username string no Authentication username.
password string no Authentication password.
encryption SmtpEncryption no Encryption type. Can be omitted, ‘ssl’, or ‘tls’ Values: none, ssl, tls.
autoTLS boolean no Enable SMTP AutoTLS feature.
mailer string no The value to use for the X-Mailer header.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the reply to field for the mail. Default value is sender name.
replyToEmail string no Email set in the reply to field for the mail. Default value is sender email.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging, SmtpEncryption } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createSMTPProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
host: '<HOST>',
port: 587, // optional
username: '<USERNAME>', // optional
password: 'password', // optional
encryption: SmtpEncryption.None, // optional
autoTLS: false, // optional
mailer: '<MAILER>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '[email protected]', // optional
enabled: false, // optional
});

Create SMTP provider

POST /messaging/providers/smtp · method page

SDK: @owbase/node only

Create a new SMTP provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
host string yes SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as smtp1.example.com:25;smtp2.example.com. You can also specify encryption type, for example: tls://smtp1.example.com:587;ssl://smtp2.example.com:465". Hosts will be tried in order.
port number no The default SMTP server port.
username string no Authentication username.
password string no Authentication password.
encryption SmtpEncryption no Encryption type. Can be omitted, ‘ssl’, or ‘tls’ Values: none, ssl, tls.
autoTLS boolean no Enable SMTP AutoTLS feature.
mailer string no The value to use for the X-Mailer header.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the reply to field for the mail. Default value is sender name.
replyToEmail string no Email set in the reply to field for the mail. Default value is sender email.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

No example of its own: see the one for the method that replaces it.

Update SMTP provider

PATCH /messaging/providers/smtp/{providerId} · method page

SDK: @owbase/node only

Update a SMTP provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
host string no SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as smtp1.example.com:25;smtp2.example.com. You can also specify encryption type, for example: tls://smtp1.example.com:587;ssl://smtp2.example.com:465". Hosts will be tried in order.
port number no SMTP port.
username string no Authentication username.
password string no Authentication password.
encryption SmtpEncryption no Encryption type. Can be ‘ssl’ or ‘tls’ Values: none, ssl, tls.
autoTLS boolean no Enable SMTP AutoTLS feature.
mailer string no The value to use for the X-Mailer header.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the Reply To field for the mail. Default value is Sender Name.
replyToEmail string no Email set in the Reply To field for the mail. Default value is Sender Email.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging, SmtpEncryption } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateSMTPProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
host: '<HOST>', // optional
port: 1, // optional
username: '<USERNAME>', // optional
password: 'password', // optional
encryption: SmtpEncryption.None, // optional
autoTLS: false, // optional
mailer: '<MAILER>', // optional
fromName: '<FROM_NAME>', // optional
fromEmail: '[email protected]', // optional
replyToName: '<REPLY_TO_NAME>', // optional
replyToEmail: '<REPLY_TO_EMAIL>', // optional
enabled: false, // optional
});

Update SMTP provider

PATCH /messaging/providers/smtp/{providerId} · method page

SDK: @owbase/node only

Update a SMTP provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
host string no SMTP hosts. Either a single hostname or multiple semicolon-delimited hostnames. You can also specify a different port for each host such as smtp1.example.com:25;smtp2.example.com. You can also specify encryption type, for example: tls://smtp1.example.com:587;ssl://smtp2.example.com:465". Hosts will be tried in order.
port number no SMTP port.
username string no Authentication username.
password string no Authentication password.
encryption SmtpEncryption no Encryption type. Can be ‘ssl’ or ‘tls’ Values: none, ssl, tls.
autoTLS boolean no Enable SMTP AutoTLS feature.
mailer string no The value to use for the X-Mailer header.
fromName string no Sender Name.
fromEmail string no Sender email address.
replyToName string no Name set in the Reply To field for the mail. Default value is Sender Name.
replyToEmail string no Email set in the Reply To field for the mail. Default value is Sender Email.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

No example of its own: see the one for the method that replaces it.

Create Telesign provider

POST /messaging/providers/telesign · method page

SDK: @owbase/node only

Create a new Telesign provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
from string no Sender Phone number. Format this number with a leading ‘+’ and a country code, e.g., +16175551212.
customerId string no Telesign customer ID.
apiKey string no Telesign API key.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createTelesignProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
from: '+12065550100', // optional
customerId: '<CUSTOMER_ID>', // optional
apiKey: '<API_KEY>', // optional
enabled: false, // optional
});

Update Telesign provider

PATCH /messaging/providers/telesign/{providerId} · method page

SDK: @owbase/node only

Update a Telesign provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
customerId string no Telesign customer ID.
apiKey string no Telesign API key.
from string no Sender number.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateTelesignProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
customerId: '<CUSTOMER_ID>', // optional
apiKey: '<API_KEY>', // optional
from: '<FROM>', // optional
});

Create Textmagic provider

POST /messaging/providers/textmagic · method page

SDK: @owbase/node only

Create a new Textmagic provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
from string no Sender Phone number. Format this number with a leading ‘+’ and a country code, e.g., +16175551212.
username string no Textmagic username.
apiKey string no Textmagic apiKey.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createTextmagicProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
from: '+12065550100', // optional
username: '<USERNAME>', // optional
apiKey: '<API_KEY>', // optional
enabled: false, // optional
});

Update Textmagic provider

PATCH /messaging/providers/textmagic/{providerId} · method page

SDK: @owbase/node only

Update a Textmagic provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
username string no Textmagic username.
apiKey string no Textmagic apiKey.
from string no Sender number.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateTextmagicProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
username: '<USERNAME>', // optional
apiKey: '<API_KEY>', // optional
from: '<FROM>', // optional
});

Create Twilio provider

POST /messaging/providers/twilio · method page

SDK: @owbase/node only

Create a new Twilio provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
from string no Sender phone number or alphanumeric sender ID. Format phone numbers with a leading ‘+’ and a country code, e.g., +16175551212.
accountSid string no Twilio account secret ID.
authToken string no Twilio authentication token.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createTwilioProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
from: '<FROM>', // optional
accountSid: '<ACCOUNT_SID>', // optional
authToken: '<AUTH_TOKEN>', // optional
enabled: false, // optional
});

Update Twilio provider

PATCH /messaging/providers/twilio/{providerId} · method page

SDK: @owbase/node only

Update a Twilio provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
accountSid string no Twilio account secret ID.
authToken string no Twilio authentication token.
from string no Sender phone number or alphanumeric sender ID. Format phone numbers with a leading ‘+’ and a country code, e.g., +16175551212.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateTwilioProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
accountSid: '<ACCOUNT_SID>', // optional
authToken: '<AUTH_TOKEN>', // optional
from: '<FROM>', // optional
});

Create Vonage provider

POST /messaging/providers/vonage · method page

SDK: @owbase/node only

Create a new Vonage provider.

Parameter Type Required Description
providerId string yes Provider ID. Choose a custom ID or generate a random ID with ID.unique(). Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can’t start with a special char. Max length is 36 chars.
name string yes Provider name.
from string no Sender Phone number. Format this number with a leading ‘+’ and a country code, e.g., +16175551212.
apiKey string no Vonage API key.
apiSecret string no Vonage API secret.
enabled boolean no Set as enabled.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createVonageProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>',
from: '+12065550100', // optional
apiKey: '<API_KEY>', // optional
apiSecret: '<API_SECRET>', // optional
enabled: false, // optional
});

Update Vonage provider

PATCH /messaging/providers/vonage/{providerId} · method page

SDK: @owbase/node only

Update a Vonage provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
apiKey string no Vonage API key.
apiSecret string no Vonage API secret.
from string no Sender number.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateVonageProvider({
providerId: '<PROVIDER_ID>',
name: '<NAME>', // optional
enabled: false, // optional
apiKey: '<API_KEY>', // optional
apiSecret: '<API_SECRET>', // optional
from: '<FROM>', // optional
});

Get provider

GET /messaging/providers/{providerId} · method page

SDK: @owbase/node only

Get a provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.

Access: API key with the providers.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.getProvider({
providerId: '<PROVIDER_ID>',
});

Delete provider

DELETE /messaging/providers/{providerId} · method page

SDK: @owbase/node only

Delete a provider by its unique ID.

Parameter Type Required Description
providerId string yes Provider ID.

Access: API key with the providers.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.deleteProvider({
providerId: '<PROVIDER_ID>',
});

List topics

GET /messaging/topics · method page

SDK: @owbase/node only

Get a list of all topics from the current Owbase project.

Parameter Type Required Description
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: name, description, emailTotal, smsTotal, pushTotal
search string no Search term to filter your list results. Max length: 256 chars.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the topics.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.listTopics({
queries: [], // optional
search: '<SEARCH>', // optional
total: false, // optional
});

Create topic

POST /messaging/topics · method page

SDK: @owbase/node only

Create a new topic.

Parameter Type Required Description
topicId string yes Topic ID. Choose a custom Topic ID or a new Topic ID.
name string yes Topic Name.
subscribe string[] no An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. learn more about roles. Maximum of 100 roles are allowed, each 64 characters long.
qos number no MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.
expiry number no Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project’s enabled Owbase providers, or the 7-day ledger window if none sets one.
description string no Optional description for the topic.

Access: API key with the topics.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.createTopic({
topicId: '<TOPIC_ID>',
name: '<NAME>',
subscribe: ['any'], // optional
qos: 0, // optional
expiry: 0, // optional
description: '<DESCRIPTION>', // optional
});

Get topic

GET /messaging/topics/{topicId} · method page

SDK: @owbase/node only

Get a topic by its unique ID.

Parameter Type Required Description
topicId string yes Topic ID.

Access: API key with the topics.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.getTopic({
topicId: '<TOPIC_ID>',
});

Update topic

PATCH /messaging/topics/{topicId} · method page

SDK: @owbase/node only

Update a topic by its unique ID.

Parameter Type Required Description
topicId string yes Topic ID.
name string no Topic Name.
subscribe string[] no An array of role strings with subscribe permission. By default all users are granted with any subscribe permission. learn more about roles. Maximum of 100 roles are allowed, each 64 characters long.
qos number no MQTT delivery quality of service for this topic. 0 is fire-and-forget (delivered only to clients connected at publish time). 1 persists each message and replays it when a client reconnects without having acknowledged it. Null lets the subscriber choose.
expiry number no Message retention in seconds for offline delivery. Max 7 days (604800). Null inherits the lowest expiry of the project’s enabled Owbase providers, or the 7-day ledger window if none sets one.
description string no Optional description for the topic.

Access: API key with the topics.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.updateTopic({
topicId: '<TOPIC_ID>',
name: '<NAME>', // optional
subscribe: ['any'], // optional
qos: 0, // optional
expiry: 0, // optional
description: '<DESCRIPTION>', // optional
});

Delete topic

DELETE /messaging/topics/{topicId} · method page

SDK: @owbase/node only

Delete a topic by its unique ID.

Parameter Type Required Description
topicId string yes Topic ID.

Access: API key with the topics.write scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.deleteTopic({
topicId: '<TOPIC_ID>',
});

List subscribers

GET /messaging/topics/{topicId}/subscribers · method page

SDK: @owbase/node only

Get a list of all subscribers from the current Owbase project.

Parameter Type Required Description
topicId string yes Topic ID. The topic ID subscribed to.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType
search string no Search term to filter your list results. Max length: 256 chars.
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Access: API key with the subscribers.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.listSubscribers({
topicId: '<TOPIC_ID>',
queries: [], // optional
search: '<SEARCH>', // optional
total: false, // optional
});

Create subscriber

POST /messaging/topics/{topicId}/subscribers · method page

SDK: @owbase/web and @owbase/node

Create a new subscriber.

Parameter Type Required Description
topicId string yes Topic ID. The topic ID to subscribe to.
subscriberId string yes Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.
targetId string yes Target ID. The target ID to link to the specified Topic ID.

Access: API key with the subscribers.write scope or user session (the resource’s permissions apply).

@owbase/web
import { Client, Messaging } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const messaging = new Messaging(client);
const result = await messaging.createSubscriber({
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
targetId: '<TARGET_ID>',
});
console.log(result);
@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
const messaging = new Messaging(client);
const result = await messaging.createSubscriber({
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
targetId: '<TARGET_ID>',
});

Get subscriber

GET /messaging/topics/{topicId}/subscribers/{subscriberId} · method page

SDK: @owbase/node only

Get a subscriber by its unique ID.

Parameter Type Required Description
topicId string yes Topic ID. The topic ID subscribed to.
subscriberId string yes Subscriber ID.

Access: API key with the subscribers.read scope.

@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const messaging = new Messaging(client);
const result = await messaging.getSubscriber({
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
});

Delete subscriber

DELETE /messaging/topics/{topicId}/subscribers/{subscriberId} · method page

SDK: @owbase/web and @owbase/node

Delete a subscriber by its unique ID.

Parameter Type Required Description
topicId string yes Topic ID. The topic ID subscribed to.
subscriberId string yes Subscriber ID.

Access: API key with the subscribers.write scope or user session (the resource’s permissions apply).

@owbase/web
import { Client, Messaging } from '@owbase/web';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>'); // Your project ID
const messaging = new Messaging(client);
const result = await messaging.deleteSubscriber({
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
});
console.log(result);
@owbase/node
import { Client, Messaging } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setJWT('<YOUR_JWT>'); // Your secret JSON Web Token
const messaging = new Messaging(client);
const result = await messaging.deleteSubscriber({
topicId: '<TOPIC_ID>',
subscriberId: '<SUBSCRIBER_ID>',
});

The descriptions on this page come from the server API specification (BSD-3-Clause license), and the examples come from the SDK generator (MIT license). The full notices are in the NOTICE file of the @owbase/web and @owbase/node packages.

Was this page helpful?