---
schema_version: "1"
id: 79b9456bd5ed2e28f0d9d7fb3943a9f07d8aa547de233a99143c8c9f069937c1
title: PushNotification(payload)
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_Messaging_PushNotification_ctor_2.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_Messaging_PushNotification_ctor_2.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6e01f0814ae6a5fe3f56ba8dc8ad6d6b54ecd9215aba972d7a661c0de0ae7aa3
description: 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.
---
# PushNotification(payload)

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.

## Signature

public PushNotification(Map<String,Object\> payload)

## Parameters

- **payload**:
    
    Type: [Map](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_map.htm#apex_methods_system_map "Contains methods for the Map collection type.")<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type."), Object>
    
    The payload, expressed as a map of key-value pairs.