Ir al contenido
v2.7

Messaging

Mensajería: proveedores de correo, SMS y push, tópicos, suscriptores y envío de correo, SMS y push.

Mensajería: proveedores de correo, SMS y push, tópicos, suscriptores y envío de correo, SMS y push.

Clase Messaging: 54 métodos (2 en @owbase/web, 54 en @owbase/node). Las descripciones de los métodos están en inglés. Los ejemplos usan la forma de objeto de los parámetros; cambia los valores entre < y > por los tuyos.

Listar mensajes

GET /messaging/messages · página del método

SDK: solo @owbase/node

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

Parámetro Tipo Obligatorio Descripción
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.

Acceso: clave de API con el alcance messages.read.

@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
});

Crear correo electrónico

POST /messaging/messages/email · página del método

SDK: solo @owbase/node

Create a new email message.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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 sí Email Subject.
content string sí 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.

Acceso: clave de API con el alcance messages.write.

@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
});

Actualizar correo electrónico

PATCH /messaging/messages/email/{messageId} · página del método

SDK: solo @owbase/node

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.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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.

Acceso: clave de API con el alcance messages.write.

@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
});

Crear notificación push

POST /messaging/messages/push · página del método

SDK: solo @owbase/node

Create a new push notification.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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. Valores: 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.

Acceso: clave de API con el alcance messages.write.

@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
});

Actualizar notificación push

PATCH /messaging/messages/push/{messageId} · página del método

SDK: solo @owbase/node

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.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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. Valores: 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.

Acceso: clave de API con el alcance messages.write.

@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
});

Crear SMS

POST /messaging/messages/sms · página del método

SDK: solo @owbase/node

Create a new SMS message.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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 sí 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.

Acceso: clave de API con el alcance messages.write.

@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
});

Crear SMS

POST /messaging/messages/sms · página del método

SDK: solo @owbase/node

Create a new SMS message.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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 sí 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.

Acceso: clave de API con el alcance messages.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Actualizar SMS

PATCH /messaging/messages/sms/{messageId} · página del método

SDK: solo @owbase/node

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.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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.

Acceso: clave de API con el alcance messages.write.

@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
});

Actualizar SMS

PATCH /messaging/messages/sms/{messageId} · página del método

SDK: solo @owbase/node

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.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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.

Acceso: clave de API con el alcance messages.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Obtener mensaje

GET /messaging/messages/{messageId} · página del método

SDK: solo @owbase/node

Get a message by its unique ID.

Parámetro Tipo Obligatorio Descripción
messageId string sí Message ID.

Acceso: clave de API con el alcance messages.read.

@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>',
});

Eliminar mensaje

DELETE /messaging/messages/{messageId} · página del método

SDK: solo @owbase/node

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

Parámetro Tipo Obligatorio Descripción
messageId string sí Message ID.

Acceso: clave de API con el alcance messages.write.

@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>',
});

Listar destinos del mensaje

GET /messaging/messages/{messageId}/targets · página del método

SDK: solo @owbase/node

Get a list of the targets associated with a message.

Parámetro Tipo Obligatorio Descripción
messageId string sí 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.

Acceso: clave de API con el alcance messages.read.

@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
});

Listar proveedores

GET /messaging/providers · página del método

SDK: solo @owbase/node

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

Parámetro Tipo Obligatorio Descripción
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.

Acceso: clave de API con el alcance providers.read.

@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
});

Crear proveedor APNS

POST /messaging/providers/apns · página del método

SDK: solo @owbase/node

Create a new Apple Push Notification service provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor APNS

POST /messaging/providers/apns · página del método

SDK: solo @owbase/node

Create a new Apple Push Notification service provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Actualizar proveedor APNS

PATCH /messaging/providers/apns/{providerId} · página del método

SDK: solo @owbase/node

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

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor APNS

PATCH /messaging/providers/apns/{providerId} · página del método

SDK: solo @owbase/node

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

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Crear proveedor FCM

POST /messaging/providers/fcm · página del método

SDK: solo @owbase/node

Create a new Firebase Cloud Messaging provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí Provider name.
serviceAccountJSON object no FCM service account JSON.
enabled boolean no Set as enabled.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor FCM

