From 37fe2e054c8ad55aafb926a6de7ad89bd6434019 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Thu, 30 Apr 2026 22:26:22 +0000 Subject: [PATCH] docs: add v5.5.0 package updates --- DefaultApi.md | 4 +-- README.md | 25 +++++++++++++++++++ apis/DefaultApi.ts | 2 +- .../CreateNotificationSuccessResponse.js.map | 2 +- models/BasicNotification.ts | 4 +-- models/BasicNotificationAllOf.ts | 2 +- models/CreateNotificationSuccessResponse.ts | 8 +++++- models/Notification.ts | 4 +-- models/NotificationTarget.ts | 2 +- models/NotificationWithMeta.ts | 4 +-- models/StartLiveActivityRequest.ts | 2 +- models/SubscriptionNotificationTarget.ts | 2 +- types/ObjectParamAPI.ts | 2 +- types/ObservableAPI.ts | 2 +- types/PromiseAPI.ts | 2 +- 15 files changed, 49 insertions(+), 18 deletions(-) diff --git a/DefaultApi.md b/DefaultApi.md index de81f6e..418e5e1 100644 --- a/DefaultApi.md +++ b/DefaultApi.md @@ -527,7 +527,7 @@ Name | Type | Description | Notes # **createNotification** > CreateNotificationSuccessResponse createNotification(notification) -Sends notifications to your users +Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. ### Example @@ -577,7 +577,7 @@ Name | Type | Description | Notes ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response and an id for the notification. If the 200 response contains \"invalid_aliases\" this will mark devices that exist in the provided app_id but are no longer subscribed. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - | +**200** | OK, invalid_aliases, or No Subscribed Players If a message was successfully created, you will get a 200 response with a non-empty `id` for the notification. If the 200 response contains `invalid_aliases`, that marks devices that exist in the provided app_id but are no longer subscribed. If `id` is an empty string, no notification was created: check the `errors` array (for example messages such as \"All included players are not subscribed\") even though HTTP status is still 200. This can happen when alias keys are wrong, External IDs do not resolve to subscribed users, or other validation issues. If no id is returned, then a message was not created and the targeted User IDs do not exist under the provided app_id. Any User IDs sent in the request that do not exist under the specified app_id will be ignored. | - | **400** | Bad Request | - | **429** | Rate Limit Exceeded | - | diff --git a/README.md b/README.md index 4773929..079f834 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,31 @@ const response = await client.createNotification(notification); console.log('Notification ID:', response.id); ``` +## Send a push notification by External ID + +Target specific users with the alias label `external_id` (snake_case). This is different from the notification-level `external_id` field, which is only for [idempotent requests](https://documentation.onesignal.com/docs/idempotent-notification-requests). + +You must set `target_channel` when sending push (or email/SMS) to alias targets. + +```javascript +const notification = new OneSignal.Notification(); +notification.app_id = 'YOUR_APP_ID'; +notification.contents = { en: 'Hello from OneSignal!' }; +notification.headings = { en: 'Push Notification' }; +// Keys under include_aliases must match API alias labels exactly (e.g. external_id, not externalId). +notification.include_aliases = { external_id: ['YOUR_USER_EXTERNAL_ID'] }; +notification.target_channel = 'push'; + +const response = await client.createNotification(notification); +if (!response.id) { + console.error('Notification was not created:', response.errors); +} else { + console.log('Notification ID:', response.id); +} +``` + +The API may return HTTP 200 with an empty `id` when no matching subscribed recipients are found; always check `response.id` and `response.errors`. + ## Send an email ```javascript diff --git a/apis/DefaultApi.ts b/apis/DefaultApi.ts index 1395db4..45545fe 100644 --- a/apis/DefaultApi.ts +++ b/apis/DefaultApi.ts @@ -489,7 +489,7 @@ export class DefaultApiRequestFactory extends BaseAPIRequestFactory { } /** - * Sends notifications to your users + * Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. * Create notification * @param notification */ diff --git a/dist/models/CreateNotificationSuccessResponse.js.map b/dist/models/CreateNotificationSuccessResponse.js.map index 9c4fb23..42f7c49 100644 --- a/dist/models/CreateNotificationSuccessResponse.js.map +++ b/dist/models/CreateNotificationSuccessResponse.js.map @@ -1 +1 @@ -{"version":3,"file":"CreateNotificationSuccessResponse.js","sourceRoot":"","sources":["../../models/CreateNotificationSuccessResponse.ts"],"names":[],"mappings":";;;AAUA;IAkCI;IACA,CAAC;IALM,qDAAmB,GAA1B;QACI,OAAO,iCAAiC,CAAC,gBAAgB,CAAC;IAC9D,CAAC;IAxBe,+CAAa,GAAuB,SAAS,CAAC;IAE9C,kDAAgB,GAA0E;QACtG;YACI,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,EAAE;SACf;QACD;YACI,MAAM,EAAE,aAAa;YACrB,UAAU,EAAE,aAAa;YACzB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,EAAE;SACf;QACD;YACI,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,EAAE;SACf;KAAK,CAAC;IAQf,wCAAC;CAAA,AApCD,IAoCC;AApCY,8EAAiC"} \ No newline at end of file +{"version":3,"file":"CreateNotificationSuccessResponse.js","sourceRoot":"","sources":["../../models/CreateNotificationSuccessResponse.ts"],"names":[],"mappings":";;;AAUA;IAwCI;IACA,CAAC;IALM,qDAAmB,GAA1B;QACI,OAAO,iCAAiC,CAAC,gBAAgB,CAAC;IAC9D,CAAC;IAxBe,+CAAa,GAAuB,SAAS,CAAC;IAE9C,kDAAgB,GAA0E;QACtG;YACI,MAAM,EAAE,IAAI;YACZ,UAAU,EAAE,IAAI;YAChB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,EAAE;SACf;QACD;YACI,MAAM,EAAE,aAAa;YACrB,UAAU,EAAE,aAAa;YACzB,MAAM,EAAE,QAAQ;YAChB,QAAQ,EAAE,EAAE;SACf;QACD;YACI,MAAM,EAAE,QAAQ;YAChB,UAAU,EAAE,QAAQ;YACpB,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,EAAE;SACf;KAAK,CAAC;IAQf,wCAAC;CAAA,AA1CD,IA0CC;AA1CY,8EAAiC"} \ No newline at end of file diff --git a/models/BasicNotification.ts b/models/BasicNotification.ts index 3a4ae51..2fbc8fe 100644 --- a/models/BasicNotification.ts +++ b/models/BasicNotification.ts @@ -61,7 +61,7 @@ export class BasicNotification { */ 'include_android_reg_ids'?: Array; /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys 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). Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. */ 'include_aliases'?: { [key: string]: Array; }; 'target_channel'?: BasicNotificationTargetChannelEnum; @@ -117,7 +117,7 @@ export class BasicNotification { */ 'app_id': string; /** - * [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true */ 'external_id'?: string; /** diff --git a/models/BasicNotificationAllOf.ts b/models/BasicNotificationAllOf.ts index 798e7aa..7273fd5 100644 --- a/models/BasicNotificationAllOf.ts +++ b/models/BasicNotificationAllOf.ts @@ -66,7 +66,7 @@ export class BasicNotificationAllOf { */ 'app_id'?: string; /** - * [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true */ 'external_id'?: string; /** diff --git a/models/CreateNotificationSuccessResponse.ts b/models/CreateNotificationSuccessResponse.ts index 03ad980..aa0b23a 100644 --- a/models/CreateNotificationSuccessResponse.ts +++ b/models/CreateNotificationSuccessResponse.ts @@ -9,10 +9,16 @@ import { HttpFile } from '../http/http'; export class CreateNotificationSuccessResponse { + /** + * 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). + */ 'id'?: string; + /** + * 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`). + */ 'external_id'?: string; /** - * Errors include the identifiers that are invalid, or that there are no subscribers. + * 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. */ 'errors'?: any; diff --git a/models/Notification.ts b/models/Notification.ts index d12df7c..4173cbe 100644 --- a/models/Notification.ts +++ b/models/Notification.ts @@ -61,7 +61,7 @@ export class Notification { */ 'include_android_reg_ids'?: Array; /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys 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). Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. */ 'include_aliases'?: { [key: string]: Array; }; 'target_channel'?: NotificationTargetChannelEnum; @@ -117,7 +117,7 @@ export class Notification { */ 'app_id': string; /** - * [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true */ 'external_id'?: string; /** diff --git a/models/NotificationTarget.ts b/models/NotificationTarget.ts index 0552fe8..9973853 100644 --- a/models/NotificationTarget.ts +++ b/models/NotificationTarget.ts @@ -56,7 +56,7 @@ export class NotificationTarget { */ 'include_android_reg_ids'?: Array; /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys 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). Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. */ 'include_aliases'?: { [key: string]: Array; }; 'target_channel'?: NotificationTargetTargetChannelEnum; diff --git a/models/NotificationWithMeta.ts b/models/NotificationWithMeta.ts index f78340b..0f1cd4a 100644 --- a/models/NotificationWithMeta.ts +++ b/models/NotificationWithMeta.ts @@ -65,7 +65,7 @@ export class NotificationWithMeta { */ 'include_android_reg_ids'?: Array; /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys 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). Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. */ 'include_aliases'?: { [key: string]: Array; }; 'target_channel'?: NotificationWithMetaTargetChannelEnum; @@ -121,7 +121,7 @@ export class NotificationWithMeta { */ 'app_id': string; /** - * [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true + * This field does **not** target users by their External ID. To send to External IDs, use `include_aliases` with the label `external_id` plus `target_channel` as documented for alias-based targeting. [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true */ 'external_id'?: string; /** diff --git a/models/StartLiveActivityRequest.ts b/models/StartLiveActivityRequest.ts index e6dcfbd..145e9dd 100644 --- a/models/StartLiveActivityRequest.ts +++ b/models/StartLiveActivityRequest.ts @@ -47,7 +47,7 @@ export class StartLiveActivityRequest { */ 'idempotency_key'?: string; /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys 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). Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. */ 'include_aliases'?: { [key: string]: Array; }; /** diff --git a/models/SubscriptionNotificationTarget.ts b/models/SubscriptionNotificationTarget.ts index f414060..9b334f2 100644 --- a/models/SubscriptionNotificationTarget.ts +++ b/models/SubscriptionNotificationTarget.ts @@ -46,7 +46,7 @@ export class SubscriptionNotificationTarget { */ 'include_android_reg_ids'?: Array; /** - * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. + * Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys 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). Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: 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. */ 'include_aliases'?: { [key: string]: Array; }; 'target_channel'?: SubscriptionNotificationTargetTargetChannelEnum; diff --git a/types/ObjectParamAPI.ts b/types/ObjectParamAPI.ts index 3fe7cf2..ae552e3 100644 --- a/types/ObjectParamAPI.ts +++ b/types/ObjectParamAPI.ts @@ -946,7 +946,7 @@ export class ObjectDefaultApi { } /** - * Sends notifications to your users + * Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. * Create notification * @param param the request object */ diff --git a/types/ObservableAPI.ts b/types/ObservableAPI.ts index a7bc385..21a72b7 100644 --- a/types/ObservableAPI.ts +++ b/types/ObservableAPI.ts @@ -264,7 +264,7 @@ export class ObservableDefaultApi { } /** - * Sends notifications to your users + * Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. * Create notification * @param notification */ diff --git a/types/PromiseAPI.ts b/types/PromiseAPI.ts index 6b48e38..9e8b858 100644 --- a/types/PromiseAPI.ts +++ b/types/PromiseAPI.ts @@ -162,7 +162,7 @@ export class PromiseDefaultApi { } /** - * Sends notifications to your users + * Sends notifications to your users. **Target by External ID (push example):** set `include_aliases` to `{ \"external_id\": [\"your-user-id\"] }` and set `target_channel` to `push` (or `email` / `sms` for those channels). Alias object keys must match API labels exactly (for example `external_id`, not camelCase). **Do not confuse** the notification-level `external_id` field with External ID targeting: top-level `external_id` / `idempotency_key` are for idempotent notification requests only, not for selecting recipients. **Targeting compatibility:** `include_aliases` must not be combined with other targeting modes (segments, filters, subscription IDs, legacy player IDs, etc.). Clients should send only one targeting strategy per request. * Create notification * @param notification */