/identitypools/{IdentityPoolId}/identity/{IdentityId}/device
http://cognito-sync.{region}.amazonaws.com/identitypools/{IdentityPoolId}/identity/{IdentityId}/device<p>Registers a device to receive push sync notifications.</p><p>This API can only be called with temporary credentials provided by Cognito Identity. You cannot call this API with developer credentials.</p>
Path Parameters
A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon Cognito. Here, the ID of the pool that the identity belongs to.
The unique ID for this identity.
Body Params
The push token.
The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX).
Responses
{
"success": true,
"data": {
"id": "abc123",
"created_at": "2025-01-01T00:00:00Z"
}
}{
"success": false,
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters"
}
}1curl --request POST \2 --url 'http://cognito-sync.{region}.amazonaws.com/identitypools/{IdentityPoolId}/identity/{IdentityId}/device' \3 --header 'accept: application/json' \4 --header 'content-type: application/json'1{2 "success": true,3 "data": {4 "id": "abc123",5 "created_at": "2025-01-01T00:00:00Z"6 }7}