Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
> **Building with an AI agent or LLM?** See [AGENTS.md](https://github.com/OneSignal/onesignal-java-api/blob/main/AGENTS.md) for an agent-oriented integration guide — authentication, calling conventions, idempotent retries, and the full API reference.

OneSignal
- API version: 5.13.0
- API version: 5.14.0

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

Expand All @@ -21,14 +21,14 @@ Building the API client library requires:
<dependency>
<groupId>com.onesignal</groupId>
<artifactId>onesignal-java-client</artifactId>
<version>5.13.0</version>
<version>5.14.0</version>
</dependency>
```

### Gradle

```groovy
implementation "com.onesignal:onesignal-java-client:5.13.0"
implementation "com.onesignal:onesignal-java-client:5.14.0"
```

## Configuration
Expand Down
115 changes: 113 additions & 2 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ info:
customer engagement strategies. Learn more at onesignal.com
termsOfService: https://onesignal.com/tos
title: OneSignal
version: 5.13.0
version: 5.14.0
servers:
- url: https://api.onesignal.com
paths:
Expand Down Expand Up @@ -3869,6 +3869,98 @@ components:
- $ref: '#/components/schemas/BasicNotification_allOf'
- required:
- app_id
EmailWarmUpStage:
description: "Channel: Email\nOne stage of an Auto Warm Up campaign's sending\
\ schedule."
properties:
start:
description: ISO 8601 timestamp for the start of this stage. Sending for
this stage will not begin before this time.
format: date-time
type: string
end:
description: ISO 8601 timestamp for the end of this stage. This stage's
quota is expected to be sent by this time.
format: date-time
type: string
quota:
description: Number of emails to send during this stage.
minimum: 0
type: integer
acked:
description: Whether this stage has been picked up and acknowledged by the
warm-up scheduler. Not accepted on create. This is only present when reading
back a campaign.
readOnly: true
type: boolean
required:
- end
- quota
- start
type: object
EmailWarmUpRequest:
description: "Channel: Email\nRequired when `kind` is \"warmup\". The gradual\
\ sending schedule for the Auto Warm Up campaign."
nullable: true
properties:
stages:
description: Required. The ordered stages that make up the campaign's sending
schedule.
items:
$ref: '#/components/schemas/EmailWarmUpStage'
type: array
strategy:
description: "How the stage schedule should be treated:\n * `recommended`\
\ - (Default) OneSignal may adjust the provided stages based on past delivery\
\ volumes, scheduled Auto Warm Up emails, and the size of the current\
\ audience.\n * `custom` - The stages provided are sent as-is.\n"
enum:
- recommended
- custom
nullable: true
type: string
required:
- stages
type: object
EmailWarmUp:
description: "Channel: Email\nPresent only when this notification's `kind` is\
\ \"warmup\". The Auto Warm Up campaign's stage schedule, scheduling strategy,\
\ and live status."
properties:
stages:
description: "The campaign's sending schedule, stage by stage."
items:
$ref: '#/components/schemas/EmailWarmUpStage'
type: array
strategy:
description: "How the stage schedule was produced:\n * `recommended` -\
\ OneSignal generated (and may still adjust) the schedule based on past\
\ delivery volumes, scheduled Auto Warm Up emails, and the size of the\
\ current audience.\n * `custom` - The stages were provided as-is in\
\ the create request.\n"
enum:
- recommended
- custom
type: string
status:
description: |
Current status of the campaign:
* `initializing` - The stages have been submitted and the schedule is being set up.
* `draft` - The campaign has been created but has not started sending.
* `active` - The campaign is currently working through its stages.
* `finished` - All stages have completed.
* `canceled` - The campaign was canceled before finishing.
enum:
- initializing
- draft
- active
- finished
- canceled
type: string
is_live:
description: Whether the campaign is currently live (actively sending).
type: boolean
type: object
Notification:
allOf:
- $ref: '#/components/schemas/BasicNotification'
Expand Down Expand Up @@ -8743,7 +8835,7 @@ components:
type: string
writeOnly: true
email_subject:
description: "Channel: Email\nRequired. The subject of the email.\n"
description: "Channel: Email\nRequired. The subject of the email.\n"
nullable: true
type: string
writeOnly: true
Expand Down Expand Up @@ -8816,6 +8908,23 @@ components:
nullable: true
type: string
writeOnly: true
kind:
description: "Channel: Email\nSet to \"warmup\" to send this as an Auto\
\ Warm Up campaign: a single campaign delivered gradually to your audience\
\ over several days, so you don't have to pace sends manually. OneSignal\
\ generates a sending schedule based on your past delivery volumes, scheduled\
\ Auto Warm Up emails, and the size of your current audience.\nWhen set,\
\ `email_warm_up` is required and describes the campaign's stages and\
\ (optionally) its scheduling strategy. `send_after` cannot be combined\
\ with `kind: \"warmup\"`. The campaign will be scheduled to begin at\
\ its first stage's `start` time.\nOnly supported for Email notifications.\n"
enum:
- warmup
nullable: true
type: string
writeOnly: true
email_warm_up:
$ref: '#/components/schemas/EmailWarmUpRequest'
sms_from:
description: "Channel: SMS\nPhone Number used to send SMS. Should be a registered\
\ Twilio phone number in E.164 format.\n"
Expand Down Expand Up @@ -8969,6 +9078,8 @@ components:
description: Number of BCC copies successfully sent for this notification.
nullable: true
type: integer
email_warm_up:
$ref: '#/components/schemas/EmailWarmUp'
type: object
PlatformDeliveryData_sms_allOf:
properties:
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ apply plugin: 'com.diffplug.spotless'
apply plugin: 'com.vanniktech.maven.publish'

group = 'com.onesignal'
version = '5.13.0'
version = '5.14.0'

buildscript {
repositories {
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.onesignal",
name := "onesignal-java-client",
version := "5.13.0",
version := "5.14.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
Expand Down
12 changes: 11 additions & 1 deletion docs/BasicNotification.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
|**summaryArgCount** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count &#x3D; 2, the new total will be 14 and the summary will be \&quot;14 more notifications from summary_arg\&quot; | [optional] |
|**iosRelevanceScore** | **BigDecimal** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] |
|**iosInterruptionLevel** | **String** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \&quot;interrupt\&quot; the user. Can choose from options: [&#39;active&#39;, &#39;passive&#39;, &#39;time_sensitive&#39;, &#39;critical&#39;]. Default is active. | [optional] |
|**emailSubject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
|**emailSubject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
|**emailBody** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an &lt;a&gt; tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
|**emailFromName** | **String** | Channel: Email The name the email is from. If not specified, will default to \&quot;from name\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
|**emailFromAddress** | **String** | Channel: Email The email address the email is from. If not specified, will default to \&quot;from email\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
Expand All @@ -116,6 +116,8 @@
|**includeUnsubscribed** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared. | [optional] |
|**emailBcc** | **List&lt;String&gt;** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
|**emailSenderDomain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] |
|**kind** | [**KindEnum**](#KindEnum) | Channel: Email Set to \&quot;warmup\&quot; to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don&#39;t have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, &#x60;email_warm_up&#x60; is required and describes the campaign&#39;s stages and (optionally) its scheduling strategy. &#x60;send_after&#x60; cannot be combined with &#x60;kind: \&quot;warmup\&quot;&#x60;. The campaign will be scheduled to begin at its first stage&#39;s &#x60;start&#x60; time. Only supported for Email notifications. | [optional] |
|**emailWarmUp** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] |
|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
|**smsMediaUrls** | **List&lt;String&gt;** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] |
|**filters** | [**List&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
Expand Down Expand Up @@ -147,6 +149,14 @@



## Enum: KindEnum

| Name | Value |
|---- | -----|
| WARMUP | &quot;warmup&quot; |



## Enum: HuaweiCategoryEnum

| Name | Value |
Expand Down
12 changes: 11 additions & 1 deletion docs/BasicNotificationAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
|**summaryArgCount** | **Integer** | Channel: Push Notifications Platform: iOS 12+ When using thread_id, you can also control the count of the number of notifications in the group. For example, if the group already has 12 notifications, and you send a new notification with summary_arg_count &#x3D; 2, the new total will be 14 and the summary will be \&quot;14 more notifications from summary_arg\&quot; | [optional] |
|**iosRelevanceScore** | **BigDecimal** | Channel: Push Notifications Platform: iOS 15+ A score to be set per notification to indicate how it should be displayed when grouped. Use a float between 0-1. | [optional] |
|**iosInterruptionLevel** | **String** | Channel: Push Notifications Platform: iOS 15+ Focus Modes and Interruption Levels indicate the priority and delivery timing of a notification, to \&quot;interrupt\&quot; the user. Can choose from options: [&#39;active&#39;, &#39;passive&#39;, &#39;time_sensitive&#39;, &#39;critical&#39;]. Default is active. | [optional] |
|**emailSubject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
|**emailSubject** | **String** | Channel: Email Required. The subject of the email. | [optional] |
|**emailBody** | **String** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an &lt;a&gt; tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] |
|**emailFromName** | **String** | Channel: Email The name the email is from. If not specified, will default to \&quot;from name\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
|**emailFromAddress** | **String** | Channel: Email The email address the email is from. If not specified, will default to \&quot;from email\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
Expand All @@ -102,6 +102,8 @@
|**includeUnsubscribed** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared. | [optional] |
|**emailBcc** | **List&lt;String&gt;** | Channel: Email BCC recipients for the email. Maximum 5 addresses. Only supported when the email service provider is OneSignal Email. | [optional] |
|**emailSenderDomain** | **String** | Channel: Email Sender domain to use for the email message. Overrides the default sender domain configured for the app. Only supported when the email service provider is OneSignal Email. | [optional] |
|**kind** | [**KindEnum**](#KindEnum) | Channel: Email Set to \&quot;warmup\&quot; to send this as an Auto Warm Up campaign: a single campaign delivered gradually to your audience over several days, so you don&#39;t have to pace sends manually. OneSignal generates a sending schedule based on your past delivery volumes, scheduled Auto Warm Up emails, and the size of your current audience. When set, &#x60;email_warm_up&#x60; is required and describes the campaign&#39;s stages and (optionally) its scheduling strategy. &#x60;send_after&#x60; cannot be combined with &#x60;kind: \&quot;warmup\&quot;&#x60;. The campaign will be scheduled to begin at its first stage&#39;s &#x60;start&#x60; time. Only supported for Email notifications. | [optional] |
|**emailWarmUp** | [**EmailWarmUpRequest**](EmailWarmUpRequest.md) | | [optional] |
|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
|**smsMediaUrls** | **List&lt;String&gt;** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional] |
|**filters** | [**List&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
Expand All @@ -123,6 +125,14 @@



## Enum: KindEnum

| Name | Value |
|---- | -----|
| WARMUP | &quot;warmup&quot; |



## Enum: HuaweiCategoryEnum

| Name | Value |
Expand Down
38 changes: 38 additions & 0 deletions docs/EmailWarmUp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@


# EmailWarmUp

Channel: Email Present only when this notification's `kind` is \"warmup\". The Auto Warm Up campaign's stage schedule, scheduling strategy, and live status.

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**stages** | [**List&lt;EmailWarmUpStage&gt;**](EmailWarmUpStage.md) | The campaign&#39;s sending schedule, stage by stage. | [optional] |
|**strategy** | [**StrategyEnum**](#StrategyEnum) | How the stage schedule was produced: * &#x60;recommended&#x60; - OneSignal generated (and may still adjust) the schedule based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * &#x60;custom&#x60; - The stages were provided as-is in the create request. | [optional] |
|**status** | [**StatusEnum**](#StatusEnum) | Current status of the campaign: * &#x60;initializing&#x60; - The stages have been submitted and the schedule is being set up. * &#x60;draft&#x60; - The campaign has been created but has not started sending. * &#x60;active&#x60; - The campaign is currently working through its stages. * &#x60;finished&#x60; - All stages have completed. * &#x60;canceled&#x60; - The campaign was canceled before finishing. | [optional] |
|**isLive** | **Boolean** | Whether the campaign is currently live (actively sending). | [optional] |



## Enum: StrategyEnum

| Name | Value |
|---- | -----|
| RECOMMENDED | &quot;recommended&quot; |
| CUSTOM | &quot;custom&quot; |



## Enum: StatusEnum

| Name | Value |
|---- | -----|
| INITIALIZING | &quot;initializing&quot; |
| DRAFT | &quot;draft&quot; |
| ACTIVE | &quot;active&quot; |
| FINISHED | &quot;finished&quot; |
| CANCELED | &quot;canceled&quot; |



24 changes: 24 additions & 0 deletions docs/EmailWarmUpRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@


# EmailWarmUpRequest

Channel: Email Required when `kind` is \"warmup\". The gradual sending schedule for the Auto Warm Up campaign.

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**stages** | [**List&lt;EmailWarmUpStage&gt;**](EmailWarmUpStage.md) | Required. The ordered stages that make up the campaign&#39;s sending schedule. | |
|**strategy** | [**StrategyEnum**](#StrategyEnum) | How the stage schedule should be treated: * &#x60;recommended&#x60; - (Default) OneSignal may adjust the provided stages based on past delivery volumes, scheduled Auto Warm Up emails, and the size of the current audience. * &#x60;custom&#x60; - The stages provided are sent as-is. | [optional] |



## Enum: StrategyEnum

| Name | Value |
|---- | -----|
| RECOMMENDED | &quot;recommended&quot; |
| CUSTOM | &quot;custom&quot; |



17 changes: 17 additions & 0 deletions docs/EmailWarmUpStage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


# EmailWarmUpStage

Channel: Email One stage of an Auto Warm Up campaign's sending schedule.

## Properties

| Name | Type | Description | Notes |
|------------ | ------------- | ------------- | -------------|
|**start** | **OffsetDateTime** | ISO 8601 timestamp for the start of this stage. Sending for this stage will not begin before this time. | |
|**end** | **OffsetDateTime** | ISO 8601 timestamp for the end of this stage. This stage&#39;s quota is expected to be sent by this time. | |
|**quota** | **Integer** | Number of emails to send during this stage. | |
|**acked** | **Boolean** | Whether this stage has been picked up and acknowledged by the warm-up scheduler. Not accepted on create. This is only present when reading back a campaign. | [optional] [readonly] |



Loading