---
schema_version: "1"
id: 21582e2d88e5109013ca1a93bfc75fae495b44d24e59d549430d39515096c045
title: PushNotification Constructors
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_Messaging_PushNotification_constructors.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_Messaging_PushNotification_constructors.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: e1261af700ea865ac858f278073bd358968bc73467962b8b7f0ec857b0c36f95
---
# PushNotification Constructors

The following are the constructors for PushNotification.

- **[PushNotification()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_Messaging_PushNotification_ctor.htm)**  
    Creates a new instance of the Messaging.PushNotification class.
- **[PushNotification(payload)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_Messaging_PushNotification_ctor_2.htm)**  
    Creates a new instance of the Messaging.PushNotification class using the specified payload parameters as key-value pairs. When you use this constructor, you don’t need to call setPayload to set the payload.