Skip to main content

send_push

Sends a transactional push notification via the OpenCDP Gateway.

Usage​

from cdp_client.models import PushPayload
await client.send_push(payload: PushPayload)

PushPayload​

FieldTypeDescription
identifiersIdentifiersUser identifiers for targeting.
transactional_message_idstrTemplate ID from the dashboard.
titlestrOptional: Notification title (overrides template).
bodystrOptional: Notification body (overrides template).
message_dataDict[str, Any]Custom data for deep links or app logic.

Example​

from cdp_client.models import PushPayload, Identifiers

payload = PushPayload(
identifiers=Identifiers(id="u_001"),
transactional_message_id="alert_notify",
title="Security Alert",
body="A new login was detected on your account."
)

await client.send_push(payload)