PingOne Platform APIs

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

application.id

Sting

Required

Immutable

The ID of the mobile application associated with the push message.

body

String

Required

Immutable

The text for the body of the push message.

createdAt

Date

N/A

Read-only

The time the resource was created.

data.type

String

Required

Immutable

Must be set to DRY for the test to work correctly.

deliveryMethod

String

Required

Immutable

The messaging service to be used. Should be one of the following values: GOOGLE, HUAWEI, IOS.

environment.id

String

N/A

Read-only

The ID of the relevant PingOne environment.

id

String

N/A

Read-only

The ID of the resource created.

policy.id

String

N/A

Read-only

The ID of the notification policy.

pushToken

String

Required

Immutable

The push token for the relevant application on the device.

status

String

N/A

Read-only

The result of the test push. If the push succeeded, value will be SENT. If there was a problem, a standard error response will be returned, containing details of the cause.

title

String

Required

Immutable

The title for the push message.

updatedAt

Date

N/A

Read-only

The time the resource was last updated.

vendor

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

INVALID_DATA

EMPTY_VALUE or INVALID_VALUE

Message: Validation Error : [<field> <message>] (for example, Validation Error : [pushToken must not be empty])

When and details

When: A request body fails constraint validation (for example, a test push request omits pushToken or application, or sets pushCategory to an unsupported value).

Details: Per violated constraint: detail EMPTY_VALUE for NotNull, NotEmpty, or NotBlank constraints, INVALID_VALUE otherwise, target = the field path, message = the constraint message.

400

INVALID_REQUEST

INVALID_VALUE or None

Message: The request could not be completed. The request was malformed or invalid.

When and details

When: A request body is malformed JSON or contains a value of the wrong type (for example, a non-UUID application.id).

Details: For JSON deserialization failures, detail INVALID_VALUE with target = the JSON path of the failing property and message Invalid value for attribute.. Otherwise no detail is returned.

400

INVALID_DATA

INVALID_VALUE

Message: Validation Error : [notification <message>]

When and details

When: A test push request violates the push validation rule (a request that sets dryRun to true, or includes cancelAuth for a PingID cancel push, also includes body, title, or template; or a regular push request contains neither body with title nor template).

Details: Detail INVALID_VALUE with target notification and message (dry run) must not contain 'body' or 'title' or 'template', (pid cancel push) must not contain 'body' or 'title' or 'template', or must contain either ('body' and 'title') or ('template').

400

INVALID_DATA

INVALID_VALUE

Message: The request could not be completed. One or more validation errors were in the request.

When and details

When: A request specifies an application.id that does not exist in the environment.

Details: Detail INVALID_VALUE with message Could not find application <applicationId>.

400

REQUEST_FAILED

CONSTRAINT_VIOLATION

Message: The request violates a constraint imposed by the service.

When and details

When: The application specified in the request has no push credentials configured.

Details: Detail CONSTRAINT_VIOLATION with message Could not find push credentials for application: <applicationId>.

400

REQUEST_FAILED

PUSH_FAILED or DEVICE_UNREGISTERED

Message: The request could not be completed. There was an issue processing the request.

When and details

When: The push provider rejects the push token as permanently invalid (for example, APNS BadDeviceToken or InvalidProviderToken), or the device is no longer registered for the application.

Details: Detail PUSH_FAILED with target pushToken and the provider’s rejection reason, or detail DEVICE_UNREGISTERED with target pushToken and the provider’s unregistered reason (for example, Unregistered).

403

ACCESS_FAILED

None

Message: The actor attempting to perform the request is not authorized.

When and details

When: The actor lacks the notifications:create:notification permission (the POST operations).

Details: None.

429

REQUEST_LIMITED

QUOTA_EXCEEDED

Message: The request will exceed your quota.

When and details

When: The notification would exceed the environment’s user or environment quota defined in the notification policy.

Details: Detail QUOTA_EXCEEDED with target = the delivery method, message Notification limit exceeded the total limit, Notification limit exceeded the used limit, or Notification limit exceeded the unused limit, and quotaLimit, quotaType, and quotaResetTime in innerError.

500

UNEXPECTED_ERROR

PUSH_FAILED

Message: There was an unexpected error with the service. Please try again later.

When and details

When: The push provider fails transiently (for example, APNS ServiceUnavailable or an internal provider error), or the push credentials for the provider could not be loaded.

Details: Detail PUSH_FAILED with target pushToken and the provider’s rejection or error message. The detail has no target when the Firebase Messaging credentials for the provider could not be loaded.