diff --git a/README.md b/README.md
index bf108c4..0e89d1b 100644
--- a/README.md
+++ b/README.md
@@ -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.11.2
+- API version: 5.12.0
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
@@ -21,14 +21,14 @@ Building the API client library requires:
com.onesignalonesignal-java-client
- 5.11.2
+ 5.12.0
```
### Gradle
```groovy
-implementation "com.onesignal:onesignal-java-client:5.11.2"
+implementation "com.onesignal:onesignal-java-client:5.12.0"
```
## Configuration
diff --git a/api/openapi.yaml b/api/openapi.yaml
index 66dc8ea..b4b0c1e 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -8,7 +8,7 @@ info:
customer engagement strategies. Learn more at onesignal.com
termsOfService: https://onesignal.com/tos
title: OneSignal
- version: 5.11.2
+ version: 5.12.0
servers:
- url: https://api.onesignal.com
paths:
@@ -2854,43 +2854,25 @@ paths:
summary: Create custom events
x-content-type: application/json
x-accepts: application/json
- /organizations/{organization_id}/audit_logs:
+ /apps/{app_id}/journeys:
get:
- description: "Retrieve a paginated, time-scoped list of audit log events for\
- \ an organization. Requires an Enterprise plan with the audit logs entitlement\
- \ enabled."
- operationId: list_audit_logs
+ description: The Journeys API is in beta. Endpoints and response fields can
+ still change. Retrieve a paginated list of journeys for an app. Returns a
+ summary representation of each journey; use View journey for the full configuration.
+ Uses forward-only cursor-based pagination.
+ operationId: view_journeys
parameters:
- - description: The UUID of the organization to retrieve audit logs for. Must
- match the authenticated Organization API Key.
+ - description: Your OneSignal App ID in UUID v4 format.
explode: false
in: path
- name: organization_id
+ name: app_id
required: true
schema:
- example: YOUR_ORG_ID
+ example: YOUR_APP_ID
type: string
style: simple
- - description: Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z).
- Required unless cursor is provided. Must be within the last 90 days.
- explode: true
- in: query
- name: start_time
- required: false
- schema:
- type: string
- style: form
- - description: End of the time range in ISO 8601 format. Defaults to the current
- time. Must be after start_time.
- explode: true
- in: query
- name: end_time
- required: false
- schema:
- type: string
- style: form
- - description: "Pagination cursor returned in a previous response as next_cursor.\
- \ When provided, start_time and end_time are ignored."
+ - description: Opaque pagination token from a previous response's next_cursor.
+ Omit for the first page.
explode: true
in: query
name: cursor
@@ -2898,117 +2880,151 @@ paths:
schema:
type: string
style: form
- - description: "Maximum number of events to return per page. Minimum 1, maximum\
- \ 100. Values outside this range are clamped automatically by the server."
+ - description: "Maximum journeys to return per page. Minimum 1, maximum 50."
explode: true
in: query
name: limit
required: false
schema:
+ default: 50
+ example: 50
+ maximum: 50
+ minimum: 1
type: integer
style: form
- - description: Filter events by app UUID. Accepts up to 10 values. Org-level
- events are always included.
- explode: true
- in: query
- name: app_ids
- required: false
- schema:
- items:
- type: string
- maxItems: 10
- type: array
- style: form
- - description: "Filter by action type (e.g. notification.sent, segment.created).\
- \ Accepts up to 20 values."
- explode: true
- in: query
- name: actions
- required: false
- schema:
- items:
- type: string
- maxItems: 20
- type: array
- style: form
- - description: Filter by actor UUID (the user or service that performed the
- action). Accepts up to 10 values.
- explode: true
- in: query
- name: actor_ids
- required: false
- schema:
- items:
- type: string
- maxItems: 10
- type: array
- style: form
- - description: Filter by actor email address. Accepts up to 10 values.
- explode: true
- in: query
- name: actor_emails
- required: false
- schema:
- items:
- type: string
- maxItems: 10
- type: array
- style: form
- - description: "Filter by the type of resource the action was performed on (e.g.\
- \ notification, segment, journey). Accepts up to 10 values."
- explode: true
- in: query
- name: target_types
- required: false
- schema:
- items:
- type: string
- maxItems: 10
- type: array
- style: form
- - description: Filter by the UUID of the resource the action was performed on.
- Accepts up to 10 values.
- explode: true
- in: query
- name: target_ids
- required: false
- schema:
- items:
- type: string
- maxItems: 10
- type: array
- style: form
- - description: Filter by the IP address the action originated from. Accepts
- up to 10 values.
- explode: true
- in: query
- name: ip_addresses
- required: false
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JourneyListResponse'
+ description: OK
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unexpected error
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Forbidden
+ "429":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RateLimitError'
+ description: Rate Limit Exceeded
+ security:
+ - rest_api_key: []
+ summary: View journeys
+ x-accepts: application/json
+ post:
+ description: The Journeys API is in beta. Endpoints and response fields can
+ still change. Create a new journey with an audience and a node graph. Journeys
+ are always created in the draft state. The authenticated App API key must
+ have permission to create journeys.
+ operationId: create_journey
+ parameters:
+ - description: Your OneSignal App ID in UUID v4 format.
+ explode: false
+ in: path
+ name: app_id
+ required: true
schema:
- items:
- type: string
- maxItems: 10
- type: array
- style: form
+ example: YOUR_APP_ID
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/CreateJourneyRequest'
+ required: true
responses:
+ "201":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Journey'
+ description: Created
default:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
description: Unexpected error
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Forbidden
+ "429":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RateLimitError'
+ description: Rate Limit Exceeded
+ security:
+ - rest_api_key: []
+ summary: Create journey
+ x-content-type: application/json
+ x-accepts: application/json
+ /apps/{app_id}/journeys/{journey_id}:
+ delete:
+ description: "The Journeys API is in beta. Endpoints and response fields can\
+ \ still change. Permanently delete a journey by its UUID. Returns { \"success\"\
+ : true } on success. The authenticated App API key must have permission to\
+ \ delete journeys. Deleting a journey stops any in-flight users and cannot\
+ \ be undone. Archive a running journey instead if you need to keep its data."
+ operationId: delete_journey
+ parameters:
+ - description: Your OneSignal App ID in UUID v4 format.
+ explode: false
+ in: path
+ name: app_id
+ required: true
+ schema:
+ example: YOUR_APP_ID
+ type: string
+ style: simple
+ - description: UUID of the journey to delete.
+ explode: false
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ example: YOUR_JOURNEY_ID
+ type: string
+ style: simple
+ responses:
"200":
content:
application/json:
schema:
- $ref: '#/components/schemas/ListAuditLogsSuccessResponse'
+ $ref: '#/components/schemas/GenericSuccessBoolResponse'
description: OK
- "400":
+ default:
content:
application/json:
schema:
$ref: '#/components/schemas/GenericError'
- description: Bad Request
+ description: Unexpected error
"403":
content:
application/json:
@@ -3028,46 +3044,516 @@ paths:
$ref: '#/components/schemas/RateLimitError'
description: Rate Limit Exceeded
security:
- - organization_api_key: []
- summary: List audit logs
+ - rest_api_key: []
+ summary: Delete journey
x-accepts: application/json
-components:
- requestBodies:
- get_notification_history_request_body:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/get_notification_history_request_body'
- required: true
- export_subscriptions_request_body:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/export_subscriptions_request_body'
- schemas:
- App:
- example:
- apns_key_id: apns_key_id
- apns_team_id: apns_team_id
- apns_p12: apns_p12
- safari_site_origin: safari_site_origin
- apns_p12_password: apns_p12_password
- created_at: 2000-01-23T04:56:07.000+00:00
- safari_icon_64_64: safari_icon_64_64
- chrome_web_sub_domain: chrome_web_sub_domain
- gcm_key: gcm_key
- apns_bundle_id: apns_bundle_id
- chrome_key: chrome_key
- safari_push_id: safari_push_id
- updated_at: 2000-01-23T04:56:07.000+00:00
- apns_certificates: apns_certificates
- safari_apns_p12: safari_apns_p12
- safari_icon_128_128: safari_icon_128_128
- id: id
- android_gcm_sender_id: android_gcm_sender_id
- safari_icon_32_32: safari_icon_32_32
- additional_data_is_root_payload: true
- apns_env: sandbox
+ get:
+ description: "The Journeys API is in beta. Endpoints and response fields can\
+ \ still change. Retrieve the full configuration of a single journey by its\
+ \ UUID, including its audience and node graph."
+ operationId: view_journey
+ parameters:
+ - description: Your OneSignal App ID in UUID v4 format.
+ explode: false
+ in: path
+ name: app_id
+ required: true
+ schema:
+ example: YOUR_APP_ID
+ type: string
+ style: simple
+ - description: UUID of the journey to retrieve.
+ explode: false
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ example: YOUR_JOURNEY_ID
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Journey'
+ description: OK
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unexpected error
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Not Found
+ "429":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RateLimitError'
+ description: Rate Limit Exceeded
+ security:
+ - rest_api_key: []
+ summary: View journey
+ x-accepts: application/json
+ patch:
+ description: "The Journeys API is in beta. Endpoints and response fields can\
+ \ still change. Apply a partial update to a journey using JSON Merge Patch\
+ \ (RFC 7396). Send only the fields you want to change; omitted fields are\
+ \ left unchanged. A null value clears a nullable field, and arrays such as\
+ \ nodes are replaced wholesale. Set state to active to activate a draft journey."
+ operationId: update_journey
+ parameters:
+ - description: Your OneSignal App ID in UUID v4 format.
+ explode: false
+ in: path
+ name: app_id
+ required: true
+ schema:
+ example: YOUR_APP_ID
+ type: string
+ style: simple
+ - description: UUID of the journey to update.
+ explode: false
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ example: YOUR_JOURNEY_ID
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateJourneyRequest'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Journey'
+ description: OK
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unexpected error
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Not Found
+ "409":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Conflict
+ "422":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unprocessable Entity
+ "429":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RateLimitError'
+ description: Rate Limit Exceeded
+ security:
+ - rest_api_key: []
+ summary: Update journey
+ x-content-type: application/json
+ x-accepts: application/json
+ /apps/{app_id}/journeys/{journey_id}/stats:
+ get:
+ description: "The Journeys API is in beta. Endpoints and response fields can\
+ \ still change. Retrieve performance stats for a single journey: journey-level\
+ \ entry and exit counts, per-node counts keyed by node id, per-branch counts\
+ \ keyed by branch id, and channel delivery stats for message-sending nodes.\
+ \ The response carries no definition detail, so join it by id against the\
+ \ journey from View journey."
+ operationId: view_journey_stats
+ parameters:
+ - description: Your OneSignal App ID in UUID v4 format.
+ explode: false
+ in: path
+ name: app_id
+ required: true
+ schema:
+ example: YOUR_APP_ID
+ type: string
+ style: simple
+ - description: UUID of the journey to retrieve stats for.
+ explode: false
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ example: YOUR_JOURNEY_ID
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/JourneyStats'
+ description: OK
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unexpected error
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Not Found
+ "429":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RateLimitError'
+ description: Rate Limit Exceeded
+ security:
+ - rest_api_key: []
+ summary: View journey stats
+ x-accepts: application/json
+ /apps/{app_id}/journeys/{journey_id}/nodes/{node_id}:
+ patch:
+ description: "The Journeys API is in beta. Endpoints and response fields can\
+ \ still change. Apply a partial update to a single node, located by its server-assigned\
+ \ id, using JSON Merge Patch (RFC 7396). Send only the node fields you want\
+ \ to change; the rest of the node and the rest of the journey graph are left\
+ \ untouched. Returns the full updated journey."
+ operationId: update_journey_node
+ parameters:
+ - description: Your OneSignal App ID in UUID v4 format.
+ explode: false
+ in: path
+ name: app_id
+ required: true
+ schema:
+ example: YOUR_APP_ID
+ type: string
+ style: simple
+ - description: UUID of the journey that owns the node.
+ explode: false
+ in: path
+ name: journey_id
+ required: true
+ schema:
+ example: YOUR_JOURNEY_ID
+ type: string
+ style: simple
+ - description: "Server-assigned UUID of the node to update, from a prior View\
+ \ journey fetch."
+ explode: false
+ in: path
+ name: node_id
+ required: true
+ schema:
+ example: YOUR_NODE_ID
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/UpdateJourneyNodeRequest'
+ required: true
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Journey'
+ description: OK
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unexpected error
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Not Found
+ "409":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Conflict
+ "422":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unprocessable Entity
+ "429":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RateLimitError'
+ description: Rate Limit Exceeded
+ security:
+ - rest_api_key: []
+ summary: Update journey node
+ x-content-type: application/json
+ x-accepts: application/json
+ /organizations/{organization_id}/audit_logs:
+ get:
+ description: "Retrieve a paginated, time-scoped list of audit log events for\
+ \ an organization. Requires an Enterprise plan with the audit logs entitlement\
+ \ enabled."
+ operationId: list_audit_logs
+ parameters:
+ - description: The UUID of the organization to retrieve audit logs for. Must
+ match the authenticated Organization API Key.
+ explode: false
+ in: path
+ name: organization_id
+ required: true
+ schema:
+ example: YOUR_ORG_ID
+ type: string
+ style: simple
+ - description: Start of the time range in ISO 8601 format (e.g. 2026-02-01T00:00:00Z).
+ Required unless cursor is provided. Must be within the last 90 days.
+ explode: true
+ in: query
+ name: start_time
+ required: false
+ schema:
+ type: string
+ style: form
+ - description: End of the time range in ISO 8601 format. Defaults to the current
+ time. Must be after start_time.
+ explode: true
+ in: query
+ name: end_time
+ required: false
+ schema:
+ type: string
+ style: form
+ - description: "Pagination cursor returned in a previous response as next_cursor.\
+ \ When provided, start_time and end_time are ignored."
+ explode: true
+ in: query
+ name: cursor
+ required: false
+ schema:
+ type: string
+ style: form
+ - description: "Maximum number of events to return per page. Minimum 1, maximum\
+ \ 100. Values outside this range are clamped automatically by the server."
+ explode: true
+ in: query
+ name: limit
+ required: false
+ schema:
+ type: integer
+ style: form
+ - description: Filter events by app UUID. Accepts up to 10 values. Org-level
+ events are always included.
+ explode: true
+ in: query
+ name: app_ids
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 10
+ type: array
+ style: form
+ - description: "Filter by action type (e.g. notification.sent, segment.created).\
+ \ Accepts up to 20 values."
+ explode: true
+ in: query
+ name: actions
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 20
+ type: array
+ style: form
+ - description: Filter by actor UUID (the user or service that performed the
+ action). Accepts up to 10 values.
+ explode: true
+ in: query
+ name: actor_ids
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 10
+ type: array
+ style: form
+ - description: Filter by actor email address. Accepts up to 10 values.
+ explode: true
+ in: query
+ name: actor_emails
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 10
+ type: array
+ style: form
+ - description: "Filter by the type of resource the action was performed on (e.g.\
+ \ notification, segment, journey). Accepts up to 10 values."
+ explode: true
+ in: query
+ name: target_types
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 10
+ type: array
+ style: form
+ - description: Filter by the UUID of the resource the action was performed on.
+ Accepts up to 10 values.
+ explode: true
+ in: query
+ name: target_ids
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 10
+ type: array
+ style: form
+ - description: Filter by the IP address the action originated from. Accepts
+ up to 10 values.
+ explode: true
+ in: query
+ name: ip_addresses
+ required: false
+ schema:
+ items:
+ type: string
+ maxItems: 10
+ type: array
+ style: form
+ responses:
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Unexpected error
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ListAuditLogsSuccessResponse'
+ description: OK
+ "400":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Bad Request
+ "403":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Forbidden
+ "404":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/GenericError'
+ description: Not Found
+ "429":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RateLimitError'
+ description: Rate Limit Exceeded
+ security:
+ - organization_api_key: []
+ summary: List audit logs
+ x-accepts: application/json
+components:
+ requestBodies:
+ get_notification_history_request_body:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/get_notification_history_request_body'
+ required: true
+ export_subscriptions_request_body:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/export_subscriptions_request_body'
+ schemas:
+ App:
+ example:
+ apns_key_id: apns_key_id
+ apns_team_id: apns_team_id
+ apns_p12: apns_p12
+ safari_site_origin: safari_site_origin
+ apns_p12_password: apns_p12_password
+ created_at: 2000-01-23T04:56:07.000+00:00
+ safari_icon_64_64: safari_icon_64_64
+ chrome_web_sub_domain: chrome_web_sub_domain
+ gcm_key: gcm_key
+ apns_bundle_id: apns_bundle_id
+ chrome_key: chrome_key
+ safari_push_id: safari_push_id
+ updated_at: 2000-01-23T04:56:07.000+00:00
+ apns_certificates: apns_certificates
+ safari_apns_p12: safari_apns_p12
+ safari_icon_128_128: safari_icon_128_128
+ id: id
+ android_gcm_sender_id: android_gcm_sender_id
+ safari_icon_32_32: safari_icon_32_32
+ additional_data_is_root_payload: true
+ apns_env: sandbox
players: 0
messageable_players: 6
apns_p8: apns_p8
@@ -3083,920 +3569,1866 @@ components:
safari_icon_256_256: safari_icon_256_256
properties:
id:
- readOnly: true
+ readOnly: true
+ type: string
+ name:
+ description: "The name of your app, as displayed on your apps list on the\
+ \ dashboard. This can be renamed."
+ type: string
+ players:
+ readOnly: true
+ type: integer
+ messageable_players:
+ readOnly: true
+ type: integer
+ updated_at:
+ format: date-time
+ readOnly: true
+ type: string
+ created_at:
+ format: date-time
+ readOnly: true
+ type: string
+ android_gcm_sender_id:
+ description: "Android: Your Google Project number. Also known as Sender\
+ \ ID."
+ type: string
+ writeOnly: true
+ gcm_key:
+ description: "Android: Your Google Push Messaging Auth Key"
+ nullable: true
+ type: string
+ chrome_web_origin:
+ description: "Chrome (All Browsers except Safari) (Recommended): The URL\
+ \ to your website. This field is required if you wish to enable web push\
+ \ and specify other web push parameters."
+ nullable: true
+ type: string
+ chrome_key:
+ description: Not for web push. Your Google Push Messaging Auth Key if you
+ use Chrome Apps / Extensions.
+ nullable: true
+ type: string
+ chrome_web_default_notification_icon:
+ description: "Chrome (All Browsers except Safari): Your default notification\
+ \ icon. Should be 256x256 pixels, min 80x80."
+ nullable: true
+ type: string
+ chrome_web_sub_domain:
+ description: "Chrome (All Browsers except Safari): A subdomain of your choice\
+ \ in order to support Web Push on non-HTTPS websites. This field must\
+ \ be set in order for the chrome_web_gcm_sender_id property to be processed."
+ nullable: true
+ type: string
+ apns_env:
+ description: "iOS: Either sandbox or production"
+ enum:
+ - sandbox
+ - production
+ nullable: true
+ type: string
+ apns_p12:
+ description: "iOS: Your apple push notification p12 certificate file, converted\
+ \ to a string and Base64 encoded."
+ type: string
+ writeOnly: true
+ apns_p12_password:
+ description: "iOS: Required if using p12 certificate. Password for the\
+ \ apns_p12 file."
+ type: string
+ writeOnly: true
+ apns_certificates:
+ nullable: true
+ readOnly: true
+ type: string
+ safari_apns_certificates:
+ readOnly: true
+ type: string
+ safari_apns_p12:
+ description: "Safari: Your apple push notification p12 certificate file\
+ \ for Safari Push Notifications, converted to a string and Base64 encoded."
+ type: string
+ writeOnly: true
+ safari_apns_p12_password:
+ description: "Safari: Password for safari_apns_p12 file"
+ type: string
+ writeOnly: true
+ apns_key_id:
+ description: "iOS: Required if using p8. Unique identifier for the p8 authentication\
+ \ key."
+ nullable: true
+ type: string
+ apns_team_id:
+ description: "iOS: Required if using p8. Team ID generated by Apple for\
+ \ your developer account."
+ nullable: true
+ type: string
+ apns_bundle_id:
+ description: "iOS: Required if using p8. Bundle ID for your app in the Apple\
+ \ ecosystem."
+ nullable: true
+ type: string
+ apns_p8:
+ description: "iOS: Required if using p8. Base64 encoded p8 key"
+ nullable: true
+ type: string
+ safari_site_origin:
+ description: "Safari (Recommended): The hostname to your website including\
+ \ http(s)://"
+ nullable: true
+ type: string
+ safari_push_id:
+ nullable: true
+ readOnly: true
+ type: string
+ safari_icon_16_16:
+ readOnly: true
+ type: string
+ safari_icon_32_32:
+ readOnly: true
+ type: string
+ safari_icon_64_64:
+ readOnly: true
+ type: string
+ safari_icon_128_128:
+ readOnly: true
+ type: string
+ safari_icon_256_256:
+ description: "Safari: A url for a 256x256 png notification icon. This is\
+ \ the only Safari icon URL you need to provide."
+ type: string
+ site_name:
+ description: "All Browsers (Recommended): The Site Name. Requires both chrome_web_origin\
+ \ and safari_site_origin to be set to add or update it."
+ nullable: true
+ type: string
+ basic_auth_key:
+ nullable: true
+ readOnly: true
+ type: string
+ organization_id:
+ description: The Id of the Organization you would like to add this app to.
+ type: string
+ writeOnly: true
+ additional_data_is_root_payload:
+ description: "iOS: Notification data (additional data) values will be added\
+ \ to the root of the apns payload when sent to the device. Ignore if\
+ \ you're not using any other plugins, or not using OneSignal SDK methods\
+ \ to read the payload."
+ type: boolean
+ writeOnly: true
+ type: object
+ Apps:
+ items:
+ $ref: '#/components/schemas/App'
+ type: array
+ SegmentNotificationTarget:
+ properties:
+ included_segments:
+ description: "The segment names you want to target. Users in these segments\
+ \ will receive a notification. This targeting parameter is only compatible\
+ \ with excluded_segments.\nExample: [\"Active Users\", \"Inactive Users\"\
+ ]\n"
+ items:
+ type: string
+ type: array
+ excluded_segments:
+ description: "Segment that will be excluded when sending. Users in these\
+ \ segments will not receive a notification, even if they were included\
+ \ in included_segments. This targeting parameter is only compatible with\
+ \ included_segments.\nExample: [\"Active Users\", \"Inactive Users\"]\n"
+ items:
+ type: string
+ type: array
+ type: object
+ SubscriptionNotificationTarget:
+ properties:
+ include_subscription_ids:
+ description: "Specific subscription ids to send your notification to. _Does\
+ \ not require API Auth Key._\nNot compatible with any other targeting\
+ \ parameters.\nExample: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"]\nLimit\
+ \ of 2,000 entries per REST API call\n"
+ items:
+ type: string
+ nullable: true
+ type: array
+ include_email_tokens:
+ deprecated: true
+ description: "Deprecated alias for `email_to`. Target specific email addresses.\
+ \ If an email does not correspond to an existing user, a new user will\
+ \ be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST\
+ \ API call. Prefer `email_to` in new integrations.\n"
+ items:
+ type: string
+ type: array
+ email_to:
+ description: "Recommended for Sending Emails - Target specific email addresses.\
+ \ If an email does not correspond to an existing user, a new user will\
+ \ be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST\
+ \ API call. Supersedes the deprecated `include_email_tokens` field.\n"
+ items:
+ type: string
+ type: array
+ include_phone_numbers:
+ description: "Recommended for Sending SMS - Target specific phone numbers.\
+ \ The phone number should be in the E.164 format. Phone number should\
+ \ be an existing subscriber on OneSignal. Refer our docs to learn how\
+ \ to add phone numbers to OneSignal.\nExample phone number: +1999999999\n\
+ Limit of 2,000 entries per REST API call\n"
+ items:
+ type: string
+ type: array
+ include_ios_tokens:
+ description: "Not Recommended: Please consider using include_subscription_ids\
+ \ or include_aliases instead.\nTarget using iOS device tokens.\nWarning:\
+ \ Only works with Production tokens.\nAll non-alphanumeric characters\
+ \ must be removed from each token. If a token does not correspond to an\
+ \ existing user, a new user will be created.\nExample: ce777617da7f548fe7a9ab6febb56cf39fba6d38203...\n\
+ Limit of 2,000 entries per REST API call\n"
+ items:
+ type: string
+ type: array
+ include_wp_wns_uris:
+ description: "Not Recommended: Please consider using include_subscription_ids\
+ \ or include_aliases instead.\nTarget using Windows URIs. If a token does\
+ \ not correspond to an existing user, a new user will be created.\nExample:\
+ \ http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-...\nLimit of 2,000 entries\
+ \ per REST API call\n"
+ items:
+ type: string
+ type: array
+ include_amazon_reg_ids:
+ description: "Not Recommended: Please consider using include_subscription_ids\
+ \ or include_aliases instead.\nTarget using Amazon ADM registration IDs.\
+ \ If a token does not correspond to an existing user, a new user will\
+ \ be created.\nExample: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV...\n\
+ Limit of 2,000 entries per REST API call\n"
+ items:
+ type: string
+ type: array
+ include_chrome_reg_ids:
+ description: "Not Recommended: Please consider using include_subscription_ids\
+ \ or include_aliases instead.\nTarget using Chrome App registration IDs.\
+ \ If a token does not correspond to an existing user, a new user will\
+ \ be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\nLimit\
+ \ of 2,000 entries per REST API call\n"
+ items:
+ type: string
+ type: array
+ include_chrome_web_reg_ids:
+ description: "Not Recommended: Please consider using include_subscription_ids\
+ \ or include_aliases instead.\nTarget using Chrome Web Push registration\
+ \ IDs. If a token does not correspond to an existing user, a new user\
+ \ will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\
+ Limit of 2,000 entries per REST API call\n"
+ items:
+ type: string
+ type: array
+ include_android_reg_ids:
+ description: "Not Recommended: Please consider using include_subscription_ids\
+ \ or include_aliases instead.\nTarget using Android device registration\
+ \ IDs. If a token does not correspond to an existing user, a new user\
+ \ will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\
+ Limit of 2,000 entries per REST API call\n"
+ items:
+ type: string
+ type: array
+ include_aliases:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ description: "Target specific users by aliases assigned via API. An alias\
+ \ can be an external_id, onesignal_id, or a custom alias.\nAccepts an\
+ \ object where keys are alias labels and values are arrays of alias IDs\
+ \ to include\nExample usage: { \"external_id\": [\"exId1\", \"extId2\"\
+ ], \"internal_label\": [\"id1\", \"id2\"] }\nKeys must match API spellings\
+ \ exactly (for example the label for External ID is the string `external_id`;\
+ \ arbitrary keys such as camelCase variants are not aliases and may yield\
+ \ no recipients).\nNot compatible with any other targeting parameters.\n\
+ REQUIRED: REST API Key Authentication\nLimit of 2,000 entries per REST\
+ \ API call\nNote: If targeting push, email, or sms subscribers with same\
+ \ ids, use with target_channel to indicate you are sending a push or email\
+ \ or sms."
+ nullable: true
+ type: object
+ target_channel:
+ enum:
+ - push
+ - email
+ - sms
+ type: string
+ type: object
+ NotificationTarget:
+ anyOf:
+ - $ref: '#/components/schemas/SegmentNotificationTarget'
+ - $ref: '#/components/schemas/SubscriptionNotificationTarget'
+ BasicNotification:
+ allOf:
+ - $ref: '#/components/schemas/NotificationTarget'
+ - $ref: '#/components/schemas/BasicNotification_allOf'
+ - required:
+ - app_id
+ Notification:
+ allOf:
+ - $ref: '#/components/schemas/BasicNotification'
+ - $ref: '#/components/schemas/Notification_allOf'
+ NotificationWithMeta:
+ allOf:
+ - $ref: '#/components/schemas/BasicNotification'
+ - $ref: '#/components/schemas/DeliveryData'
+ - $ref: '#/components/schemas/OutcomesData'
+ - $ref: '#/components/schemas/NotificationWithMeta_allOf'
+ Button:
+ properties:
+ id:
type: string
- name:
- description: "The name of your app, as displayed on your apps list on the\
- \ dashboard. This can be renamed."
+ text:
type: string
- players:
- readOnly: true
- type: integer
- messageable_players:
- readOnly: true
- type: integer
- updated_at:
- format: date-time
- readOnly: true
+ icon:
type: string
- created_at:
- format: date-time
- readOnly: true
+ required:
+ - id
+ type: object
+ WebButton:
+ properties:
+ id:
type: string
- android_gcm_sender_id:
- description: "Android: Your Google Project number. Also known as Sender\
- \ ID."
+ text:
type: string
- writeOnly: true
- gcm_key:
- description: "Android: Your Google Push Messaging Auth Key"
- nullable: true
+ icon:
+ type: string
+ url:
+ type: string
+ required:
+ - id
+ type: object
+ LanguageStringMap:
+ example:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
+ properties:
+ en:
+ description: Text in English. Will be used as a fallback
+ type: string
+ ar:
+ description: Text in Arabic.
+ type: string
+ bs:
+ description: Text in Bosnian.
+ type: string
+ bg:
+ description: Text in Bulgarian.
+ type: string
+ ca:
+ description: Text in Catalan.
+ type: string
+ zh-Hans:
+ description: Text in Chinese (Simplified).
+ type: string
+ zh-Hant:
+ description: Text in Chinese (Traditional).
+ type: string
+ zh:
+ description: Alias for zh-Hans.
+ type: string
+ hr:
+ description: Text in Croatian.
+ type: string
+ cs:
+ description: Text in Czech.
+ type: string
+ da:
+ description: Text in Danish.
+ type: string
+ nl:
+ description: Text in Dutch.
+ type: string
+ et:
+ description: Text in Estonian.
+ type: string
+ fi:
+ description: Text in Finnish.
+ type: string
+ fr:
+ description: Text in French.
+ type: string
+ ka:
+ description: Text in Georgian.
+ type: string
+ de:
+ description: Text in German.
+ type: string
+ el:
+ description: Text in Greek.
+ type: string
+ hi:
+ description: Text in Hindi.
+ type: string
+ he:
+ description: Text in Hebrew.
+ type: string
+ hu:
+ description: Text in Hungarian.
+ type: string
+ id:
+ description: Text in Indonesian.
+ type: string
+ it:
+ description: Text in Italian.
+ type: string
+ ja:
+ description: Text in Japanese.
+ type: string
+ ko:
+ description: Text in Korean.
+ type: string
+ lv:
+ description: Text in Latvian.
+ type: string
+ lt:
+ description: Text in Lithuanian.
+ type: string
+ ms:
+ description: Text in Malay.
+ type: string
+ nb:
+ description: Text in Norwegian.
+ type: string
+ pl:
+ description: Text in Polish.
+ type: string
+ fa:
+ description: Text in Persian.
+ type: string
+ pt:
+ description: Text in Portugese.
+ type: string
+ pa:
+ description: Text in Punjabi.
+ type: string
+ ro:
+ description: Text in Romanian.
+ type: string
+ ru:
+ description: Text in Russian.
+ type: string
+ sr:
+ description: Text in Serbian.
+ type: string
+ sk:
+ description: Text in Slovak.
+ type: string
+ es:
+ description: Text in Spanish.
+ type: string
+ sv:
+ description: Text in Swedish.
+ type: string
+ th:
+ description: Text in Thai.
+ type: string
+ tr:
+ description: Text in Turkish.
+ type: string
+ uk:
+ description: Text in Ukrainian.
+ type: string
+ vi:
+ description: Text in Vietnamese.
+ type: string
+ type: object
+ NotificationSlice:
+ example:
+ offset: 6
+ time_offset: time_offset
+ total_count: 0
+ limit: 1
+ next_time_offset: next_time_offset
+ notifications:
+ - null
+ - null
+ properties:
+ total_count:
+ type: integer
+ offset:
+ type: integer
+ limit:
+ type: integer
+ time_offset:
+ description: "The time_offset cursor specified in the request, if any."
type: string
- chrome_web_origin:
- description: "Chrome (All Browsers except Safari) (Recommended): The URL\
- \ to your website. This field is required if you wish to enable web push\
- \ and specify other web push parameters."
- nullable: true
+ next_time_offset:
+ description: An opaque Base64 cursor token representing the next page of
+ messages to fetch. Present when time_offset was provided in the request. Pass
+ this value as time_offset on the next request to continue paginating.
type: string
- chrome_key:
- description: Not for web push. Your Google Push Messaging Auth Key if you
- use Chrome Apps / Extensions.
+ notifications:
+ items:
+ $ref: '#/components/schemas/NotificationWithMeta'
+ type: array
+ type: object
+ PlatformDeliveryData:
+ description: Hash of delivery statistics broken out by target device platform.
+ properties:
+ edge_web_push:
+ $ref: '#/components/schemas/DeliveryData'
+ chrome_web_push:
+ $ref: '#/components/schemas/DeliveryData'
+ firefox_web_push:
+ $ref: '#/components/schemas/DeliveryData'
+ safari_web_push:
+ $ref: '#/components/schemas/DeliveryData'
+ android:
+ $ref: '#/components/schemas/DeliveryData'
+ ios:
+ $ref: '#/components/schemas/DeliveryData'
+ sms:
+ allOf:
+ - $ref: '#/components/schemas/DeliveryData'
+ - $ref: '#/components/schemas/PlatformDeliveryData_sms_allOf'
+ email:
+ allOf:
+ - $ref: '#/components/schemas/DeliveryData'
+ - $ref: '#/components/schemas/PlatformDeliveryData_email_allOf'
+ type: object
+ DeliveryData:
+ properties:
+ successful:
+ description: "Number of messages delivered to push servers, mobile carriers,\
+ \ or email service providers."
nullable: true
- type: string
- chrome_web_default_notification_icon:
- description: "Chrome (All Browsers except Safari): Your default notification\
- \ icon. Should be 256x256 pixels, min 80x80."
+ type: integer
+ failed:
+ description: Number of messages sent to unsubscribed devices.
nullable: true
- type: string
- chrome_web_sub_domain:
- description: "Chrome (All Browsers except Safari): A subdomain of your choice\
- \ in order to support Web Push on non-HTTPS websites. This field must\
- \ be set in order for the chrome_web_gcm_sender_id property to be processed."
+ type: integer
+ errored:
+ description: Number of errors reported.
nullable: true
- type: string
- apns_env:
- description: "iOS: Either sandbox or production"
- enum:
- - sandbox
- - production
+ type: integer
+ converted:
+ description: Number of messages that were clicked.
nullable: true
- type: string
- apns_p12:
- description: "iOS: Your apple push notification p12 certificate file, converted\
- \ to a string and Base64 encoded."
- type: string
- writeOnly: true
- apns_p12_password:
- description: "iOS: Required if using p12 certificate. Password for the\
- \ apns_p12 file."
- type: string
- writeOnly: true
- apns_certificates:
+ type: integer
+ received:
+ description: Number of devices that received the message.
nullable: true
- readOnly: true
+ type: integer
+ type: object
+ Purchase:
+ example:
+ amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ properties:
+ sku:
+ description: The unique identifier of the purchased item.
+ example: com.example.coins100
type: string
- safari_apns_certificates:
- readOnly: true
+ amount:
+ description: "The amount, in USD, spent purchasing the item."
+ example: "0.99"
type: string
- safari_apns_p12:
- description: "Safari: Your apple push notification p12 certificate file\
- \ for Safari Push Notifications, converted to a string and Base64 encoded."
+ iso:
+ description: The 3-letter ISO 4217 currency code. Required for correct storage
+ and conversion of amount.
+ example: USD
type: string
- writeOnly: true
- safari_apns_p12_password:
- description: "Safari: Password for safari_apns_p12 file"
+ count:
+ type: integer
+ required:
+ - amount
+ - iso
+ - sku
+ type: object
+ OutcomeData:
+ example:
+ aggregation: sum
+ id: id
+ value: 0
+ properties:
+ id:
type: string
- writeOnly: true
- apns_key_id:
- description: "iOS: Required if using p8. Unique identifier for the p8 authentication\
- \ key."
- nullable: true
+ value:
+ type: integer
+ aggregation:
+ enum:
+ - sum
+ - count
type: string
- apns_team_id:
- description: "iOS: Required if using p8. Team ID generated by Apple for\
- \ your developer account."
- nullable: true
+ required:
+ - aggregation
+ - id
+ - value
+ type: object
+ OutcomesData:
+ example:
+ outcomes:
+ - aggregation: sum
+ id: id
+ value: 0
+ - aggregation: sum
+ id: id
+ value: 0
+ properties:
+ outcomes:
+ items:
+ $ref: '#/components/schemas/OutcomeData'
+ type: array
+ type: object
+ Filter:
+ properties:
+ field:
+ description: Required. Name of the field to use as the first operand in
+ the filter expression.
+ example: tag
type: string
- apns_bundle_id:
- description: "iOS: Required if using p8. Bundle ID for your app in the Apple\
- \ ecosystem."
- nullable: true
+ key:
+ description: "If `field` is `tag`, this field is *required* to specify `key`\
+ \ inside the tags."
+ example: level
type: string
- apns_p8:
- description: "iOS: Required if using p8. Base64 encoded p8 key"
- nullable: true
+ value:
+ description: "Constant value to use as the second operand in the filter\
+ \ expression. This value is *required* when the relation operator is a\
+ \ binary operator. For `in_array` and `not_in_array` relations, provide\
+ \ a comma-separated list of up to 20 values."
+ example: "10"
type: string
- safari_site_origin:
- description: "Safari (Recommended): The hostname to your website including\
- \ http(s)://"
- nullable: true
+ hours_ago:
+ description: "If `field` is session-related, this is *required* to specify\
+ \ the number of hours before or after the user's session."
+ example: "24"
type: string
- safari_push_id:
- nullable: true
- readOnly: true
+ radius:
+ description: "If `field` is `location`, this will specify the radius in\
+ \ meters from a provided location point. Use with `lat` and `long`."
+ type: number
+ lat:
+ description: "If `field` is `location`, this is *required* to specify the\
+ \ user's latitude."
+ type: number
+ long:
+ description: "If `field` is `location`, this is *required* to specify the\
+ \ user's longitude."
+ type: number
+ relation:
+ description: Required. Operator of a filter expression.
+ enum:
+ - '>'
+ - <
+ - =
+ - '!='
+ - exists
+ - not_exists
+ - time_elapsed_gt
+ - time_elapsed_lt
+ - in_array
+ - not_in_array
type: string
- safari_icon_16_16:
- readOnly: true
+ type: object
+ Operator:
+ properties:
+ operator:
+ description: "Strictly, this must be either `\"OR\"`, or `\"AND\"`. It\
+ \ can be used to compose Filters as part of a Filters object."
+ enum:
+ - OR
+ - AND
type: string
- safari_icon_32_32:
- readOnly: true
+ type: object
+ FilterExpression:
+ oneOf:
+ - $ref: '#/components/schemas/Filter'
+ - $ref: '#/components/schemas/Operator'
+ Segment:
+ example:
+ name: Inactive 30 days
+ id: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
+ filters:
+ - null
+ - null
+ properties:
+ id:
+ description: "UUID of the segment. If left empty, it will be assigned automaticaly."
+ example: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
type: string
- safari_icon_64_64:
- readOnly: true
+ name:
+ description: Name of the segment. You'll see this name on the Web UI.
+ example: Inactive 30 days
type: string
- safari_icon_128_128:
- readOnly: true
+ filters:
+ description: "Filter or operators the segment will have. For a list of\
+ \ available filters with details, please see Send to Users Based on Filters."
+ items:
+ $ref: '#/components/schemas/FilterExpression'
+ type: array
+ required:
+ - filters
+ - name
+ type: object
+ SegmentData:
+ example:
+ is_active: true
+ updated_at: updated_at
+ read_only: true
+ name: name
+ created_at: created_at
+ id: id
+ app_id: app_id
+ properties:
+ id:
+ description: The segment ID
type: string
- safari_icon_256_256:
- description: "Safari: A url for a 256x256 png notification icon. This is\
- \ the only Safari icon URL you need to provide."
+ name:
+ description: The segment name
type: string
- site_name:
- description: "All Browsers (Recommended): The Site Name. Requires both chrome_web_origin\
- \ and safari_site_origin to be set to add or update it."
- nullable: true
+ created_at:
+ description: Date segment created
type: string
- basic_auth_key:
- nullable: true
- readOnly: true
+ updated_at:
+ description: Date segment last updated
type: string
- organization_id:
- description: The Id of the Organization you would like to add this app to.
+ app_id:
+ description: The app id
type: string
- writeOnly: true
- additional_data_is_root_payload:
- description: "iOS: Notification data (additional data) values will be added\
- \ to the root of the apns payload when sent to the device. Ignore if\
- \ you're not using any other plugins, or not using OneSignal SDK methods\
- \ to read the payload."
+ read_only:
+ description: Is the segment read only?
+ type: boolean
+ is_active:
+ description: Is the segment active?
type: boolean
- writeOnly: true
type: object
- Apps:
- items:
- $ref: '#/components/schemas/App'
- type: array
- SegmentNotificationTarget:
+ GetSegmentsSuccessResponse:
+ example:
+ offset: 6
+ total_count: 0
+ limit: 1
+ segments:
+ - is_active: true
+ updated_at: updated_at
+ read_only: true
+ name: name
+ created_at: created_at
+ id: id
+ app_id: app_id
+ - is_active: true
+ updated_at: updated_at
+ read_only: true
+ name: name
+ created_at: created_at
+ id: id
+ app_id: app_id
properties:
- included_segments:
- description: "The segment names you want to target. Users in these segments\
- \ will receive a notification. This targeting parameter is only compatible\
- \ with excluded_segments.\nExample: [\"Active Users\", \"Inactive Users\"\
- ]\n"
- items:
- type: string
- type: array
- excluded_segments:
- description: "Segment that will be excluded when sending. Users in these\
- \ segments will not receive a notification, even if they were included\
- \ in included_segments. This targeting parameter is only compatible with\
- \ included_segments.\nExample: [\"Active Users\", \"Inactive Users\"]\n"
+ total_count:
+ description: The number of Segments in the response.
+ type: integer
+ offset:
+ description: Set with the offset query parameter. Default 0.
+ type: integer
+ limit:
+ description: Maximum number of Segments returned. Default 300.
+ type: integer
+ segments:
+ description: An array containing the Segment information.
items:
- type: string
+ $ref: '#/components/schemas/SegmentData'
type: array
type: object
- SubscriptionNotificationTarget:
+ SegmentDetails:
+ description: Segment details. Only included when the include-segment-detail
+ query parameter is set to true.
+ example:
+ name: name
+ description: description
+ created_at: 6
+ id: id
+ source: default
+ filters:
+ - null
+ - null
properties:
- include_subscription_ids:
- description: "Specific subscription ids to send your notification to. _Does\
- \ not require API Auth Key._\nNot compatible with any other targeting\
- \ parameters.\nExample: [\"1dd608f2-c6a1-11e3-851d-000c2940e62c\"]\nLimit\
- \ of 2,000 entries per REST API call\n"
- items:
- type: string
+ id:
+ description: The unique identifier for the segment (UUID v4).
+ type: string
+ name:
+ description: The segment name.
+ type: string
+ description:
+ description: Human-readable description for the segment. `null` when unset.
+ Maximum 255 characters.
nullable: true
- type: array
- include_email_tokens:
- deprecated: true
- description: "Deprecated alias for `email_to`. Target specific email addresses.\
- \ If an email does not correspond to an existing user, a new user will\
- \ be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST\
- \ API call. Prefer `email_to` in new integrations.\n"
- items:
- type: string
- type: array
- email_to:
- description: "Recommended for Sending Emails - Target specific email addresses.\
- \ If an email does not correspond to an existing user, a new user will\
- \ be created. Example: nick@catfac.ts. Limit of 2,000 entries per REST\
- \ API call. Supersedes the deprecated `include_email_tokens` field.\n"
- items:
- type: string
- type: array
- include_phone_numbers:
- description: "Recommended for Sending SMS - Target specific phone numbers.\
- \ The phone number should be in the E.164 format. Phone number should\
- \ be an existing subscriber on OneSignal. Refer our docs to learn how\
- \ to add phone numbers to OneSignal.\nExample phone number: +1999999999\n\
- Limit of 2,000 entries per REST API call\n"
- items:
- type: string
- type: array
- include_ios_tokens:
- description: "Not Recommended: Please consider using include_subscription_ids\
- \ or include_aliases instead.\nTarget using iOS device tokens.\nWarning:\
- \ Only works with Production tokens.\nAll non-alphanumeric characters\
- \ must be removed from each token. If a token does not correspond to an\
- \ existing user, a new user will be created.\nExample: ce777617da7f548fe7a9ab6febb56cf39fba6d38203...\n\
- Limit of 2,000 entries per REST API call\n"
- items:
- type: string
- type: array
- include_wp_wns_uris:
- description: "Not Recommended: Please consider using include_subscription_ids\
- \ or include_aliases instead.\nTarget using Windows URIs. If a token does\
- \ not correspond to an existing user, a new user will be created.\nExample:\
- \ http://s.notify.live.net/u/1/bn1/HmQAAACPaLDr-...\nLimit of 2,000 entries\
- \ per REST API call\n"
- items:
- type: string
- type: array
- include_amazon_reg_ids:
- description: "Not Recommended: Please consider using include_subscription_ids\
- \ or include_aliases instead.\nTarget using Amazon ADM registration IDs.\
- \ If a token does not correspond to an existing user, a new user will\
- \ be created.\nExample: amzn1.adm-registration.v1.XpvSSUk0Rc3hTVVV...\n\
- Limit of 2,000 entries per REST API call\n"
- items:
- type: string
- type: array
- include_chrome_reg_ids:
- description: "Not Recommended: Please consider using include_subscription_ids\
- \ or include_aliases instead.\nTarget using Chrome App registration IDs.\
- \ If a token does not correspond to an existing user, a new user will\
- \ be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\nLimit\
- \ of 2,000 entries per REST API call\n"
- items:
- type: string
- type: array
- include_chrome_web_reg_ids:
- description: "Not Recommended: Please consider using include_subscription_ids\
- \ or include_aliases instead.\nTarget using Chrome Web Push registration\
- \ IDs. If a token does not correspond to an existing user, a new user\
- \ will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\
- Limit of 2,000 entries per REST API call\n"
+ type: string
+ created_at:
+ description: Unix timestamp when the segment was created.
+ type: integer
+ source:
+ description: The source of the segment.
+ enum:
+ - default
+ - custom
+ - quickstart
+ type: string
+ filters:
+ description: "Array of filter and operator objects defining the segment\
+ \ criteria. Uses the same format as the Create Segment API, so filters\
+ \ can be directly used to recreate or update the segment."
items:
- type: string
+ $ref: '#/components/schemas/FilterExpression'
type: array
- include_android_reg_ids:
- description: "Not Recommended: Please consider using include_subscription_ids\
- \ or include_aliases instead.\nTarget using Android device registration\
- \ IDs. If a token does not correspond to an existing user, a new user\
- \ will be created.\nExample: APA91bEeiUeSukAAUdnw3O2RB45FWlSpgJ7Ji_...\n\
- Limit of 2,000 entries per REST API call\n"
+ type: object
+ GetSegmentSuccessResponse:
+ example:
+ payload:
+ name: name
+ description: description
+ created_at: 6
+ id: id
+ source: default
+ filters:
+ - null
+ - null
+ subscriber_count: 0
+ properties:
+ subscriber_count:
+ description: The number of subscribers matching this segment.
+ type: integer
+ payload:
+ $ref: '#/components/schemas/SegmentDetails'
+ type: object
+ UpdateSegmentRequest:
+ example:
+ name: name
+ description: description
+ filters:
+ - null
+ - null
+ properties:
+ name:
+ description: Required. The segment name. Maximum 128 characters.
+ maxLength: 128
+ type: string
+ description:
+ description: Optional human-readable description for the segment. Maximum
+ 255 characters. Pass an empty string to clear; omit to leave unchanged.
+ maxLength: 255
+ type: string
+ filters:
+ description: "Optional. When provided, replaces all existing filters. Filters\
+ \ define the segment based on user properties like tags, activity, or\
+ \ location using flexible AND/OR logic. Limited to 200 total entries,\
+ \ including fields and OR operators."
items:
- type: string
+ $ref: '#/components/schemas/FilterExpression'
type: array
- include_aliases:
- additionalProperties:
- items:
- type: string
- type: array
- description: "Target specific users by aliases assigned via API. An alias\
- \ can be an external_id, onesignal_id, or a custom alias.\nAccepts an\
- \ object where keys are alias labels and values are arrays of alias IDs\
- \ to include\nExample usage: { \"external_id\": [\"exId1\", \"extId2\"\
- ], \"internal_label\": [\"id1\", \"id2\"] }\nKeys must match API spellings\
- \ exactly (for example the label for External ID is the string `external_id`;\
- \ arbitrary keys such as camelCase variants are not aliases and may yield\
- \ no recipients).\nNot compatible with any other targeting parameters.\n\
- REQUIRED: REST API Key Authentication\nLimit of 2,000 entries per REST\
- \ API call\nNote: If targeting push, email, or sms subscribers with same\
- \ ids, use with target_channel to indicate you are sending a push or email\
- \ or sms."
- nullable: true
- type: object
- target_channel:
- enum:
- - push
- - email
- - sms
- type: string
+ required:
+ - name
type: object
- NotificationTarget:
- anyOf:
- - $ref: '#/components/schemas/SegmentNotificationTarget'
- - $ref: '#/components/schemas/SubscriptionNotificationTarget'
- BasicNotification:
- allOf:
- - $ref: '#/components/schemas/NotificationTarget'
- - $ref: '#/components/schemas/BasicNotification_allOf'
- - required:
- - app_id
- Notification:
- allOf:
- - $ref: '#/components/schemas/BasicNotification'
- - $ref: '#/components/schemas/Notification_allOf'
- NotificationWithMeta:
- allOf:
- - $ref: '#/components/schemas/BasicNotification'
- - $ref: '#/components/schemas/DeliveryData'
- - $ref: '#/components/schemas/OutcomesData'
- - $ref: '#/components/schemas/NotificationWithMeta_allOf'
- Button:
+ UpdateSegmentSuccessResponse:
+ example:
+ success: true
+ id: id
properties:
+ success:
+ description: "true if the segment was updated successfully, false otherwise."
+ type: boolean
id:
+ description: UUID of the updated segment.
type: string
- text:
+ type: object
+ UpdateLiveActivityRequest:
+ example:
+ event_updates: "{}"
+ stale_date: 0
+ contents:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
+ sound: sound
+ name: name
+ headings:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
+ dismissal_date: 6
+ event: update
+ priority: 1
+ properties:
+ name:
+ description: An internal name to assist with your campaign organization.
+ This does not get displayed in the message itself.
type: string
- icon:
+ event:
+ enum:
+ - update
+ - end
+ type: string
+ event_updates:
+ description: This must match the ContentState interface you have defined
+ within your Live Activity in your app.
+ type: object
+ contents:
+ $ref: '#/components/schemas/LanguageStringMap'
+ headings:
+ $ref: '#/components/schemas/LanguageStringMap'
+ sound:
+ description: Sound file that is included in your app to play instead of
+ the default device notification sound. Omit to disable vibration and sound
+ for the notification.
type: string
+ stale_date:
+ description: "Accepts Unix timestamp in seconds. When time reaches the configured\
+ \ stale date, the system considers the Live Activity out of date, and\
+ \ the ActivityState of the Live Activity changes to ActivityState.stale."
+ type: integer
+ dismissal_date:
+ description: Accepts Unix timestamp in seconds; only allowed if event is
+ "end"
+ type: integer
+ priority:
+ description: "Delivery priority through the the push provider (APNs). Pass\
+ \ 10 for higher priority notifications, or 5 for lower priority notifications.\
+ \ Lower priority notifications are sent based on the power considerations\
+ \ of the end user's device. If not set, defaults to 10. Some providers\
+ \ (APNs) allow for a limited budget of high priority notifications per\
+ \ hour, and if that budget is exceeded, the provider may throttle notification\
+ \ delivery."
+ type: integer
required:
- - id
+ - event
+ - event_updates
+ - name
type: object
- WebButton:
+ IdentityObject:
+ additionalProperties:
+ type: string
+ example:
+ external_id: YOUR_USER_EXTERNAL_ID
+ type: object
+ PropertiesObject:
+ example:
+ country: US
+ purchases:
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ ip: 203.0.113.10
+ timezone_id: America/Los_Angeles
+ language: en
+ first_active: 1
+ last_active: 5
+ lat: 0.8008281904610115
+ long: 6.027456183070403
+ tags:
+ level: "10"
+ vip: "true"
+ amount_spent: 5.637376656633329
properties:
- id:
+ tags:
+ additionalProperties: true
+ example:
+ level: "10"
+ vip: "true"
+ type: object
+ language:
+ example: en
type: string
- text:
+ timezone_id:
+ example: America/Los_Angeles
type: string
- icon:
+ lat:
+ type: number
+ long:
+ type: number
+ country:
+ example: US
type: string
- url:
+ first_active:
+ type: integer
+ last_active:
+ type: integer
+ amount_spent:
+ type: number
+ purchases:
+ items:
+ $ref: '#/components/schemas/Purchase'
+ type: array
+ ip:
+ example: 203.0.113.10
type: string
- required:
- - id
type: object
- LanguageStringMap:
+ PropertiesDeltas:
example:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
+ purchases:
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ session_count: 6
+ session_time: 0
+ properties:
+ session_time:
+ type: integer
+ session_count:
+ type: integer
+ purchases:
+ items:
+ $ref: '#/components/schemas/Purchase'
+ type: array
+ type: object
+ Subscription:
+ example:
+ notification_types: 1
+ device_model: "iPhone14,2"
+ app_version: 1.0.0
+ web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
+ net_type: 9
+ type: iOSPush
+ device_os: "17.1"
+ enabled: true
+ session_time: 60
+ test_type: 7
+ token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
+ carrier: Verizon
+ session_count: 1
+ web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
+ rooted: true
+ id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
+ sdk: 5.2.0
properties:
- en:
- description: Text in English. Will be used as a fallback
- type: string
- ar:
- description: Text in Arabic.
- type: string
- bs:
- description: Text in Bosnian.
- type: string
- bg:
- description: Text in Bulgarian.
- type: string
- ca:
- description: Text in Catalan.
- type: string
- zh-Hans:
- description: Text in Chinese (Simplified).
- type: string
- zh-Hant:
- description: Text in Chinese (Traditional).
- type: string
- zh:
- description: Alias for zh-Hans.
- type: string
- hr:
- description: Text in Croatian.
- type: string
- cs:
- description: Text in Czech.
- type: string
- da:
- description: Text in Danish.
- type: string
- nl:
- description: Text in Dutch.
- type: string
- et:
- description: Text in Estonian.
- type: string
- fi:
- description: Text in Finnish.
- type: string
- fr:
- description: Text in French.
- type: string
- ka:
- description: Text in Georgian.
- type: string
- de:
- description: Text in German.
- type: string
- el:
- description: Text in Greek.
- type: string
- hi:
- description: Text in Hindi.
- type: string
- he:
- description: Text in Hebrew.
- type: string
- hu:
- description: Text in Hungarian.
- type: string
id:
- description: Text in Indonesian.
- type: string
- it:
- description: Text in Italian.
- type: string
- ja:
- description: Text in Japanese.
- type: string
- ko:
- description: Text in Korean.
- type: string
- lv:
- description: Text in Latvian.
- type: string
- lt:
- description: Text in Lithuanian.
- type: string
- ms:
- description: Text in Malay.
- type: string
- nb:
- description: Text in Norwegian.
- type: string
- pl:
- description: Text in Polish.
- type: string
- fa:
- description: Text in Persian.
- type: string
- pt:
- description: Text in Portugese.
- type: string
- pa:
- description: Text in Punjabi.
- type: string
- ro:
- description: Text in Romanian.
+ example: e4e87830-b954-4363-b7bc-1f01dbaee5c8
type: string
- ru:
- description: Text in Russian.
+ type:
+ enum:
+ - iOSPush
+ - AndroidPush
+ - FireOSPush
+ - ChromeExtensionPush
+ - ChromePush
+ - WindowsPush
+ - SafariLegacyPush
+ - FirefoxPush
+ - macOSPush
+ - HuaweiPush
+ - SafariPush
+ - Email
+ - SMS
type: string
- sr:
- description: Text in Serbian.
+ token:
+ example: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
type: string
- sk:
- description: Text in Slovak.
+ enabled:
+ example: true
+ type: boolean
+ notification_types:
+ example: 1
+ type: integer
+ session_time:
+ example: 60
+ type: integer
+ session_count:
+ example: 1
+ type: integer
+ sdk:
+ example: 5.2.0
type: string
- es:
- description: Text in Spanish.
+ device_model:
+ example: "iPhone14,2"
type: string
- sv:
- description: Text in Swedish.
+ device_os:
+ example: "17.1"
type: string
- th:
- description: Text in Thai.
+ rooted:
+ type: boolean
+ test_type:
+ type: integer
+ app_version:
+ example: 1.0.0
type: string
- tr:
- description: Text in Turkish.
+ net_type:
+ type: integer
+ carrier:
+ example: Verizon
type: string
- uk:
- description: Text in Ukrainian.
+ web_auth:
+ example: 5DUmpGmLuTxWCLj5lJpwLQ
type: string
- vi:
- description: Text in Vietnamese.
+ web_p256:
+ example: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
type: string
type: object
- NotificationSlice:
+ User:
example:
- offset: 6
- time_offset: time_offset
- total_count: 0
- limit: 1
- next_time_offset: next_time_offset
- notifications:
- - null
- - null
+ subscriptions:
+ - notification_types: 1
+ device_model: "iPhone14,2"
+ app_version: 1.0.0
+ web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
+ net_type: 9
+ type: iOSPush
+ device_os: "17.1"
+ enabled: true
+ session_time: 60
+ test_type: 7
+ token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
+ carrier: Verizon
+ session_count: 1
+ web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
+ rooted: true
+ id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
+ sdk: 5.2.0
+ - notification_types: 1
+ device_model: "iPhone14,2"
+ app_version: 1.0.0
+ web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
+ net_type: 9
+ type: iOSPush
+ device_os: "17.1"
+ enabled: true
+ session_time: 60
+ test_type: 7
+ token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
+ carrier: Verizon
+ session_count: 1
+ web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
+ rooted: true
+ id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
+ sdk: 5.2.0
+ identity:
+ external_id: YOUR_USER_EXTERNAL_ID
+ properties:
+ country: US
+ purchases:
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ ip: 203.0.113.10
+ timezone_id: America/Los_Angeles
+ language: en
+ first_active: 1
+ last_active: 5
+ lat: 0.8008281904610115
+ long: 6.027456183070403
+ tags:
+ level: "10"
+ vip: "true"
+ amount_spent: 5.637376656633329
properties:
- total_count:
- type: integer
- offset:
- type: integer
- limit:
- type: integer
- time_offset:
- description: "The time_offset cursor specified in the request, if any."
- type: string
- next_time_offset:
- description: An opaque Base64 cursor token representing the next page of
- messages to fetch. Present when time_offset was provided in the request. Pass
- this value as time_offset on the next request to continue paginating.
- type: string
- notifications:
+ properties:
+ $ref: '#/components/schemas/PropertiesObject'
+ identity:
+ additionalProperties:
+ type: string
+ example:
+ external_id: YOUR_USER_EXTERNAL_ID
+ type: object
+ subscriptions:
items:
- $ref: '#/components/schemas/NotificationWithMeta'
+ $ref: '#/components/schemas/Subscription'
type: array
type: object
- PlatformDeliveryData:
- description: Hash of delivery statistics broken out by target device platform.
+ UpdateUserRequest:
+ example:
+ refresh_device_metadata: false
+ deltas:
+ purchases:
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ session_count: 6
+ session_time: 0
+ properties:
+ country: US
+ purchases:
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ - amount: "0.99"
+ iso: USD
+ count: 2
+ sku: com.example.coins100
+ ip: 203.0.113.10
+ timezone_id: America/Los_Angeles
+ language: en
+ first_active: 1
+ last_active: 5
+ lat: 0.8008281904610115
+ long: 6.027456183070403
+ tags:
+ level: "10"
+ vip: "true"
+ amount_spent: 5.637376656633329
properties:
- edge_web_push:
- $ref: '#/components/schemas/DeliveryData'
- chrome_web_push:
- $ref: '#/components/schemas/DeliveryData'
- firefox_web_push:
- $ref: '#/components/schemas/DeliveryData'
- safari_web_push:
- $ref: '#/components/schemas/DeliveryData'
- android:
- $ref: '#/components/schemas/DeliveryData'
- ios:
- $ref: '#/components/schemas/DeliveryData'
- sms:
- allOf:
- - $ref: '#/components/schemas/DeliveryData'
- - $ref: '#/components/schemas/PlatformDeliveryData_sms_allOf'
- email:
- allOf:
- - $ref: '#/components/schemas/DeliveryData'
- - $ref: '#/components/schemas/PlatformDeliveryData_email_allOf'
+ properties:
+ $ref: '#/components/schemas/PropertiesObject'
+ refresh_device_metadata:
+ default: false
+ type: boolean
+ deltas:
+ $ref: '#/components/schemas/PropertiesDeltas'
type: object
- DeliveryData:
+ CreateNotificationSuccessResponse:
+ example:
+ external_id: external_id
+ id: id
+ errors: ""
properties:
- successful:
- description: "Number of messages delivered to push servers, mobile carriers,\
- \ or email service providers."
- nullable: true
- type: integer
- failed:
- description: Number of messages sent to unsubscribed devices.
- nullable: true
- type: integer
- errored:
- description: Number of errors reported.
- nullable: true
- type: integer
- converted:
- description: Number of messages that were clicked.
- nullable: true
- type: integer
- received:
- description: Number of devices that received the message.
+ id:
+ description: "Notification identifier when the request created a notification.\
+ \ An empty string means no notification was created; read `errors` for\
+ \ details (HTTP may still be 200). All OneSignal server SDKs expose message-sent\
+ \ / message-not-sent narrowing helpers (named idiomatically per language\
+ \ — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer\
+ \ them over comparing `id` directly."
+ type: string
+ external_id:
+ description: Optional correlation / idempotency-related value from the API
+ response. This is not the end-user External ID used for targeting recipients
+ (that lives under `include_aliases.external_id`).
nullable: true
- type: integer
+ type: string
+ errors:
+ description: "Polymorphic field: may be an array of human-readable strings\
+ \ and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`,\
+ \ or `invalid_player_ids`) depending on the API response; HTTP may still\
+ \ be 200 with partial success. Typed SDKs model this loosely so both shapes\
+ \ deserialize."
type: object
- Purchase:
+ GenericSuccessBoolResponse:
example:
- amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
+ success: true
+ properties:
+ success:
+ type: boolean
+ type: object
+ NotificationHistorySuccessResponse:
+ example:
+ success: true
+ destination_url: destination_url
properties:
- sku:
- description: The unique identifier of the purchased item.
- example: com.example.coins100
- type: string
- amount:
- description: "The amount, in USD, spent purchasing the item."
- example: "0.99"
- type: string
- iso:
- description: The 3-letter ISO 4217 currency code. Required for correct storage
- and conversion of amount.
- example: USD
+ success:
+ type: boolean
+ destination_url:
type: string
- count:
- type: integer
- required:
- - amount
- - iso
- - sku
type: object
- OutcomeData:
+ CreateSegmentSuccessResponse:
example:
- aggregation: sum
+ success: true
id: id
- value: 0
properties:
+ success:
+ type: boolean
id:
+ description: UUID of created segment
type: string
- value:
- type: integer
- aggregation:
- enum:
- - sum
- - count
- type: string
- required:
- - aggregation
- - id
- - value
type: object
- OutcomesData:
- example:
- outcomes:
- - aggregation: sum
- id: id
- value: 0
- - aggregation: sum
- id: id
- value: 0
+ CreateSegmentConflictResponse:
properties:
- outcomes:
+ success:
+ type: boolean
+ errors:
items:
- $ref: '#/components/schemas/OutcomeData'
+ type: string
type: array
type: object
- Filter:
+ ExportSubscriptionsSuccessResponse:
+ example:
+ csv_file_url: csv_file_url
properties:
- field:
- description: Required. Name of the field to use as the first operand in
- the filter expression.
- example: tag
- type: string
- key:
- description: "If `field` is `tag`, this field is *required* to specify `key`\
- \ inside the tags."
- example: level
- type: string
- value:
- description: "Constant value to use as the second operand in the filter\
- \ expression. This value is *required* when the relation operator is a\
- \ binary operator. For `in_array` and `not_in_array` relations, provide\
- \ a comma-separated list of up to 20 values."
- example: "10"
- type: string
- hours_ago:
- description: "If `field` is session-related, this is *required* to specify\
- \ the number of hours before or after the user's session."
- example: "24"
- type: string
- radius:
- description: "If `field` is `location`, this will specify the radius in\
- \ meters from a provided location point. Use with `lat` and `long`."
- type: number
- lat:
- description: "If `field` is `location`, this is *required* to specify the\
- \ user's latitude."
- type: number
- long:
- description: "If `field` is `location`, this is *required* to specify the\
- \ user's longitude."
- type: number
- relation:
- description: Required. Operator of a filter expression.
- enum:
- - '>'
- - <
- - =
- - '!='
- - exists
- - not_exists
- - time_elapsed_gt
- - time_elapsed_lt
- - in_array
- - not_in_array
+ csv_file_url:
type: string
type: object
- Operator:
+ UpdateLiveActivitySuccessResponse:
+ example:
+ id: id
properties:
- operator:
- description: "Strictly, this must be either `\"OR\"`, or `\"AND\"`. It\
- \ can be used to compose Filters as part of a Filters object."
- enum:
- - OR
- - AND
+ id:
type: string
type: object
- FilterExpression:
- oneOf:
- - $ref: '#/components/schemas/Filter'
- - $ref: '#/components/schemas/Operator'
- Segment:
+ StartLiveActivityRequest:
example:
- name: Inactive 30 days
- id: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
+ excluded_segments:
+ - excluded_segments
+ - excluded_segments
+ stale_date: 0
+ included_segments:
+ - included_segments
+ - included_segments
filters:
- null
- null
+ priority: 6
+ include_aliases:
+ key:
+ - include_aliases
+ - include_aliases
+ ios_relevance_score: 1.4658129805029452
+ event_updates: "{}"
+ contents:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
+ name: name
+ activity_id: activity_id
+ headings:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
+ idempotency_key: idempotency_key
+ event_attributes: "{}"
+ include_subscription_ids:
+ - include_subscription_ids
+ - include_subscription_ids
+ event: start
properties:
- id:
- description: "UUID of the segment. If left empty, it will be assigned automaticaly."
- example: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
- type: string
name:
- description: Name of the segment. You'll see this name on the Web UI.
- example: Inactive 30 days
+ description: An internal name to assist with your campaign organization.
+ This does not get displayed in the message itself.
+ type: string
+ event:
+ default: start
+ enum:
+ - start
+ type: string
+ activity_id:
+ description: Set a unique activity_id to track and manage the Live Activity.
+ type: string
+ event_attributes:
+ description: Default/static data to initialize the Live Activity upon start.
+ type: object
+ event_updates:
+ description: Dynamic content used to update the running Live Activity at
+ start. Must match the ContentState interface defined in your app.
+ type: object
+ contents:
+ $ref: '#/components/schemas/LanguageStringMap'
+ headings:
+ $ref: '#/components/schemas/LanguageStringMap'
+ stale_date:
+ description: "Accepts Unix timestamp in seconds. When time reaches the configured\
+ \ stale date, the system considers the Live Activity out of date, and\
+ \ the ActivityState of the Live Activity changes to ActivityState.stale."
+ type: integer
+ priority:
+ description: "Delivery priority through the push provider (APNs). Pass 10\
+ \ for higher priority notifications, or 5 for lower priority notifications.\
+ \ Lower priority notifications are sent based on the power considerations\
+ \ of the end user's device. If not set, defaults to 10."
+ type: integer
+ ios_relevance_score:
+ description: iOS 15+. A score to indicate how a notification should be displayed
+ when grouped. Use a float between 0-1.
+ nullable: true
+ type: number
+ idempotency_key:
+ description: "Correlation and idempotency key.\nA request received with\
+ \ this parameter will first look for another notification with the same\
+ \ idempotency key. If one exists, a notification will not be sent, and\
+ \ result of the previous operation will instead be returned. Therefore,\
+ \ if you plan on using this feature, it's important to use a good source\
+ \ of randomness to generate the UUID passed here.\nThis key is only idempotent\
+ \ for 30 days. After 30 days, the notification could be removed from our\
+ \ system and a notification with the same idempotency key will be sent\
+ \ again.\n See Idempotent Notification Requests for more details\nwriteOnly:\
+ \ true\n"
+ nullable: true
type: string
+ include_aliases:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ description: "Target specific users by aliases assigned via API. An alias\
+ \ can be an external_id, onesignal_id, or a custom alias.\nAccepts an\
+ \ object where keys are alias labels and values are arrays of alias IDs\
+ \ to include\nExample usage: { \"external_id\": [\"exId1\", \"extId2\"\
+ ], \"internal_label\": [\"id1\", \"id2\"] }\nKeys must match API spellings\
+ \ exactly (for example the label for External ID is the string `external_id`;\
+ \ arbitrary keys such as camelCase variants are not aliases and may yield\
+ \ no recipients).\nNot compatible with any other targeting parameters.\n\
+ REQUIRED: REST API Key Authentication\nLimit of 2,000 entries per REST\
+ \ API call\nNote: If targeting push, email, or sms subscribers with same\
+ \ ids, use with target_channel to indicate you are sending a push or email\
+ \ or sms."
+ nullable: true
+ type: object
+ include_subscription_ids:
+ description: Specific subscription ids to target. Not compatible with other
+ targeting parameters.
+ items:
+ type: string
+ nullable: true
+ type: array
+ included_segments:
+ description: Segment names to include. Only compatible with excluded_segments.
+ items:
+ type: string
+ nullable: true
+ type: array
+ excluded_segments:
+ description: Segment names to exclude. Only compatible with included_segments.
+ items:
+ type: string
+ nullable: true
+ type: array
filters:
- description: "Filter or operators the segment will have. For a list of\
- \ available filters with details, please see Send to Users Based on Filters."
items:
$ref: '#/components/schemas/FilterExpression'
+ nullable: true
type: array
required:
- - filters
+ - activity_id
+ - contents
+ - event
+ - event_attributes
+ - event_updates
+ - headings
- name
type: object
- SegmentData:
+ StartLiveActivitySuccessResponse:
example:
- is_active: true
- updated_at: updated_at
- read_only: true
+ notification_id: notification_id
+ properties:
+ notification_id:
+ type: string
+ type: object
+ IncludeAliases:
+ additionalProperties:
+ items:
+ type: string
+ type: array
+ description: "Target specific users by aliases assigned via API. An alias can\
+ \ be an external_id, onesignal_id, or a custom alias.\nAccepts an object where\
+ \ keys are alias labels and values are arrays of alias IDs to include\nExample\
+ \ usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"\
+ id1\", \"id2\"] }\nKeys must match API spellings exactly (for example the\
+ \ label for External ID is the string `external_id`; arbitrary keys such as\
+ \ camelCase variants are not aliases and may yield no recipients).\nNot compatible\
+ \ with any other targeting parameters.\nREQUIRED: REST API Key Authentication\n\
+ Limit of 2,000 entries per REST API call\nNote: If targeting push, email,\
+ \ or sms subscribers with same ids, use with target_channel to indicate you\
+ \ are sending a push or email or sms."
+ nullable: true
+ type: object
+ CreateTemplateRequest:
+ example:
+ isSMS: true
+ email_body: email_body
+ contents:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
+ subtitle:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
name: name
- created_at: created_at
- id: id
+ isEmail: true
+ email_bcc:
+ - email_bcc
+ - email_bcc
+ - email_bcc
+ - email_bcc
+ - email_bcc
+ headings:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
+ dynamic_content: dynamic_content
app_id: app_id
+ email_subject: email_subject
properties:
- id:
- description: The segment ID
- type: string
- name:
- description: The segment name
- type: string
- created_at:
- description: Date segment created
- type: string
- updated_at:
- description: Date segment last updated
- type: string
app_id:
- description: The app id
- type: string
- read_only:
- description: Is the segment read only?
- type: boolean
- is_active:
- description: Is the segment active?
- type: boolean
- type: object
- GetSegmentsSuccessResponse:
- example:
- offset: 6
- total_count: 0
- limit: 1
- segments:
- - is_active: true
- updated_at: updated_at
- read_only: true
- name: name
- created_at: created_at
- id: id
- app_id: app_id
- - is_active: true
- updated_at: updated_at
- read_only: true
- name: name
- created_at: created_at
- id: id
- app_id: app_id
- properties:
- total_count:
- description: The number of Segments in the response.
- type: integer
- offset:
- description: Set with the offset query parameter. Default 0.
- type: integer
- limit:
- description: Maximum number of Segments returned. Default 300.
- type: integer
- segments:
- description: An array containing the Segment information.
- items:
- $ref: '#/components/schemas/SegmentData'
- type: array
- type: object
- SegmentDetails:
- description: Segment details. Only included when the include-segment-detail
- query parameter is set to true.
- example:
- name: name
- description: description
- created_at: 6
- id: id
- source: default
- filters:
- - null
- - null
- properties:
- id:
- description: The unique identifier for the segment (UUID v4).
+ description: Your OneSignal App ID in UUID v4 format.
type: string
name:
- description: The segment name.
+ description: Name of the template.
type: string
- description:
- description: Human-readable description for the segment. `null` when unset.
- Maximum 255 characters.
+ contents:
+ $ref: '#/components/schemas/LanguageStringMap'
+ headings:
+ $ref: '#/components/schemas/LanguageStringMap'
+ subtitle:
+ $ref: '#/components/schemas/LanguageStringMap'
+ isEmail:
+ description: Set true for an Email template.
+ type: boolean
+ email_subject:
+ description: Subject of the email.
nullable: true
type: string
- created_at:
- description: Unix timestamp when the segment was created.
- type: integer
- source:
- description: The source of the segment.
- enum:
- - default
- - custom
- - quickstart
+ email_body:
+ description: Body of the email (HTML supported).
+ nullable: true
type: string
- filters:
- description: "Array of filter and operator objects defining the segment\
- \ criteria. Uses the same format as the Create Segment API, so filters\
- \ can be directly used to recreate or update the segment."
+ email_bcc:
+ description: BCC recipients for the email template. Maximum 5 addresses.
+ Only supported when the email service provider is OneSignal Email.
items:
- $ref: '#/components/schemas/FilterExpression'
+ type: string
+ maxItems: 5
+ nullable: true
type: array
- type: object
- GetSegmentSuccessResponse:
- example:
- payload:
- name: name
- description: description
- created_at: 6
- id: id
- source: default
- filters:
- - null
- - null
- subscriber_count: 0
- properties:
- subscriber_count:
- description: The number of subscribers matching this segment.
- type: integer
- payload:
- $ref: '#/components/schemas/SegmentDetails'
- type: object
- UpdateSegmentRequest:
- example:
- name: name
- description: description
- filters:
- - null
- - null
- properties:
- name:
- description: Required. The segment name. Maximum 128 characters.
- maxLength: 128
- type: string
- description:
- description: Optional human-readable description for the segment. Maximum
- 255 characters. Pass an empty string to clear; omit to leave unchanged.
- maxLength: 255
+ isSMS:
+ description: Set true for an SMS template.
+ type: boolean
+ dynamic_content:
+ description: JSON string for dynamic content personalization.
+ nullable: true
type: string
- filters:
- description: "Optional. When provided, replaces all existing filters. Filters\
- \ define the segment based on user properties like tags, activity, or\
- \ location using flexible AND/OR logic. Limited to 200 total entries,\
- \ including fields and OR operators."
- items:
- $ref: '#/components/schemas/FilterExpression'
- type: array
required:
+ - app_id
+ - contents
- name
type: object
- UpdateSegmentSuccessResponse:
- example:
- success: true
- id: id
- properties:
- success:
- description: "true if the segment was updated successfully, false otherwise."
- type: boolean
- id:
- description: UUID of the updated segment.
- type: string
- type: object
- UpdateLiveActivityRequest:
+ UpdateTemplateRequest:
example:
- event_updates: "{}"
- stale_date: 0
+ isSMS: true
+ email_body: email_body
contents:
de: de
hi: hi
@@ -4041,8 +5473,58 @@ components:
ro: ro
nl: nl
tr: tr
- sound: sound
+ subtitle:
+ de: de
+ hi: hi
+ fi: fi
+ ru: ru
+ pt: pt
+ bg: bg
+ lt: lt
+ hr: hr
+ lv: lv
+ fr: fr
+ hu: hu
+ bs: bs
+ zh-Hans: zh-Hans
+ zh-Hant: zh-Hant
+ ka: ka
+ uk: uk
+ sk: sk
+ id: id
+ ca: ca
+ sr: sr
+ sv: sv
+ ko: ko
+ ms: ms
+ el: el
+ en: en
+ it: it
+ zh: zh
+ es: es
+ et: et
+ cs: cs
+ ar: ar
+ pa: pa
+ vi: vi
+ nb: nb
+ th: th
+ ja: ja
+ fa: fa
+ pl: pl
+ da: da
+ he: he
+ ro: ro
+ nl: nl
+ tr: tr
name: name
+ isEmail: true
+ email_bcc:
+ - email_bcc
+ - email_bcc
+ - email_bcc
+ - email_bcc
+ - email_bcc
headings:
de: de
hi: hi
@@ -4087,262 +5569,135 @@ components:
ro: ro
nl: nl
tr: tr
- dismissal_date: 6
- event: update
- priority: 1
+ dynamic_content: dynamic_content
+ email_subject: email_subject
properties:
name:
- description: An internal name to assist with your campaign organization.
- This does not get displayed in the message itself.
- type: string
- event:
- enum:
- - update
- - end
- type: string
- event_updates:
- description: This must match the ContentState interface you have defined
- within your Live Activity in your app.
- type: object
+ description: Updated name of the template.
+ type: string
contents:
$ref: '#/components/schemas/LanguageStringMap'
headings:
$ref: '#/components/schemas/LanguageStringMap'
- sound:
- description: Sound file that is included in your app to play instead of
- the default device notification sound. Omit to disable vibration and sound
- for the notification.
+ subtitle:
+ $ref: '#/components/schemas/LanguageStringMap'
+ isEmail:
+ description: Set true for an Email template.
+ type: boolean
+ email_subject:
+ description: Subject of the email.
+ nullable: true
+ type: string
+ email_body:
+ description: Body of the email (HTML supported).
+ nullable: true
+ type: string
+ email_bcc:
+ description: BCC recipients for the email template. Maximum 5 addresses.
+ Only supported when the email service provider is OneSignal Email.
+ items:
+ type: string
+ maxItems: 5
+ nullable: true
+ type: array
+ isSMS:
+ description: Set true for an SMS template.
+ type: boolean
+ dynamic_content:
+ description: JSON string for dynamic content personalization.
+ nullable: true
type: string
- stale_date:
- description: "Accepts Unix timestamp in seconds. When time reaches the configured\
- \ stale date, the system considers the Live Activity out of date, and\
- \ the ActivityState of the Live Activity changes to ActivityState.stale."
- type: integer
- dismissal_date:
- description: Accepts Unix timestamp in seconds; only allowed if event is
- "end"
- type: integer
- priority:
- description: "Delivery priority through the the push provider (APNs). Pass\
- \ 10 for higher priority notifications, or 5 for lower priority notifications.\
- \ Lower priority notifications are sent based on the power considerations\
- \ of the end user's device. If not set, defaults to 10. Some providers\
- \ (APNs) allow for a limited budget of high priority notifications per\
- \ hour, and if that budget is exceeded, the provider may throttle notification\
- \ delivery."
- type: integer
- required:
- - event
- - event_updates
- - name
- type: object
- IdentityObject:
- additionalProperties:
- type: string
- example:
- external_id: YOUR_USER_EXTERNAL_ID
type: object
- PropertiesObject:
+ TemplateResource:
example:
- country: US
- purchases:
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- ip: 203.0.113.10
- timezone_id: America/Los_Angeles
- language: en
- first_active: 1
- last_active: 5
- lat: 0.8008281904610115
- long: 6.027456183070403
- tags:
- level: "10"
- vip: "true"
- amount_spent: 5.637376656633329
+ updated_at: 2000-01-23T04:56:07.000+00:00
+ name: name
+ channel: push
+ created_at: 2000-01-23T04:56:07.000+00:00
+ id: id
+ content:
+ key: ""
properties:
- tags:
- additionalProperties: true
- example:
- level: "10"
- vip: "true"
- type: object
- language:
- example: en
+ id:
type: string
- timezone_id:
- example: America/Los_Angeles
+ name:
type: string
- lat:
- type: number
- long:
- type: number
- country:
- example: US
+ created_at:
+ format: date-time
type: string
- first_active:
- type: integer
- last_active:
- type: integer
- amount_spent:
- type: number
- purchases:
- items:
- $ref: '#/components/schemas/Purchase'
- type: array
- ip:
- example: 203.0.113.10
+ updated_at:
+ format: date-time
+ type: string
+ channel:
+ enum:
+ - push
+ - email
+ - sms
+ nullable: true
type: string
+ content:
+ additionalProperties: true
+ description: Rendered content and channel/platform flags for the template.
+ type: object
type: object
- PropertiesDeltas:
+ TemplatesListResponse:
example:
- purchases:
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- session_count: 6
- session_time: 0
+ templates:
+ - updated_at: 2000-01-23T04:56:07.000+00:00
+ name: name
+ channel: push
+ created_at: 2000-01-23T04:56:07.000+00:00
+ id: id
+ content:
+ key: ""
+ - updated_at: 2000-01-23T04:56:07.000+00:00
+ name: name
+ channel: push
+ created_at: 2000-01-23T04:56:07.000+00:00
+ id: id
+ content:
+ key: ""
properties:
- session_time:
- type: integer
- session_count:
- type: integer
- purchases:
+ templates:
items:
- $ref: '#/components/schemas/Purchase'
+ $ref: '#/components/schemas/TemplateResource'
type: array
type: object
- Subscription:
+ CopyTemplateRequest:
example:
- notification_types: 1
- device_model: "iPhone14,2"
- app_version: 1.0.0
- web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
- net_type: 9
- type: iOSPush
- device_os: "17.1"
- enabled: true
- session_time: 60
- test_type: 7
- token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
- carrier: Verizon
- session_count: 1
- web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
- rooted: true
- id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
- sdk: 5.2.0
+ target_app_id: target_app_id
properties:
- id:
- example: e4e87830-b954-4363-b7bc-1f01dbaee5c8
- type: string
- type:
- enum:
- - iOSPush
- - AndroidPush
- - FireOSPush
- - ChromeExtensionPush
- - ChromePush
- - WindowsPush
- - SafariLegacyPush
- - FirefoxPush
- - macOSPush
- - HuaweiPush
- - SafariPush
- - Email
- - SMS
- type: string
- token:
- example: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
- type: string
- enabled:
- example: true
- type: boolean
- notification_types:
- example: 1
- type: integer
- session_time:
- example: 60
- type: integer
- session_count:
- example: 1
- type: integer
- sdk:
- example: 5.2.0
- type: string
- device_model:
- example: "iPhone14,2"
- type: string
- device_os:
- example: "17.1"
- type: string
- rooted:
- type: boolean
- test_type:
- type: integer
- app_version:
- example: 1.0.0
- type: string
- net_type:
- type: integer
- carrier:
- example: Verizon
- type: string
- web_auth:
- example: 5DUmpGmLuTxWCLj5lJpwLQ
+ target_app_id:
+ description: Destination OneSignal App ID in UUID v4 format.
type: string
- web_p256:
- example: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
+ required:
+ - target_app_id
+ type: object
+ CreateUserConflictResponse:
+ properties:
+ errors:
+ items:
+ $ref: '#/components/schemas/CreateUserConflictResponse_errors_inner'
+ type: array
+ type: object
+ GenericError:
+ properties:
+ errors: {}
+ success:
+ type: boolean
+ reference: {}
+ type: object
+ RateLimitError:
+ properties:
+ errors:
+ items:
+ type: string
+ type: array
+ limit:
type: string
type: object
- User:
+ PropertiesBody:
example:
- subscriptions:
- - notification_types: 1
- device_model: "iPhone14,2"
- app_version: 1.0.0
- web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
- net_type: 9
- type: iOSPush
- device_os: "17.1"
- enabled: true
- session_time: 60
- test_type: 7
- token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
- carrier: Verizon
- session_count: 1
- web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
- rooted: true
- id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
- sdk: 5.2.0
- - notification_types: 1
- device_model: "iPhone14,2"
- app_version: 1.0.0
- web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
- net_type: 9
- type: iOSPush
- device_os: "17.1"
- enabled: true
- session_time: 60
- test_type: 7
- token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
- carrier: Verizon
- session_count: 1
- web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
- rooted: true
- id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
- sdk: 5.2.0
- identity:
- external_id: YOUR_USER_EXTERNAL_ID
properties:
country: US
purchases:
@@ -4368,1302 +5723,2261 @@ components:
properties:
properties:
$ref: '#/components/schemas/PropertiesObject'
+ type: object
+ SubscriptionBody:
+ example:
+ subscription:
+ notification_types: 1
+ device_model: "iPhone14,2"
+ app_version: 1.0.0
+ web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
+ net_type: 9
+ type: iOSPush
+ device_os: "17.1"
+ enabled: true
+ session_time: 60
+ test_type: 7
+ token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
+ carrier: Verizon
+ session_count: 1
+ web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
+ rooted: true
+ id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
+ sdk: 5.2.0
+ properties:
+ subscription:
+ $ref: '#/components/schemas/Subscription'
+ type: object
+ TransferSubscriptionRequestBody:
+ example:
+ identity:
+ key: identity
+ properties:
+ identity:
+ additionalProperties:
+ type: string
+ maxProperties: 1
+ minProperties: 1
+ type: object
+ type: object
+ UserIdentityBody:
+ example:
+ identity:
+ external_id: YOUR_USER_EXTERNAL_ID
+ properties:
identity:
additionalProperties:
type: string
example:
external_id: YOUR_USER_EXTERNAL_ID
type: object
- subscriptions:
- items:
- $ref: '#/components/schemas/Subscription'
- type: array
type: object
- UpdateUserRequest:
+ ExportEventsSuccessResponse:
example:
- refresh_device_metadata: false
- deltas:
- purchases:
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- session_count: 6
- session_time: 0
- properties:
- country: US
- purchases:
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- ip: 203.0.113.10
- timezone_id: America/Los_Angeles
- language: en
- first_active: 1
- last_active: 5
- lat: 0.8008281904610115
- long: 6.027456183070403
- tags:
- level: "10"
- vip: "true"
- amount_spent: 5.637376656633329
+ csv_file_url: csv_file_url
properties:
- properties:
- $ref: '#/components/schemas/PropertiesObject'
- refresh_device_metadata:
- default: false
- type: boolean
- deltas:
- $ref: '#/components/schemas/PropertiesDeltas'
+ csv_file_url:
+ type: string
type: object
- CreateNotificationSuccessResponse:
+ CustomEvent:
example:
+ onesignal_id: onesignal_id
+ payload:
+ key: ""
+ name: name
external_id: external_id
- id: id
- errors: ""
+ timestamp: 2000-01-23T04:56:07.000+00:00
properties:
- id:
- description: "Notification identifier when the request created a notification.\
- \ An empty string means no notification was created; read `errors` for\
- \ details (HTTP may still be 200). All OneSignal server SDKs expose message-sent\
- \ / message-not-sent narrowing helpers (named idiomatically per language\
- \ — e.g. `isMessageSent`, `is_message_sent`, `message_sent?`); prefer\
- \ them over comparing `id` directly."
+ name:
+ description: The identifier or name of the event. Maximum 128 characters.
type: string
external_id:
- description: Optional correlation / idempotency-related value from the API
- response. This is not the end-user External ID used for targeting recipients
- (that lives under `include_aliases.external_id`).
+ description: The external ID of the user targeted for the event. Either
+ the user's External ID or OneSignal ID is required.
nullable: true
type: string
- errors:
- description: "Polymorphic field: may be an array of human-readable strings\
- \ and/or an object (for example with `invalid_aliases`, `invalid_external_user_ids`,\
- \ or `invalid_player_ids`) depending on the API response; HTTP may still\
- \ be 200 with partial success. Typed SDKs model this loosely so both shapes\
- \ deserialize."
+ onesignal_id:
+ description: The OneSignal ID of the user targeted for the event. Either
+ the user's External ID or OneSignal ID is required.
+ nullable: true
+ type: string
+ timestamp:
+ description: Time the event occurred as an ISO8601 formatted string. Defaults
+ to now if not included or past date provided.
+ format: date-time
+ type: string
+ payload:
+ additionalProperties: true
+ description: "Properties or data related to the event, like {\"geography\"\
+ : \"USA\"}"
+ type: object
+ required:
+ - name
type: object
- GenericSuccessBoolResponse:
+ CustomEventsRequest:
example:
- success: true
+ events:
+ - onesignal_id: onesignal_id
+ payload:
+ key: ""
+ name: name
+ external_id: external_id
+ timestamp: 2000-01-23T04:56:07.000+00:00
+ - onesignal_id: onesignal_id
+ payload:
+ key: ""
+ name: name
+ external_id: external_id
+ timestamp: 2000-01-23T04:56:07.000+00:00
properties:
- success:
- type: boolean
+ events:
+ items:
+ $ref: '#/components/schemas/CustomEvent'
+ type: array
+ required:
+ - events
type: object
- NotificationHistorySuccessResponse:
- example:
- success: true
- destination_url: destination_url
- properties:
- success:
- type: boolean
- destination_url:
- type: string
+ CustomEventsResponse:
type: object
- CreateSegmentSuccessResponse:
+ ApiKeyToken:
example:
- success: true
- id: id
+ token_id: token_id
+ updated_at: updated_at
+ name: name
+ created_at: created_at
+ ip_allowlist_mode: disabled
+ ip_allowlist:
+ - ip_allowlist
+ - ip_allowlist
properties:
- success:
- type: boolean
- id:
- description: UUID of created segment
+ token_id:
+ type: string
+ updated_at:
+ type: string
+ created_at:
+ type: string
+ name:
type: string
- type: object
- CreateSegmentConflictResponse:
- properties:
- success:
- type: boolean
- errors:
+ ip_allowlist_mode:
+ enum:
+ - disabled
+ - explicit
+ type: string
+ ip_allowlist:
items:
type: string
type: array
type: object
- ExportSubscriptionsSuccessResponse:
- example:
- csv_file_url: csv_file_url
- properties:
- csv_file_url:
- type: string
- type: object
- UpdateLiveActivitySuccessResponse:
+ ApiKeyTokensListResponse:
example:
- id: id
+ tokens:
+ - token_id: token_id
+ updated_at: updated_at
+ name: name
+ created_at: created_at
+ ip_allowlist_mode: disabled
+ ip_allowlist:
+ - ip_allowlist
+ - ip_allowlist
+ - token_id: token_id
+ updated_at: updated_at
+ name: name
+ created_at: created_at
+ ip_allowlist_mode: disabled
+ ip_allowlist:
+ - ip_allowlist
+ - ip_allowlist
properties:
- id:
- type: string
+ tokens:
+ items:
+ $ref: '#/components/schemas/ApiKeyToken'
+ type: array
type: object
- StartLiveActivityRequest:
+ CreateApiKeyRequest:
example:
- excluded_segments:
- - excluded_segments
- - excluded_segments
- stale_date: 0
- included_segments:
- - included_segments
- - included_segments
- filters:
- - null
- - null
- priority: 6
- include_aliases:
- key:
- - include_aliases
- - include_aliases
- ios_relevance_score: 1.4658129805029452
- event_updates: "{}"
- contents:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
name: name
- activity_id: activity_id
- headings:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
- idempotency_key: idempotency_key
- event_attributes: "{}"
- include_subscription_ids:
- - include_subscription_ids
- - include_subscription_ids
- event: start
+ ip_allowlist_mode: disabled
+ ip_allowlist:
+ - ip_allowlist
+ - ip_allowlist
properties:
name:
- description: An internal name to assist with your campaign organization.
- This does not get displayed in the message itself.
type: string
- event:
- default: start
+ ip_allowlist_mode:
enum:
- - start
- type: string
- activity_id:
- description: Set a unique activity_id to track and manage the Live Activity.
- type: string
- event_attributes:
- description: Default/static data to initialize the Live Activity upon start.
- type: object
- event_updates:
- description: Dynamic content used to update the running Live Activity at
- start. Must match the ContentState interface defined in your app.
- type: object
- contents:
- $ref: '#/components/schemas/LanguageStringMap'
- headings:
- $ref: '#/components/schemas/LanguageStringMap'
- stale_date:
- description: "Accepts Unix timestamp in seconds. When time reaches the configured\
- \ stale date, the system considers the Live Activity out of date, and\
- \ the ActivityState of the Live Activity changes to ActivityState.stale."
- type: integer
- priority:
- description: "Delivery priority through the push provider (APNs). Pass 10\
- \ for higher priority notifications, or 5 for lower priority notifications.\
- \ Lower priority notifications are sent based on the power considerations\
- \ of the end user's device. If not set, defaults to 10."
- type: integer
- ios_relevance_score:
- description: iOS 15+. A score to indicate how a notification should be displayed
- when grouped. Use a float between 0-1.
- nullable: true
- type: number
- idempotency_key:
- description: "Correlation and idempotency key.\nA request received with\
- \ this parameter will first look for another notification with the same\
- \ idempotency key. If one exists, a notification will not be sent, and\
- \ result of the previous operation will instead be returned. Therefore,\
- \ if you plan on using this feature, it's important to use a good source\
- \ of randomness to generate the UUID passed here.\nThis key is only idempotent\
- \ for 30 days. After 30 days, the notification could be removed from our\
- \ system and a notification with the same idempotency key will be sent\
- \ again.\n See Idempotent Notification Requests for more details\nwriteOnly:\
- \ true\n"
- nullable: true
+ - disabled
+ - explicit
type: string
- include_aliases:
- additionalProperties:
- items:
- type: string
- type: array
- description: "Target specific users by aliases assigned via API. An alias\
- \ can be an external_id, onesignal_id, or a custom alias.\nAccepts an\
- \ object where keys are alias labels and values are arrays of alias IDs\
- \ to include\nExample usage: { \"external_id\": [\"exId1\", \"extId2\"\
- ], \"internal_label\": [\"id1\", \"id2\"] }\nKeys must match API spellings\
- \ exactly (for example the label for External ID is the string `external_id`;\
- \ arbitrary keys such as camelCase variants are not aliases and may yield\
- \ no recipients).\nNot compatible with any other targeting parameters.\n\
- REQUIRED: REST API Key Authentication\nLimit of 2,000 entries per REST\
- \ API call\nNote: If targeting push, email, or sms subscribers with same\
- \ ids, use with target_channel to indicate you are sending a push or email\
- \ or sms."
- nullable: true
- type: object
- include_subscription_ids:
- description: Specific subscription ids to target. Not compatible with other
- targeting parameters.
- items:
- type: string
- nullable: true
- type: array
- included_segments:
- description: Segment names to include. Only compatible with excluded_segments.
+ ip_allowlist:
items:
type: string
- nullable: true
type: array
- excluded_segments:
- description: Segment names to exclude. Only compatible with included_segments.
+ type: object
+ CreateApiKeyResponse:
+ example:
+ token_id: token_id
+ formatted_token: formatted_token
+ properties:
+ token_id:
+ type: string
+ formatted_token:
+ type: string
+ type: object
+ UpdateApiKeyRequest:
+ example:
+ name: name
+ ip_allowlist_mode: disabled
+ ip_allowlist:
+ - ip_allowlist
+ - ip_allowlist
+ properties:
+ name:
+ type: string
+ ip_allowlist_mode:
+ enum:
+ - disabled
+ - explicit
+ type: string
+ ip_allowlist:
items:
type: string
- nullable: true
- type: array
- filters:
- items:
- $ref: '#/components/schemas/FilterExpression'
- nullable: true
type: array
- required:
- - activity_id
- - contents
- - event
- - event_attributes
- - event_updates
- - headings
- - name
type: object
- StartLiveActivitySuccessResponse:
+ AuditLogActor:
+ description: The user or service that performed the action. Absent if the actor
+ is unknown.
example:
- notification_id: notification_id
+ metadata: "{}"
+ name: name
+ id: id
+ type: type
+ email: email
properties:
- notification_id:
+ email:
+ description: Email address of the actor. Absent if unavailable.
type: string
- type: object
- IncludeAliases:
- additionalProperties:
- items:
+ id:
+ description: UUID of the actor.
+ type: string
+ metadata:
+ description: Additional actor-specific data.
+ type: object
+ name:
+ description: Display name of the actor. Absent if unavailable.
+ type: string
+ type:
+ description: "Actor type (e.g. member, api_key, system)."
type: string
- type: array
- description: "Target specific users by aliases assigned via API. An alias can\
- \ be an external_id, onesignal_id, or a custom alias.\nAccepts an object where\
- \ keys are alias labels and values are arrays of alias IDs to include\nExample\
- \ usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"\
- id1\", \"id2\"] }\nKeys must match API spellings exactly (for example the\
- \ label for External ID is the string `external_id`; arbitrary keys such as\
- \ camelCase variants are not aliases and may yield no recipients).\nNot compatible\
- \ with any other targeting parameters.\nREQUIRED: REST API Key Authentication\n\
- Limit of 2,000 entries per REST API call\nNote: If targeting push, email,\
- \ or sms subscribers with same ids, use with target_channel to indicate you\
- \ are sending a push or email or sms."
- nullable: true
type: object
- CreateTemplateRequest:
+ AuditLogTarget:
+ description: A resource the action was performed on.
example:
- isSMS: true
- email_body: email_body
- contents:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
- subtitle:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
+ metadata: "{}"
name: name
- isEmail: true
- email_bcc:
- - email_bcc
- - email_bcc
- - email_bcc
- - email_bcc
- - email_bcc
- headings:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
- dynamic_content: dynamic_content
+ id: id
+ type: type
+ properties:
+ id:
+ description: UUID of the resource.
+ type: string
+ metadata:
+ description: Additional resource-specific data.
+ type: object
+ name:
+ description: Display name of the resource. Absent if unavailable.
+ type: string
+ type:
+ description: "Resource type (e.g. notification, segment, journey, app)."
+ type: string
+ type: object
+ AuditLogContext:
+ description: Request context at the time of the event. Absent if context was
+ not captured.
+ example:
+ country: country
+ metadata: "{}"
+ ip: ip
+ user_agent: user_agent
+ properties:
+ country:
+ description: Country code derived from the request IP.
+ type: string
+ ip:
+ description: IP address the request originated from.
+ type: string
+ metadata:
+ description: Additional context-specific data.
+ type: object
+ user_agent:
+ description: User agent of the client that made the request.
+ type: string
+ type: object
+ AuditLogEvent:
+ example:
+ actor:
+ metadata: "{}"
+ name: name
+ id: id
+ type: type
+ email: email
+ occurred_at: occurred_at
+ metadata: "{}"
+ organization_id: organization_id
+ context:
+ country: country
+ metadata: "{}"
+ ip: ip
+ user_agent: user_agent
+ action: action
+ id: id
app_id: app_id
- email_subject: email_subject
+ targets:
+ - metadata: "{}"
+ name: name
+ id: id
+ type: type
+ - metadata: "{}"
+ name: name
+ id: id
+ type: type
+ version: 0
properties:
+ action:
+ description: "The action that was performed (e.g. notification.sent, segment.created,\
+ \ member.invited)."
+ type: string
+ actor:
+ $ref: '#/components/schemas/AuditLogActor'
app_id:
- description: Your OneSignal App ID in UUID v4 format.
+ description: UUID of the app the event is associated with. Absent for org-level
+ events.
type: string
- name:
- description: Name of the template.
+ context:
+ $ref: '#/components/schemas/AuditLogContext'
+ id:
+ description: UUID of the audit log event.
type: string
- contents:
- $ref: '#/components/schemas/LanguageStringMap'
- headings:
- $ref: '#/components/schemas/LanguageStringMap'
- subtitle:
- $ref: '#/components/schemas/LanguageStringMap'
- isEmail:
- description: Set true for an Email template.
- type: boolean
- email_subject:
- description: Subject of the email.
- nullable: true
+ metadata:
+ description: Additional event-specific data that does not fit into the standard
+ fields.
+ type: object
+ occurred_at:
+ description: RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z).
type: string
- email_body:
- description: Body of the email (HTML supported).
- nullable: true
+ organization_id:
+ description: UUID of the organization the event belongs to.
type: string
- email_bcc:
- description: BCC recipients for the email template. Maximum 5 addresses.
- Only supported when the email service provider is OneSignal Email.
+ targets:
+ description: The resources the action was performed on. May be empty for
+ org-level events.
items:
- type: string
- maxItems: 5
- nullable: true
+ $ref: '#/components/schemas/AuditLogTarget'
type: array
- isSMS:
- description: Set true for an SMS template.
- type: boolean
- dynamic_content:
- description: JSON string for dynamic content personalization.
- nullable: true
- type: string
- required:
- - app_id
- - contents
- - name
+ version:
+ description: Schema version of the event payload.
+ type: integer
type: object
- UpdateTemplateRequest:
+ ListAuditLogsSuccessResponse:
example:
- isSMS: true
- email_body: email_body
- contents:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
- subtitle:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
- id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
- name: name
- isEmail: true
- email_bcc:
- - email_bcc
- - email_bcc
- - email_bcc
- - email_bcc
- - email_bcc
- headings:
- de: de
- hi: hi
- fi: fi
- ru: ru
- pt: pt
- bg: bg
- lt: lt
- hr: hr
- lv: lv
- fr: fr
- hu: hu
- bs: bs
- zh-Hans: zh-Hans
- zh-Hant: zh-Hant
- ka: ka
- uk: uk
- sk: sk
+ next_cursor: next_cursor
+ has_more: true
+ audit_logs:
+ - actor:
+ metadata: "{}"
+ name: name
+ id: id
+ type: type
+ email: email
+ occurred_at: occurred_at
+ metadata: "{}"
+ organization_id: organization_id
+ context:
+ country: country
+ metadata: "{}"
+ ip: ip
+ user_agent: user_agent
+ action: action
id: id
- ca: ca
- sr: sr
- sv: sv
- ko: ko
- ms: ms
- el: el
- en: en
- it: it
- zh: zh
- es: es
- et: et
- cs: cs
- ar: ar
- pa: pa
- vi: vi
- nb: nb
- th: th
- ja: ja
- fa: fa
- pl: pl
- da: da
- he: he
- ro: ro
- nl: nl
- tr: tr
- dynamic_content: dynamic_content
- email_subject: email_subject
+ app_id: app_id
+ targets:
+ - metadata: "{}"
+ name: name
+ id: id
+ type: type
+ - metadata: "{}"
+ name: name
+ id: id
+ type: type
+ version: 0
+ - actor:
+ metadata: "{}"
+ name: name
+ id: id
+ type: type
+ email: email
+ occurred_at: occurred_at
+ metadata: "{}"
+ organization_id: organization_id
+ context:
+ country: country
+ metadata: "{}"
+ ip: ip
+ user_agent: user_agent
+ action: action
+ id: id
+ app_id: app_id
+ targets:
+ - metadata: "{}"
+ name: name
+ id: id
+ type: type
+ - metadata: "{}"
+ name: name
+ id: id
+ type: type
+ version: 0
properties:
- name:
- description: Updated name of the template.
- type: string
- contents:
- $ref: '#/components/schemas/LanguageStringMap'
- headings:
- $ref: '#/components/schemas/LanguageStringMap'
- subtitle:
- $ref: '#/components/schemas/LanguageStringMap'
- isEmail:
- description: Set true for an Email template.
- type: boolean
- email_subject:
- description: Subject of the email.
- nullable: true
- type: string
- email_body:
- description: Body of the email (HTML supported).
- nullable: true
- type: string
- email_bcc:
- description: BCC recipients for the email template. Maximum 5 addresses.
- Only supported when the email service provider is OneSignal Email.
+ audit_logs:
+ description: "Array of audit log events, ordered by occurred_at ascending."
items:
- type: string
- maxItems: 5
- nullable: true
+ $ref: '#/components/schemas/AuditLogEvent'
type: array
- isSMS:
- description: Set true for an SMS template.
+ has_more:
+ description: True if additional events exist beyond this page. Use next_cursor
+ to fetch the next page.
type: boolean
- dynamic_content:
- description: JSON string for dynamic content personalization.
- nullable: true
+ next_cursor:
+ description: Opaque cursor to pass as cursor in the next request. Only present
+ when has_more is true.
type: string
type: object
- TemplateResource:
+ JourneySchedule:
+ description: Optional future start and/or stop time. null means no scheduled
+ activation.
example:
- updated_at: 2000-01-23T04:56:07.000+00:00
- name: name
- channel: push
- created_at: 2000-01-23T04:56:07.000+00:00
- id: id
- content:
- key: ""
+ start_at: start_at
+ error: error
+ stop_at: stop_at
+ nullable: true
properties:
- id:
- type: string
- name:
- type: string
- created_at:
- format: date-time
+ start_at:
+ description: ISO 8601 start time. Use UTC (Z or +00:00). Must be at least
+ 5 minutes in the future.
+ nullable: true
type: string
- updated_at:
- format: date-time
+ stop_at:
+ description: ISO 8601 stop time. Use UTC (Z or +00:00). Must be in the future
+ and later than start_at.
+ nullable: true
type: string
- channel:
- enum:
- - push
- - email
- - sms
+ error:
+ description: Read-only. Present when a scheduling error occurred.
nullable: true
type: string
- content:
- additionalProperties: true
- description: Rendered content and channel/platform flags for the template.
- type: object
type: object
- TemplatesListResponse:
+ JourneyReentryRules:
+ description: Controls whether and how soon a user can re-enter the journey.
+ null means re-entry is not allowed.
example:
- templates:
- - updated_at: 2000-01-23T04:56:07.000+00:00
- name: name
- channel: push
- created_at: 2000-01-23T04:56:07.000+00:00
- id: id
- content:
- key: ""
- - updated_at: 2000-01-23T04:56:07.000+00:00
- name: name
- channel: push
- created_at: 2000-01-23T04:56:07.000+00:00
- id: id
- content:
- key: ""
+ duration_seconds: 600
+ nullable: true
properties:
- templates:
- items:
- $ref: '#/components/schemas/TemplateResource'
- type: array
+ duration_seconds:
+ description: Minimum seconds before a user can re-enter. Must be at least
+ 600 (10 minutes).
+ minimum: 600
+ nullable: true
+ type: integer
type: object
- CopyTemplateRequest:
+ JourneyEventAttribute:
example:
- target_app_id: target_app_id
+ value: value
+ key: key
+ operator: equal
properties:
- target_app_id:
- description: Destination OneSignal App ID in UUID v4 format.
+ key:
+ description: Event attribute key.
+ type: string
+ operator:
+ description: Comparison operator.
+ enum:
+ - equal
+ - not_equal
+ - less
+ - less_or_equal
+ - greater_or_equal
+ - greater
+ - is
+ - is_not
+ - exists
+ - not_exists
+ - before
+ - after
+ type: string
+ value:
+ description: Value to compare against. Not required for exists and not_exists.
type: string
required:
- - target_app_id
+ - key
+ - operator
type: object
- CreateUserConflictResponse:
+ JourneyEventTriggerAttributes:
+ description: "Event attribute matchers, as a list of condition groups. Send\
+ \ a single group whose conditions are AND'd together. More than one group\
+ \ is rejected."
+ items:
+ items:
+ $ref: '#/components/schemas/JourneyEventAttribute'
+ type: array
+ type: array
+ JourneyAudience:
+ description: The journey entry audience. The kind field selects which other
+ fields apply.
+ example:
+ future_additions_only: true
+ kind: segment
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
properties:
- errors:
+ kind:
+ description: Audience kind. Selects which other fields apply.
+ enum:
+ - segment
+ - event_trigger
+ type: string
+ included_segment_ids:
+ description: "segment audiences: Segment UUIDs whose users enter the journey."
items:
- $ref: '#/components/schemas/CreateUserConflictResponse_errors_inner'
+ type: string
type: array
- type: object
- GenericError:
- properties:
- errors: {}
- success:
- type: boolean
- reference: {}
- type: object
- RateLimitError:
- properties:
- errors:
+ excluded_segment_ids:
+ description: "segment audiences: Segment UUIDs whose users are excluded."
items:
type: string
type: array
- limit:
+ future_additions_only:
+ description: "segment audiences: when true, only users who newly match the\
+ \ segment after activation enter the journey. Defaults to false."
+ nullable: true
+ type: boolean
+ name:
+ description: "event_trigger audiences: event name that triggers entry, up\
+ \ to 255 characters."
type: string
+ attributes:
+ description: "Event attribute matchers, as a list of condition groups. Send\
+ \ a single group whose conditions are AND'd together. More than one group\
+ \ is rejected."
+ items:
+ items:
+ $ref: '#/components/schemas/JourneyEventAttribute'
+ type: array
+ type: array
+ required:
+ - kind
type: object
- PropertiesBody:
- example:
- properties:
- country: US
- purchases:
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- - amount: "0.99"
- iso: USD
- count: 2
- sku: com.example.coins100
- ip: 203.0.113.10
- timezone_id: America/Los_Angeles
- language: en
- first_active: 1
- last_active: 5
- lat: 0.8008281904610115
- long: 6.027456183070403
- tags:
- level: "10"
- vip: "true"
- amount_spent: 5.637376656633329
- properties:
- properties:
- $ref: '#/components/schemas/PropertiesObject'
- type: object
- SubscriptionBody:
- example:
- subscription:
- notification_types: 1
- device_model: "iPhone14,2"
- app_version: 1.0.0
- web_p256: BM5-r8DauQXOb2E-3PgLPjSvjT0Ao9v5oJhw8bZ0cW7Vh6BbmPYcqbbCEJ1P2sK0hZ7HxSh9zGyU5pQk1jJmZ8A
- net_type: 9
- type: iOSPush
- device_os: "17.1"
- enabled: true
- session_time: 60
- test_type: 7
- token: d5d4d1a8-1c9e-42fb-b3f2-56d3a5a9a8b7
- carrier: Verizon
- session_count: 1
- web_auth: 5DUmpGmLuTxWCLj5lJpwLQ
- rooted: true
- id: e4e87830-b954-4363-b7bc-1f01dbaee5c8
- sdk: 5.2.0
- properties:
- subscription:
- $ref: '#/components/schemas/Subscription'
- type: object
- TransferSubscriptionRequestBody:
+ JourneyEarlyExit:
+ description: Conditions that remove a user from the journey before it completes.
+ At least one rule must be set under rules. Send null to remove early exit
+ entirely.
example:
- identity:
- key: identity
+ rules:
+ on_segment:
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ on_event:
+ name: name
+ when_not_in_audience: true
+ on_session: true
+ tag_on_early_exit:
+ key: tag_on_early_exit
+ nullable: true
properties:
- identity:
+ rules:
+ $ref: '#/components/schemas/JourneyEarlyExit_rules'
+ tag_on_early_exit:
additionalProperties:
type: string
- maxProperties: 1
- minProperties: 1
+ description: Tag key-value pairs applied when a user exits early.
type: object
type: object
- UserIdentityBody:
- example:
- identity:
- external_id: YOUR_USER_EXTERNAL_ID
+ JourneyTimePoint:
properties:
- identity:
- additionalProperties:
- type: string
- example:
- external_id: YOUR_USER_EXTERNAL_ID
- type: object
+ hour:
+ description: "Hour of day, 0-23."
+ maximum: 23
+ minimum: 0
+ type: integer
+ minute:
+ description: "Minute of hour, 0-59. Defaults to 0."
+ maximum: 59
+ minimum: 0
+ type: integer
type: object
- ExportEventsSuccessResponse:
+ JourneyTimeWindow:
+ description: A wall-clock window. Each window must span at least 15 minutes.
example:
- csv_file_url: csv_file_url
+ start: ""
+ end: ""
+ day_of_week: 4
properties:
- csv_file_url:
- type: string
+ start:
+ allOf:
+ - $ref: '#/components/schemas/JourneyTimePoint'
+ description: When the window opens.
+ end:
+ allOf:
+ - $ref: '#/components/schemas/JourneyTimePoint'
+ description: When the window closes.
+ day_of_week:
+ description: "Day of week, 1 = Monday. Omit to apply the window to every\
+ \ day."
+ maximum: 7
+ minimum: 1
+ type: integer
type: object
- CustomEvent:
- example:
- onesignal_id: onesignal_id
- payload:
- key: ""
+ JourneyCondition:
+ description: A branch condition. The kind field selects which other fields apply.
+ example:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
name: name
- external_id: external_id
- timestamp: 2000-01-23T04:56:07.000+00:00
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
properties:
- name:
- description: The identifier or name of the event. Maximum 128 characters.
+ kind:
+ description: Condition kind. Selects which other fields apply.
+ enum:
+ - segment_membership
+ - on_notification_action
+ - event_trigger
type: string
- external_id:
- description: The external ID of the user targeted for the event. Either
- the user's External ID or OneSignal ID is required.
- nullable: true
+ included_segment_ids:
+ description: "segment_membership conditions: Segment UUIDs the user must\
+ \ belong to."
+ items:
+ type: string
+ type: array
+ excluded_segment_ids:
+ description: "segment_membership conditions: Segment UUIDs the user must\
+ \ not belong to."
+ items:
+ type: string
+ type: array
+ action:
+ description: "on_notification_action conditions: the notification action\
+ \ to branch on. Which actions apply depends on the sending node's channel."
+ enum:
+ - received
+ - clicked
+ - opened
type: string
- onesignal_id:
- description: The OneSignal ID of the user targeted for the event. Either
- the user's External ID or OneSignal ID is required.
- nullable: true
+ sending_node_id:
+ description: "on_notification_action conditions: id of the sending node\
+ \ this action refers to. Returned on reads; accepted on write."
type: string
- timestamp:
- description: Time the event occurred as an ISO8601 formatted string. Defaults
- to now if not included or past date provided.
- format: date-time
+ client_node_id:
+ description: "on_notification_action conditions: write-only alternative\
+ \ to sending_node_id. References the sending node by its client_node_id."
type: string
- payload:
- additionalProperties: true
- description: "Properties or data related to the event, like {\"geography\"\
- : \"USA\"}"
- type: object
- required:
- - name
- type: object
- CustomEventsRequest:
- example:
- events:
- - onesignal_id: onesignal_id
- payload:
- key: ""
- name: name
- external_id: external_id
- timestamp: 2000-01-23T04:56:07.000+00:00
- - onesignal_id: onesignal_id
- payload:
- key: ""
- name: name
- external_id: external_id
- timestamp: 2000-01-23T04:56:07.000+00:00
- properties:
- events:
+ name:
+ description: "event_trigger conditions: event name, up to 255 characters."
+ type: string
+ attributes:
+ description: "Event attribute matchers, as a list of condition groups. Send\
+ \ a single group whose conditions are AND'd together. More than one group\
+ \ is rejected."
items:
- $ref: '#/components/schemas/CustomEvent'
+ items:
+ $ref: '#/components/schemas/JourneyEventAttribute'
+ type: array
+ type: array
+ entry_event_match_attributes:
+ description: "event_trigger conditions: match incoming event properties\
+ \ against the journey's entry event. Only valid on event-triggered journeys."
+ items:
+ type: object
+ nullable: true
type: array
required:
- - events
+ - kind
type: object
- CustomEventsResponse:
+ JourneyWaitUntilExpiration:
+ description: Optional expiration timer. null waits indefinitely.
+ example:
+ duration_seconds: 17789868
+ exits: true
+ nullable: true
+ properties:
+ duration_seconds:
+ description: "Seconds to wait before the timer fires. Minimum 60, maximum\
+ \ 31556952 (1 year)."
+ maximum: 31556952
+ minimum: 60
+ nullable: true
+ type: integer
+ exits:
+ description: "When true, the user exits the journey when the timer fires;\
+ \ when false, the user continues to convergence."
+ nullable: true
+ type: boolean
type: object
- ApiKeyToken:
+ JourneyNode:
+ description: "A journey node. The kind field selects which other fields apply.\
+ \ Branching nodes (split_range, yes_no, wait_until) nest their sub-graphs\
+ \ inline via branches[].nodes."
example:
- token_id: token_id
- updated_at: updated_at
- name: name
- created_at: created_at
- ip_allowlist_mode: disabled
- ip_allowlist:
- - ip_allowlist
- - ip_allowlist
+ annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ kind: wait
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ client_node_id: client_node_id
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ id: id
+ user_ttl_seconds: 1
properties:
- token_id:
+ id:
+ description: Server-assigned node UUID. Returned on reads. Required on update
+ to keep an existing node. Rejected on create with a 400 validation error.
type: string
- updated_at:
+ kind:
+ description: Node kind. Selects which other fields apply.
+ enum:
+ - wait
+ - time_window
+ - send_push
+ - send_email
+ - send_sms
+ - send_iam
+ - send_webhook
+ - tag
+ - split_range
+ - yes_no
+ - wait_until
+ type: string
+ client_node_id:
+ description: "Optional client-assigned identifier, unique within the journey.\
+ \ Use it to reference this node from elsewhere in the same request. Persisted\
+ \ and returned on reads."
+ type: string
+ annotation:
+ description: "Optional free-text label, up to 255 characters. Stored and\
+ \ returned as-is with no effect on journey behavior."
+ type: string
+ duration_seconds:
+ description: "wait nodes: seconds to hold the user. Minimum 60, maximum\
+ \ 31556952 (1 year)."
+ maximum: 31556952
+ minimum: 60
+ nullable: true
+ type: integer
+ relative_to:
+ description: "time_window nodes: schedule_in_timezone uses the configured\
+ \ windows; last_active_time holds relative to the user's last active time."
+ enum:
+ - schedule_in_timezone
+ - last_active_time
type: string
- created_at:
+ windows:
+ description: "time_window nodes: one or more time windows. A window with\
+ \ no day_of_week applies to every day. Required when relative_to is schedule_in_timezone;\
+ \ omit when it is last_active_time."
+ items:
+ $ref: '#/components/schemas/JourneyTimeWindow'
+ type: array
+ time_zone:
+ description: "time_window nodes: IANA timezone identifier used when the\
+ \ user's timezone is unavailable."
type: string
- name:
+ use_user_time_zone:
+ description: "time_window nodes: when true, uses the user's timezone if\
+ \ available."
+ nullable: true
+ type: boolean
+ template_id:
+ description: "send_push, send_email, and send_sms nodes: UUID of the template\
+ \ to send."
type: string
- ip_allowlist_mode:
- enum:
- - disabled
- - explicit
+ iam_id:
+ description: "send_iam nodes: UUID of the in-app message to send."
type: string
- ip_allowlist:
- items:
+ user_ttl_seconds:
+ description: "send_iam nodes: optional time-to-live for the in-app message,\
+ \ in seconds."
+ minimum: 1
+ nullable: true
+ type: integer
+ webhook_id:
+ description: "send_webhook nodes: UUID of the webhook to send."
+ type: string
+ assignments:
+ additionalProperties:
type: string
+ description: "tag nodes: tag key-value pairs to assign. An empty string\
+ \ value removes the tag. Keys are limited to 255 characters and values\
+ \ to 1024."
+ type: object
+ randomize_on_entry:
+ description: "split_range nodes: when true, assigns each user to a branch\
+ \ at random on entry. Defaults to false."
+ nullable: true
+ type: boolean
+ branches:
+ description: "Branching nodes: nested branches. split_range requires 2-20\
+ \ weighted branches that sum to 100. yes_no requires exactly 2 branches.\
+ \ wait_until requires 1-10 condition branches."
+ items:
+ $ref: '#/components/schemas/JourneyBranch'
type: array
+ expiration:
+ $ref: '#/components/schemas/JourneyWaitUntilExpiration'
+ required:
+ - kind
type: object
- ApiKeyTokensListResponse:
+ JourneyBranch:
example:
- tokens:
- - token_id: token_id
- updated_at: updated_at
- name: name
- created_at: created_at
- ip_allowlist_mode: disabled
- ip_allowlist:
- - ip_allowlist
- - ip_allowlist
- - token_id: token_id
- updated_at: updated_at
+ condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
name: name
- created_at: created_at
- ip_allowlist_mode: disabled
- ip_allowlist:
- - ip_allowlist
- - ip_allowlist
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
properties:
- tokens:
+ id:
+ description: Server-assigned branch identifier. Read-only on create; echo
+ it on update to keep the branch.
+ type: string
+ condition:
+ $ref: '#/components/schemas/JourneyCondition'
+ weight:
+ description: Branch weight for split_range nodes. Weights across a node's
+ branches must sum to 100.
+ type: number
+ nodes:
+ description: "Nodes run when this branch is taken, before flow converges\
+ \ to the next sibling node."
items:
- $ref: '#/components/schemas/ApiKeyToken'
+ $ref: '#/components/schemas/JourneyNode'
type: array
type: object
- CreateApiKeyRequest:
+ Journey:
+ description: "Full journey representation returned by the detail, create, and\
+ \ update endpoints."
example:
+ audience:
+ future_additions_only: true
+ kind: segment
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ archived_at: archived_at
+ description: description
+ created_at: created_at
+ early_exit:
+ rules:
+ on_segment:
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ on_event:
+ name: name
+ when_not_in_audience: true
+ on_session: true
+ tag_on_early_exit:
+ key: tag_on_early_exit
+ created_source: created_source
+ schedule:
+ start_at: start_at
+ error: error
+ stop_at: stop_at
+ concurrency_key: concurrency_key
+ nodes:
+ - annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ kind: wait
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ client_node_id: client_node_id
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ id: id
+ user_ttl_seconds: 1
+ - annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ kind: wait
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ client_node_id: client_node_id
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ id: id
+ user_ttl_seconds: 1
+ updated_at: updated_at
name: name
- ip_allowlist_mode: disabled
- ip_allowlist:
- - ip_allowlist
- - ip_allowlist
+ started_at: started_at
+ id: id
+ state: draft
+ reentry_rules:
+ duration_seconds: 600
+ app_id: app_id
properties:
+ id:
+ description: Journey UUID. Read-only.
+ type: string
+ app_id:
+ description: UUID of the app the journey belongs to. Read-only.
+ type: string
name:
+ description: "Journey name, up to 300 characters."
type: string
- ip_allowlist_mode:
+ description:
+ description: "Journey description, up to 1024 characters. Defaults to an\
+ \ empty string."
+ nullable: true
+ type: string
+ state:
+ description: Journey state. New journeys are created as draft. processing
+ is transient while activation is in progress. archived is a journey that
+ has been stopped. Change it through the state field on Update journey.
enum:
- - disabled
- - explicit
+ - draft
+ - scheduled
+ - processing
+ - active
+ - archived
type: string
- ip_allowlist:
+ created_at:
+ description: ISO 8601 creation time. Read-only.
+ type: string
+ updated_at:
+ description: ISO 8601 last-update time. Read-only.
+ type: string
+ started_at:
+ description: "ISO 8601 time the journey was activated, or null. Read-only.\
+ \ May stay null briefly after you set state to active: activation is enqueued,\
+ \ and started_at populates once the journey finishes processing."
+ nullable: true
+ type: string
+ archived_at:
+ description: "ISO 8601 time the journey was archived, or null. Read-only."
+ nullable: true
+ type: string
+ created_source:
+ description: "Origin of the journey, for example public_api or dashboard.\
+ \ Read-only."
+ nullable: true
+ type: string
+ audience:
+ $ref: '#/components/schemas/JourneyAudience'
+ early_exit:
+ $ref: '#/components/schemas/JourneyEarlyExit'
+ reentry_rules:
+ $ref: '#/components/schemas/JourneyReentryRules'
+ schedule:
+ $ref: '#/components/schemas/JourneySchedule'
+ nodes:
+ description: Ordered list of journey nodes.
items:
- type: string
+ $ref: '#/components/schemas/JourneyNode'
type: array
- type: object
- CreateApiKeyResponse:
- example:
- token_id: token_id
- formatted_token: formatted_token
- properties:
- token_id:
- type: string
- formatted_token:
+ concurrency_key:
+ description: Opaque optimistic-concurrency token. Read-only. Pass it back
+ on update to guard against overwriting a concurrent change (409). Send
+ it back exactly as read; do not construct or parse it.
type: string
type: object
- UpdateApiKeyRequest:
+ JourneyListAudience:
+ description: Entry audience reduced to its kind. Use View journey for the full
+ audience configuration.
example:
- name: name
- ip_allowlist_mode: disabled
- ip_allowlist:
- - ip_allowlist
- - ip_allowlist
+ kind: segment
properties:
- name:
- type: string
- ip_allowlist_mode:
+ kind:
+ description: Audience kind.
enum:
- - disabled
- - explicit
+ - segment
+ - event_trigger
type: string
- ip_allowlist:
- items:
- type: string
- type: array
type: object
- AuditLogActor:
- description: The user or service that performed the action. Absent if the actor
- is unknown.
+ JourneyListItem:
+ description: "Summary journey representation returned by the list endpoint.\
+ \ Excludes description, nodes, early-exit configuration, and concurrency_key."
example:
- metadata: "{}"
+ schedule:
+ start_at: start_at
+ error: error
+ stop_at: stop_at
+ audience:
+ kind: segment
+ updated_at: updated_at
+ archived_at: archived_at
name: name
+ created_at: created_at
+ started_at: started_at
+ created_source: created_source
id: id
- type: type
- email: email
+ state: draft
+ reentry_rules:
+ duration_seconds: 600
+ app_id: app_id
properties:
- email:
- description: Email address of the actor. Absent if unavailable.
- type: string
id:
- description: UUID of the actor.
+ description: Journey UUID. Read-only.
+ type: string
+ app_id:
+ description: UUID of the app the journey belongs to. Read-only.
type: string
- metadata:
- description: Additional actor-specific data.
- type: object
name:
- description: Display name of the actor. Absent if unavailable.
+ description: "Journey name, up to 300 characters."
type: string
- type:
- description: "Actor type (e.g. member, api_key, system)."
+ state:
+ description: Journey state. New journeys are created as draft. processing
+ is transient while activation is in progress. archived is a journey that
+ has been stopped. Change it through the state field on Update journey.
+ enum:
+ - draft
+ - scheduled
+ - processing
+ - active
+ - archived
+ type: string
+ created_at:
+ description: ISO 8601 creation time. Read-only.
+ type: string
+ updated_at:
+ description: ISO 8601 last-update time. Read-only.
+ type: string
+ started_at:
+ description: "ISO 8601 time the journey was activated, or null. Read-only."
+ nullable: true
+ type: string
+ archived_at:
+ description: "ISO 8601 time the journey was archived, or null. Read-only."
+ nullable: true
+ type: string
+ created_source:
+ description: "Origin of the journey, for example public_api or dashboard.\
+ \ Read-only."
+ nullable: true
+ type: string
+ schedule:
+ $ref: '#/components/schemas/JourneySchedule'
+ audience:
+ $ref: '#/components/schemas/JourneyListAudience'
+ reentry_rules:
+ $ref: '#/components/schemas/JourneyReentryRules'
+ type: object
+ JourneyListResponse:
+ example:
+ journeys:
+ - schedule:
+ start_at: start_at
+ error: error
+ stop_at: stop_at
+ audience:
+ kind: segment
+ updated_at: updated_at
+ archived_at: archived_at
+ name: name
+ created_at: created_at
+ started_at: started_at
+ created_source: created_source
+ id: id
+ state: draft
+ reentry_rules:
+ duration_seconds: 600
+ app_id: app_id
+ - schedule:
+ start_at: start_at
+ error: error
+ stop_at: stop_at
+ audience:
+ kind: segment
+ updated_at: updated_at
+ archived_at: archived_at
+ name: name
+ created_at: created_at
+ started_at: started_at
+ created_source: created_source
+ id: id
+ state: draft
+ reentry_rules:
+ duration_seconds: 600
+ app_id: app_id
+ next_cursor: next_cursor
+ has_more: true
+ properties:
+ journeys:
+ description: "Journeys ordered by creation time, newest first."
+ items:
+ $ref: '#/components/schemas/JourneyListItem'
+ type: array
+ has_more:
+ description: true if more journeys exist beyond this page.
+ type: boolean
+ next_cursor:
+ description: Cursor for the next page. Present only when has_more is true.
type: string
type: object
- AuditLogTarget:
- description: A resource the action was performed on.
+ CreateJourneyRequest:
+ description: Writable fields for Create journey. Journeys are always created
+ in the draft state. Server-controlled fields such as state or id are rejected.
example:
- metadata: "{}"
+ schedule:
+ start_at: start_at
+ error: error
+ stop_at: stop_at
+ audience:
+ future_additions_only: true
+ kind: segment
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ nodes:
+ - annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ kind: wait
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ client_node_id: client_node_id
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ id: id
+ user_ttl_seconds: 1
+ - annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ kind: wait
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ client_node_id: client_node_id
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ id: id
+ user_ttl_seconds: 1
name: name
- id: id
- type: type
+ description: description
+ early_exit:
+ rules:
+ on_segment:
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ on_event:
+ name: name
+ when_not_in_audience: true
+ on_session: true
+ tag_on_early_exit:
+ key: tag_on_early_exit
+ reentry_rules:
+ duration_seconds: 600
properties:
- id:
- description: UUID of the resource.
- type: string
- metadata:
- description: Additional resource-specific data.
- type: object
name:
- description: Display name of the resource. Absent if unavailable.
- type: string
- type:
- description: "Resource type (e.g. notification, segment, journey, app)."
+ description: "Journey name, up to 300 characters."
type: string
+ description:
+ description: "Optional journey description, up to 1024 characters."
+ nullable: true
+ type: string
+ audience:
+ $ref: '#/components/schemas/JourneyAudience'
+ early_exit:
+ $ref: '#/components/schemas/JourneyEarlyExit'
+ reentry_rules:
+ $ref: '#/components/schemas/JourneyReentryRules'
+ schedule:
+ $ref: '#/components/schemas/JourneySchedule'
+ nodes:
+ description: Ordered list of journey nodes. Server-assigned id fields are
+ rejected on create.
+ items:
+ $ref: '#/components/schemas/JourneyNode'
+ type: array
+ required:
+ - name
type: object
- AuditLogContext:
- description: Request context at the time of the event. Absent if context was
- not captured.
+ UpdateJourneyRequest:
+ description: Partial update applied with JSON Merge Patch (RFC 7396). Send only
+ the fields you want to change. A null value clears a nullable field. Arrays
+ such as nodes are replaced wholesale.
example:
- country: country
- metadata: "{}"
- ip: ip
- user_agent: user_agent
+ schedule:
+ start_at: start_at
+ error: error
+ stop_at: stop_at
+ audience:
+ future_additions_only: true
+ kind: segment
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ concurrency_key: concurrency_key
+ nodes:
+ - annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ kind: wait
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ client_node_id: client_node_id
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ id: id
+ user_ttl_seconds: 1
+ - annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ kind: wait
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
+ id: id
+ client_node_id: client_node_id
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ id: id
+ user_ttl_seconds: 1
+ name: name
+ description: description
+ early_exit:
+ rules:
+ on_segment:
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ on_event:
+ name: name
+ when_not_in_audience: true
+ on_session: true
+ tag_on_early_exit:
+ key: tag_on_early_exit
+ reentry_rules:
+ duration_seconds: 600
+ state: draft
properties:
- country:
- description: Country code derived from the request IP.
+ name:
+ description: Journey name.
type: string
- ip:
- description: IP address the request originated from.
+ description:
+ description: Journey description. Send null to clear it.
+ nullable: true
+ type: string
+ audience:
+ $ref: '#/components/schemas/JourneyAudience'
+ early_exit:
+ $ref: '#/components/schemas/JourneyEarlyExit'
+ reentry_rules:
+ $ref: '#/components/schemas/JourneyReentryRules'
+ schedule:
+ $ref: '#/components/schemas/JourneySchedule'
+ nodes:
+ description: "Full ordered list of nodes, which replaces the existing graph\
+ \ wholesale. Preserve each node's server-assigned id from a prior fetch\
+ \ to keep in-flight users on that node; omit id to add a new node."
+ items:
+ $ref: '#/components/schemas/JourneyNode'
+ type: array
+ state:
+ description: "Target state. Set active to activate a draft journey, or scheduled\
+ \ together with a future schedule.start_at to activate it later. Set archived\
+ \ to stop a running journey; archiving is permanent. Only scheduled and\
+ \ processing journeys can return to draft."
+ enum:
+ - draft
+ - scheduled
+ - active
+ - archived
type: string
- metadata:
- description: Additional context-specific data.
- type: object
- user_agent:
- description: User agent of the client that made the request.
+ concurrency_key:
+ description: Optional optimistic-concurrency token. Pass the concurrency_key
+ from a prior fetch to reject the update with 409 if the journey changed.
+ Omit to skip the check.
+ nullable: true
type: string
type: object
- AuditLogEvent:
+ UpdateJourneyNodeRequest:
+ description: "Node fields to change, merged onto the current node. Send only\
+ \ the fields you want to change. The node's kind and id cannot be changed.\
+ \ Send null to clear a nullable field. Which other fields apply depends on\
+ \ the node's kind, matching JourneyNode."
example:
- actor:
- metadata: "{}"
- name: name
- id: id
- type: type
- email: email
- occurred_at: occurred_at
- metadata: "{}"
- organization_id: organization_id
- context:
- country: country
- metadata: "{}"
- ip: ip
- user_agent: user_agent
- action: action
- id: id
- app_id: app_id
- targets:
- - metadata: "{}"
- name: name
+ annotation: annotation
+ duration_seconds: 2527224
+ relative_to: schedule_in_timezone
+ assignments:
+ key: assignments
+ windows:
+ - start: ""
+ end: ""
+ day_of_week: 4
+ - start: ""
+ end: ""
+ day_of_week: 4
+ time_zone: time_zone
+ use_user_time_zone: true
+ branches:
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
id: id
- type: type
- - metadata: "{}"
- name: name
+ - condition:
+ kind: segment_membership
+ entry_event_match_attributes:
+ - "{}"
+ - "{}"
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ excluded_segment_ids:
+ - excluded_segment_ids
+ - excluded_segment_ids
+ name: name
+ action: received
+ attributes:
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ - - value: value
+ key: key
+ operator: equal
+ - value: value
+ key: key
+ operator: equal
+ sending_node_id: sending_node_id
+ client_node_id: client_node_id
+ nodes:
+ - null
+ - null
+ weight: 5.962133916683182
id: id
- type: type
- version: 0
+ client_node_id: client_node_id
+ concurrency_key: concurrency_key
+ iam_id: iam_id
+ randomize_on_entry: true
+ webhook_id: webhook_id
+ template_id: template_id
+ expiration:
+ duration_seconds: 17789868
+ exits: true
+ user_ttl_seconds: 1
properties:
- action:
- description: "The action that was performed (e.g. notification.sent, segment.created,\
- \ member.invited)."
+ client_node_id:
+ description: "Optional client-assigned identifier, unique within the journey.\
+ \ Use it to reference this node from elsewhere in the same request. Persisted\
+ \ and returned on reads."
type: string
- actor:
- $ref: '#/components/schemas/AuditLogActor'
- app_id:
- description: UUID of the app the event is associated with. Absent for org-level
- events.
+ annotation:
+ description: "Optional free-text label, up to 255 characters. Stored and\
+ \ returned as-is with no effect on journey behavior."
type: string
- context:
- $ref: '#/components/schemas/AuditLogContext'
- id:
- description: UUID of the audit log event.
+ duration_seconds:
+ description: "wait nodes: seconds to hold the user. Minimum 60, maximum\
+ \ 31556952 (1 year)."
+ maximum: 31556952
+ minimum: 60
+ nullable: true
+ type: integer
+ relative_to:
+ description: "time_window nodes: schedule_in_timezone uses the configured\
+ \ windows; last_active_time holds relative to the user's last active time."
+ enum:
+ - schedule_in_timezone
+ - last_active_time
type: string
- metadata:
- description: Additional event-specific data that does not fit into the standard
- fields.
- type: object
- occurred_at:
- description: RFC 3339 timestamp of when the event occurred (e.g. 2026-02-18T12:34:56Z).
+ windows:
+ description: "time_window nodes: one or more time windows. A window with\
+ \ no day_of_week applies to every day. Required when relative_to is schedule_in_timezone;\
+ \ omit when it is last_active_time."
+ items:
+ $ref: '#/components/schemas/JourneyTimeWindow'
+ type: array
+ time_zone:
+ description: "time_window nodes: IANA timezone identifier used when the\
+ \ user's timezone is unavailable."
type: string
- organization_id:
- description: UUID of the organization the event belongs to.
+ use_user_time_zone:
+ description: "time_window nodes: when true, uses the user's timezone if\
+ \ available."
+ nullable: true
+ type: boolean
+ template_id:
+ description: "send_push, send_email, and send_sms nodes: UUID of the template\
+ \ to send."
type: string
- targets:
- description: The resources the action was performed on. May be empty for
- org-level events.
+ iam_id:
+ description: "send_iam nodes: UUID of the in-app message to send."
+ type: string
+ user_ttl_seconds:
+ description: "send_iam nodes: optional time-to-live for the in-app message,\
+ \ in seconds."
+ minimum: 1
+ nullable: true
+ type: integer
+ webhook_id:
+ description: "send_webhook nodes: UUID of the webhook to send."
+ type: string
+ assignments:
+ additionalProperties:
+ type: string
+ description: "tag nodes: tag key-value pairs to assign. An empty string\
+ \ value removes the tag. Keys are limited to 255 characters and values\
+ \ to 1024."
+ type: object
+ randomize_on_entry:
+ description: "split_range nodes: when true, assigns each user to a branch\
+ \ at random on entry. Defaults to false."
+ nullable: true
+ type: boolean
+ branches:
+ description: "Branching nodes: nested branches. split_range requires 2-20\
+ \ weighted branches that sum to 100. yes_no requires exactly 2 branches.\
+ \ wait_until requires 1-10 condition branches."
items:
- $ref: '#/components/schemas/AuditLogTarget'
+ $ref: '#/components/schemas/JourneyBranch'
type: array
- version:
- description: Schema version of the event payload.
+ expiration:
+ $ref: '#/components/schemas/JourneyWaitUntilExpiration'
+ concurrency_key:
+ description: Optional optimistic-concurrency token. Pass the concurrency_key
+ from a prior fetch to reject the update with 409 if the journey changed.
+ Omit to skip the check. It is not merged onto the node.
+ nullable: true
+ type: string
+ type: object
+ JourneyMessageStats:
+ description: "Delivery stats for a message-sending node. Present only on send_push,\
+ \ send_email, send_sms, send_iam, and send_webhook nodes. The keys inside\
+ \ totals depend on the node's channel."
+ example:
+ totals:
+ key: 7.061401241503109
+ properties:
+ totals:
+ additionalProperties:
+ type: number
+ description: "All-time totals for this node, keyed by channel-specific stat\
+ \ name."
+ type: object
+ type: object
+ JourneyNodeStats:
+ description: Stats for a single node. Keyed in the response by the node's server-assigned
+ id.
+ example:
+ waiting: 5
+ kind: wait
+ exited_early: 2
+ message_stats:
+ totals:
+ key: 7.061401241503109
+ completed: 5
+ properties:
+ kind:
+ description: "Node kind, repeated here so stats can be read without joining\
+ \ against the journey definition."
+ enum:
+ - wait
+ - time_window
+ - send_push
+ - send_email
+ - send_sms
+ - send_iam
+ - send_webhook
+ - tag
+ - split_range
+ - yes_no
+ - wait_until
+ type: string
+ waiting:
+ description: Users currently held at this node.
+ type: integer
+ completed:
+ description: Users who advanced past this node normally.
type: integer
+ exited_early:
+ description: Users who left the journey from this node through an early
+ exit rule.
+ type: integer
+ message_stats:
+ $ref: '#/components/schemas/JourneyMessageStats'
type: object
- ListAuditLogsSuccessResponse:
+ JourneyBranchStats:
+ description: Stats for a single branch of a branching node. Keyed in the response
+ by the branch's server-assigned id.
example:
- next_cursor: next_cursor
- has_more: true
- audit_logs:
- - actor:
- metadata: "{}"
- name: name
- id: id
- type: type
- email: email
- occurred_at: occurred_at
- metadata: "{}"
- organization_id: organization_id
- context:
- country: country
- metadata: "{}"
- ip: ip
- user_agent: user_agent
- action: action
- id: id
- app_id: app_id
- targets:
- - metadata: "{}"
- name: name
- id: id
- type: type
- - metadata: "{}"
- name: name
- id: id
- type: type
- version: 0
- - actor:
- metadata: "{}"
- name: name
- id: id
- type: type
- email: email
- occurred_at: occurred_at
- metadata: "{}"
- organization_id: organization_id
- context:
- country: country
- metadata: "{}"
- ip: ip
- user_agent: user_agent
- action: action
- id: id
- app_id: app_id
- targets:
- - metadata: "{}"
- name: name
- id: id
- type: type
- - metadata: "{}"
- name: name
- id: id
- type: type
- version: 0
+ completed: 9
properties:
- audit_logs:
- description: "Array of audit log events, ordered by occurred_at ascending."
- items:
- $ref: '#/components/schemas/AuditLogEvent'
- type: array
- has_more:
- description: True if additional events exist beyond this page. Use next_cursor
- to fetch the next page.
- type: boolean
- next_cursor:
- description: Opaque cursor to pass as cursor in the next request. Only present
- when has_more is true.
+ completed:
+ description: Users who took this branch.
+ type: integer
+ type: object
+ JourneyStats:
+ description: "Journey-level counts plus flat, id-keyed maps of node and branch\
+ \ stats. Contains no definition detail; join it by id against the journey\
+ \ from View journey."
+ example:
+ nodes:
+ key:
+ waiting: 5
+ kind: wait
+ exited_early: 2
+ message_stats:
+ totals:
+ key: 7.061401241503109
+ completed: 5
+ started: 0
+ exited_early: 1
+ id: id
+ completed: 6
+ branches:
+ key:
+ completed: 9
+ properties:
+ id:
+ description: UUID of the journey these stats belong to.
type: string
+ started:
+ description: Users who entered the journey.
+ type: integer
+ completed:
+ description: Users who reached the end of the journey normally.
+ type: integer
+ exited_early:
+ description: Users who left the journey through an early exit rule.
+ type: integer
+ nodes:
+ additionalProperties:
+ $ref: '#/components/schemas/JourneyNodeStats'
+ description: "Node stats keyed by node id. Includes every node in the graph,\
+ \ at any nesting depth."
+ type: object
+ branches:
+ additionalProperties:
+ $ref: '#/components/schemas/JourneyBranchStats'
+ description: Branch stats keyed by branch id. Empty for a journey with no
+ branching nodes.
+ type: object
type: object
get_notification_history_request_body:
properties:
@@ -6701,6 +9015,55 @@ components:
meta:
$ref: '#/components/schemas/CreateUserConflictResponse_errorsItems_meta'
type: object
+ JourneyEarlyExit_rules_on_segment:
+ example:
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ nullable: true
+ properties:
+ included_segment_ids:
+ description: Exit when the user enters any of these segments.
+ items:
+ type: string
+ type: array
+ type: object
+ JourneyEarlyExit_rules_on_event:
+ example:
+ name: name
+ nullable: true
+ properties:
+ name:
+ description: Exit when this event occurs. Up to 255 characters.
+ type: string
+ required:
+ - name
+ type: object
+ JourneyEarlyExit_rules:
+ example:
+ on_segment:
+ included_segment_ids:
+ - included_segment_ids
+ - included_segment_ids
+ on_event:
+ name: name
+ when_not_in_audience: true
+ on_session: true
+ properties:
+ on_segment:
+ $ref: '#/components/schemas/JourneyEarlyExit_rules_on_segment'
+ when_not_in_audience:
+ description: Exit when the user no longer matches the journey audience.
+ Defaults to false.
+ nullable: true
+ type: boolean
+ on_session:
+ description: Exit on a new session start. Defaults to false.
+ nullable: true
+ type: boolean
+ on_event:
+ $ref: '#/components/schemas/JourneyEarlyExit_rules_on_event'
+ type: object
securitySchemes:
rest_api_key:
scheme: bearer
diff --git a/build.gradle b/build.gradle
index 3f3701b..bfca9a5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ apply plugin: 'com.diffplug.spotless'
apply plugin: 'com.vanniktech.maven.publish'
group = 'com.onesignal'
-version = '5.11.2'
+version = '5.12.0'
buildscript {
repositories {
diff --git a/build.sbt b/build.sbt
index e05229a..c1ab245 100644
--- a/build.sbt
+++ b/build.sbt
@@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "com.onesignal",
name := "onesignal-java-client",
- version := "5.11.2",
+ version := "5.12.0",
scalaVersion := "2.11.4",
scalacOptions ++= Seq("-feature"),
javacOptions in compile ++= Seq("-Xlint:deprecation"),
diff --git a/docs/CreateJourneyRequest.md b/docs/CreateJourneyRequest.md
new file mode 100644
index 0000000..7e59ec8
--- /dev/null
+++ b/docs/CreateJourneyRequest.md
@@ -0,0 +1,20 @@
+
+
+# CreateJourneyRequest
+
+Writable fields for Create journey. Journeys are always created in the draft state. Server-controlled fields such as state or id are rejected.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **String** | Journey name, up to 300 characters. | |
+|**description** | **String** | Optional journey description, up to 1024 characters. | [optional] |
+|**audience** | [**JourneyAudience**](JourneyAudience.md) | | [optional] |
+|**earlyExit** | [**JourneyEarlyExit**](JourneyEarlyExit.md) | | [optional] |
+|**reentryRules** | [**JourneyReentryRules**](JourneyReentryRules.md) | | [optional] |
+|**schedule** | [**JourneySchedule**](JourneySchedule.md) | | [optional] |
+|**nodes** | [**List<JourneyNode>**](JourneyNode.md) | Ordered list of journey nodes. Server-assigned id fields are rejected on create. | [optional] |
+
+
+
diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md
index 16a017e..13000b6 100644
--- a/docs/DefaultApi.md
+++ b/docs/DefaultApi.md
@@ -11,6 +11,7 @@ All URIs are relative to *https://api.onesignal.com*
| [**createApiKey**](DefaultApi.md#createApiKey) | **POST** /apps/{app_id}/auth/tokens | Create API key |
| [**createApp**](DefaultApi.md#createApp) | **POST** /apps | Create an app |
| [**createCustomEvents**](DefaultApi.md#createCustomEvents) | **POST** /apps/{app_id}/custom_events | Create custom events |
+| [**createJourney**](DefaultApi.md#createJourney) | **POST** /apps/{app_id}/journeys | Create journey |
| [**createNotification**](DefaultApi.md#createNotification) | **POST** /notifications | Create notification |
| [**createSegment**](DefaultApi.md#createSegment) | **POST** /apps/{app_id}/segments | Create Segment |
| [**createSubscription**](DefaultApi.md#createSubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions | |
@@ -18,6 +19,7 @@ All URIs are relative to *https://api.onesignal.com*
| [**createUser**](DefaultApi.md#createUser) | **POST** /apps/{app_id}/users | |
| [**deleteAlias**](DefaultApi.md#deleteAlias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} | |
| [**deleteApiKey**](DefaultApi.md#deleteApiKey) | **DELETE** /apps/{app_id}/auth/tokens/{token_id} | Delete API key |
+| [**deleteJourney**](DefaultApi.md#deleteJourney) | **DELETE** /apps/{app_id}/journeys/{journey_id} | Delete journey |
| [**deleteSegment**](DefaultApi.md#deleteSegment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment |
| [**deleteSubscription**](DefaultApi.md#deleteSubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} | |
| [**deleteTemplate**](DefaultApi.md#deleteTemplate) | **DELETE** /templates/{template_id} | Delete template |
@@ -42,6 +44,8 @@ All URIs are relative to *https://api.onesignal.com*
| [**unsubscribeEmailWithToken**](DefaultApi.md#unsubscribeEmailWithToken) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token |
| [**updateApiKey**](DefaultApi.md#updateApiKey) | **PATCH** /apps/{app_id}/auth/tokens/{token_id} | Update API key |
| [**updateApp**](DefaultApi.md#updateApp) | **PUT** /apps/{app_id} | Update an app |
+| [**updateJourney**](DefaultApi.md#updateJourney) | **PATCH** /apps/{app_id}/journeys/{journey_id} | Update journey |
+| [**updateJourneyNode**](DefaultApi.md#updateJourneyNode) | **PATCH** /apps/{app_id}/journeys/{journey_id}/nodes/{node_id} | Update journey node |
| [**updateLiveActivity**](DefaultApi.md#updateLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push |
| [**updateSegment**](DefaultApi.md#updateSegment) | **PATCH** /apps/{app_id}/segments/{segment_id} | Update Segment |
| [**updateSubscription**](DefaultApi.md#updateSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} | |
@@ -49,6 +53,9 @@ All URIs are relative to *https://api.onesignal.com*
| [**updateTemplate**](DefaultApi.md#updateTemplate) | **PATCH** /templates/{template_id} | Update template |
| [**updateUser**](DefaultApi.md#updateUser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} | |
| [**viewApiKeys**](DefaultApi.md#viewApiKeys) | **GET** /apps/{app_id}/auth/tokens | View API keys |
+| [**viewJourney**](DefaultApi.md#viewJourney) | **GET** /apps/{app_id}/journeys/{journey_id} | View journey |
+| [**viewJourneyStats**](DefaultApi.md#viewJourneyStats) | **GET** /apps/{app_id}/journeys/{journey_id}/stats | View journey stats |
+| [**viewJourneys**](DefaultApi.md#viewJourneys) | **GET** /apps/{app_id}/journeys | View journeys |
| [**viewTemplate**](DefaultApi.md#viewTemplate) | **GET** /templates/{template_id} | View template |
| [**viewTemplates**](DefaultApi.md#viewTemplates) | **GET** /templates | View templates |
@@ -624,6 +631,82 @@ public class Example {
| **429** | Rate Limit Exceeded | - |
| **0** | Unexpected error | - |
+
+# **createJourney**
+> Journey createJourney(appId, createJourneyRequest)
+
+Create journey
+
+The Journeys API is in beta. Endpoints and response fields can still change. Create a new journey with an audience and a node graph. Journeys are always created in the draft state. The authenticated App API key must have permission to create journeys.
+
+### Example
+```java
+// Import classes:
+import com.onesignal.client.ApiClient;
+import com.onesignal.client.ApiException;
+import com.onesignal.client.Configuration;
+import com.onesignal.client.auth.*;
+import com.onesignal.client.model.*;
+import com.onesignal.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.onesignal.com");
+
+ // Configure HTTP bearer authorization: rest_api_key
+ HttpBearerAuth rest_api_key = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
+ rest_api_key.setBearerToken("YOUR_REST_API_KEY");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ String appId = "YOUR_APP_ID"; // String | Your OneSignal App ID in UUID v4 format.
+ CreateJourneyRequest createJourneyRequest = new CreateJourneyRequest(); // CreateJourneyRequest |
+ try {
+ Journey result = apiInstance.createJourney(appId, createJourneyRequest);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#createJourney");
+ System.err.println("Status code: " + e.getCode());
+ // getErrorMessages() flattens any error-envelope shape to a List;
+ // the raw body remains on getResponseBody().
+ System.err.println("Error messages: " + e.getErrorMessages());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **appId** | **String**| Your OneSignal App ID in UUID v4 format. | |
+| **createJourneyRequest** | [**CreateJourneyRequest**](CreateJourneyRequest.md)| | |
+
+### Return type
+
+[**Journey**](Journey.md)
+
+### Authorization
+
+[rest_api_key](https://github.com/OneSignal/onesignal-java-api#configuration)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **201** | Created | - |
+| **400** | Bad Request | - |
+| **403** | Forbidden | - |
+| **429** | Rate Limit Exceeded | - |
+| **0** | Unexpected error | - |
+
# **createNotification**
> CreateNotificationSuccessResponse createNotification(notification)
@@ -1266,6 +1349,82 @@ public class Example {
| **400** | Bad Request | - |
| **0** | Unexpected error | - |
+
+# **deleteJourney**
+> GenericSuccessBoolResponse deleteJourney(appId, journeyId)
+
+Delete journey
+
+The Journeys API is in beta. Endpoints and response fields can still change. Permanently delete a journey by its UUID. Returns { \"success\": true } on success. The authenticated App API key must have permission to delete journeys. Deleting a journey stops any in-flight users and cannot be undone. Archive a running journey instead if you need to keep its data.
+
+### Example
+```java
+// Import classes:
+import com.onesignal.client.ApiClient;
+import com.onesignal.client.ApiException;
+import com.onesignal.client.Configuration;
+import com.onesignal.client.auth.*;
+import com.onesignal.client.model.*;
+import com.onesignal.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.onesignal.com");
+
+ // Configure HTTP bearer authorization: rest_api_key
+ HttpBearerAuth rest_api_key = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
+ rest_api_key.setBearerToken("YOUR_REST_API_KEY");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ String appId = "YOUR_APP_ID"; // String | Your OneSignal App ID in UUID v4 format.
+ String journeyId = "YOUR_JOURNEY_ID"; // String | UUID of the journey to delete.
+ try {
+ GenericSuccessBoolResponse result = apiInstance.deleteJourney(appId, journeyId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#deleteJourney");
+ System.err.println("Status code: " + e.getCode());
+ // getErrorMessages() flattens any error-envelope shape to a List;
+ // the raw body remains on getResponseBody().
+ System.err.println("Error messages: " + e.getErrorMessages());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **appId** | **String**| Your OneSignal App ID in UUID v4 format. | |
+| **journeyId** | **String**| UUID of the journey to delete. | |
+
+### Return type
+
+[**GenericSuccessBoolResponse**](GenericSuccessBoolResponse.md)
+
+### Authorization
+
+[rest_api_key](https://github.com/OneSignal/onesignal-java-api#configuration)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **403** | Forbidden | - |
+| **404** | Not Found | - |
+| **429** | Rate Limit Exceeded | - |
+| **0** | Unexpected error | - |
+
# **deleteSegment**
> GenericSuccessBoolResponse deleteSegment(appId, segmentId)
@@ -3121,6 +3280,170 @@ public class Example {
| **429** | Rate Limit Exceeded | - |
| **0** | Unexpected error | - |
+
+# **updateJourney**
+> Journey updateJourney(appId, journeyId, updateJourneyRequest)
+
+Update journey
+
+The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a journey using JSON Merge Patch (RFC 7396). Send only the fields you want to change; omitted fields are left unchanged. A null value clears a nullable field, and arrays such as nodes are replaced wholesale. Set state to active to activate a draft journey.
+
+### Example
+```java
+// Import classes:
+import com.onesignal.client.ApiClient;
+import com.onesignal.client.ApiException;
+import com.onesignal.client.Configuration;
+import com.onesignal.client.auth.*;
+import com.onesignal.client.model.*;
+import com.onesignal.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.onesignal.com");
+
+ // Configure HTTP bearer authorization: rest_api_key
+ HttpBearerAuth rest_api_key = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
+ rest_api_key.setBearerToken("YOUR_REST_API_KEY");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ String appId = "YOUR_APP_ID"; // String | Your OneSignal App ID in UUID v4 format.
+ String journeyId = "YOUR_JOURNEY_ID"; // String | UUID of the journey to update.
+ UpdateJourneyRequest updateJourneyRequest = new UpdateJourneyRequest(); // UpdateJourneyRequest |
+ try {
+ Journey result = apiInstance.updateJourney(appId, journeyId, updateJourneyRequest);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#updateJourney");
+ System.err.println("Status code: " + e.getCode());
+ // getErrorMessages() flattens any error-envelope shape to a List;
+ // the raw body remains on getResponseBody().
+ System.err.println("Error messages: " + e.getErrorMessages());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **appId** | **String**| Your OneSignal App ID in UUID v4 format. | |
+| **journeyId** | **String**| UUID of the journey to update. | |
+| **updateJourneyRequest** | [**UpdateJourneyRequest**](UpdateJourneyRequest.md)| | |
+
+### Return type
+
+[**Journey**](Journey.md)
+
+### Authorization
+
+[rest_api_key](https://github.com/OneSignal/onesignal-java-api#configuration)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **400** | Bad Request | - |
+| **403** | Forbidden | - |
+| **404** | Not Found | - |
+| **409** | Conflict | - |
+| **422** | Unprocessable Entity | - |
+| **429** | Rate Limit Exceeded | - |
+| **0** | Unexpected error | - |
+
+
+# **updateJourneyNode**
+> Journey updateJourneyNode(appId, journeyId, nodeId, updateJourneyNodeRequest)
+
+Update journey node
+
+The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a single node, located by its server-assigned id, using JSON Merge Patch (RFC 7396). Send only the node fields you want to change; the rest of the node and the rest of the journey graph are left untouched. Returns the full updated journey.
+
+### Example
+```java
+// Import classes:
+import com.onesignal.client.ApiClient;
+import com.onesignal.client.ApiException;
+import com.onesignal.client.Configuration;
+import com.onesignal.client.auth.*;
+import com.onesignal.client.model.*;
+import com.onesignal.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.onesignal.com");
+
+ // Configure HTTP bearer authorization: rest_api_key
+ HttpBearerAuth rest_api_key = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
+ rest_api_key.setBearerToken("YOUR_REST_API_KEY");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ String appId = "YOUR_APP_ID"; // String | Your OneSignal App ID in UUID v4 format.
+ String journeyId = "YOUR_JOURNEY_ID"; // String | UUID of the journey that owns the node.
+ String nodeId = "YOUR_NODE_ID"; // String | Server-assigned UUID of the node to update, from a prior View journey fetch.
+ UpdateJourneyNodeRequest updateJourneyNodeRequest = new UpdateJourneyNodeRequest(); // UpdateJourneyNodeRequest |
+ try {
+ Journey result = apiInstance.updateJourneyNode(appId, journeyId, nodeId, updateJourneyNodeRequest);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#updateJourneyNode");
+ System.err.println("Status code: " + e.getCode());
+ // getErrorMessages() flattens any error-envelope shape to a List;
+ // the raw body remains on getResponseBody().
+ System.err.println("Error messages: " + e.getErrorMessages());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **appId** | **String**| Your OneSignal App ID in UUID v4 format. | |
+| **journeyId** | **String**| UUID of the journey that owns the node. | |
+| **nodeId** | **String**| Server-assigned UUID of the node to update, from a prior View journey fetch. | |
+| **updateJourneyNodeRequest** | [**UpdateJourneyNodeRequest**](UpdateJourneyNodeRequest.md)| | |
+
+### Return type
+
+[**Journey**](Journey.md)
+
+### Authorization
+
+[rest_api_key](https://github.com/OneSignal/onesignal-java-api#configuration)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **400** | Bad Request | - |
+| **403** | Forbidden | - |
+| **404** | Not Found | - |
+| **409** | Conflict | - |
+| **422** | Unprocessable Entity | - |
+| **429** | Rate Limit Exceeded | - |
+| **0** | Unexpected error | - |
+
# **updateLiveActivity**
> UpdateLiveActivitySuccessResponse updateLiveActivity(appId, activityId, updateLiveActivityRequest)
@@ -3662,6 +3985,234 @@ public class Example {
| **400** | Bad Request | - |
| **0** | Unexpected error | - |
+
+# **viewJourney**
+> Journey viewJourney(appId, journeyId)
+
+View journey
+
+The Journeys API is in beta. Endpoints and response fields can still change. Retrieve the full configuration of a single journey by its UUID, including its audience and node graph.
+
+### Example
+```java
+// Import classes:
+import com.onesignal.client.ApiClient;
+import com.onesignal.client.ApiException;
+import com.onesignal.client.Configuration;
+import com.onesignal.client.auth.*;
+import com.onesignal.client.model.*;
+import com.onesignal.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.onesignal.com");
+
+ // Configure HTTP bearer authorization: rest_api_key
+ HttpBearerAuth rest_api_key = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
+ rest_api_key.setBearerToken("YOUR_REST_API_KEY");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ String appId = "YOUR_APP_ID"; // String | Your OneSignal App ID in UUID v4 format.
+ String journeyId = "YOUR_JOURNEY_ID"; // String | UUID of the journey to retrieve.
+ try {
+ Journey result = apiInstance.viewJourney(appId, journeyId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#viewJourney");
+ System.err.println("Status code: " + e.getCode());
+ // getErrorMessages() flattens any error-envelope shape to a List;
+ // the raw body remains on getResponseBody().
+ System.err.println("Error messages: " + e.getErrorMessages());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **appId** | **String**| Your OneSignal App ID in UUID v4 format. | |
+| **journeyId** | **String**| UUID of the journey to retrieve. | |
+
+### Return type
+
+[**Journey**](Journey.md)
+
+### Authorization
+
+[rest_api_key](https://github.com/OneSignal/onesignal-java-api#configuration)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **404** | Not Found | - |
+| **429** | Rate Limit Exceeded | - |
+| **0** | Unexpected error | - |
+
+
+# **viewJourneyStats**
+> JourneyStats viewJourneyStats(appId, journeyId)
+
+View journey stats
+
+The Journeys API is in beta. Endpoints and response fields can still change. Retrieve performance stats for a single journey: journey-level entry and exit counts, per-node counts keyed by node id, per-branch counts keyed by branch id, and channel delivery stats for message-sending nodes. The response carries no definition detail, so join it by id against the journey from View journey.
+
+### Example
+```java
+// Import classes:
+import com.onesignal.client.ApiClient;
+import com.onesignal.client.ApiException;
+import com.onesignal.client.Configuration;
+import com.onesignal.client.auth.*;
+import com.onesignal.client.model.*;
+import com.onesignal.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.onesignal.com");
+
+ // Configure HTTP bearer authorization: rest_api_key
+ HttpBearerAuth rest_api_key = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
+ rest_api_key.setBearerToken("YOUR_REST_API_KEY");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ String appId = "YOUR_APP_ID"; // String | Your OneSignal App ID in UUID v4 format.
+ String journeyId = "YOUR_JOURNEY_ID"; // String | UUID of the journey to retrieve stats for.
+ try {
+ JourneyStats result = apiInstance.viewJourneyStats(appId, journeyId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#viewJourneyStats");
+ System.err.println("Status code: " + e.getCode());
+ // getErrorMessages() flattens any error-envelope shape to a List;
+ // the raw body remains on getResponseBody().
+ System.err.println("Error messages: " + e.getErrorMessages());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **appId** | **String**| Your OneSignal App ID in UUID v4 format. | |
+| **journeyId** | **String**| UUID of the journey to retrieve stats for. | |
+
+### Return type
+
+[**JourneyStats**](JourneyStats.md)
+
+### Authorization
+
+[rest_api_key](https://github.com/OneSignal/onesignal-java-api#configuration)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **404** | Not Found | - |
+| **429** | Rate Limit Exceeded | - |
+| **0** | Unexpected error | - |
+
+
+# **viewJourneys**
+> JourneyListResponse viewJourneys(appId, cursor, limit)
+
+View journeys
+
+The Journeys API is in beta. Endpoints and response fields can still change. Retrieve a paginated list of journeys for an app. Returns a summary representation of each journey; use View journey for the full configuration. Uses forward-only cursor-based pagination.
+
+### Example
+```java
+// Import classes:
+import com.onesignal.client.ApiClient;
+import com.onesignal.client.ApiException;
+import com.onesignal.client.Configuration;
+import com.onesignal.client.auth.*;
+import com.onesignal.client.model.*;
+import com.onesignal.client.api.DefaultApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.onesignal.com");
+
+ // Configure HTTP bearer authorization: rest_api_key
+ HttpBearerAuth rest_api_key = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
+ rest_api_key.setBearerToken("YOUR_REST_API_KEY");
+
+ DefaultApi apiInstance = new DefaultApi(defaultClient);
+ String appId = "YOUR_APP_ID"; // String | Your OneSignal App ID in UUID v4 format.
+ String cursor = "cursor_example"; // String | Opaque pagination token from a previous response's next_cursor. Omit for the first page.
+ Integer limit = 50; // Integer | Maximum journeys to return per page. Minimum 1, maximum 50.
+ try {
+ JourneyListResponse result = apiInstance.viewJourneys(appId, cursor, limit);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling DefaultApi#viewJourneys");
+ System.err.println("Status code: " + e.getCode());
+ // getErrorMessages() flattens any error-envelope shape to a List;
+ // the raw body remains on getResponseBody().
+ System.err.println("Error messages: " + e.getErrorMessages());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **appId** | **String**| Your OneSignal App ID in UUID v4 format. | |
+| **cursor** | **String**| Opaque pagination token from a previous response's next_cursor. Omit for the first page. | [optional] |
+| **limit** | **Integer**| Maximum journeys to return per page. Minimum 1, maximum 50. | [optional] [default to 50] |
+
+### Return type
+
+[**JourneyListResponse**](JourneyListResponse.md)
+
+### Authorization
+
+[rest_api_key](https://github.com/OneSignal/onesignal-java-api#configuration)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **400** | Bad Request | - |
+| **403** | Forbidden | - |
+| **429** | Rate Limit Exceeded | - |
+| **0** | Unexpected error | - |
+
# **viewTemplate**
> TemplateResource viewTemplate(templateId, appId)
diff --git a/docs/Journey.md b/docs/Journey.md
new file mode 100644
index 0000000..e4f96ee
--- /dev/null
+++ b/docs/Journey.md
@@ -0,0 +1,41 @@
+
+
+# Journey
+
+Full journey representation returned by the detail, create, and update endpoints.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Journey UUID. Read-only. | [optional] |
+|**appId** | **String** | UUID of the app the journey belongs to. Read-only. | [optional] |
+|**name** | **String** | Journey name, up to 300 characters. | [optional] |
+|**description** | **String** | Journey description, up to 1024 characters. Defaults to an empty string. | [optional] |
+|**state** | [**StateEnum**](#StateEnum) | Journey state. New journeys are created as draft. processing is transient while activation is in progress. archived is a journey that has been stopped. Change it through the state field on Update journey. | [optional] |
+|**createdAt** | **String** | ISO 8601 creation time. Read-only. | [optional] |
+|**updatedAt** | **String** | ISO 8601 last-update time. Read-only. | [optional] |
+|**startedAt** | **String** | ISO 8601 time the journey was activated, or null. Read-only. May stay null briefly after you set state to active: activation is enqueued, and started_at populates once the journey finishes processing. | [optional] |
+|**archivedAt** | **String** | ISO 8601 time the journey was archived, or null. Read-only. | [optional] |
+|**createdSource** | **String** | Origin of the journey, for example public_api or dashboard. Read-only. | [optional] |
+|**audience** | [**JourneyAudience**](JourneyAudience.md) | | [optional] |
+|**earlyExit** | [**JourneyEarlyExit**](JourneyEarlyExit.md) | | [optional] |
+|**reentryRules** | [**JourneyReentryRules**](JourneyReentryRules.md) | | [optional] |
+|**schedule** | [**JourneySchedule**](JourneySchedule.md) | | [optional] |
+|**nodes** | [**List<JourneyNode>**](JourneyNode.md) | Ordered list of journey nodes. | [optional] |
+|**concurrencyKey** | **String** | Opaque optimistic-concurrency token. Read-only. Pass it back on update to guard against overwriting a concurrent change (409). Send it back exactly as read; do not construct or parse it. | [optional] |
+
+
+
+## Enum: StateEnum
+
+| Name | Value |
+|---- | -----|
+| DRAFT | "draft" |
+| SCHEDULED | "scheduled" |
+| PROCESSING | "processing" |
+| ACTIVE | "active" |
+| ARCHIVED | "archived" |
+
+
+
diff --git a/docs/JourneyAudience.md b/docs/JourneyAudience.md
new file mode 100644
index 0000000..8899f99
--- /dev/null
+++ b/docs/JourneyAudience.md
@@ -0,0 +1,28 @@
+
+
+# JourneyAudience
+
+The journey entry audience. The kind field selects which other fields apply.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**kind** | [**KindEnum**](#KindEnum) | Audience kind. Selects which other fields apply. | |
+|**includedSegmentIds** | **List<String>** | segment audiences: Segment UUIDs whose users enter the journey. | [optional] |
+|**excludedSegmentIds** | **List<String>** | segment audiences: Segment UUIDs whose users are excluded. | [optional] |
+|**futureAdditionsOnly** | **Boolean** | segment audiences: when true, only users who newly match the segment after activation enter the journey. Defaults to false. | [optional] |
+|**name** | **String** | event_trigger audiences: event name that triggers entry, up to 255 characters. | [optional] |
+|**attributes** | **List<List<JourneyEventAttribute>>** | Event attribute matchers, as a list of condition groups. Send a single group whose conditions are AND'd together. More than one group is rejected. | [optional] |
+
+
+
+## Enum: KindEnum
+
+| Name | Value |
+|---- | -----|
+| SEGMENT | "segment" |
+| EVENT_TRIGGER | "event_trigger" |
+
+
+
diff --git a/docs/JourneyBranch.md b/docs/JourneyBranch.md
new file mode 100644
index 0000000..1c27a32
--- /dev/null
+++ b/docs/JourneyBranch.md
@@ -0,0 +1,16 @@
+
+
+# JourneyBranch
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Server-assigned branch identifier. Read-only on create; echo it on update to keep the branch. | [optional] |
+|**condition** | [**JourneyCondition**](JourneyCondition.md) | | [optional] |
+|**weight** | **BigDecimal** | Branch weight for split_range nodes. Weights across a node's branches must sum to 100. | [optional] |
+|**nodes** | [**List<JourneyNode>**](JourneyNode.md) | Nodes run when this branch is taken, before flow converges to the next sibling node. | [optional] |
+
+
+
diff --git a/docs/JourneyBranchStats.md b/docs/JourneyBranchStats.md
new file mode 100644
index 0000000..a818759
--- /dev/null
+++ b/docs/JourneyBranchStats.md
@@ -0,0 +1,14 @@
+
+
+# JourneyBranchStats
+
+Stats for a single branch of a branching node. Keyed in the response by the branch's server-assigned id.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**completed** | **Integer** | Users who took this branch. | [optional] |
+
+
+
diff --git a/docs/JourneyCondition.md b/docs/JourneyCondition.md
new file mode 100644
index 0000000..1a81ac1
--- /dev/null
+++ b/docs/JourneyCondition.md
@@ -0,0 +1,42 @@
+
+
+# JourneyCondition
+
+A branch condition. The kind field selects which other fields apply.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**kind** | [**KindEnum**](#KindEnum) | Condition kind. Selects which other fields apply. | |
+|**includedSegmentIds** | **List<String>** | segment_membership conditions: Segment UUIDs the user must belong to. | [optional] |
+|**excludedSegmentIds** | **List<String>** | segment_membership conditions: Segment UUIDs the user must not belong to. | [optional] |
+|**action** | [**ActionEnum**](#ActionEnum) | on_notification_action conditions: the notification action to branch on. Which actions apply depends on the sending node's channel. | [optional] |
+|**sendingNodeId** | **String** | on_notification_action conditions: id of the sending node this action refers to. Returned on reads; accepted on write. | [optional] |
+|**clientNodeId** | **String** | on_notification_action conditions: write-only alternative to sending_node_id. References the sending node by its client_node_id. | [optional] |
+|**name** | **String** | event_trigger conditions: event name, up to 255 characters. | [optional] |
+|**attributes** | **List<List<JourneyEventAttribute>>** | Event attribute matchers, as a list of condition groups. Send a single group whose conditions are AND'd together. More than one group is rejected. | [optional] |
+|**entryEventMatchAttributes** | **List<Object>** | event_trigger conditions: match incoming event properties against the journey's entry event. Only valid on event-triggered journeys. | [optional] |
+
+
+
+## Enum: KindEnum
+
+| Name | Value |
+|---- | -----|
+| SEGMENT_MEMBERSHIP | "segment_membership" |
+| ON_NOTIFICATION_ACTION | "on_notification_action" |
+| EVENT_TRIGGER | "event_trigger" |
+
+
+
+## Enum: ActionEnum
+
+| Name | Value |
+|---- | -----|
+| RECEIVED | "received" |
+| CLICKED | "clicked" |
+| OPENED | "opened" |
+
+
+
diff --git a/docs/JourneyEarlyExit.md b/docs/JourneyEarlyExit.md
new file mode 100644
index 0000000..0840006
--- /dev/null
+++ b/docs/JourneyEarlyExit.md
@@ -0,0 +1,15 @@
+
+
+# JourneyEarlyExit
+
+Conditions that remove a user from the journey before it completes. At least one rule must be set under rules. Send null to remove early exit entirely.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**rules** | [**JourneyEarlyExitRules**](JourneyEarlyExitRules.md) | | [optional] |
+|**tagOnEarlyExit** | **Map<String, String>** | Tag key-value pairs applied when a user exits early. | [optional] |
+
+
+
diff --git a/docs/JourneyEarlyExitRules.md b/docs/JourneyEarlyExitRules.md
new file mode 100644
index 0000000..d91c234
--- /dev/null
+++ b/docs/JourneyEarlyExitRules.md
@@ -0,0 +1,16 @@
+
+
+# JourneyEarlyExitRules
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**onSegment** | [**JourneyEarlyExitRulesOnSegment**](JourneyEarlyExitRulesOnSegment.md) | | [optional] |
+|**whenNotInAudience** | **Boolean** | Exit when the user no longer matches the journey audience. Defaults to false. | [optional] |
+|**onSession** | **Boolean** | Exit on a new session start. Defaults to false. | [optional] |
+|**onEvent** | [**JourneyEarlyExitRulesOnEvent**](JourneyEarlyExitRulesOnEvent.md) | | [optional] |
+
+
+
diff --git a/docs/JourneyEarlyExitRulesOnEvent.md b/docs/JourneyEarlyExitRulesOnEvent.md
new file mode 100644
index 0000000..472e167
--- /dev/null
+++ b/docs/JourneyEarlyExitRulesOnEvent.md
@@ -0,0 +1,13 @@
+
+
+# JourneyEarlyExitRulesOnEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **String** | Exit when this event occurs. Up to 255 characters. | |
+
+
+
diff --git a/docs/JourneyEarlyExitRulesOnSegment.md b/docs/JourneyEarlyExitRulesOnSegment.md
new file mode 100644
index 0000000..e97e764
--- /dev/null
+++ b/docs/JourneyEarlyExitRulesOnSegment.md
@@ -0,0 +1,13 @@
+
+
+# JourneyEarlyExitRulesOnSegment
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**includedSegmentIds** | **List<String>** | Exit when the user enters any of these segments. | [optional] |
+
+
+
diff --git a/docs/JourneyEventAttribute.md b/docs/JourneyEventAttribute.md
new file mode 100644
index 0000000..adb85fa
--- /dev/null
+++ b/docs/JourneyEventAttribute.md
@@ -0,0 +1,34 @@
+
+
+# JourneyEventAttribute
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**key** | **String** | Event attribute key. | |
+|**operator** | [**OperatorEnum**](#OperatorEnum) | Comparison operator. | |
+|**value** | **String** | Value to compare against. Not required for exists and not_exists. | [optional] |
+
+
+
+## Enum: OperatorEnum
+
+| Name | Value |
+|---- | -----|
+| EQUAL | "equal" |
+| NOT_EQUAL | "not_equal" |
+| LESS | "less" |
+| LESS_OR_EQUAL | "less_or_equal" |
+| GREATER_OR_EQUAL | "greater_or_equal" |
+| GREATER | "greater" |
+| IS | "is" |
+| IS_NOT | "is_not" |
+| EXISTS | "exists" |
+| NOT_EXISTS | "not_exists" |
+| BEFORE | "before" |
+| AFTER | "after" |
+
+
+
diff --git a/docs/JourneyListAudience.md b/docs/JourneyListAudience.md
new file mode 100644
index 0000000..4494e9e
--- /dev/null
+++ b/docs/JourneyListAudience.md
@@ -0,0 +1,23 @@
+
+
+# JourneyListAudience
+
+Entry audience reduced to its kind. Use View journey for the full audience configuration.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**kind** | [**KindEnum**](#KindEnum) | Audience kind. | [optional] |
+
+
+
+## Enum: KindEnum
+
+| Name | Value |
+|---- | -----|
+| SEGMENT | "segment" |
+| EVENT_TRIGGER | "event_trigger" |
+
+
+
diff --git a/docs/JourneyListItem.md b/docs/JourneyListItem.md
new file mode 100644
index 0000000..20f7acd
--- /dev/null
+++ b/docs/JourneyListItem.md
@@ -0,0 +1,37 @@
+
+
+# JourneyListItem
+
+Summary journey representation returned by the list endpoint. Excludes description, nodes, early-exit configuration, and concurrency_key.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Journey UUID. Read-only. | [optional] |
+|**appId** | **String** | UUID of the app the journey belongs to. Read-only. | [optional] |
+|**name** | **String** | Journey name, up to 300 characters. | [optional] |
+|**state** | [**StateEnum**](#StateEnum) | Journey state. New journeys are created as draft. processing is transient while activation is in progress. archived is a journey that has been stopped. Change it through the state field on Update journey. | [optional] |
+|**createdAt** | **String** | ISO 8601 creation time. Read-only. | [optional] |
+|**updatedAt** | **String** | ISO 8601 last-update time. Read-only. | [optional] |
+|**startedAt** | **String** | ISO 8601 time the journey was activated, or null. Read-only. | [optional] |
+|**archivedAt** | **String** | ISO 8601 time the journey was archived, or null. Read-only. | [optional] |
+|**createdSource** | **String** | Origin of the journey, for example public_api or dashboard. Read-only. | [optional] |
+|**schedule** | [**JourneySchedule**](JourneySchedule.md) | | [optional] |
+|**audience** | [**JourneyListAudience**](JourneyListAudience.md) | | [optional] |
+|**reentryRules** | [**JourneyReentryRules**](JourneyReentryRules.md) | | [optional] |
+
+
+
+## Enum: StateEnum
+
+| Name | Value |
+|---- | -----|
+| DRAFT | "draft" |
+| SCHEDULED | "scheduled" |
+| PROCESSING | "processing" |
+| ACTIVE | "active" |
+| ARCHIVED | "archived" |
+
+
+
diff --git a/docs/JourneyListResponse.md b/docs/JourneyListResponse.md
new file mode 100644
index 0000000..edf059b
--- /dev/null
+++ b/docs/JourneyListResponse.md
@@ -0,0 +1,15 @@
+
+
+# JourneyListResponse
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**journeys** | [**List<JourneyListItem>**](JourneyListItem.md) | Journeys ordered by creation time, newest first. | [optional] |
+|**hasMore** | **Boolean** | true if more journeys exist beyond this page. | [optional] |
+|**nextCursor** | **String** | Cursor for the next page. Present only when has_more is true. | [optional] |
+
+
+
diff --git a/docs/JourneyMessageStats.md b/docs/JourneyMessageStats.md
new file mode 100644
index 0000000..67bb6b1
--- /dev/null
+++ b/docs/JourneyMessageStats.md
@@ -0,0 +1,14 @@
+
+
+# JourneyMessageStats
+
+Delivery stats for a message-sending node. Present only on send_push, send_email, send_sms, send_iam, and send_webhook nodes. The keys inside totals depend on the node's channel.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**totals** | **Map<String, BigDecimal>** | All-time totals for this node, keyed by channel-specific stat name. | [optional] |
+
+
+
diff --git a/docs/JourneyNode.md b/docs/JourneyNode.md
new file mode 100644
index 0000000..2e2deb9
--- /dev/null
+++ b/docs/JourneyNode.md
@@ -0,0 +1,57 @@
+
+
+# JourneyNode
+
+A journey node. The kind field selects which other fields apply. Branching nodes (split_range, yes_no, wait_until) nest their sub-graphs inline via branches[].nodes.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | Server-assigned node UUID. Returned on reads. Required on update to keep an existing node. Rejected on create with a 400 validation error. | [optional] |
+|**kind** | [**KindEnum**](#KindEnum) | Node kind. Selects which other fields apply. | |
+|**clientNodeId** | **String** | Optional client-assigned identifier, unique within the journey. Use it to reference this node from elsewhere in the same request. Persisted and returned on reads. | [optional] |
+|**annotation** | **String** | Optional free-text label, up to 255 characters. Stored and returned as-is with no effect on journey behavior. | [optional] |
+|**durationSeconds** | **Integer** | wait nodes: seconds to hold the user. Minimum 60, maximum 31556952 (1 year). | [optional] |
+|**relativeTo** | [**RelativeToEnum**](#RelativeToEnum) | time_window nodes: schedule_in_timezone uses the configured windows; last_active_time holds relative to the user's last active time. | [optional] |
+|**windows** | [**List<JourneyTimeWindow>**](JourneyTimeWindow.md) | time_window nodes: one or more time windows. A window with no day_of_week applies to every day. Required when relative_to is schedule_in_timezone; omit when it is last_active_time. | [optional] |
+|**timeZone** | **String** | time_window nodes: IANA timezone identifier used when the user's timezone is unavailable. | [optional] |
+|**useUserTimeZone** | **Boolean** | time_window nodes: when true, uses the user's timezone if available. | [optional] |
+|**templateId** | **String** | send_push, send_email, and send_sms nodes: UUID of the template to send. | [optional] |
+|**iamId** | **String** | send_iam nodes: UUID of the in-app message to send. | [optional] |
+|**userTtlSeconds** | **Integer** | send_iam nodes: optional time-to-live for the in-app message, in seconds. | [optional] |
+|**webhookId** | **String** | send_webhook nodes: UUID of the webhook to send. | [optional] |
+|**assignments** | **Map<String, String>** | tag nodes: tag key-value pairs to assign. An empty string value removes the tag. Keys are limited to 255 characters and values to 1024. | [optional] |
+|**randomizeOnEntry** | **Boolean** | split_range nodes: when true, assigns each user to a branch at random on entry. Defaults to false. | [optional] |
+|**branches** | [**List<JourneyBranch>**](JourneyBranch.md) | Branching nodes: nested branches. split_range requires 2-20 weighted branches that sum to 100. yes_no requires exactly 2 branches. wait_until requires 1-10 condition branches. | [optional] |
+|**expiration** | [**JourneyWaitUntilExpiration**](JourneyWaitUntilExpiration.md) | | [optional] |
+
+
+
+## Enum: KindEnum
+
+| Name | Value |
+|---- | -----|
+| WAIT | "wait" |
+| TIME_WINDOW | "time_window" |
+| SEND_PUSH | "send_push" |
+| SEND_EMAIL | "send_email" |
+| SEND_SMS | "send_sms" |
+| SEND_IAM | "send_iam" |
+| SEND_WEBHOOK | "send_webhook" |
+| TAG | "tag" |
+| SPLIT_RANGE | "split_range" |
+| YES_NO | "yes_no" |
+| WAIT_UNTIL | "wait_until" |
+
+
+
+## Enum: RelativeToEnum
+
+| Name | Value |
+|---- | -----|
+| SCHEDULE_IN_TIMEZONE | "schedule_in_timezone" |
+| LAST_ACTIVE_TIME | "last_active_time" |
+
+
+
diff --git a/docs/JourneyNodeStats.md b/docs/JourneyNodeStats.md
new file mode 100644
index 0000000..db3343a
--- /dev/null
+++ b/docs/JourneyNodeStats.md
@@ -0,0 +1,36 @@
+
+
+# JourneyNodeStats
+
+Stats for a single node. Keyed in the response by the node's server-assigned id.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**kind** | [**KindEnum**](#KindEnum) | Node kind, repeated here so stats can be read without joining against the journey definition. | [optional] |
+|**waiting** | **Integer** | Users currently held at this node. | [optional] |
+|**completed** | **Integer** | Users who advanced past this node normally. | [optional] |
+|**exitedEarly** | **Integer** | Users who left the journey from this node through an early exit rule. | [optional] |
+|**messageStats** | [**JourneyMessageStats**](JourneyMessageStats.md) | | [optional] |
+
+
+
+## Enum: KindEnum
+
+| Name | Value |
+|---- | -----|
+| WAIT | "wait" |
+| TIME_WINDOW | "time_window" |
+| SEND_PUSH | "send_push" |
+| SEND_EMAIL | "send_email" |
+| SEND_SMS | "send_sms" |
+| SEND_IAM | "send_iam" |
+| SEND_WEBHOOK | "send_webhook" |
+| TAG | "tag" |
+| SPLIT_RANGE | "split_range" |
+| YES_NO | "yes_no" |
+| WAIT_UNTIL | "wait_until" |
+
+
+
diff --git a/docs/JourneyReentryRules.md b/docs/JourneyReentryRules.md
new file mode 100644
index 0000000..d7a0e6b
--- /dev/null
+++ b/docs/JourneyReentryRules.md
@@ -0,0 +1,14 @@
+
+
+# JourneyReentryRules
+
+Controls whether and how soon a user can re-enter the journey. null means re-entry is not allowed.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**durationSeconds** | **Integer** | Minimum seconds before a user can re-enter. Must be at least 600 (10 minutes). | [optional] |
+
+
+
diff --git a/docs/JourneySchedule.md b/docs/JourneySchedule.md
new file mode 100644
index 0000000..2af6b8f
--- /dev/null
+++ b/docs/JourneySchedule.md
@@ -0,0 +1,16 @@
+
+
+# JourneySchedule
+
+Optional future start and/or stop time. null means no scheduled activation.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**startAt** | **String** | ISO 8601 start time. Use UTC (Z or +00:00). Must be at least 5 minutes in the future. | [optional] |
+|**stopAt** | **String** | ISO 8601 stop time. Use UTC (Z or +00:00). Must be in the future and later than start_at. | [optional] |
+|**error** | **String** | Read-only. Present when a scheduling error occurred. | [optional] |
+
+
+
diff --git a/docs/JourneyStats.md b/docs/JourneyStats.md
new file mode 100644
index 0000000..92e3236
--- /dev/null
+++ b/docs/JourneyStats.md
@@ -0,0 +1,19 @@
+
+
+# JourneyStats
+
+Journey-level counts plus flat, id-keyed maps of node and branch stats. Contains no definition detail; join it by id against the journey from View journey.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**id** | **String** | UUID of the journey these stats belong to. | [optional] |
+|**started** | **Integer** | Users who entered the journey. | [optional] |
+|**completed** | **Integer** | Users who reached the end of the journey normally. | [optional] |
+|**exitedEarly** | **Integer** | Users who left the journey through an early exit rule. | [optional] |
+|**nodes** | [**Map<String, JourneyNodeStats>**](JourneyNodeStats.md) | Node stats keyed by node id. Includes every node in the graph, at any nesting depth. | [optional] |
+|**branches** | [**Map<String, JourneyBranchStats>**](JourneyBranchStats.md) | Branch stats keyed by branch id. Empty for a journey with no branching nodes. | [optional] |
+
+
+
diff --git a/docs/JourneyTimePoint.md b/docs/JourneyTimePoint.md
new file mode 100644
index 0000000..66cd881
--- /dev/null
+++ b/docs/JourneyTimePoint.md
@@ -0,0 +1,14 @@
+
+
+# JourneyTimePoint
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**hour** | **Integer** | Hour of day, 0-23. | [optional] |
+|**minute** | **Integer** | Minute of hour, 0-59. Defaults to 0. | [optional] |
+
+
+
diff --git a/docs/JourneyTimeWindow.md b/docs/JourneyTimeWindow.md
new file mode 100644
index 0000000..831d648
--- /dev/null
+++ b/docs/JourneyTimeWindow.md
@@ -0,0 +1,16 @@
+
+
+# JourneyTimeWindow
+
+A wall-clock window. Each window must span at least 15 minutes.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**start** | [**JourneyTimePoint**](JourneyTimePoint.md) | When the window opens. | [optional] |
+|**end** | [**JourneyTimePoint**](JourneyTimePoint.md) | When the window closes. | [optional] |
+|**dayOfWeek** | **Integer** | Day of week, 1 = Monday. Omit to apply the window to every day. | [optional] |
+
+
+
diff --git a/docs/JourneyWaitUntilExpiration.md b/docs/JourneyWaitUntilExpiration.md
new file mode 100644
index 0000000..da02f08
--- /dev/null
+++ b/docs/JourneyWaitUntilExpiration.md
@@ -0,0 +1,15 @@
+
+
+# JourneyWaitUntilExpiration
+
+Optional expiration timer. null waits indefinitely.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**durationSeconds** | **Integer** | Seconds to wait before the timer fires. Minimum 60, maximum 31556952 (1 year). | [optional] |
+|**exits** | **Boolean** | When true, the user exits the journey when the timer fires; when false, the user continues to convergence. | [optional] |
+
+
+
diff --git a/docs/UpdateJourneyNodeRequest.md b/docs/UpdateJourneyNodeRequest.md
new file mode 100644
index 0000000..44864eb
--- /dev/null
+++ b/docs/UpdateJourneyNodeRequest.md
@@ -0,0 +1,38 @@
+
+
+# UpdateJourneyNodeRequest
+
+Node fields to change, merged onto the current node. Send only the fields you want to change. The node's kind and id cannot be changed. Send null to clear a nullable field. Which other fields apply depends on the node's kind, matching JourneyNode.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**clientNodeId** | **String** | Optional client-assigned identifier, unique within the journey. Use it to reference this node from elsewhere in the same request. Persisted and returned on reads. | [optional] |
+|**annotation** | **String** | Optional free-text label, up to 255 characters. Stored and returned as-is with no effect on journey behavior. | [optional] |
+|**durationSeconds** | **Integer** | wait nodes: seconds to hold the user. Minimum 60, maximum 31556952 (1 year). | [optional] |
+|**relativeTo** | [**RelativeToEnum**](#RelativeToEnum) | time_window nodes: schedule_in_timezone uses the configured windows; last_active_time holds relative to the user's last active time. | [optional] |
+|**windows** | [**List<JourneyTimeWindow>**](JourneyTimeWindow.md) | time_window nodes: one or more time windows. A window with no day_of_week applies to every day. Required when relative_to is schedule_in_timezone; omit when it is last_active_time. | [optional] |
+|**timeZone** | **String** | time_window nodes: IANA timezone identifier used when the user's timezone is unavailable. | [optional] |
+|**useUserTimeZone** | **Boolean** | time_window nodes: when true, uses the user's timezone if available. | [optional] |
+|**templateId** | **String** | send_push, send_email, and send_sms nodes: UUID of the template to send. | [optional] |
+|**iamId** | **String** | send_iam nodes: UUID of the in-app message to send. | [optional] |
+|**userTtlSeconds** | **Integer** | send_iam nodes: optional time-to-live for the in-app message, in seconds. | [optional] |
+|**webhookId** | **String** | send_webhook nodes: UUID of the webhook to send. | [optional] |
+|**assignments** | **Map<String, String>** | tag nodes: tag key-value pairs to assign. An empty string value removes the tag. Keys are limited to 255 characters and values to 1024. | [optional] |
+|**randomizeOnEntry** | **Boolean** | split_range nodes: when true, assigns each user to a branch at random on entry. Defaults to false. | [optional] |
+|**branches** | [**List<JourneyBranch>**](JourneyBranch.md) | Branching nodes: nested branches. split_range requires 2-20 weighted branches that sum to 100. yes_no requires exactly 2 branches. wait_until requires 1-10 condition branches. | [optional] |
+|**expiration** | [**JourneyWaitUntilExpiration**](JourneyWaitUntilExpiration.md) | | [optional] |
+|**concurrencyKey** | **String** | Optional optimistic-concurrency token. Pass the concurrency_key from a prior fetch to reject the update with 409 if the journey changed. Omit to skip the check. It is not merged onto the node. | [optional] |
+
+
+
+## Enum: RelativeToEnum
+
+| Name | Value |
+|---- | -----|
+| SCHEDULE_IN_TIMEZONE | "schedule_in_timezone" |
+| LAST_ACTIVE_TIME | "last_active_time" |
+
+
+
diff --git a/docs/UpdateJourneyRequest.md b/docs/UpdateJourneyRequest.md
new file mode 100644
index 0000000..e0b9b65
--- /dev/null
+++ b/docs/UpdateJourneyRequest.md
@@ -0,0 +1,33 @@
+
+
+# UpdateJourneyRequest
+
+Partial update applied with JSON Merge Patch (RFC 7396). Send only the fields you want to change. A null value clears a nullable field. Arrays such as nodes are replaced wholesale.
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**name** | **String** | Journey name. | [optional] |
+|**description** | **String** | Journey description. Send null to clear it. | [optional] |
+|**audience** | [**JourneyAudience**](JourneyAudience.md) | | [optional] |
+|**earlyExit** | [**JourneyEarlyExit**](JourneyEarlyExit.md) | | [optional] |
+|**reentryRules** | [**JourneyReentryRules**](JourneyReentryRules.md) | | [optional] |
+|**schedule** | [**JourneySchedule**](JourneySchedule.md) | | [optional] |
+|**nodes** | [**List<JourneyNode>**](JourneyNode.md) | Full ordered list of nodes, which replaces the existing graph wholesale. Preserve each node's server-assigned id from a prior fetch to keep in-flight users on that node; omit id to add a new node. | [optional] |
+|**state** | [**StateEnum**](#StateEnum) | Target state. Set active to activate a draft journey, or scheduled together with a future schedule.start_at to activate it later. Set archived to stop a running journey; archiving is permanent. Only scheduled and processing journeys can return to draft. | [optional] |
+|**concurrencyKey** | **String** | Optional optimistic-concurrency token. Pass the concurrency_key from a prior fetch to reject the update with 409 if the journey changed. Omit to skip the check. | [optional] |
+
+
+
+## Enum: StateEnum
+
+| Name | Value |
+|---- | -----|
+| DRAFT | "draft" |
+| SCHEDULED | "scheduled" |
+| ACTIVE | "active" |
+| ARCHIVED | "archived" |
+
+
+
diff --git a/pom.xml b/pom.xml
index 6ee4f28..69acb94 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
onesignal-java-clientjaronesignal-java-client
- 5.11.2
+ 5.12.0https://github.com/OneSignal/onesignal-java-apiOneSignal Java API Client
diff --git a/src/main/java/com/onesignal/client/ApiClient.java b/src/main/java/com/onesignal/client/ApiClient.java
index 326c9ea..255b0fe 100644
--- a/src/main/java/com/onesignal/client/ApiClient.java
+++ b/src/main/java/com/onesignal/client/ApiClient.java
@@ -132,7 +132,7 @@ private void init() {
json = new JSON();
// Set default User-Agent.
- setUserAgent("OpenAPI-Generator/5.11.2/java");
+ setUserAgent("OpenAPI-Generator/5.12.0/java");
authentications = new HashMap();
}
diff --git a/src/main/java/com/onesignal/client/JSON.java b/src/main/java/com/onesignal/client/JSON.java
index 0178969..002b2d1 100644
--- a/src/main/java/com/onesignal/client/JSON.java
+++ b/src/main/java/com/onesignal/client/JSON.java
@@ -106,6 +106,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
.registerTypeAdapterFactory(new com.onesignal.client.model.CopyTemplateRequest.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.CreateApiKeyRequest.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.CreateApiKeyResponse.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.CreateJourneyRequest.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.CreateNotificationSuccessResponse.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.CreateSegmentConflictResponse.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.CreateSegmentSuccessResponse.CustomTypeAdapterFactory())
@@ -126,6 +127,28 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
.registerTypeAdapterFactory(new com.onesignal.client.model.GetNotificationHistoryRequestBody.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.GetSegmentSuccessResponse.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.GetSegmentsSuccessResponse.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.Journey.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyAudience.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyBranch.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyBranchStats.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyCondition.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyEarlyExit.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyEarlyExitRules.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyEarlyExitRulesOnEvent.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyEarlyExitRulesOnSegment.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyEventAttribute.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyListAudience.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyListItem.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyListResponse.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyMessageStats.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyNode.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyNodeStats.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyReentryRules.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneySchedule.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyStats.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyTimePoint.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyTimeWindow.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.JourneyWaitUntilExpiration.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.LanguageStringMap.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.ListAuditLogsSuccessResponse.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.Notification.CustomTypeAdapterFactory())
@@ -159,6 +182,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
.registerTypeAdapterFactory(new com.onesignal.client.model.TemplatesListResponse.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.TransferSubscriptionRequestBody.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.UpdateApiKeyRequest.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.UpdateJourneyNodeRequest.CustomTypeAdapterFactory())
+ .registerTypeAdapterFactory(new com.onesignal.client.model.UpdateJourneyRequest.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.UpdateLiveActivityRequest.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.UpdateLiveActivitySuccessResponse.CustomTypeAdapterFactory())
.registerTypeAdapterFactory(new com.onesignal.client.model.UpdateSegmentRequest.CustomTypeAdapterFactory())
diff --git a/src/main/java/com/onesignal/client/api/DefaultApi.java b/src/main/java/com/onesignal/client/api/DefaultApi.java
index 160d3f3..7b65887 100644
--- a/src/main/java/com/onesignal/client/api/DefaultApi.java
+++ b/src/main/java/com/onesignal/client/api/DefaultApi.java
@@ -31,6 +31,7 @@
import com.onesignal.client.model.CopyTemplateRequest;
import com.onesignal.client.model.CreateApiKeyRequest;
import com.onesignal.client.model.CreateApiKeyResponse;
+import com.onesignal.client.model.CreateJourneyRequest;
import com.onesignal.client.model.CreateNotificationSuccessResponse;
import com.onesignal.client.model.CreateSegmentConflictResponse;
import com.onesignal.client.model.CreateSegmentSuccessResponse;
@@ -45,6 +46,9 @@
import com.onesignal.client.model.GetNotificationHistoryRequestBody;
import com.onesignal.client.model.GetSegmentSuccessResponse;
import com.onesignal.client.model.GetSegmentsSuccessResponse;
+import com.onesignal.client.model.Journey;
+import com.onesignal.client.model.JourneyListResponse;
+import com.onesignal.client.model.JourneyStats;
import com.onesignal.client.model.ListAuditLogsSuccessResponse;
import com.onesignal.client.model.Notification;
import com.onesignal.client.model.NotificationHistorySuccessResponse;
@@ -61,6 +65,8 @@
import com.onesignal.client.model.TemplatesListResponse;
import com.onesignal.client.model.TransferSubscriptionRequestBody;
import com.onesignal.client.model.UpdateApiKeyRequest;
+import com.onesignal.client.model.UpdateJourneyNodeRequest;
+import com.onesignal.client.model.UpdateJourneyRequest;
import com.onesignal.client.model.UpdateLiveActivityRequest;
import com.onesignal.client.model.UpdateLiveActivitySuccessResponse;
import com.onesignal.client.model.UpdateSegmentRequest;
@@ -158,7 +164,7 @@ public okhttp3.Call cancelNotificationCall(String appId, String notificationId,
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (appId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("app_id", appId));
@@ -316,7 +322,7 @@ public okhttp3.Call copyTemplateToAppCall(String templateId, String appId, CopyT
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (appId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("app_id", appId));
@@ -482,7 +488,7 @@ public okhttp3.Call createAliasCall(String appId, String aliasLabel, String alia
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -659,7 +665,7 @@ public okhttp3.Call createAliasBySubscriptionCall(String appId, String subscript
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -823,7 +829,7 @@ public okhttp3.Call createApiKeyCall(String appId, CreateApiKeyRequest createApi
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -969,7 +975,7 @@ public okhttp3.Call createAppCall(App app, final ApiCallback _callback) throws A
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -1113,7 +1119,7 @@ public okhttp3.Call createCustomEventsCall(String appId, CustomEventsRequest cus
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -1224,6 +1230,161 @@ public okhttp3.Call createCustomEventsAsync(String appId, CustomEventsRequest cu
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for createJourney
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param createJourneyRequest (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
201
Created
-
+
400
Bad Request
-
+
403
Forbidden
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call createJourneyCall(String appId, CreateJourneyRequest createJourneyRequest, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = createJourneyRequest;
+
+ // create path and map variables
+ String localVarPath = "/apps/{app_id}/journeys"
+ .replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ // Adds client sdk version header
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "rest_api_key" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call createJourneyValidateBeforeCall(String appId, CreateJourneyRequest createJourneyRequest, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'appId' is set
+ if (appId == null) {
+ throw new ApiException("Missing the required parameter 'appId' when calling createJourney(Async)");
+ }
+
+ // verify the required parameter 'createJourneyRequest' is set
+ if (createJourneyRequest == null) {
+ throw new ApiException("Missing the required parameter 'createJourneyRequest' when calling createJourney(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = createJourneyCall(appId, createJourneyRequest, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Create journey
+ * The Journeys API is in beta. Endpoints and response fields can still change. Create a new journey with an audience and a node graph. Journeys are always created in the draft state. The authenticated App API key must have permission to create journeys.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param createJourneyRequest (required)
+ * @return Journey
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
201
Created
-
+
400
Bad Request
-
+
403
Forbidden
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public Journey createJourney(String appId, CreateJourneyRequest createJourneyRequest) throws ApiException {
+ ApiResponse localVarResp = createJourneyWithHttpInfo(appId, createJourneyRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Create journey
+ * The Journeys API is in beta. Endpoints and response fields can still change. Create a new journey with an audience and a node graph. Journeys are always created in the draft state. The authenticated App API key must have permission to create journeys.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param createJourneyRequest (required)
+ * @return ApiResponse<Journey>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
201
Created
-
+
400
Bad Request
-
+
403
Forbidden
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public ApiResponse createJourneyWithHttpInfo(String appId, CreateJourneyRequest createJourneyRequest) throws ApiException {
+ okhttp3.Call localVarCall = createJourneyValidateBeforeCall(appId, createJourneyRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Create journey (asynchronously)
+ * The Journeys API is in beta. Endpoints and response fields can still change. Create a new journey with an audience and a node graph. Journeys are always created in the draft state. The authenticated App API key must have permission to create journeys.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param createJourneyRequest (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
201
Created
-
+
400
Bad Request
-
+
403
Forbidden
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call createJourneyAsync(String appId, CreateJourneyRequest createJourneyRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = createJourneyValidateBeforeCall(appId, createJourneyRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for createNotification
* @param notification (required)
@@ -1265,7 +1426,7 @@ public okhttp3.Call createNotificationCall(Notification notification, final ApiC
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -1409,7 +1570,7 @@ public okhttp3.Call createSegmentCall(String appId, Segment segment, final ApiCa
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -1565,7 +1726,7 @@ public okhttp3.Call createSubscriptionCall(String appId, String aliasLabel, Stri
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -1739,7 +1900,7 @@ public okhttp3.Call createTemplateCall(CreateTemplateRequest createTemplateReque
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -1885,7 +2046,7 @@ public okhttp3.Call createUserCall(String appId, User user, final ApiCallback _c
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -2052,7 +2213,7 @@ public okhttp3.Call deleteAliasCall(String appId, String aliasLabel, String alia
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -2225,7 +2386,7 @@ public okhttp3.Call deleteApiKeyCall(String appId, String tokenId, final ApiCall
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -2330,6 +2491,162 @@ public okhttp3.Call deleteApiKeyAsync(String appId, String tokenId, final ApiCal
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for deleteJourney
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to delete. (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
403
Forbidden
-
+
404
Not Found
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call deleteJourneyCall(String appId, String journeyId, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/apps/{app_id}/journeys/{journey_id}"
+ .replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()))
+ .replaceAll("\\{" + "journey_id" + "\\}", localVarApiClient.escapeString(journeyId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ // Adds client sdk version header
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "rest_api_key" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call deleteJourneyValidateBeforeCall(String appId, String journeyId, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'appId' is set
+ if (appId == null) {
+ throw new ApiException("Missing the required parameter 'appId' when calling deleteJourney(Async)");
+ }
+
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException("Missing the required parameter 'journeyId' when calling deleteJourney(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = deleteJourneyCall(appId, journeyId, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Delete journey
+ * The Journeys API is in beta. Endpoints and response fields can still change. Permanently delete a journey by its UUID. Returns { \"success\": true } on success. The authenticated App API key must have permission to delete journeys. Deleting a journey stops any in-flight users and cannot be undone. Archive a running journey instead if you need to keep its data.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to delete. (required)
+ * @return GenericSuccessBoolResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
403
Forbidden
-
+
404
Not Found
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public GenericSuccessBoolResponse deleteJourney(String appId, String journeyId) throws ApiException {
+ ApiResponse localVarResp = deleteJourneyWithHttpInfo(appId, journeyId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Delete journey
+ * The Journeys API is in beta. Endpoints and response fields can still change. Permanently delete a journey by its UUID. Returns { \"success\": true } on success. The authenticated App API key must have permission to delete journeys. Deleting a journey stops any in-flight users and cannot be undone. Archive a running journey instead if you need to keep its data.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to delete. (required)
+ * @return ApiResponse<GenericSuccessBoolResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
403
Forbidden
-
+
404
Not Found
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public ApiResponse deleteJourneyWithHttpInfo(String appId, String journeyId) throws ApiException {
+ okhttp3.Call localVarCall = deleteJourneyValidateBeforeCall(appId, journeyId, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Delete journey (asynchronously)
+ * The Journeys API is in beta. Endpoints and response fields can still change. Permanently delete a journey by its UUID. Returns { \"success\": true } on success. The authenticated App API key must have permission to delete journeys. Deleting a journey stops any in-flight users and cannot be undone. Archive a running journey instead if you need to keep its data.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to delete. (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
403
Forbidden
-
+
404
Not Found
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call deleteJourneyAsync(String appId, String journeyId, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = deleteJourneyValidateBeforeCall(appId, journeyId, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for deleteSegment
* @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
@@ -2375,7 +2692,7 @@ public okhttp3.Call deleteSegmentCall(String appId, String segmentId, final ApiC
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -2532,7 +2849,7 @@ public okhttp3.Call deleteSubscriptionCall(String appId, String subscriptionId,
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -2685,7 +3002,7 @@ public okhttp3.Call deleteTemplateCall(String templateId, String appId, final Ap
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (appId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("app_id", appId));
@@ -2844,7 +3161,7 @@ public okhttp3.Call deleteUserCall(String appId, String aliasLabel, String alias
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -3003,7 +3320,7 @@ public okhttp3.Call exportEventsCall(String notificationId, String appId, final
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (appId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("app_id", appId));
@@ -3161,7 +3478,7 @@ public okhttp3.Call exportSubscriptionsCall(String appId, ExportSubscriptionsReq
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -3311,7 +3628,7 @@ public okhttp3.Call getAliasesCall(String appId, String aliasLabel, String alias
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -3474,7 +3791,7 @@ public okhttp3.Call getAliasesBySubscriptionCall(String appId, String subscripti
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -3624,7 +3941,7 @@ public okhttp3.Call getAppCall(String appId, final ApiCallback _callback) throws
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -3764,7 +4081,7 @@ public okhttp3.Call getAppsCall(final ApiCallback _callback) throws ApiException
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -3900,7 +4217,7 @@ public okhttp3.Call getNotificationCall(String appId, String notificationId, fin
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (appId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("app_id", appId));
@@ -4059,7 +4376,7 @@ public okhttp3.Call getNotificationHistoryCall(String notificationId, GetNotific
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -4215,7 +4532,7 @@ public okhttp3.Call getNotificationsCall(String appId, Integer limit, Integer of
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (appId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("app_id", appId));
@@ -4394,7 +4711,7 @@ public okhttp3.Call getOutcomesCall(String appId, String outcomeNames, String ou
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (outcomeNames != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("outcome_names", outcomeNames));
@@ -4580,7 +4897,7 @@ public okhttp3.Call getSegmentCall(String appId, String segmentId, Boolean inclu
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (includeSegmentDetail != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("include-segment-detail", includeSegmentDetail));
@@ -4742,7 +5059,7 @@ public okhttp3.Call getSegmentsCall(String appId, Integer offset, Integer limit,
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (offset != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("offset", offset));
@@ -4903,7 +5220,7 @@ public okhttp3.Call getUserCall(String appId, String aliasLabel, String aliasId,
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -5077,7 +5394,7 @@ public okhttp3.Call listAuditLogsCall(String organizationId, String startTime, S
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (startTime != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("start_time", startTime));
@@ -5303,7 +5620,7 @@ public okhttp3.Call rotateApiKeyCall(String appId, String tokenId, final ApiCall
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -5453,7 +5770,7 @@ public okhttp3.Call startLiveActivityCall(String appId, String activityType, Sta
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -5616,7 +5933,7 @@ public okhttp3.Call transferSubscriptionCall(String appId, String subscriptionId
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -5783,7 +6100,7 @@ public okhttp3.Call unsubscribeEmailWithTokenCall(String appId, String notificat
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
if (token != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("token", token));
@@ -5947,7 +6264,7 @@ public okhttp3.Call updateApiKeyCall(String appId, String tokenId, UpdateApiKeyR
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -6103,7 +6420,7 @@ public okhttp3.Call updateAppCall(String appId, App app, final ApiCallback _call
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -6212,10 +6529,10 @@ public okhttp3.Call updateAppAsync(String appId, App app, final ApiCallback
return localVarCall;
}
/**
- * Build call for updateLiveActivity
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param activityId Live Activity record ID (required)
- * @param updateLiveActivityRequest (required)
+ * Build call for updateJourney
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to update. (required)
+ * @param updateJourneyRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -6224,11 +6541,15 @@ public okhttp3.Call updateAppAsync(String appId, App app, final ApiCallback
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
+
403
Forbidden
-
+
404
Not Found
-
+
409
Conflict
-
+
422
Unprocessable Entity
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public okhttp3.Call updateLiveActivityCall(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateJourneyCall(String appId, String journeyId, UpdateJourneyRequest updateJourneyRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -6242,12 +6563,12 @@ public okhttp3.Call updateLiveActivityCall(String appId, String activityId, Upda
basePath = null;
}
- Object localVarPostBody = updateLiveActivityRequest;
+ Object localVarPostBody = updateJourneyRequest;
// create path and map variables
- String localVarPath = "/apps/{app_id}/live_activities/{activity_id}/notifications"
+ String localVarPath = "/apps/{app_id}/journeys/{journey_id}"
.replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()))
- .replaceAll("\\{" + "activity_id" + "\\}", localVarApiClient.escapeString(activityId.toString()));
+ .replaceAll("\\{" + "journey_id" + "\\}", localVarApiClient.escapeString(journeyId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -6256,7 +6577,7 @@ public okhttp3.Call updateLiveActivityCall(String appId, String activityId, Upda
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -6275,84 +6596,92 @@ public okhttp3.Call updateLiveActivityCall(String appId, String activityId, Upda
}
String[] localVarAuthNames = new String[] { "rest_api_key" };
- return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call updateLiveActivityValidateBeforeCall(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call updateJourneyValidateBeforeCall(String appId, String journeyId, UpdateJourneyRequest updateJourneyRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
- throw new ApiException("Missing the required parameter 'appId' when calling updateLiveActivity(Async)");
+ throw new ApiException("Missing the required parameter 'appId' when calling updateJourney(Async)");
}
- // verify the required parameter 'activityId' is set
- if (activityId == null) {
- throw new ApiException("Missing the required parameter 'activityId' when calling updateLiveActivity(Async)");
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException("Missing the required parameter 'journeyId' when calling updateJourney(Async)");
}
- // verify the required parameter 'updateLiveActivityRequest' is set
- if (updateLiveActivityRequest == null) {
- throw new ApiException("Missing the required parameter 'updateLiveActivityRequest' when calling updateLiveActivity(Async)");
+ // verify the required parameter 'updateJourneyRequest' is set
+ if (updateJourneyRequest == null) {
+ throw new ApiException("Missing the required parameter 'updateJourneyRequest' when calling updateJourney(Async)");
}
- okhttp3.Call localVarCall = updateLiveActivityCall(appId, activityId, updateLiveActivityRequest, _callback);
+ okhttp3.Call localVarCall = updateJourneyCall(appId, journeyId, updateJourneyRequest, _callback);
return localVarCall;
}
/**
- * Update a Live Activity via Push
- * Updates a specified live activity.
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param activityId Live Activity record ID (required)
- * @param updateLiveActivityRequest (required)
- * @return UpdateLiveActivitySuccessResponse
+ * Update journey
+ * The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a journey using JSON Merge Patch (RFC 7396). Send only the fields you want to change; omitted fields are left unchanged. A null value clears a nullable field, and arrays such as nodes are replaced wholesale. Set state to active to activate a draft journey.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to update. (required)
+ * @param updateJourneyRequest (required)
+ * @return Journey
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
+
403
Forbidden
-
+
404
Not Found
-
+
409
Conflict
-
+
422
Unprocessable Entity
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public UpdateLiveActivitySuccessResponse updateLiveActivity(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest) throws ApiException {
- ApiResponse localVarResp = updateLiveActivityWithHttpInfo(appId, activityId, updateLiveActivityRequest);
+ public Journey updateJourney(String appId, String journeyId, UpdateJourneyRequest updateJourneyRequest) throws ApiException {
+ ApiResponse localVarResp = updateJourneyWithHttpInfo(appId, journeyId, updateJourneyRequest);
return localVarResp.getData();
}
/**
- * Update a Live Activity via Push
- * Updates a specified live activity.
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param activityId Live Activity record ID (required)
- * @param updateLiveActivityRequest (required)
- * @return ApiResponse<UpdateLiveActivitySuccessResponse>
+ * Update journey
+ * The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a journey using JSON Merge Patch (RFC 7396). Send only the fields you want to change; omitted fields are left unchanged. A null value clears a nullable field, and arrays such as nodes are replaced wholesale. Set state to active to activate a draft journey.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to update. (required)
+ * @param updateJourneyRequest (required)
+ * @return ApiResponse<Journey>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
+
403
Forbidden
-
+
404
Not Found
-
+
409
Conflict
-
+
422
Unprocessable Entity
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public ApiResponse updateLiveActivityWithHttpInfo(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest) throws ApiException {
- okhttp3.Call localVarCall = updateLiveActivityValidateBeforeCall(appId, activityId, updateLiveActivityRequest, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public ApiResponse updateJourneyWithHttpInfo(String appId, String journeyId, UpdateJourneyRequest updateJourneyRequest) throws ApiException {
+ okhttp3.Call localVarCall = updateJourneyValidateBeforeCall(appId, journeyId, updateJourneyRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * Update a Live Activity via Push (asynchronously)
- * Updates a specified live activity.
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param activityId Live Activity record ID (required)
- * @param updateLiveActivityRequest (required)
+ * Update journey (asynchronously)
+ * The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a journey using JSON Merge Patch (RFC 7396). Send only the fields you want to change; omitted fields are left unchanged. A null value clears a nullable field, and arrays such as nodes are replaced wholesale. Set state to active to activate a draft journey.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey to update. (required)
+ * @param updateJourneyRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -6361,22 +6690,27 @@ public ApiResponse updateLiveActivityWithHttp
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
+
403
Forbidden
-
+
404
Not Found
-
+
409
Conflict
-
+
422
Unprocessable Entity
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public okhttp3.Call updateLiveActivityAsync(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateJourneyAsync(String appId, String journeyId, UpdateJourneyRequest updateJourneyRequest, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = updateLiveActivityValidateBeforeCall(appId, activityId, updateLiveActivityRequest, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ okhttp3.Call localVarCall = updateJourneyValidateBeforeCall(appId, journeyId, updateJourneyRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
- * Build call for updateSegment
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
- * @param updateSegmentRequest (optional)
+ * Build call for updateJourneyNode
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey that owns the node. (required)
+ * @param nodeId Server-assigned UUID of the node to update, from a prior View journey fetch. (required)
+ * @param updateJourneyNodeRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -6387,11 +6721,13 @@ public okhttp3.Call updateLiveActivityAsync(String appId, String activityId, Upd
400
Bad Request
-
403
Forbidden
-
404
Not Found
-
+
409
Conflict
-
+
422
Unprocessable Entity
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public okhttp3.Call updateSegmentCall(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateJourneyNodeCall(String appId, String journeyId, String nodeId, UpdateJourneyNodeRequest updateJourneyNodeRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -6405,12 +6741,13 @@ public okhttp3.Call updateSegmentCall(String appId, String segmentId, UpdateSegm
basePath = null;
}
- Object localVarPostBody = updateSegmentRequest;
+ Object localVarPostBody = updateJourneyNodeRequest;
// create path and map variables
- String localVarPath = "/apps/{app_id}/segments/{segment_id}"
+ String localVarPath = "/apps/{app_id}/journeys/{journey_id}/nodes/{node_id}"
.replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()))
- .replaceAll("\\{" + "segment_id" + "\\}", localVarApiClient.escapeString(segmentId.toString()));
+ .replaceAll("\\{" + "journey_id" + "\\}", localVarApiClient.escapeString(journeyId.toString()))
+ .replaceAll("\\{" + "node_id" + "\\}", localVarApiClient.escapeString(nodeId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -6419,7 +6756,7 @@ public okhttp3.Call updateSegmentCall(String appId, String segmentId, UpdateSegm
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -6442,31 +6779,42 @@ public okhttp3.Call updateSegmentCall(String appId, String segmentId, UpdateSegm
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call updateSegmentValidateBeforeCall(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call updateJourneyNodeValidateBeforeCall(String appId, String journeyId, String nodeId, UpdateJourneyNodeRequest updateJourneyNodeRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
- throw new ApiException("Missing the required parameter 'appId' when calling updateSegment(Async)");
+ throw new ApiException("Missing the required parameter 'appId' when calling updateJourneyNode(Async)");
}
- // verify the required parameter 'segmentId' is set
- if (segmentId == null) {
- throw new ApiException("Missing the required parameter 'segmentId' when calling updateSegment(Async)");
+ // verify the required parameter 'journeyId' is set
+ if (journeyId == null) {
+ throw new ApiException("Missing the required parameter 'journeyId' when calling updateJourneyNode(Async)");
+ }
+
+ // verify the required parameter 'nodeId' is set
+ if (nodeId == null) {
+ throw new ApiException("Missing the required parameter 'nodeId' when calling updateJourneyNode(Async)");
+ }
+
+ // verify the required parameter 'updateJourneyNodeRequest' is set
+ if (updateJourneyNodeRequest == null) {
+ throw new ApiException("Missing the required parameter 'updateJourneyNodeRequest' when calling updateJourneyNode(Async)");
}
- okhttp3.Call localVarCall = updateSegmentCall(appId, segmentId, updateSegmentRequest, _callback);
+ okhttp3.Call localVarCall = updateJourneyNodeCall(appId, journeyId, nodeId, updateJourneyNodeRequest, _callback);
return localVarCall;
}
/**
- * Update Segment
- * Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
- * @param updateSegmentRequest (optional)
- * @return UpdateSegmentSuccessResponse
+ * Update journey node
+ * The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a single node, located by its server-assigned id, using JSON Merge Patch (RFC 7396). Send only the node fields you want to change; the rest of the node and the rest of the journey graph are left untouched. Returns the full updated journey.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey that owns the node. (required)
+ * @param nodeId Server-assigned UUID of the node to update, from a prior View journey fetch. (required)
+ * @param updateJourneyNodeRequest (required)
+ * @return Journey
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
- public UpdateSegmentSuccessResponse updateSegment(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest) throws ApiException {
- ApiResponse localVarResp = updateSegmentWithHttpInfo(appId, segmentId, updateSegmentRequest);
+ public Journey updateJourneyNode(String appId, String journeyId, String nodeId, UpdateJourneyNodeRequest updateJourneyNodeRequest) throws ApiException {
+ ApiResponse localVarResp = updateJourneyNodeWithHttpInfo(appId, journeyId, nodeId, updateJourneyNodeRequest);
return localVarResp.getData();
}
/**
- * Update Segment
- * Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
- * @param updateSegmentRequest (optional)
- * @return ApiResponse<UpdateSegmentSuccessResponse>
+ * Update journey node
+ * The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a single node, located by its server-assigned id, using JSON Merge Patch (RFC 7396). Send only the node fields you want to change; the rest of the node and the rest of the journey graph are left untouched. Returns the full updated journey.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey that owns the node. (required)
+ * @param nodeId Server-assigned UUID of the node to update, from a prior View journey fetch. (required)
+ * @param updateJourneyNodeRequest (required)
+ * @return ApiResponse<Journey>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
@@ -6499,22 +6850,25 @@ public UpdateSegmentSuccessResponse updateSegment(String appId, String segmentId
400
Bad Request
-
403
Forbidden
-
404
Not Found
-
+
409
Conflict
-
+
422
Unprocessable Entity
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public ApiResponse updateSegmentWithHttpInfo(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest) throws ApiException {
- okhttp3.Call localVarCall = updateSegmentValidateBeforeCall(appId, segmentId, updateSegmentRequest, null);
- Type localVarReturnType = new TypeToken(){}.getType();
+ public ApiResponse updateJourneyNodeWithHttpInfo(String appId, String journeyId, String nodeId, UpdateJourneyNodeRequest updateJourneyNodeRequest) throws ApiException {
+ okhttp3.Call localVarCall = updateJourneyNodeValidateBeforeCall(appId, journeyId, nodeId, updateJourneyNodeRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * Update Segment (asynchronously)
- * Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
- * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
- * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
- * @param updateSegmentRequest (optional)
+ * Update journey node (asynchronously)
+ * The Journeys API is in beta. Endpoints and response fields can still change. Apply a partial update to a single node, located by its server-assigned id, using JSON Merge Patch (RFC 7396). Send only the node fields you want to change; the rest of the node and the rest of the journey graph are left untouched. Returns the full updated journey.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param journeyId UUID of the journey that owns the node. (required)
+ * @param nodeId Server-assigned UUID of the node to update, from a prior View journey fetch. (required)
+ * @param updateJourneyNodeRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -6525,22 +6879,24 @@ public ApiResponse updateSegmentWithHttpInfo(Strin
400
Bad Request
-
403
Forbidden
-
404
Not Found
-
+
409
Conflict
-
+
422
Unprocessable Entity
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public okhttp3.Call updateSegmentAsync(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateJourneyNodeAsync(String appId, String journeyId, String nodeId, UpdateJourneyNodeRequest updateJourneyNodeRequest, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = updateSegmentValidateBeforeCall(appId, segmentId, updateSegmentRequest, _callback);
- Type localVarReturnType = new TypeToken(){}.getType();
+ okhttp3.Call localVarCall = updateJourneyNodeValidateBeforeCall(appId, journeyId, nodeId, updateJourneyNodeRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
- * Build call for updateSubscription
- * @param appId (required)
- * @param subscriptionId (required)
- * @param subscriptionBody (required)
+ * Build call for updateLiveActivity
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param activityId Live Activity record ID (required)
+ * @param updateLiveActivityRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
@@ -6549,13 +6905,11 @@ public okhttp3.Call updateSegmentAsync(String appId, String segmentId, UpdateSeg
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
-
404
Not Found
-
-
409
Conflict
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public okhttp3.Call updateSubscriptionCall(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateLiveActivityCall(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -6569,12 +6923,12 @@ public okhttp3.Call updateSubscriptionCall(String appId, String subscriptionId,
basePath = null;
}
- Object localVarPostBody = subscriptionBody;
+ Object localVarPostBody = updateLiveActivityRequest;
// create path and map variables
- String localVarPath = "/apps/{app_id}/subscriptions/{subscription_id}"
+ String localVarPath = "/apps/{app_id}/live_activities/{activity_id}/notifications"
.replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()))
- .replaceAll("\\{" + "subscription_id" + "\\}", localVarApiClient.escapeString(subscriptionId.toString()));
+ .replaceAll("\\{" + "activity_id" + "\\}", localVarApiClient.escapeString(activityId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -6583,7 +6937,7 @@ public okhttp3.Call updateSubscriptionCall(String appId, String subscriptionId,
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -6602,85 +6956,84 @@ public okhttp3.Call updateSubscriptionCall(String appId, String subscriptionId,
}
String[] localVarAuthNames = new String[] { "rest_api_key" };
- return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call updateSubscriptionValidateBeforeCall(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call updateLiveActivityValidateBeforeCall(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
- throw new ApiException("Missing the required parameter 'appId' when calling updateSubscription(Async)");
+ throw new ApiException("Missing the required parameter 'appId' when calling updateLiveActivity(Async)");
}
- // verify the required parameter 'subscriptionId' is set
- if (subscriptionId == null) {
- throw new ApiException("Missing the required parameter 'subscriptionId' when calling updateSubscription(Async)");
+ // verify the required parameter 'activityId' is set
+ if (activityId == null) {
+ throw new ApiException("Missing the required parameter 'activityId' when calling updateLiveActivity(Async)");
}
- // verify the required parameter 'subscriptionBody' is set
- if (subscriptionBody == null) {
- throw new ApiException("Missing the required parameter 'subscriptionBody' when calling updateSubscription(Async)");
+ // verify the required parameter 'updateLiveActivityRequest' is set
+ if (updateLiveActivityRequest == null) {
+ throw new ApiException("Missing the required parameter 'updateLiveActivityRequest' when calling updateLiveActivity(Async)");
}
- okhttp3.Call localVarCall = updateSubscriptionCall(appId, subscriptionId, subscriptionBody, _callback);
+ okhttp3.Call localVarCall = updateLiveActivityCall(appId, activityId, updateLiveActivityRequest, _callback);
return localVarCall;
}
/**
- *
- * Updates an existing Subscription’s properties.
- * @param appId (required)
- * @param subscriptionId (required)
- * @param subscriptionBody (required)
+ * Update a Live Activity via Push
+ * Updates a specified live activity.
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param activityId Live Activity record ID (required)
+ * @param updateLiveActivityRequest (required)
+ * @return UpdateLiveActivitySuccessResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
-
404
Not Found
-
-
409
Conflict
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public void updateSubscription(String appId, String subscriptionId, SubscriptionBody subscriptionBody) throws ApiException {
- updateSubscriptionWithHttpInfo(appId, subscriptionId, subscriptionBody);
+ public UpdateLiveActivitySuccessResponse updateLiveActivity(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest) throws ApiException {
+ ApiResponse localVarResp = updateLiveActivityWithHttpInfo(appId, activityId, updateLiveActivityRequest);
+ return localVarResp.getData();
}
/**
- *
- * Updates an existing Subscription’s properties.
- * @param appId (required)
- * @param subscriptionId (required)
- * @param subscriptionBody (required)
- * @return ApiResponse<Void>
+ * Update a Live Activity via Push
+ * Updates a specified live activity.
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param activityId Live Activity record ID (required)
+ * @param updateLiveActivityRequest (required)
+ * @return ApiResponse<UpdateLiveActivitySuccessResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
-
404
Not Found
-
-
409
Conflict
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public ApiResponse updateSubscriptionWithHttpInfo(String appId, String subscriptionId, SubscriptionBody subscriptionBody) throws ApiException {
- okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(appId, subscriptionId, subscriptionBody, null);
- return localVarApiClient.execute(localVarCall);
+ public ApiResponse updateLiveActivityWithHttpInfo(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest) throws ApiException {
+ okhttp3.Call localVarCall = updateLiveActivityValidateBeforeCall(appId, activityId, updateLiveActivityRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
- * (asynchronously)
- * Updates an existing Subscription’s properties.
- * @param appId (required)
- * @param subscriptionId (required)
- * @param subscriptionBody (required)
+ * Update a Live Activity via Push (asynchronously)
+ * Updates a specified live activity.
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param activityId Live Activity record ID (required)
+ * @param updateLiveActivityRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -6689,37 +7042,37 @@ public ApiResponse updateSubscriptionWithHttpInfo(String appId, String sub
Status Code
Description
Response Headers
200
OK
-
400
Bad Request
-
-
404
Not Found
-
-
409
Conflict
-
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public okhttp3.Call updateSubscriptionAsync(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateLiveActivityAsync(String appId, String activityId, UpdateLiveActivityRequest updateLiveActivityRequest, final ApiCallback _callback) throws ApiException {
- okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(appId, subscriptionId, subscriptionBody, _callback);
- localVarApiClient.executeAsync(localVarCall, _callback);
+ okhttp3.Call localVarCall = updateLiveActivityValidateBeforeCall(appId, activityId, updateLiveActivityRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
- * Build call for updateSubscriptionByToken
- * @param appId Your OneSignal App ID in UUID v4 format. (required)
- * @param tokenType The type of token to use when looking up the subscription. See Subscription Types. (required)
- * @param token The value of the token to lookup by (e.g., email address, phone number). (required)
- * @param subscriptionBody (required)
+ * Build call for updateSegment
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
+ * @param updateSegmentRequest (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
-
202
ACCEPTED
-
+
200
OK
-
400
Bad Request
-
+
403
Forbidden
-
404
Not Found
-
+
429
Rate Limit Exceeded
-
0
Unexpected error
-
*/
- public okhttp3.Call updateSubscriptionByTokenCall(String appId, String tokenType, String token, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call updateSegmentCall(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -6733,13 +7086,12 @@ public okhttp3.Call updateSubscriptionByTokenCall(String appId, String tokenType
basePath = null;
}
- Object localVarPostBody = subscriptionBody;
+ Object localVarPostBody = updateSegmentRequest;
// create path and map variables
- String localVarPath = "/apps/{app_id}/subscriptions_by_token/{token_type}/{token}"
+ String localVarPath = "/apps/{app_id}/segments/{segment_id}"
.replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()))
- .replaceAll("\\{" + "token_type" + "\\}", localVarApiClient.escapeString(tokenType.toString()))
- .replaceAll("\\{" + "token" + "\\}", localVarApiClient.escapeString(token.toString()));
+ .replaceAll("\\{" + "segment_id" + "\\}", localVarApiClient.escapeString(segmentId.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -6748,7 +7100,7 @@ public okhttp3.Call updateSubscriptionByTokenCall(String appId, String tokenType
Map localVarFormParams = new HashMap();
// Adds client sdk version header
- localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.11.2");
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
final String[] localVarAccepts = {
"application/json"
@@ -6771,112 +7123,913 @@ public okhttp3.Call updateSubscriptionByTokenCall(String appId, String tokenType
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call updateSubscriptionByTokenValidateBeforeCall(String appId, String tokenType, String token, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call updateSegmentValidateBeforeCall(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'appId' is set
if (appId == null) {
- throw new ApiException("Missing the required parameter 'appId' when calling updateSubscriptionByToken(Async)");
- }
-
- // verify the required parameter 'tokenType' is set
- if (tokenType == null) {
- throw new ApiException("Missing the required parameter 'tokenType' when calling updateSubscriptionByToken(Async)");
- }
-
- // verify the required parameter 'token' is set
- if (token == null) {
- throw new ApiException("Missing the required parameter 'token' when calling updateSubscriptionByToken(Async)");
+ throw new ApiException("Missing the required parameter 'appId' when calling updateSegment(Async)");
}
- // verify the required parameter 'subscriptionBody' is set
- if (subscriptionBody == null) {
- throw new ApiException("Missing the required parameter 'subscriptionBody' when calling updateSubscriptionByToken(Async)");
+ // verify the required parameter 'segmentId' is set
+ if (segmentId == null) {
+ throw new ApiException("Missing the required parameter 'segmentId' when calling updateSegment(Async)");
}
- okhttp3.Call localVarCall = updateSubscriptionByTokenCall(appId, tokenType, token, subscriptionBody, _callback);
+ okhttp3.Call localVarCall = updateSegmentCall(appId, segmentId, updateSegmentRequest, _callback);
return localVarCall;
}
/**
- * Update subscription by token
- * Update properties on an existing OneSignal subscription using its token.
+ * Update Segment
+ * Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
+ * @param updateSegmentRequest (optional)
+ * @return UpdateSegmentSuccessResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad Request
-
+
403
Forbidden
-
+
404
Not Found
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public UpdateSegmentSuccessResponse updateSegment(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest) throws ApiException {
+ ApiResponse localVarResp = updateSegmentWithHttpInfo(appId, segmentId, updateSegmentRequest);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Update Segment
+ * Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
+ * @param updateSegmentRequest (optional)
+ * @return ApiResponse<UpdateSegmentSuccessResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad Request
-
+
403
Forbidden
-
+
404
Not Found
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public ApiResponse updateSegmentWithHttpInfo(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest) throws ApiException {
+ okhttp3.Call localVarCall = updateSegmentValidateBeforeCall(appId, segmentId, updateSegmentRequest, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Update Segment (asynchronously)
+ * Update an existing segment's name and/or filters. The name parameter is always required. When filters are provided, all existing filters are replaced with the new ones.
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs. (required)
+ * @param segmentId The segment's unique identifier. Can be found using the View Segments API or in the URL of the segment when viewing it in the dashboard. (required)
+ * @param updateSegmentRequest (optional)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad Request
-
+
403
Forbidden
-
+
404
Not Found
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call updateSegmentAsync(String appId, String segmentId, UpdateSegmentRequest updateSegmentRequest, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = updateSegmentValidateBeforeCall(appId, segmentId, updateSegmentRequest, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for updateSubscription
+ * @param appId (required)
+ * @param subscriptionId (required)
+ * @param subscriptionBody (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad Request
-
+
404
Not Found
-
+
409
Conflict
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call updateSubscriptionCall(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = subscriptionBody;
+
+ // create path and map variables
+ String localVarPath = "/apps/{app_id}/subscriptions/{subscription_id}"
+ .replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()))
+ .replaceAll("\\{" + "subscription_id" + "\\}", localVarApiClient.escapeString(subscriptionId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ // Adds client sdk version header
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "rest_api_key" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call updateSubscriptionValidateBeforeCall(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'appId' is set
+ if (appId == null) {
+ throw new ApiException("Missing the required parameter 'appId' when calling updateSubscription(Async)");
+ }
+
+ // verify the required parameter 'subscriptionId' is set
+ if (subscriptionId == null) {
+ throw new ApiException("Missing the required parameter 'subscriptionId' when calling updateSubscription(Async)");
+ }
+
+ // verify the required parameter 'subscriptionBody' is set
+ if (subscriptionBody == null) {
+ throw new ApiException("Missing the required parameter 'subscriptionBody' when calling updateSubscription(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = updateSubscriptionCall(appId, subscriptionId, subscriptionBody, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ *
+ * Updates an existing Subscription’s properties.
+ * @param appId (required)
+ * @param subscriptionId (required)
+ * @param subscriptionBody (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad Request
-
+
404
Not Found
-
+
409
Conflict
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public void updateSubscription(String appId, String subscriptionId, SubscriptionBody subscriptionBody) throws ApiException {
+ updateSubscriptionWithHttpInfo(appId, subscriptionId, subscriptionBody);
+ }
+
+ /**
+ *
+ * Updates an existing Subscription’s properties.
+ * @param appId (required)
+ * @param subscriptionId (required)
+ * @param subscriptionBody (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad Request
-
+
404
Not Found
-
+
409
Conflict
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public ApiResponse updateSubscriptionWithHttpInfo(String appId, String subscriptionId, SubscriptionBody subscriptionBody) throws ApiException {
+ okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(appId, subscriptionId, subscriptionBody, null);
+ return localVarApiClient.execute(localVarCall);
+ }
+
+ /**
+ * (asynchronously)
+ * Updates an existing Subscription’s properties.
+ * @param appId (required)
+ * @param subscriptionId (required)
+ * @param subscriptionBody (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
200
OK
-
+
400
Bad Request
-
+
404
Not Found
-
+
409
Conflict
-
+
429
Rate Limit Exceeded
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call updateSubscriptionAsync(String appId, String subscriptionId, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = updateSubscriptionValidateBeforeCall(appId, subscriptionId, subscriptionBody, _callback);
+ localVarApiClient.executeAsync(localVarCall, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for updateSubscriptionByToken
* @param appId Your OneSignal App ID in UUID v4 format. (required)
* @param tokenType The type of token to use when looking up the subscription. See Subscription Types. (required)
* @param token The value of the token to lookup by (e.g., email address, phone number). (required)
* @param subscriptionBody (required)
- * @return Object
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+
Status Code
Description
Response Headers
+
202
ACCEPTED
-
+
400
Bad Request
-
+
404
Not Found
-
+
0
Unexpected error
-
+
+ */
+ public okhttp3.Call updateSubscriptionByTokenCall(String appId, String tokenType, String token, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = subscriptionBody;
+
+ // create path and map variables
+ String localVarPath = "/apps/{app_id}/subscriptions_by_token/{token_type}/{token}"
+ .replaceAll("\\{" + "app_id" + "\\}", localVarApiClient.escapeString(appId.toString()))
+ .replaceAll("\\{" + "token_type" + "\\}", localVarApiClient.escapeString(tokenType.toString()))
+ .replaceAll("\\{" + "token" + "\\}", localVarApiClient.escapeString(token.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ // Adds client sdk version header
+ localVarHeaderParams.put("OS-Usage-Data", "kind=sdk, sdk-name=onesignal-java, version=5.12.0");
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "rest_api_key" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call updateSubscriptionByTokenValidateBeforeCall(String appId, String tokenType, String token, SubscriptionBody subscriptionBody, final ApiCallback _callback) throws ApiException {
+
+ // verify the required parameter 'appId' is set
+ if (appId == null) {
+ throw new ApiException("Missing the required parameter 'appId' when calling updateSubscriptionByToken(Async)");
+ }
+
+ // verify the required parameter 'tokenType' is set
+ if (tokenType == null) {
+ throw new ApiException("Missing the required parameter 'tokenType' when calling updateSubscriptionByToken(Async)");
+ }
+
+ // verify the required parameter 'token' is set
+ if (token == null) {
+ throw new ApiException("Missing the required parameter 'token' when calling updateSubscriptionByToken(Async)");
+ }
+
+ // verify the required parameter 'subscriptionBody' is set
+ if (subscriptionBody == null) {
+ throw new ApiException("Missing the required parameter 'subscriptionBody' when calling updateSubscriptionByToken(Async)");
+ }
+
+
+ okhttp3.Call localVarCall = updateSubscriptionByTokenCall(appId, tokenType, token, subscriptionBody, _callback);
+ return localVarCall;
+
+ }
+
+ /**
+ * Update subscription by token
+ * Update properties on an existing OneSignal subscription using its token.
+ * @param appId Your OneSignal App ID in UUID v4 format. (required)
+ * @param tokenType The type of token to use when looking up the subscription. See Subscription Types. (required)
+ * @param token The value of the token to lookup by (e.g., email address, phone number). (required)
+ * @param subscriptionBody (required)
+ * @return Object
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+