Java SDK
Setup & Initialization
- Add the Pingram dependency (Maven). Use the latest version on Maven Central:
<dependency>
<groupId>io.pingram</groupId>
<artifactId>pingram</artifactId>
<version>1.0.0</version>
</dependency>
Or with Gradle:
implementation 'io.pingram:pingram:1.0.0'
- Create the Pingram client with your API key:
import io.pingram.Pingram;
Pingram client = new Pingram("YOUR_API_KEY");
| Name | Type | Description |
|---|---|---|
apiKey* | string | Your Pingram API key. You can get it from your dashboard under Environments. |
baseUrl | string | Optional. Use new Pingram(apiKey, "https://api.eu.pingram.io") or new Pingram(apiKey, Pingram.Region.EU) for EU/CA. |
* required
Region example:
// EU or CA region
Pingram client = new Pingram("YOUR_API_KEY", Pingram.Region.EU);
Send
send()
Send a notification
SenderPostBody senderPostBody = new SenderPostBody(); // SenderPostBody |
try {
SenderPostResponse result = client.send(senderPostBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#send: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
type | string | |
to | object | |
to.id | string | |
to.email | string | |
to.number | string | |
to.pushTokens | object[] | |
to.pushTokens[].type | ”FCM” | “APN” | (required) |
to.pushTokens[].token | string | (required) |
to.pushTokens[].device | object | (required) |
to.pushTokens[].device.app_id | string | |
to.pushTokens[].device.ad_id | string | |
to.pushTokens[].device.device_id | string | (required) |
to.pushTokens[].device.platform | string | |
to.pushTokens[].device.manufacturer | string | |
to.pushTokens[].device.model | string | |
to.pushTokens[].environment | string | used by APN to differentiate between sandbox and production builds (sandbox/undefined or production) |
to.webPushTokens | object[] | |
to.webPushTokens[].sub | object | (required) Configuration for a Push Subscription. This can be obtained on the frontend by calling serviceWorkerRegistration.pushManager.subscribe(). The expected format is the same output as JSON.stringify’ing a PushSubscription in the browser. |
to.webPushTokens[].sub.endpoint | string | (required) |
to.webPushTokens[].sub.keys | object | (required) |
to.webPushTokens[].sub.keys.p256dh | string | (required) |
to.webPushTokens[].sub.keys.auth | string | (required) |
to.timezone | string | |
to.slackChannel | string | The destination channel of slack notifications sent to this user. Can be either of the following: - Channel name, e.g. “test” - Channel name with # prefix, e.g. “#test” - Channel ID, e.g. “C1234567890” - User ID for DM, e.g. “U1234567890” - Username with @ prefix, e.g. “@test” |
to.slackToken | object | |
to.slackToken.access_token | string | |
to.slackToken.app_id | string | |
to.slackToken.authed_user | object | |
to.slackToken.authed_user.access_token | string | |
to.slackToken.authed_user.expires_in | number | |
to.slackToken.authed_user.id | string | |
to.slackToken.authed_user.refresh_token | string | |
to.slackToken.authed_user.scope | string | |
to.slackToken.authed_user.token_type | string | |
to.slackToken.bot_user_id | string | |
to.slackToken.enterprise | object | |
to.slackToken.enterprise.id | string | |
to.slackToken.enterprise.name | string | |
to.slackToken.error | string | |
to.slackToken.expires_in | number | |
to.slackToken.incoming_webhook | object | |
to.slackToken.incoming_webhook.channel | string | |
to.slackToken.incoming_webhook.channel_id | string | |
to.slackToken.incoming_webhook.configuration_url | string | |
to.slackToken.incoming_webhook.url | string | |
to.slackToken.is_enterprise_install | boolean | |
to.slackToken.needed | string | |
to.slackToken.ok | boolean | (required) |
to.slackToken.provided | string | |
to.slackToken.refresh_token | string | |
to.slackToken.scope | string | |
to.slackToken.team | object | |
to.slackToken.team.id | string | |
to.slackToken.team.name | string | |
to.slackToken.token_type | string | |
to.slackToken.warning | string | |
to.slackToken.response_metadata | object | |
to.slackToken.response_metadata.warnings | string[] | |
to.slackToken.response_metadata.next_cursor | string | |
to.slackToken.response_metadata.scopes | string[] | |
to.slackToken.response_metadata.acceptedScopes | string[] | |
to.slackToken.response_metadata.retryAfter | number | |
to.slackToken.response_metadata.messages | string[] | |
to.lastSeenTime | string | |
to.updatedAt | string | |
to.createdAt | string | |
to.emailSuppressionStatus | object | |
to.emailSuppressionStatus.reason | ”Bounce” | “Complaint” | (required) |
to.emailSuppressionStatus.details | object | (required) |
forceChannels | (“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | |
parameters | Record<string, any> | |
secondaryId | string | |
templateId | string | |
subNotificationId | string | |
options | object | |
options.email | object | |
options.email.replyToAddresses | string[] | |
options.email.ccAddresses | string[] | |
options.email.bccAddresses | string[] | |
options.email.fromAddress | string | |
options.email.fromName | string | |
options.email.attachments | (object | object)[] | |
options.email.condition | string | |
options.apn | object | |
options.apn.expiry | number | |
options.apn.priority | number | |
options.apn.collapseId | string | |
options.apn.threadId | string | |
options.apn.badge | number | |
options.apn.sound | string | |
options.apn.contentAvailable | boolean | |
options.fcm | object | |
options.fcm.android | object | |
options.fcm.android.collapseKey | string | |
options.fcm.android.priority | ”high” | “normal” | |
options.fcm.android.ttl | number | |
options.fcm.android.restrictedPackageName | string | |
schedule | string | |
email | object | |
email.subject | string | (required) |
email.html | string | (required) |
email.previewText | string | |
email.senderName | string | |
email.senderEmail | string | |
inapp | object | |
inapp.title | string | (required) |
inapp.url | string | |
inapp.image | string | |
sms | object | |
sms.message | string | |
sms.autoReply | object | |
sms.autoReply.message | string | (required) |
call | object | |
call.message | string | (required) |
web_push | object | |
web_push.title | string | (required) |
web_push.message | string | (required) |
web_push.icon | string | |
web_push.url | string | |
mobile_push | object | |
mobile_push.title | string | (required) |
mobile_push.message | string | (required) |
slack | object | |
slack.text | string | (required) |
slack.blocks | Record<string, any>[] | |
slack.username | string | |
slack.icon | string | |
slack.thread_ts | string | |
slack.reply_broadcast | boolean | |
slack.parse | ”full” | “none” | |
slack.link_names | boolean | |
slack.mrkdwn | boolean | |
slack.unfurl_links | boolean | |
slack.unfurl_media | boolean | |
slack.metadata | object | Slack message metadata with optional work object entities. Combines standard Slack message metadata fields with an array of entity objects. |
slack.metadata.entities | object[] | An array of work object entities. |
slack.metadata.entities[].entity_type | string | (required) Entity type (e.g., ‘slack#/entities/task’, ‘slack#/entities/file’). |
slack.metadata.entities[].entity_payload | Record<string, any> | (required) Schema for the given entity type. |
slack.metadata.entities[].external_ref | object | (required) Reference used to identify an entity within the developer’s system. |
slack.metadata.entities[].external_ref.id | string | (required) |
slack.metadata.entities[].external_ref.type | string | |
slack.metadata.entities[].url | string | (required) URL used to identify an entity within the developer’s system. |
slack.metadata.entities[].app_unfurl_url | string | The exact URL posted in the source message. Required in metadata passed to chat.unfurl. |
slack.metadata.event_type | string | A human readable alphanumeric string representing your application’s metadata event. |
slack.metadata.event_payload | Record<string, any> | A free-form object containing whatever data your application wishes to attach to messages. |
Domains
domainsAddDomain()
Request to verify a new sender domain
PostSendersRequestBody postSendersRequestBody = new PostSendersRequestBody(); // PostSendersRequestBody |
try {
List<GetSendersResponseInner> result = client.getDomains().domainsAddDomain(postSendersRequestBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#domainsAddDomain: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
sender | string | (required) |
domainsDeleteDomain()
Delete a sender domain or email address
String sender = "sender_example"; // String | Sender domain or email address (URL encoded)
try {
SuccessResponse result = client.getDomains().domainsDeleteDomain(sender);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#domainsDeleteDomain: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| sender | String | Sender domain or email address (URL encoded) |
domainsListDomains()
Get all sender domains configured for the account
try {
List<GetSendersResponseInner> result = client.getDomains().domainsListDomains();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DomainsApi#domainsListDomains: " + e.getMessage());
}
Parameters
This endpoint does not need any parameter.
Environments
environmentsCreateEnvironment()
Create a new environment for the account
EnvironmentCreateRequest environmentCreateRequest = new EnvironmentCreateRequest(); // EnvironmentCreateRequest |
try {
Environment result = client.getEnvironments().environmentsCreateEnvironment(environmentCreateRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EnvironmentsApi#environmentsCreateEnvironment: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
title | string | (required) |
environmentsListEnvironments()
Get all environments for the authenticated account
try {
List<GetEnvironmentsResponseInner> result = client.getEnvironments().environmentsListEnvironments();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EnvironmentsApi#environmentsListEnvironments: " + e.getMessage());
}
Parameters
This endpoint does not need any parameter.
environmentsUpdateEnvironment()
Update environment settings (title, secret, disable sending, secure mode)
String clientId = "clientId_example"; // String | Environment client ID
EnvironmentPatchRequest environmentPatchRequest = new EnvironmentPatchRequest(); // EnvironmentPatchRequest |
try {
Environment result = client.getEnvironments().environmentsUpdateEnvironment(clientId, environmentPatchRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling EnvironmentsApi#environmentsUpdateEnvironment: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| clientId | String | Environment client ID | |
| environmentPatchRequest | EnvironmentPatchRequest |
Request Body Properties
| Name | Type | Description |
|---|---|---|
resetSecret | boolean | |
disableSending | (“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | |
title | string | |
secureMode | boolean |
Logs
logsGetLogRetention()
Get log retention period in days for the account
try {
LogsRetentionResponse result = client.getLogs().logsGetLogRetention();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LogsApi#logsGetLogRetention: " + e.getMessage());
}
Parameters
This endpoint does not need any parameter.
logsGetLogs()
List logs for the authenticated account
BigDecimal limit = new BigDecimal(78); // BigDecimal | Maximum number of logs to return (default
String cursor = "cursor_example"; // String | Pagination cursor for next page
try {
GetLogsResponse result = client.getLogs().logsGetLogs(limit, cursor);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LogsApi#logsGetLogs: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | BigDecimal | Maximum number of logs to return (default | [optional] |
| cursor | String | Pagination cursor for next page | [optional] |
logsGetLogsByTrackingIds()
Get logs by tracking IDs (comma-separated, max 25 IDs)
String trackingIds = "trackingIds_example"; // String | Comma-separated tracking IDs (URL encoded)
try {
LogsGetResponse result = client.getLogs().logsGetLogsByTrackingIds(trackingIds);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LogsApi#logsGetLogsByTrackingIds: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| trackingIds | String | Comma-separated tracking IDs (URL encoded) |
logsGetLogsQueryResult()
Get results from a query ID
String queryId = "queryId_example"; // String | Query ID
try {
LogsQueryResultResponse result = client.getLogs().logsGetLogsQueryResult(queryId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LogsApi#logsGetLogsQueryResult: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| queryId | String | Query ID |
logsStartLogsQuery()
Start a log query and return query ID for asynchronous log searching
LogQueryPostBody logQueryPostBody = new LogQueryPostBody(); // LogQueryPostBody |
try {
LogsQueryResponse result = client.getLogs().logsStartLogsQuery(logQueryPostBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LogsApi#logsStartLogsQuery: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
dateRangeFilter | number[] | A tuple of [startTime, endTime] for the date range filter, each representing a unix timestamp. |
userFilter | string | |
envIdFilter | string[] | |
statusFilter | string | |
channelFilter | (“email” | “inapp” | “sms” | “call” | “web_push” | “mobile_push” | “slack”)[] | |
notificationFilter | string[] |
logsTailLogs()
Get last 100 logs from the stream
try {
LogsTailResponse result = client.getLogs().logsTailLogs();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling LogsApi#logsTailLogs: " + e.getMessage());
}
Parameters
This endpoint does not need any parameter.
Sender
senderDeleteSchedule()
Delete (unschedule) an already scheduled notification
String trackingId = "trackingId_example"; // String | The tracking ID of the scheduled notification
try {
MessageResponse result = client.getSender().senderDeleteSchedule(trackingId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SenderApi#senderDeleteSchedule: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| trackingId | String | The tracking ID of the scheduled notification |
senderTestEmail()
Test the emailer with a sample email
PostEmailTestRequest postEmailTestRequest = new PostEmailTestRequest(); // PostEmailTestRequest |
try {
PostEmailTestResponse result = client.getSender().senderTestEmail(postEmailTestRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SenderApi#senderTestEmail: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
notificationId | string | (required) |
to | string | (required) |
subject | string | (required) |
html | string | (required) |
fromAddress | string | (required) |
fromName | string | (required) |
previewText | string |
senderUpdateSchedule()
Update the body or schedule of an already scheduled notification.
String trackingId = "trackingId_example"; // String | The tracking ID of the scheduled notification
SenderPostBody senderPostBody = new SenderPostBody(); // SenderPostBody |
try {
MessageResponse result = client.getSender().senderUpdateSchedule(trackingId, senderPostBody);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling SenderApi#senderUpdateSchedule: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| trackingId | String | The tracking ID of the scheduled notification | |
| senderPostBody | SenderPostBody |
Request Body Properties
| Name | Type | Description |
|---|---|---|
type | string | |
to | object | |
to.id | string | |
to.email | string | |
to.number | string | |
to.pushTokens | object[] | |
to.pushTokens[].type | ”FCM” | “APN” | (required) |
to.pushTokens[].token | string | (required) |
to.pushTokens[].device | object | (required) |
to.pushTokens[].device.app_id | string | |
to.pushTokens[].device.ad_id | string | |
to.pushTokens[].device.device_id | string | (required) |
to.pushTokens[].device.platform | string | |
to.pushTokens[].device.manufacturer | string | |
to.pushTokens[].device.model | string | |
to.pushTokens[].environment | string | used by APN to differentiate between sandbox and production builds (sandbox/undefined or production) |
to.webPushTokens | object[] | |
to.webPushTokens[].sub | object | (required) Configuration for a Push Subscription. This can be obtained on the frontend by calling serviceWorkerRegistration.pushManager.subscribe(). The expected format is the same output as JSON.stringify’ing a PushSubscription in the browser. |
to.webPushTokens[].sub.endpoint | string | (required) |
to.webPushTokens[].sub.keys | object | (required) |
to.webPushTokens[].sub.keys.p256dh | string | (required) |
to.webPushTokens[].sub.keys.auth | string | (required) |
to.timezone | string | |
to.slackChannel | string | The destination channel of slack notifications sent to this user. Can be either of the following: - Channel name, e.g. “test” - Channel name with # prefix, e.g. “#test” - Channel ID, e.g. “C1234567890” - User ID for DM, e.g. “U1234567890” - Username with @ prefix, e.g. “@test” |
to.slackToken | object | |
to.slackToken.access_token | string | |
to.slackToken.app_id | string | |
to.slackToken.authed_user | object | |
to.slackToken.authed_user.access_token | string | |
to.slackToken.authed_user.expires_in | number | |
to.slackToken.authed_user.id | string | |
to.slackToken.authed_user.refresh_token | string | |
to.slackToken.authed_user.scope | string | |
to.slackToken.authed_user.token_type | string | |
to.slackToken.bot_user_id | string | |
to.slackToken.enterprise | object | |
to.slackToken.enterprise.id | string | |
to.slackToken.enterprise.name | string | |
to.slackToken.error | string | |
to.slackToken.expires_in | number | |
to.slackToken.incoming_webhook | object | |
to.slackToken.incoming_webhook.channel | string | |
to.slackToken.incoming_webhook.channel_id | string | |
to.slackToken.incoming_webhook.configuration_url | string | |
to.slackToken.incoming_webhook.url | string | |
to.slackToken.is_enterprise_install | boolean | |
to.slackToken.needed | string | |
to.slackToken.ok | boolean | (required) |
to.slackToken.provided | string | |
to.slackToken.refresh_token | string | |
to.slackToken.scope | string | |
to.slackToken.team | object | |
to.slackToken.team.id | string | |
to.slackToken.team.name | string | |
to.slackToken.token_type | string | |
to.slackToken.warning | string | |
to.slackToken.response_metadata | object | |
to.slackToken.response_metadata.warnings | string[] | |
to.slackToken.response_metadata.next_cursor | string | |
to.slackToken.response_metadata.scopes | string[] | |
to.slackToken.response_metadata.acceptedScopes | string[] | |
to.slackToken.response_metadata.retryAfter | number | |
to.slackToken.response_metadata.messages | string[] | |
to.lastSeenTime | string | |
to.updatedAt | string | |
to.createdAt | string | |
to.emailSuppressionStatus | object | |
to.emailSuppressionStatus.reason | ”Bounce” | “Complaint” | (required) |
to.emailSuppressionStatus.details | object | (required) |
forceChannels | (“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | |
parameters | Record<string, any> | |
secondaryId | string | |
templateId | string | |
subNotificationId | string | |
options | object | |
options.email | object | |
options.email.replyToAddresses | string[] | |
options.email.ccAddresses | string[] | |
options.email.bccAddresses | string[] | |
options.email.fromAddress | string | |
options.email.fromName | string | |
options.email.attachments | (object | object)[] | |
options.email.condition | string | |
options.apn | object | |
options.apn.expiry | number | |
options.apn.priority | number | |
options.apn.collapseId | string | |
options.apn.threadId | string | |
options.apn.badge | number | |
options.apn.sound | string | |
options.apn.contentAvailable | boolean | |
options.fcm | object | |
options.fcm.android | object | |
options.fcm.android.collapseKey | string | |
options.fcm.android.priority | ”high” | “normal” | |
options.fcm.android.ttl | number | |
options.fcm.android.restrictedPackageName | string | |
schedule | string | |
email | object | |
email.subject | string | (required) |
email.html | string | (required) |
email.previewText | string | |
email.senderName | string | |
email.senderEmail | string | |
inapp | object | |
inapp.title | string | (required) |
inapp.url | string | |
inapp.image | string | |
sms | object | |
sms.message | string | |
sms.autoReply | object | |
sms.autoReply.message | string | (required) |
call | object | |
call.message | string | (required) |
web_push | object | |
web_push.title | string | (required) |
web_push.message | string | (required) |
web_push.icon | string | |
web_push.url | string | |
mobile_push | object | |
mobile_push.title | string | (required) |
mobile_push.message | string | (required) |
slack | object | |
slack.text | string | (required) |
slack.blocks | Record<string, any>[] | |
slack.username | string | |
slack.icon | string | |
slack.thread_ts | string | |
slack.reply_broadcast | boolean | |
slack.parse | ”full” | “none” | |
slack.link_names | boolean | |
slack.mrkdwn | boolean | |
slack.unfurl_links | boolean | |
slack.unfurl_media | boolean | |
slack.metadata | object | Slack message metadata with optional work object entities. Combines standard Slack message metadata fields with an array of entity objects. |
slack.metadata.entities | object[] | An array of work object entities. |
slack.metadata.entities[].entity_type | string | (required) Entity type (e.g., ‘slack#/entities/task’, ‘slack#/entities/file’). |
slack.metadata.entities[].entity_payload | Record<string, any> | (required) Schema for the given entity type. |
slack.metadata.entities[].external_ref | object | (required) Reference used to identify an entity within the developer’s system. |
slack.metadata.entities[].external_ref.id | string | (required) |
slack.metadata.entities[].external_ref.type | string | |
slack.metadata.entities[].url | string | (required) URL used to identify an entity within the developer’s system. |
slack.metadata.entities[].app_unfurl_url | string | The exact URL posted in the source message. Required in metadata passed to chat.unfurl. |
slack.metadata.event_type | string | A human readable alphanumeric string representing your application’s metadata event. |
slack.metadata.event_payload | Record<string, any> | A free-form object containing whatever data your application wishes to attach to messages. |
Templates
templatesCreateTemplate()
Create a new template for a notification
String notificationId = "notificationId_example"; // String | Notification ID
String channel = "channel_example"; // String | Channel type
TemplatePostRequest templatePostRequest = new TemplatePostRequest(); // TemplatePostRequest |
try {
Template result = client.getTemplates().templatesCreateTemplate(notificationId, channel, templatePostRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesCreateTemplate: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | Notification ID | |
| channel | String | Channel type | |
| templatePostRequest | TemplatePostRequest |
Request Body Properties
| Name | Type | Description |
|---|---|---|
templateId | string | (required) Unique ID for this template within the notification and channel. Required. |
html | string | HTML body of the email. |
previewText | string | Preview text (e.g. for inbox). |
internal | string | Internal editor representation of the email content (e.g. Bee or Redactor JSON). Used for editing and component embedding; the actual email sent to recipients uses the html field. |
subject | string | Email subject line. |
senderName | string | Sender display name. |
senderEmail | string | Sender email address. |
migration | string | Migration metadata (e.g. from template migration). |
title | string | Notification title (in-app). |
redirectURL | string | URL to open when the user taps the notification. |
imageURL | string | Image URL shown in the in-app notification. |
instant | object | Copy for instant (real-time) delivery. |
instant.title | string | |
instant.redirectURL | string | |
instant.imageURL | string | (required) |
batch | object | Copy for batch delivery. |
batch.title | string | (required) |
batch.redirectURL | string | (required) |
batch.imageURL | string | (required) |
text | string | Message text (SMS or call). |
message | string | Push notification body text. (title is shared with INAPP_WEB above.) |
icon | string | Web push: icon URL. Slack: bot icon (emoji or URL). |
url | string | Web push: URL to open when the notification is clicked. |
blocks | Record<string, any>[] | Slack message blocks (optional). |
username | string | Slack bot username. |
templatesDeleteTemplate()
Delete a template
String notificationId = "notificationId_example"; // String | Notification ID
String channel = "channel_example"; // String | Channel type
String templateId = "templateId_example"; // String | Template ID
try {
client.getTemplates().templatesDeleteTemplate(notificationId, channel, templateId);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesDeleteTemplate: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | Notification ID | |
| channel | String | Channel type | |
| templateId | String | Template ID |
templatesGetTemplate()
Get a single template by ID
String notificationId = "notificationId_example"; // String | Notification ID
String channel = "channel_example"; // String | Channel type
String templateId = "templateId_example"; // String | Template ID
try {
GetTemplatesResponse result = client.getTemplates().templatesGetTemplate(notificationId, channel, templateId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesGetTemplate: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | Notification ID | |
| channel | String | Channel type | |
| templateId | String | Template ID |
templatesInitiateMigration()
Initiate AI-powered template migration from complex to simple HTML
String notificationId = "notificationId_example"; // String | Notification ID
String channel = "channel_example"; // String | Channel type
String templateId = "templateId_example"; // String | Template ID
try {
Template result = client.getTemplates().templatesInitiateMigration(notificationId, channel, templateId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesInitiateMigration: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | Notification ID | |
| channel | String | Channel type | |
| templateId | String | Template ID |
templatesListTemplates()
List all templates for a notification and channel
String notificationId = "notificationId_example"; // String | Notification ID
String channel = "channel_example"; // String | Channel type
try {
List<GetTemplatesListResponseInner> result = client.getTemplates().templatesListTemplates(notificationId, channel);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesListTemplates: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | Notification ID | |
| channel | String | Channel type |
templatesSetDefaultTemplate()
Set a template as default for specific delivery modes
String notificationId = "notificationId_example"; // String | Notification ID
String channel = "channel_example"; // String | Channel type
SetDefaultTemplateRequest setDefaultTemplateRequest = new SetDefaultTemplateRequest(); // SetDefaultTemplateRequest |
try {
Template result = client.getTemplates().templatesSetDefaultTemplate(notificationId, channel, setDefaultTemplateRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesSetDefaultTemplate: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | Notification ID | |
| channel | String | Channel type | |
| setDefaultTemplateRequest | SetDefaultTemplateRequest |
Request Body Properties
| Name | Type | Description |
|---|---|---|
templateId | string | (required) |
modes | (“instant” | “hourly” | “daily” | “weekly” | “monthly”)[] | (required) |
templatesUpdateTemplate()
Update a template’s properties
String notificationId = "notificationId_example"; // String | Notification ID
String channel = "channel_example"; // String | Channel type
String templateId = "templateId_example"; // String | Template ID
TemplatePatchRequest templatePatchRequest = new TemplatePatchRequest(); // TemplatePatchRequest |
try {
Template result = client.getTemplates().templatesUpdateTemplate(notificationId, channel, templateId, templatePatchRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TemplatesApi#templatesUpdateTemplate: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | Notification ID | |
| channel | String | Channel type | |
| templateId | String | Template ID | |
| templatePatchRequest | TemplatePatchRequest |
Types
typesCreateNotificationType()
Create a new notification
NotificationCreateRequest notificationCreateRequest = new NotificationCreateRequest(); // NotificationCreateRequest |
try {
Notification result = client.getTypes().typesCreateNotificationType(notificationCreateRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TypesApi#typesCreateNotificationType: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
notificationId | string | (required) |
title | string | (required) |
channels | string[] | (required) |
options | object | |
options.EMAIL | object | |
options.EMAIL.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.EMAIL.off | object | |
options.EMAIL.off.enabled | boolean | (required) |
options.EMAIL.instant | object | |
options.EMAIL.instant.enabled | boolean | (required) |
options.EMAIL.hourly | object | |
options.EMAIL.hourly.enabled | boolean | (required) |
options.EMAIL.daily | object | |
options.EMAIL.daily.enabled | boolean | (required) |
options.EMAIL.daily.hour | string | |
options.EMAIL.weekly | object | |
options.EMAIL.weekly.enabled | boolean | (required) |
options.EMAIL.weekly.hour | string | |
options.EMAIL.weekly.day | string | |
options.EMAIL.monthly | object | |
options.EMAIL.monthly.enabled | boolean | (required) |
options.EMAIL.monthly.hour | string | |
options.EMAIL.monthly.date | ”first” | “last” | |
options.INAPP_WEB | object | |
options.INAPP_WEB.defaultDeliveryOption | ”off” | “instant” | (required) |
options.INAPP_WEB.off | object | |
options.INAPP_WEB.off.enabled | boolean | (required) |
options.INAPP_WEB.instant | object | |
options.INAPP_WEB.instant.enabled | boolean | (required) |
options.INAPP_WEB.instant.batching | boolean | |
options.INAPP_WEB.instant.batchingKey | string | |
options.INAPP_WEB.instant.batchingWindow | number | |
options.SMS | object | |
options.SMS.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SMS.off | object | |
options.SMS.off.enabled | boolean | (required) |
options.SMS.instant | object | |
options.SMS.instant.enabled | boolean | (required) |
options.SMS.hourly | object | |
options.SMS.hourly.enabled | boolean | (required) |
options.SMS.daily | object | |
options.SMS.daily.enabled | boolean | (required) |
options.SMS.daily.hour | string | |
options.SMS.weekly | object | |
options.SMS.weekly.enabled | boolean | (required) |
options.SMS.weekly.hour | string | |
options.SMS.weekly.day | string | |
options.SMS.monthly | object | |
options.SMS.monthly.enabled | boolean | (required) |
options.SMS.monthly.hour | string | |
options.SMS.monthly.date | ”first” | “last” | |
options.CALL | object | |
options.CALL.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.CALL.off | object | |
options.CALL.off.enabled | boolean | (required) |
options.CALL.instant | object | |
options.CALL.instant.enabled | boolean | (required) |
options.CALL.hourly | object | |
options.CALL.hourly.enabled | boolean | (required) |
options.CALL.daily | object | |
options.CALL.daily.enabled | boolean | (required) |
options.CALL.daily.hour | string | |
options.CALL.weekly | object | |
options.CALL.weekly.enabled | boolean | (required) |
options.CALL.weekly.hour | string | |
options.CALL.weekly.day | string | |
options.CALL.monthly | object | |
options.CALL.monthly.enabled | boolean | (required) |
options.CALL.monthly.hour | string | |
options.CALL.monthly.date | ”first” | “last” | |
options.PUSH | object | |
options.PUSH.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.PUSH.off | object | |
options.PUSH.off.enabled | boolean | (required) |
options.PUSH.instant | object | |
options.PUSH.instant.enabled | boolean | (required) |
options.PUSH.hourly | object | |
options.PUSH.hourly.enabled | boolean | (required) |
options.PUSH.daily | object | |
options.PUSH.daily.enabled | boolean | (required) |
options.PUSH.daily.hour | string | |
options.PUSH.weekly | object | |
options.PUSH.weekly.enabled | boolean | (required) |
options.PUSH.weekly.hour | string | |
options.PUSH.weekly.day | string | |
options.PUSH.monthly | object | |
options.PUSH.monthly.enabled | boolean | (required) |
options.PUSH.monthly.hour | string | |
options.PUSH.monthly.date | ”first” | “last” | |
options.WEB_PUSH | object | |
options.WEB_PUSH.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.WEB_PUSH.off | object | |
options.WEB_PUSH.off.enabled | boolean | (required) |
options.WEB_PUSH.instant | object | |
options.WEB_PUSH.instant.enabled | boolean | (required) |
options.WEB_PUSH.hourly | object | |
options.WEB_PUSH.hourly.enabled | boolean | (required) |
options.WEB_PUSH.daily | object | |
options.WEB_PUSH.daily.enabled | boolean | (required) |
options.WEB_PUSH.daily.hour | string | |
options.WEB_PUSH.weekly | object | |
options.WEB_PUSH.weekly.enabled | boolean | (required) |
options.WEB_PUSH.weekly.hour | string | |
options.WEB_PUSH.weekly.day | string | |
options.WEB_PUSH.monthly | object | |
options.WEB_PUSH.monthly.enabled | boolean | (required) |
options.WEB_PUSH.monthly.hour | string | |
options.WEB_PUSH.monthly.date | ”first” | “last” | |
options.SLACK | object | |
options.SLACK.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SLACK.off | object | |
options.SLACK.off.enabled | boolean | (required) |
options.SLACK.instant | object | |
options.SLACK.instant.enabled | boolean | (required) |
options.SLACK.hourly | object | |
options.SLACK.hourly.enabled | boolean | (required) |
options.SLACK.daily | object | |
options.SLACK.daily.enabled | boolean | (required) |
options.SLACK.daily.hour | string | |
options.SLACK.weekly | object | |
options.SLACK.weekly.enabled | boolean | (required) |
options.SLACK.weekly.hour | string | |
options.SLACK.weekly.day | string | |
options.SLACK.monthly | object | |
options.SLACK.monthly.enabled | boolean | (required) |
options.SLACK.monthly.hour | string | |
options.SLACK.monthly.date | ”first” | “last” |
typesDeleteNotificationType()
Delete a notification
String notificationId = "notificationId_example"; // String | The notification ID
try {
client.getTypes().typesDeleteNotificationType(notificationId);
} catch (ApiException e) {
System.err.println("Exception when calling TypesApi#typesDeleteNotificationType: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | The notification ID |
typesGetNotificationType()
Get a specific notification by ID
String notificationId = "notificationId_example"; // String | The notification ID
try {
List<GetNotificationsResponseInner> result = client.getTypes().typesGetNotificationType(notificationId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TypesApi#typesGetNotificationType: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | The notification ID |
typesListNotificationTypes()
Get all notifications for an account with their templates
try {
List<GetNotificationsResponseInner> result = client.getTypes().typesListNotificationTypes();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TypesApi#typesListNotificationTypes: " + e.getMessage());
}
Parameters
This endpoint does not need any parameter.
typesUpdateNotificationType()
Update a notification’s settings
String notificationId = "notificationId_example"; // String | The notification ID
NotificationPatchRequest notificationPatchRequest = new NotificationPatchRequest(); // NotificationPatchRequest |
try {
Notification result = client.getTypes().typesUpdateNotificationType(notificationId, notificationPatchRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling TypesApi#typesUpdateNotificationType: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| notificationId | String | The notification ID | |
| notificationPatchRequest | NotificationPatchRequest |
Request Body Properties
| Name | Type | Description |
|---|---|---|
title | string | |
channels | (“EMAIL” | “INAPP_WEB” | “SMS” | “CALL” | “PUSH” | “WEB_PUSH” | “SLACK”)[] | |
enabled | boolean | |
deduplication | object | |
deduplication.duration | number | (required) |
throttling | object | |
throttling.max | number | (required) |
throttling.period | number | (required) |
throttling.unit | ”seconds” | “minutes” | “hours” | “days” | “months” | “years” | (required) |
throttling.forever | boolean | (required) |
throttling.scope | (“userId” | “notificationId”)[] | (required) |
retention | number | |
options | object | |
options.EMAIL | object | |
options.EMAIL.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.EMAIL.off | object | |
options.EMAIL.off.enabled | boolean | (required) |
options.EMAIL.instant | object | |
options.EMAIL.instant.enabled | boolean | (required) |
options.EMAIL.hourly | object | |
options.EMAIL.hourly.enabled | boolean | (required) |
options.EMAIL.daily | object | |
options.EMAIL.daily.enabled | boolean | (required) |
options.EMAIL.daily.hour | string | |
options.EMAIL.weekly | object | |
options.EMAIL.weekly.enabled | boolean | (required) |
options.EMAIL.weekly.hour | string | |
options.EMAIL.weekly.day | string | |
options.EMAIL.monthly | object | |
options.EMAIL.monthly.enabled | boolean | (required) |
options.EMAIL.monthly.hour | string | |
options.EMAIL.monthly.date | ”first” | “last” | |
options.INAPP_WEB | object | |
options.INAPP_WEB.defaultDeliveryOption | ”off” | “instant” | (required) |
options.INAPP_WEB.off | object | |
options.INAPP_WEB.off.enabled | boolean | (required) |
options.INAPP_WEB.instant | object | |
options.INAPP_WEB.instant.enabled | boolean | (required) |
options.INAPP_WEB.instant.batching | boolean | |
options.INAPP_WEB.instant.batchingKey | string | |
options.INAPP_WEB.instant.batchingWindow | number | |
options.SMS | object | |
options.SMS.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SMS.off | object | |
options.SMS.off.enabled | boolean | (required) |
options.SMS.instant | object | |
options.SMS.instant.enabled | boolean | (required) |
options.SMS.hourly | object | |
options.SMS.hourly.enabled | boolean | (required) |
options.SMS.daily | object | |
options.SMS.daily.enabled | boolean | (required) |
options.SMS.daily.hour | string | |
options.SMS.weekly | object | |
options.SMS.weekly.enabled | boolean | (required) |
options.SMS.weekly.hour | string | |
options.SMS.weekly.day | string | |
options.SMS.monthly | object | |
options.SMS.monthly.enabled | boolean | (required) |
options.SMS.monthly.hour | string | |
options.SMS.monthly.date | ”first” | “last” | |
options.CALL | object | |
options.CALL.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.CALL.off | object | |
options.CALL.off.enabled | boolean | (required) |
options.CALL.instant | object | |
options.CALL.instant.enabled | boolean | (required) |
options.CALL.hourly | object | |
options.CALL.hourly.enabled | boolean | (required) |
options.CALL.daily | object | |
options.CALL.daily.enabled | boolean | (required) |
options.CALL.daily.hour | string | |
options.CALL.weekly | object | |
options.CALL.weekly.enabled | boolean | (required) |
options.CALL.weekly.hour | string | |
options.CALL.weekly.day | string | |
options.CALL.monthly | object | |
options.CALL.monthly.enabled | boolean | (required) |
options.CALL.monthly.hour | string | |
options.CALL.monthly.date | ”first” | “last” | |
options.PUSH | object | |
options.PUSH.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.PUSH.off | object | |
options.PUSH.off.enabled | boolean | (required) |
options.PUSH.instant | object | |
options.PUSH.instant.enabled | boolean | (required) |
options.PUSH.hourly | object | |
options.PUSH.hourly.enabled | boolean | (required) |
options.PUSH.daily | object | |
options.PUSH.daily.enabled | boolean | (required) |
options.PUSH.daily.hour | string | |
options.PUSH.weekly | object | |
options.PUSH.weekly.enabled | boolean | (required) |
options.PUSH.weekly.hour | string | |
options.PUSH.weekly.day | string | |
options.PUSH.monthly | object | |
options.PUSH.monthly.enabled | boolean | (required) |
options.PUSH.monthly.hour | string | |
options.PUSH.monthly.date | ”first” | “last” | |
options.WEB_PUSH | object | |
options.WEB_PUSH.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.WEB_PUSH.off | object | |
options.WEB_PUSH.off.enabled | boolean | (required) |
options.WEB_PUSH.instant | object | |
options.WEB_PUSH.instant.enabled | boolean | (required) |
options.WEB_PUSH.hourly | object | |
options.WEB_PUSH.hourly.enabled | boolean | (required) |
options.WEB_PUSH.daily | object | |
options.WEB_PUSH.daily.enabled | boolean | (required) |
options.WEB_PUSH.daily.hour | string | |
options.WEB_PUSH.weekly | object | |
options.WEB_PUSH.weekly.enabled | boolean | (required) |
options.WEB_PUSH.weekly.hour | string | |
options.WEB_PUSH.weekly.day | string | |
options.WEB_PUSH.monthly | object | |
options.WEB_PUSH.monthly.enabled | boolean | (required) |
options.WEB_PUSH.monthly.hour | string | |
options.WEB_PUSH.monthly.date | ”first” | “last” | |
options.SLACK | object | |
options.SLACK.defaultDeliveryOption | ”off” | “instant” | “hourly” | “daily” | “weekly” | “monthly” | (required) |
options.SLACK.off | object | |
options.SLACK.off.enabled | boolean | (required) |
options.SLACK.instant | object | |
options.SLACK.instant.enabled | boolean | (required) |
options.SLACK.hourly | object | |
options.SLACK.hourly.enabled | boolean | (required) |
options.SLACK.daily | object | |
options.SLACK.daily.enabled | boolean | (required) |
options.SLACK.daily.hour | string | |
options.SLACK.weekly | object | |
options.SLACK.weekly.enabled | boolean | (required) |
options.SLACK.weekly.hour | string | |
options.SLACK.weekly.day | string | |
options.SLACK.monthly | object | |
options.SLACK.monthly.enabled | boolean | (required) |
options.SLACK.monthly.hour | string | |
options.SLACK.monthly.date | ”first” | “last” |
User
userGenerateSlackOauthPath()
Complete Slack OAuth flow and store access token for user
String userId = "userId_example"; // String | User ID
SlackOauthRequest slackOauthRequest = new SlackOauthRequest(); // SlackOauthRequest |
try {
client.getUser().userGenerateSlackOauthPath(userId, slackOauthRequest);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGenerateSlackOauthPath: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | User ID | |
| slackOauthRequest | SlackOauthRequest |
Request Body Properties
| Name | Type | Description |
|---|---|---|
code | string | (required) |
redirect_uri | string | (required) |
userGetAccountMetadata()
Get account-level metadata including logo, VAPID key, and web push status
try {
GetAccountMetadataResponse result = client.getUser().userGetAccountMetadata();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetAccountMetadata: " + e.getMessage());
}
Parameters
This endpoint does not need any parameter.
userGetAvailableSlackChannels()
Get list of Slack channels and users for the authenticated user
String userId = "userId_example"; // String | User ID
try {
client.getUser().userGetAvailableSlackChannels(userId);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetAvailableSlackChannels: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | User ID |
userGetInAppNotifications()
Get in-app notifications for a user
String before = "before_example"; // String | Timestamp or ISO date to fetch notifications before
BigDecimal count = new BigDecimal(78); // BigDecimal | Number of notifications to return (default 10)
try {
GetInappNotificationsResponse result = client.getUser().userGetInAppNotifications(before, count);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetInAppNotifications: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| before | String | Timestamp or ISO date to fetch notifications before | [optional] |
| count | BigDecimal | Number of notifications to return (default 10) | [optional] |
userGetInAppUnreadCount()
Get the count of unread in-app notifications for a user
try {
InappUnreadCountResponse result = client.getUser().userGetInAppUnreadCount();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetInAppUnreadCount: " + e.getMessage());
}
Parameters
This endpoint does not need any parameter.
userGetUser()
Get a user by ID. All users exist implicitly, returns basic user object if not found in DB.
String userId = "userId_example"; // String | User ID
try {
User result = client.getUser().userGetUser(userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userGetUser: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | User ID |
userIdentify()
Create or update a user with the given ID. Updates lastSeenTime automatically.
String userId = "userId_example"; // String | User ID
PostUserRequest postUserRequest = new PostUserRequest(); // PostUserRequest |
try {
User result = client.getUser().userIdentify(userId, postUserRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userIdentify: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | User ID | |
| postUserRequest | PostUserRequest |
Request Body Properties
| Name | Type | Description |
|---|---|---|
id | string | |
email | string | |
number | string | |
pushTokens | object[] | |
pushTokens[].type | ”FCM” | “APN” | (required) |
pushTokens[].token | string | (required) |
pushTokens[].device | object | (required) |
pushTokens[].device.app_id | string | |
pushTokens[].device.ad_id | string | |
pushTokens[].device.device_id | string | (required) |
pushTokens[].device.platform | string | |
pushTokens[].device.manufacturer | string | |
pushTokens[].device.model | string | |
pushTokens[].environment | string | used by APN to differentiate between sandbox and production builds (sandbox/undefined or production) |
webPushTokens | object[] | |
webPushTokens[].sub | object | (required) Configuration for a Push Subscription. This can be obtained on the frontend by calling serviceWorkerRegistration.pushManager.subscribe(). The expected format is the same output as JSON.stringify’ing a PushSubscription in the browser. |
webPushTokens[].sub.endpoint | string | (required) |
webPushTokens[].sub.keys | object | (required) |
webPushTokens[].sub.keys.p256dh | string | (required) |
webPushTokens[].sub.keys.auth | string | (required) |
timezone | string | |
slackChannel | string | The destination channel of slack notifications sent to this user. Can be either of the following: - Channel name, e.g. “test” - Channel name with # prefix, e.g. “#test” - Channel ID, e.g. “C1234567890” - User ID for DM, e.g. “U1234567890” - Username with @ prefix, e.g. “@test” |
slackToken | object | |
slackToken.access_token | string | |
slackToken.app_id | string | |
slackToken.authed_user | object | |
slackToken.authed_user.access_token | string | |
slackToken.authed_user.expires_in | number | |
slackToken.authed_user.id | string | |
slackToken.authed_user.refresh_token | string | |
slackToken.authed_user.scope | string | |
slackToken.authed_user.token_type | string | |
slackToken.bot_user_id | string | |
slackToken.enterprise | object | |
slackToken.enterprise.id | string | |
slackToken.enterprise.name | string | |
slackToken.error | string | |
slackToken.expires_in | number | |
slackToken.incoming_webhook | object | |
slackToken.incoming_webhook.channel | string | |
slackToken.incoming_webhook.channel_id | string | |
slackToken.incoming_webhook.configuration_url | string | |
slackToken.incoming_webhook.url | string | |
slackToken.is_enterprise_install | boolean | |
slackToken.needed | string | |
slackToken.ok | boolean | (required) |
slackToken.provided | string | |
slackToken.refresh_token | string | |
slackToken.scope | string | |
slackToken.team | object | |
slackToken.team.id | string | |
slackToken.team.name | string | |
slackToken.token_type | string | |
slackToken.warning | string | |
slackToken.response_metadata | object | |
slackToken.response_metadata.warnings | string[] | |
slackToken.response_metadata.next_cursor | string | |
slackToken.response_metadata.scopes | string[] | |
slackToken.response_metadata.acceptedScopes | string[] | |
slackToken.response_metadata.retryAfter | number | |
slackToken.response_metadata.messages | string[] |
userMarkInAppNotificationsAsSeen()
Mark in-app web notifications as seen/read for a user
InAppNotificationUnreadClearRequest inAppNotificationUnreadClearRequest = new InAppNotificationUnreadClearRequest(); // InAppNotificationUnreadClearRequest |
try {
SuccessResponse result = client.getUser().userMarkInAppNotificationsAsSeen(inAppNotificationUnreadClearRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userMarkInAppNotificationsAsSeen: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
notificationId | string | |
trackingId | string |
userUpdateInAppNotificationStatus()
Update in-app web notification status (opened, archived, clicked, etc.)
InAppNotificationPatchRequest inAppNotificationPatchRequest = new InAppNotificationPatchRequest(); // InAppNotificationPatchRequest |
try {
SuccessResponse result = client.getUser().userUpdateInAppNotificationStatus(inAppNotificationPatchRequest);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UserApi#userUpdateInAppNotificationStatus: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|
Request Body Properties
| Name | Type | Description |
|---|---|---|
trackingIds | string[] | (required) |
opened | string | |
clicked | string | |
archived | string | |
actioned1 | string | |
actioned2 | string | |
reply | object | |
reply.date | string | (required) |
reply.message | string | (required) |
replies | object[] | |
replies[].date | string | (required) |
replies[].message | string | (required) |
Users
usersDeleteUser()
Delete a user and all associated data (in-app notifications, preferences, and user record)
String userId = "userId_example"; // String | User ID
String envId = "envId_example"; // String | Environment ID (required when using JWT auth)
try {
DeleteUserResponse result = client.getUsers().usersDeleteUser(userId, envId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#usersDeleteUser: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | User ID | |
| envId | String | Environment ID (required when using JWT auth) | [optional] |
usersListUsers()
Get all users for an environment with pagination support
BigDecimal limit = new BigDecimal(78); // BigDecimal | Maximum number of users to return (default
String nextToken = "nextToken_example"; // String | Pagination token for next page
String envId = "envId_example"; // String | Environment ID (required when using JWT auth)
try {
GetUsersResponse result = client.getUsers().usersListUsers(limit, nextToken, envId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#usersListUsers: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | BigDecimal | Maximum number of users to return (default | |
| nextToken | String | Pagination token for next page | |
| envId | String | Environment ID (required when using JWT auth) | [optional] |
usersRemoveUserFromSuppression()
Remove user suppression status for a specific channel
String userId = "userId_example"; // String | User ID
String channel = "channel_example"; // String | Channel type (EMAIL)
String envId = "envId_example"; // String | Environment ID (required when using JWT auth)
try {
UserSuppressionDeleteResponse result = client.getUsers().usersRemoveUserFromSuppression(userId, channel, envId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling UsersApi#usersRemoveUserFromSuppression: " + e.getMessage());
}
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| userId | String | User ID | |
| channel | String | Channel type (EMAIL) | |
| envId | String | Environment ID (required when using JWT auth) | [optional] |