Amazon Simple Notification Service
API Reference (API Version 2010-03-31)


Sets the attributes for an endpoint for a device on one of the supported push notification services, such as GCM and APNS. For more information, see Using Amazon SNS Mobile Push Notifications.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

Attributes.entry.N.key (key)
Attributes.entry.N.value (value)

A map of the endpoint attributes. Attributes in this map include the following:

  • CustomUserData -- arbitrary user data to associate with the endpoint. Amazon SNS does not use this data. The data must be in UTF-8 format and less than 2KB.

  • Enabled -- flag that enables/disables delivery to the endpoint. Amazon SNS will set this to false when a notification service indicates to Amazon SNS that the endpoint is invalid. Users can set it back to true, typically after updating Token.

  • Token -- device token, also referred to as a registration id, for an app and mobile device. This is returned from the notification service when an app and mobile device are registered with the notification service.

Type: String to string map

Required: Yes


EndpointArn used for SetEndpointAttributes action.

Type: String

Required: Yes


For information about the errors that are common to all actions, see Common Errors.


Indicates that the user has been denied access to the requested resource.

HTTP Status Code: 403


Indicates an internal service error.

HTTP Status Code: 500


Indicates that a request parameter does not comply with the associated constraints.

HTTP Status Code: 400


Indicates that the requested resource does not exist.

HTTP Status Code: 404



Sample Request

POST HTTP/1.1 ... Attributes.entry.1.key=CustomUserData &Action=SetEndpointAttributes &SignatureMethod=HmacSHA256 &Attributes.entry.1.value=My+custom+userdata &AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE &EndpointArn=arn%3Aaws%3Asns%3Aus-west-2%3A123456789012%3Aendpoint%2FGCM%2Fgcmpushapp%2F5e3e9847-3183-3f18-a7e8-671c3a57d4b3 &SignatureVersion=2 &Version=2010-03-31 &Signature=CFTGfGOS5vgSU3%2FZgv2h%2FJdWgr2JQdDJSrUU9k38wSM%3D &Timestamp=2013-07-01T22%3A56%3A45.582Z

Sample Response

HTTP/1.1 200 OK ... <SetEndpointAttributesResponse xmlns=""> <ResponseMetadata> <RequestId>2fe0bfc7-3e85-5ee5-a9e2-f58b35e85f6a</RequestId> </ResponseMetadata> </SetEndpointAttributesResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: