Method: projects.messages.send

Send a message to specified target (a registration token, topic or condition).

HTTP request

POST https://fcm.googleapis.com/v1/{parent=projects/*}/messages:send

The URL usesgRPC Transcoding syntax.

Path parameters

Parameters
parent

string

Required. It contains the Firebase project id (i.e. the unique identifier for your Firebase project), in the format ofprojects/{project_id}. The numeric project number with no padding is also supported in the format ofprojects/{project_number}.

Request body

The request body contains data with the following structure:

JSON representation
{"validate_only":boolean,"message":{object (Message)}}
Fields
validate_only

boolean

Flag for testing the request without actually delivering the message.

message

object (Message)

Required. Message to send.

Response body

If successful, the response body contains an instance ofMessage.

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/firebase.messaging
  • https://www.googleapis.com/auth/cloud-platform

For more information, see theOAuth 2.0 Overview.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-05-29 UTC.