Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex Cloud Notification Service
    • Overview
    • Getting started with mobile push notifications
    • Getting started with in-browser push notifications
    • Getting started with SMS
    • Getting started with topics
    • Overview
    • Mobile push notifications
    • In-browser push notifications
    • SMS
    • Topics
    • Quotas and limits
    • All tools
    • AWS CLI
    • AWS SDK for C++
    • AWS SDK for Go
    • AWS SDK for Java
    • AWS SDK for JavaScript
    • AWS SDK for Kotlin
    • AWS SDK for .NET
    • AWS SDK for PHP
    • AWS SDK for Python (boto3)
  • Pricing policy
  • Access management
    • Overview
    • Sending a request
    • Errors
    • Publish
  • Monitoring metrics
  • Logs Cloud Logging
  • Release notes

In this article:

  • HTTP request
  • Query parameters
  • Attributes
  • Response
  • Successful response
  • Error response
  • See also
  1. API reference
  2. Publish

Publish

Written by
Yandex Cloud
Updated at April 13, 2026
  • HTTP request
    • Query parameters
    • Attributes
  • Response
    • Successful response
    • Error response
  • See also

Sends a push notification to an endpoint, or an SMS to a phone number.

HTTP requestHTTP request

POST https://notifications.yandexcloud.net/

Query parametersQuery parameters

Parameter Description
Action string
Required field.
Operation type parameter.
Value: Publish.
Message string
Required field.
Message you want to send to the endpoint.
The possible formats are:
  • Plain text
  • JSON

In JSON format, you can optionally provide text for a specific mobile platform, e.g.:
{ "default": "Default message", "APNS": "{"aps":{"alert": "Check out these awesome deals!","url":"yandex.cloud"} }", "GCM": "{"data":{"message":"Check out these awesome deals!","url":"yandex.cloud"},"notification":{"title":"GCM notification title"}}" "HMS": "{"data":{"message":"Check out these awesome deals!","url":"yandex.cloud"},"notification":{"title":"HMS notification title"}}" }
Messages for FCM and HMS platforms must contain at least one of the data or notification fields.
MessageStructure string
If providing a message in JSON format in the Message field, set the MessageStructure field to json.
MessageAttributes.entry.N.key string
Required field.
Attribute key. N is a numeric value.
Example: MessageAttributes.entry.1.key=AWS.SNS.MOBILE.APNS.PUSH_TYPE&MessageAttributes.entry.2.key=AWS.SNS.MOBILE.APNS.PRIORITY.
MessageAttributes.entry.N.value string
Required field.
Attribute value. N is a numeric value.
Example: MessageAttributes.entry.1.value={"DataType":"String","StringValue":"background"}&MessageAttributes.entry.2.value={"DataType":"String","StringValue":"5"}.
TargetArn string
This is a required field.
Mobile endpoint ARN. You must specify either TargetArn or PhoneNumber. You cannot use this parameter along with PhoneNumber.
Here is an example: arn:aws:sns::aoegtvhtp8ob********:endpoint/GCM/test-cns-9990/4cbe148515360244248c993abe0a12884d162bb15e87d6c16bd0c810********.
PhoneNumber string
This is a required field.
Enter a phone number in E.164 format. Sending SMS to Russian numbers is supported. You must specify either TargetArn or PhoneNumber. You cannot use this parameter along with TargetArn.
ResponseFormat string
Response format.
The possible values are:
  • XML (default)
  • JSON.

AttributesAttributes

You can use attributes to provide mobile platform-specific parameters. You cannot provide binary data in the MessageAttributes values.

APNS and APNS_SANDBOX attributesAPNS and APNS_SANDBOX attributes

Attribute Description
AWS.SNS.MOBILE.APNS.TTL Notification lifetime in seconds
AWS.SNS.MOBILE.APNS_SANDBOX.TTL Notification lifetime in seconds for apps under testing
AWS.SNS.MOBILE.APNS_VOIP.TTL Lifetime of an incoming VoIP call notification in seconds
AWS.SNS.MOBILE.APNS_VOIP_SANDBOX.TTL Lifetime of an incoming VoIP call notification in seconds for apps under testing
AWS.SNS.MOBILE.APNS.COLLAPSE_ID ID for multiple notifications that are collapsed into one
AWS.SNS.MOBILE.APNS.PRIORITY Notification output priority. A value from 1 to 10.
AWS.SNS.MOBILE.APNS.PUSH_TYPE Notification type. See the Apple documentation for details.
AWS.SNS.MOBILE.APNS.TOPIC Notification topic. See the Apple documentation for details.

FCM attributesFCM attributes

Attribute Description
AWS.SNS.MOBILE.FCM.TTL Message lifetime in seconds

SMS attributesSMS attributes

Attribute Description
AWS.SNS.SMS.SenderID Sender's text name
AWS.SNS.SMS.SMSType SMS type.
The possible values are:
  • Promotional: Default value. Promotion-related messages.
  • Transactional: Operation-related messages, e.g., one-time passwords.

RUSTORE attributesRUSTORE attributes

Attribute Description
CNS.MOBILE.RUSTORE.TTL Message lifetime in seconds

ResponseResponse

Successful responseSuccessful response

If there are no errors, Cloud Notification Service returns the 200 HTTP code.

Error responseError response

In case of an error, Cloud Notification Service returns a message with the appropriate HTTP code.

For a list of common error codes for all actions, see Errors.

Errors specific for Publish:

HTTP Error code Extended code Description
400 InvalidParameter InvalidMessageAttribute An invalid MessageAttribute attribute was provided. See the ParamName field for the attribute name.
400 InvalidParameter MessageLimitExceeded The message size including the attributes exceeds the limit.
400 InvalidParameter SMSBodyWithMixedWords Attempting to send an SMS containing words that were a combination of Latin and Cyrillic characters
400 UserError SMSSandboxNumberNotVerified Attempting to send an SMS to an unverified phone number via the SMS notification channel in the sandbox
400 UserError WrongSMSChannelState Attempting to send an SMS from a channel that is in a state that does not allow sending messages
400 UserError SMSChannelIsBanned Attempting to send an SMS using a blocked channel
400 UserError InvalidPhoneNumberRegion Phone numbers from outside Russia are not supported.

See alsoSee also

  • Yandex Cloud Notification Service HTTP API overview
  • Sending an HTTP API request to Yandex Cloud Notification Service
  • Publish API action in the AWS documentation

Was the article helpful?

Previous
Delete
Next
Monitoring metrics
© 2026 Direct Cursus Technology L.L.C.