POST /messaging/providers/fcm · página del método

SDK: solo @owbase/node

Create a new Firebase Cloud Messaging provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí Provider name.
serviceAccountJSON object no FCM service account JSON.
enabled boolean no Set as enabled.

Acceso: clave de API con el alcance providers.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Actualizar proveedor FCM

PATCH /messaging/providers/fcm/{providerId} · página del método

SDK: solo @owbase/node

Update a Firebase Cloud Messaging provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
serviceAccountJSON object no FCM service account JSON.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor FCM

PATCH /messaging/providers/fcm/{providerId} · página del método

SDK: solo @owbase/node

Update a Firebase Cloud Messaging provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí Provider ID.
name string no Provider name.
enabled boolean no Set as enabled.
serviceAccountJSON object no FCM service account JSON.

Acceso: clave de API con el alcance providers.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Crear proveedor Mailgun

POST /messaging/providers/mailgun · página del método

SDK: solo @owbase/node

Create a new Mailgun provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Mailgun

PATCH /messaging/providers/mailgun/{providerId} · página del método

SDK: solo @owbase/node

Update a Mailgun provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor Msg91

POST /messaging/providers/msg91 · página del método

SDK: solo @owbase/node

Create a new MSG91 provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Msg91

PATCH /messaging/providers/msg91/{providerId} · página del método

SDK: solo @owbase/node

Update a MSG91 provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor Resend

POST /messaging/providers/resend · página del método

SDK: solo @owbase/node

Create a new Resend provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Resend

PATCH /messaging/providers/resend/{providerId} · página del método

SDK: solo @owbase/node

Update a Resend provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor Sendgrid

POST /messaging/providers/sendgrid · página del método

SDK: solo @owbase/node

Create a new Sendgrid provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Sendgrid

PATCH /messaging/providers/sendgrid/{providerId} · página del método

SDK: solo @owbase/node

Update a Sendgrid provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor Amazon SES

POST /messaging/providers/ses · página del método

SDK: solo @owbase/node

Create a new Amazon SES provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Amazon SES

PATCH /messaging/providers/ses/{providerId} · página del método

SDK: solo @owbase/node

Update an Amazon SES provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor SMTP

POST /messaging/providers/smtp · página del método

SDK: solo @owbase/node

Create a new SMTP provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí Provider name.
host string sí 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’ Valores: 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor SMTP

POST /messaging/providers/smtp · página del método

SDK: solo @owbase/node

Create a new SMTP provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí Provider name.
host string sí 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’ Valores: 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.

Acceso: clave de API con el alcance providers.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Actualizar proveedor SMTP

PATCH /messaging/providers/smtp/{providerId} · página del método

SDK: solo @owbase/node

Update a SMTP provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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’ Valores: 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor SMTP

PATCH /messaging/providers/smtp/{providerId} · página del método

SDK: solo @owbase/node

Update a SMTP provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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’ Valores: 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.

Acceso: clave de API con el alcance providers.write.

Sin ejemplo propio: consulta el del método que lo reemplaza.

Crear proveedor Telesign

POST /messaging/providers/telesign · página del método

SDK: solo @owbase/node

Create a new Telesign provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Telesign

PATCH /messaging/providers/telesign/{providerId} · página del método

SDK: solo @owbase/node

Update a Telesign provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor Textmagic

POST /messaging/providers/textmagic · página del método

SDK: solo @owbase/node

Create a new Textmagic provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Textmagic

PATCH /messaging/providers/textmagic/{providerId} · página del método

SDK: solo @owbase/node

Update a Textmagic provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor Twilio

POST /messaging/providers/twilio · página del método

SDK: solo @owbase/node

Create a new Twilio provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Twilio

PATCH /messaging/providers/twilio/{providerId} · página del método

SDK: solo @owbase/node

Update a Twilio provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Crear proveedor Vonage

POST /messaging/providers/vonage · página del método

SDK: solo @owbase/node

Create a new Vonage provider.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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 sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Actualizar proveedor Vonage

