Menu
Amazon Pinpoint
REST API Reference

Endpoints

An endpoint uniquely identifies a mobile device, email address, or phone number that can receive a message. You can use this resource to create or update endpoints.

You can use the /endpoints URI to create or edit up to 500 endpoints at once. Use the /endpoints/{endpoint-id} URI to create or edit a single endpoint.

URI

/v1/apps/application-id/endpoints

HTTP Methods

PUT

Use to update a batch of endpoints.

Body

Name Required Type

EndpointBatchRequest

true

EndpointBatchRequest

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

Response

Status Code Schema

202

MessageBody

Errors

Errors

Status Code Schema Error Type

400

MessageBody

BadRequestException

403

MessageBody

ForbiddenException

404

MessageBody

NotFoundException

405

MessageBody

MethodNotAllowedException

429

MessageBody

TooManyRequestsException

500

MessageBody

InternalServerErrorException

Schemas

Request Schemas

Example EndpointBatchRequest

Copy
{ "Item": [ { "ChannelType": "GCM", "Address": "string", "EndpointStatus": "string", "OptOut": "string", "RequestId": "string", "Location": { "Latitude": 0, "Longitude": 0, "PostalCode": "string", "City": "string", "Region": "string", "Country": "string" }, "Demographic": { "Make": "string", "Model": "string", "ModelVersion": "string", "Timezone": "string", "Locale": "string", "AppVersion": "string", "Platform": "string", "PlatformVersion": "string" }, "EffectiveDate": "string", "Attributes": { "additionalProp1": [ "string" ], "additionalProp2": [ "string" ], "additionalProp3": [ "string" ] }, "Metrics": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 }, "User": { "UserId": "string", "UserAttributes": { "additionalProp1": [ "string" ], "additionalProp2": [ "string" ], "additionalProp3": [ "string" ] } }, "Id": "string" } ] }

Response Schemas

Example MessageBody

Copy
{ "RequestID": "string", "Message": "string" }

Attributes

EndpointBatchRequest

Attribute Type Description

Item

array

List of items to update. Maximum 100 items

EndpointBatchItem

Attribute Type Description

Address

string

The address or token of the endpoint as provided by your push provider (e.g. DeviceToken or RegistrationId).

Attributes

object

Custom attributes that your app reports to Amazon Pinpoint. You can use these attributes as selection criteria when you create a segment.

ChannelType

string

The channel type.

Valid values: GCM | APNS | SMS | EMAIL

Demographic

EndpointDemographic

The endpoint demographic attributes.

EffectiveDate

string

The last time the endpoint was updated. Provided in ISO 8601 format.

EndpointStatus

string

The endpoint status. Can be either ACTIVE or INACTIVE. Will be set to INACTIVE if a delivery fails. Will be set to ACTIVE if the address is updated.

Id

string

The unique Id for the Endpoint in the batch.

Location

EndpointLocation

The endpoint location attributes.

Metrics

object

Custom metrics that your app reports to Amazon Pinpoint.

OptOut

string

Indicates whether a user has opted out of receiving messages with one of the following values:

ALL - User has opted out of all messages.

NONE - Users has not opted out and receives all messages.

RequestId

string

The unique ID for the most recent request to update the endpoint.

User

EndpointUser

Custom user-specific attributes that your app reports to Amazon Pinpoint.

EndpointDemographic

Attribute Type Description

AppVersion

string

The version of the application associated with the endpoint.

Locale

string

The endpoint locale in the following format: The ISO 639-1 alpha-2 code, followed by an underscore, followed by an ISO 3166-1 alpha-2 value.

Make

string

The endpoint make, such as such as Apple or Samsung.

Model

string

The endpoint model, such as iPhone.

ModelVersion

string

The endpoint model version.

Platform

string

The endpoint platform, such as ios or android.

PlatformVersion

string

The endpoint platform version.

Timezone

string

The timezone of the endpoint. Specified as a tz database value, such as Americas/Los_Angeles.

EndpointLocation

Attribute Type Description

City

string

The city where the endpoint is located.

Country

string

Country according to ISO 3166-1 Alpha-2 codes. For example, US.

Latitude

number

The latitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).

Longitude

number

The longitude of the endpoint location. Rounded to one decimal (Roughly corresponding to a mile).

PostalCode

string

The postal code or zip code of the endpoint.

Region

string

The region of the endpoint location. For example, corresponds to a state in US.

EndpointUser

Attribute Type Description

UserAttributes

object

Custom attributes specific to the user.

UserId

string

The unique ID of the user.

MessageBody

Attribute Type Description

Message

string

The error message returned from the API.

RequestID

string

The unique message body ID.