Send Notification
You can use the notifications endpoint to send a test notification to a mobile application by including the query parameter sync=true.
{{apiPath}}/v1/environments/{{envID}}/notifications?sync=true
Send Notifications data model
| Property | Type | Required | Mutable | Description |
|---|---|---|---|---|
|
Sting |
Required |
Immutable |
The ID of the mobile application associated with the push message. |
|
String |
Required |
Immutable |
The text for the body of the push message. |
|
Date |
N/A |
Read-only |
The time the resource was created. |
|
String |
Required |
Immutable |
Must be set to |
|
String |
Required |
Immutable |
The messaging service to be used. Should be one of the following values: |
|
String |
N/A |
Read-only |
The ID of the relevant PingOne environment. |
|
String |
N/A |
Read-only |
The ID of the resource created. |
|
String |
N/A |
Read-only |
The ID of the notification policy. |
|
String |
Required |
Immutable |
The push token for the relevant application on the device. |
|
String |
N/A |
Read-only |
The result of the test push. If the push succeeded, value will be |
|
String |
Required |
Immutable |
The title for the push message. |
|
Date |
N/A |
Read-only |
The time the resource was last updated. |
|
String |
N/A |
Read-only |
The type of push credential used. Will be APNS (for Apple), FCM_HTTP_V1 (for Google), HMS (for Huawei), or FCM (used previously for Google, no longer supported). |
Send notification errors
In addition to the general error codes, send notification operations can return the following errors:
| HTTP status | Top‑level code | Detail code | When it happens and what the response contains |
|---|---|---|---|
400 |
|
|
Message: When and detailsWhen: A request body fails constraint validation (for example, a test push request omits Details: Per violated constraint: detail |
400 |
|
|
Message: When and detailsWhen: A request body is malformed JSON or contains a value of the wrong type (for example, a non-UUID Details: For JSON deserialization failures, detail |
400 |
|
|
Message: When and detailsWhen: A test push request violates the push validation rule (a request that sets Details: Detail |
400 |
|
|
Message: When and detailsWhen: A request specifies an Details: Detail |
400 |
|
|
Message: When and detailsWhen: The application specified in the request has no push credentials configured. Details: Detail |
400 |
|
|
Message: When and detailsWhen: The push provider rejects the push token as permanently invalid (for example, APNS Details: Detail |
403 |
|
None |
Message: When and detailsWhen: The actor lacks the Details: None. |
429 |
|
|
Message: When and detailsWhen: The notification would exceed the environment’s user or environment quota defined in the notification policy. Details: Detail |
500 |
|
|
Message: When and detailsWhen: The push provider fails transiently (for example, APNS Details: Detail |