PATCH /messaging/providers/vonage/{providerId} · página del método

SDK: solo @owbase/node

Update a Vonage provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí 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.

Acceso: clave de API con el alcance providers.write.

@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
});

Obtener proveedor

GET /messaging/providers/{providerId} · página del método

SDK: solo @owbase/node

Get a provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí Provider ID.

Acceso: clave de API con el alcance providers.read.

@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>',
});

Eliminar proveedor

DELETE /messaging/providers/{providerId} · página del método

SDK: solo @owbase/node

Delete a provider by its unique ID.

Parámetro Tipo Obligatorio Descripción
providerId string sí Provider ID.

Acceso: clave de API con el alcance providers.write.

@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>',
});

Listar tópicos

GET /messaging/topics · página del método

SDK: solo @owbase/node

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

Parámetro Tipo Obligatorio Descripción
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.

Acceso: clave de API con el alcance topics.read.

@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
});

Crear tópico

POST /messaging/topics · página del método

SDK: solo @owbase/node

Create a new topic.

Parámetro Tipo Obligatorio Descripción
topicId string sí Topic ID. Choose a custom Topic ID or a new Topic ID.
name string sí 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.

Acceso: clave de API con el alcance topics.write.

@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
});

Obtener tópico

GET /messaging/topics/{topicId} · página del método

SDK: solo @owbase/node

Get a topic by its unique ID.

Parámetro Tipo Obligatorio Descripción
topicId string sí Topic ID.

Acceso: clave de API con el alcance topics.read.

@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>',
});

Actualizar tópico

PATCH /messaging/topics/{topicId} · página del método

SDK: solo @owbase/node

Update a topic by its unique ID.

Parámetro Tipo Obligatorio Descripción
topicId string sí 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.

Acceso: clave de API con el alcance topics.write.

@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
});

Eliminar tópico

DELETE /messaging/topics/{topicId} · página del método

SDK: solo @owbase/node

Delete a topic by its unique ID.

Parámetro Tipo Obligatorio Descripción
topicId string sí Topic ID.

Acceso: clave de API con el alcance topics.write.

@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>',
});

Listar suscriptores

GET /messaging/topics/{topicId}/subscribers · página del método

SDK: solo @owbase/node

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

Parámetro Tipo Obligatorio Descripción
topicId string sí 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.

Acceso: clave de API con el alcance subscribers.read.

@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
});

Crear suscriptor

POST /messaging/topics/{topicId}/subscribers · página del método

SDK: @owbase/web y @owbase/node

Create a new subscriber.

Parámetro Tipo Obligatorio Descripción
topicId string sí Topic ID. The topic ID to subscribe to.
subscriberId string sí Subscriber ID. Choose a custom Subscriber ID or a new Subscriber ID.
targetId string sí Target ID. The target ID to link to the specified Topic ID.

Acceso: clave de API con el alcance subscribers.write o sesión del usuario (vale lo que permitan los permisos del recurso).

@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>',
});

Obtener suscriptor

GET /messaging/topics/{topicId}/subscribers/{subscriberId} · página del método

SDK: solo @owbase/node

Get a subscriber by its unique ID.

Parámetro Tipo Obligatorio Descripción
topicId string sí Topic ID. The topic ID subscribed to.
subscriberId string sí Subscriber ID.

Acceso: clave de API con el alcance subscribers.read.

@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>',
});

Eliminar suscriptor

DELETE /messaging/topics/{topicId}/subscribers/{subscriberId} · página del método

SDK: @owbase/web y @owbase/node

Delete a subscriber by its unique ID.

Parámetro Tipo Obligatorio Descripción
topicId string sí Topic ID. The topic ID subscribed to.
subscriberId string sí Subscriber ID.

Acceso: clave de API con el alcance subscribers.write o sesión del usuario (vale lo que permitan los permisos del recurso).

@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>',
});

Las descripciones de esta página vienen de la especificación de la API del servidor (licencia BSD-3-Clause), en inglés, y los ejemplos vienen del generador de SDKs (licencia MIT). Los avisos completos están en el archivo NOTICE de los paquetes @owbase/web y @owbase/node.

¿Te ayudó esta página?