amazon pinpoint - rest api reference · amazon pinpoint rest api reference amazon pinpoint endpoint...

258
Amazon Pinpoint REST API Reference

Upload: dinhhanh

Post on 12-Sep-2018

269 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon PinpointREST API Reference

Page 2: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API Reference

Amazon Pinpoint: REST API ReferenceCopyright © 2018 Amazon Web Services, Inc. and/or its affiliates. All rights reserved.

Amazon's trademarks and trade dress may not be used in connection with any product or service that is not Amazon's, in any mannerthat is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks notowned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored byAmazon.

Page 3: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API Reference

Table of ContentsWelcome .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Amazon Pinpoint Endpoint ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Example REST Request ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Hypertext Application Language .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Resources .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3Apps .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3

URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

App .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

Campaigns .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

Campaign .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38

Campaign Activities ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

Campaign Versions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Campaign Version .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64

ADM Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72

APNs Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73

iii

Page 4: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API Reference

URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

APNs Sandbox Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

APNs VoIP Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

APNs VoIP Sandbox Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88

Baidu Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

Email Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96

GCM Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97URI ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

SMS Channel ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103

Endpoints ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

Endpoint ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111

iv

Page 5: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API Reference

Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

Events .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122

Event Stream ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129

Export Jobs .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133

Export Job .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137

Import Jobs .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142

Import Job .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147

Messages .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152

Phone Number Validate .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169

Segments .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179

Segment .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185

v

Page 6: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API Reference

URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193

Segment Export Jobs .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201

Segment Import Jobs .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205

Segment Versions .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210

Segment Version .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

Settings .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228

Users Messages .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233

User .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246URI .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246HTTP Methods .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246Errors ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247Schemas .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248Attributes .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249

vi

Page 7: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAmazon Pinpoint Endpoint

WelcomeThis is the Amazon Pinpoint REST API reference. It contains examples of REST resources and theiroperations.

Topics• Amazon Pinpoint Endpoint (p. 1)• Example REST Request (p. 1)• Hypertext Application Language (p. 1)

Amazon Pinpoint EndpointAmazon Pinpoint is available in the US East (N. Virginia) region (us-east-1) at this endpoint:

https://pinpoint.us-east-1.amazonaws.com/v1

Example REST RequestThe following is an example of a REST request that you make to Amazon Pinpoint:

GET /v1/apps/a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6/campaignsAccept: application/jsonAuthorization: AWS4-HMAC-SHA256 Credential=AKIAIOSFODNN7EXAMPLE/20161127/us-east-1/mobiletargeting/aws4_request, SignedHeaders=accept;host;x-amz-date, Signature=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a1b2c3d4e5f6Host: pinpoint.us-east-1.amazonaws.comX-Amz-Date: 20161127T202324Z

Following this request, Amazon Pinpoint returns a response that includes the following header:

200Access-Control-Allow-Origin: *Connection: keep-aliveContent-Length: 94237Content-Type: application/jsonDate: Sun, 27 Nov 2016 20:23:28 GMTX-Amz-Cf-Id: BerfOyKjyRgVGEKS2q3gHdWBZYFrqq0w4KmpamCCbY6o_xsAzxR1Iw==x-amzn-RequestId: 595c3386-b4df-11e6-855b-61b43929a1e2X-Amzn-Trace-Id: Root=1-583b40bd-ca765532129bcbb6c5016375

Hypertext Application LanguageAmazon Pinpoint provides a resource-based API that uses Hypertext Application Language (HAL). HALprovides a standard way for expressing the resources and relationships of an API as hyperlinks. UsingHAL, you use HTTP methods (GET, PUT, POST, DELETE) to submit requests and receive information aboutthe API in the response. Applications can use the information returned to explore the functionality of theAPI. For more information about HAL, see the JSON Hypertext Application Language draft.

1

Page 8: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHypertext Application Language

To request a HAL response from Amazon Pinpoint, specify application/hal+json for the acceptrequest header.

2

Page 9: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceApps

ResourcesThe Amazon Pinpoint REST API includes the following resources.

Topics• Apps (p. 3)• App (p. 7)• Campaigns (p. 9)• Campaign (p. 28)• Campaign Activities (p. 45)• Campaign Versions (p. 48)• Campaign Version (p. 59)• ADM Channel (p. 69)• APNs Channel (p. 73)• APNs Sandbox Channel (p. 77)• APNs VoIP Channel (p. 81)• APNs VoIP Sandbox Channel (p. 85)• Baidu Channel (p. 89)• Email Channel (p. 93)• GCM Channel (p. 97)• SMS Channel (p. 100)• Endpoints (p. 104)• Endpoint (p. 110)• Events (p. 118)• Event Stream (p. 126)• Export Jobs (p. 130)• Export Job (p. 136)• Import Jobs (p. 139)• Import Job (p. 145)• Messages (p. 149)• Phone Number Validate (p. 167)• Segments (p. 171)• Segment (p. 185)• Segment Export Jobs (p. 199)• Segment Import Jobs (p. 203)• Segment Versions (p. 207)• Segment Version (p. 216)• Settings (p. 225)• Users Messages (p. 230)• User (p. 246)

AppsAn app is an Amazon Pinpoint project in which you define the audience for a distinct application, and youengage this audience with tailored messages. For example, use an app to send push notifications to your

3

Page 10: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceURI

mobile app users, send emails to your newsletter subscribers, or send SMS messages to your customers'phone numbers.

After you create an app, you can define your audience by registering endpoints and defining segments.To engage your audience, define campaigns or write direct messages, and send your messages using anysupported channel (mobile push, email, and SMS).

You can monitor app analytics by creating an event stream, which streams data for message deliveriesand events reported by your application. Analytics are also provided in the Amazon Pinpoint console. Inthe console, you can open your app on the Projects page.

Use this resource to look up or create an app.

To delete an app, use the App resource and run a DELETE request against the /apps/application-id URI.

URI/v1/apps

HTTP MethodsGETReturns information about your apps.

Header

Name Required Type

accept false string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 ApplicationsResponse (p. 6)

POSTCreates or updates an app.

Body

Name Required Type

CreateApplicationRequest true CreateApplicationRequest (p. 6)

4

Page 11: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Header

Name Required Type

accept false string

Response

Status Code Schema

201 ApplicationResponse (p. 6)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 6) BadRequestException

403 MessageBody (p. 6) ForbiddenException

404 MessageBody (p. 6) NotFoundException

405 MessageBody (p. 6) MethodNotAllowedException

429 MessageBody (p. 6) TooManyRequestsException

500 MessageBody (p. 6) InternalServerErrorException

Schemas

Request Schemas

Example CreateApplicationRequest

{ "Name": "string"}

Response Schemas

Example ApplicationsResponse

{ "NextToken": "string", "Item": [ { "Name": "string", "Id": "string" } ]

5

Page 12: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

}

Example ApplicationResponse

{ "Name": "string", "Id": "string"}

Example MessageBody

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

AttributesCreateApplicationRequest

Attribute Type Description

Name string The display name of the application.Used in the Amazon Pinpointconsole.

ApplicationsResponse

Attribute Type Description

Item array List of applications returned in thispage.

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

ApplicationResponse

Attribute Type Description

Id string The unique application ID.

Name string The display name of the application.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

6

Page 13: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceApp

AppAn app is an Amazon Pinpoint project in which you define the audience for a distinct application, and youengage this audience with tailored messages. For example, use an app to send push notifications to yourmobile app users, send emails to your newsletter subscribers, or send SMS messages to your customers'phone numbers.

Use this resource to look up or delete an app.

To create an app, use the Apps resource and run a POST request against the /apps URI.

URI/v1/apps/application-id

HTTP Methods

DELETE

Deletes an app.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 ApplicationResponse (p. 9)

GET

Returns information about an app.

Header

Name Required Type

accept false string

7

Page 14: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 ApplicationResponse (p. 9)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 9) BadRequestException

403 MessageBody (p. 9) ForbiddenException

404 MessageBody (p. 9) NotFoundException

405 MessageBody (p. 9) MethodNotAllowedException

429 MessageBody (p. 9) TooManyRequestsException

500 MessageBody (p. 9) InternalServerErrorException

Schemas

Response Schemas

Example ApplicationResponse

{ "Name": "string", "Id": "string"}

Example MessageBody

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

8

Page 15: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

AttributesApplicationResponse

Attribute Type Description

Id string The unique application ID.

Name string The display name of the application.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

CampaignsA campaign is a messaging initiative that engages a specific segment of end users. The informationrepresented by this resource includes the segment that the campaign reaches out to, the message thatit delivers, and the schedule on which it runs. You can use this resource to look up, update, or delete acampaign.

URI/v1/apps/application-id/campaigns

HTTP MethodsGETReturns information about your campaigns.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Query

Name Required Type

page-size false string

9

Page 16: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Name Required Type

token false string

Response

Status Code Schema

200 CampaignsResponse (p. 26)

POSTCreates or updates a campaign.

Body

Name Required Type

WriteCampaignRequest true WriteCampaignRequest (p. 22)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

201 CampaignResponse (p. 27)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 28) BadRequestException

403 MessageBody (p. 28) ForbiddenException

404 MessageBody (p. 28) NotFoundException

405 MessageBody (p. 28) MethodNotAllowedException

10

Page 17: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

429 MessageBody (p. 28) TooManyRequestsException

500 MessageBody (p. 28) InternalServerErrorException

Schemas

Request Schemas

Example WriteCampaignRequest

{ "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string",

11

Page 18: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SegmentId": "string", "SegmentVersion": 0, "IsPaused": true, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true,

12

Page 19: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" },

13

Page 20: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SizePercent": 0 } ], "HoldoutPercent": 0, "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "Name": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }, "Description": "string"}

Response SchemasExample CampaignsResponse

{ "Item": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string",

14

Page 21: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string",

15

Page 22: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "SegmentId": "string", "SegmentVersion": 0, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string",

16

Page 23: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SizePercent": 0, "Id": "string", "State": { "CampaignStatus": "SCHEDULED" } } ], "HoldoutPercent": 0, "Name": "string", "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "Description": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string",

17

Page 24: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Mode": "DELIVERY" }, "State": { "CampaignStatus": "SCHEDULED" }, "DefaultState": { "CampaignStatus": "SCHEDULED" }, "Version": 0, "IsPaused": true } ], "NextToken": "string"}

Example CampaignResponse

{ "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": {

18

Page 25: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "SegmentId": "string", "SegmentVersion": 0, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string",

19

Page 26: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": {

20

Page 27: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SizePercent": 0, "Id": "string", "State": { "CampaignStatus": "SCHEDULED" } } ], "HoldoutPercent": 0, "Name": "string", "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "Description": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }, "State": { "CampaignStatus": "SCHEDULED" }, "DefaultState": { "CampaignStatus": "SCHEDULED" }, "Version": 0, "IsPaused": true}

Example MessageBody

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

21

Page 28: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

AttributesWriteCampaignRequest

Attribute Type Description

AdditionalTreatments array Treatments that are defined inaddition to the default treatment.

Description string A description of the campaign.

HoldoutPercent integer The allocated percentage of endusers who will not receive messagesfrom this campaign.

Hook CampaignHook (p. 26) Campaign hook information.

IsPaused boolean Indicates whether the campaign ispaused. A paused campaign doesnot send messages unless youresume it by setting IsPaused tofalse.

Limits CampaignLimits (p. 26) The campaign limits settings.

MessageConfiguration MessageConfiguration (p. 23) The message configuration settings.

Name string The custom name of the campaign.

Schedule Schedule (p. 25) The campaign schedule.

SegmentId string The ID of the segment to which thecampaign sends messages.

SegmentVersion integer The version of the segment to whichthe campaign sends messages.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

WriteTreatmentResource

Attribute Type Description

MessageConfiguration MessageConfiguration (p. 23) The message configuration settings.

Schedule Schedule (p. 25) The campaign schedule.

SizePercent integer The allocated percentage of usersfor this treatment.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

22

Page 29: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

MessageConfiguration

Attribute Type Description

ADMMessage Message (p. 23) The message that the campaigndelivers to ADM channels. Overridesthe default message.

APNSMessage Message (p. 23) The message that the campaigndelivers to APNS channels. Overridesthe default message.

BaiduMessage Message (p. 23) The message that the campaigndelivers to Baidu channels. Overridesthe default message.

DefaultMessage Message (p. 23) The default message for allchannels.

EmailMessage CampaignEmailMessage (p. 24) The email message configuration.

GCMMessage Message (p. 23) The message that the campaigndelivers to GCM channels. Overridesthe default message.

SMSMessage CampaignSmsMessage (p. 25) The SMS message configuration.

Message

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP - Yourapp launches, or it becomes theforeground app if it has been sent tothe background. This is the defaultaction.

DEEP_LINK - Uses deep linkingfeatures in iOS and Android to openyour app and display a designateduser interface within the app.

URL - The default mobile browseron the user's device launches andopens a web page at the URL youspecify.

Body string The message body. Can include upto 140 characters.

ImageIconUrl string The URL that points to the iconimage for the push notification icon,for example, the app icon.

ImageSmallIconUrl string The URL that points to the smallicon image for the push notificationicon, for example, the app icon.

23

Page 30: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

ImageUrl string The URL that points to an imageused in the push notification.

JsonBody string The JSON payload used for a silentpush.

MediaUrl string The URL that points to the mediaresource, for example a .mp4 or .giffile.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device.

Silent pushes can be used forRemote Configuration and PhoneHome use cases.

TimeToLive integer This parameter specifies how long(in seconds) the message shouldbe kept if the service is unable todeliver the notification the firsttime. If the value is 0, it treatsthe notification as if it expiresimmediately and does not store thenotification or attempt to redeliverit. This value is converted to theexpiration field when sent to theservice. It only applies to APNs andGCM

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

CampaignEmailMessage

Attribute Type Description

Body string The email text body.

FromAddress string The email address used to sendthe email from. Defaults to useFromAddress specified in the EmailChannel.

HtmlBody string The email html body.

Title string The email title (Or subject).

24

Page 31: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

CampaignSmsMessage

Attribute Type Description

Body string The SMS text body.

MessageType string Is this is a transactional SMSmessage, otherwise a promotionalmessage.

SenderId string Sender ID of sent message.

Schedule

Attribute Type Description

EndTime string The scheduled time that thecampaign ends in ISO 8601 format.

Frequency string How often the campaign deliversmessages.

Valid values: ONCE, HOURLY, DAILY,WEEKLY, MONTHLY

IsLocalTime boolean Indicates whether the campaignschedule takes effect according toeach user's local time.

QuietTime QuietTime (p. 25) The time during which the campaignsends no messages.

StartTime string The scheduled time that thecampaign begins in ISO 8601format.

Timezone string The starting UTC offset for theschedule if the value for isLocalTimeis true

Valid values: UTC UTC+01 UTC+02UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07UTC+08 UTC+09 UTC+09:30 UTC+10UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05UTC-06 UTC-07 UTC-08 UTC-09UTC-10 UTC-11

QuietTime

Attribute Type Description

End string The default end time for quiet timein ISO 8601 format.

25

Page 32: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Start string The default start time for quiet timein ISO 8601 format.

CampaignHook

Attribute Type Description

LambdaFunctionName string Lambda function name or arn to becalled for delivery

Mode string What mode Lambda should beinvoked in.

WebUrl string Web URL to call for hook. If the URLhas authentication specified it willbe added as authentication to therequest

CampaignLimits

Attribute Type Description

Daily integer The maximum number of messagesthat each campaign can send to asingle endpoint in a 24-hour period.

MaximumDuration integer The length of time (in seconds) thatthe campaign can run before it endsand message deliveries stop. Thisduration begins at the scheduledstart time for the campaign. Theminimum value is 60.

MessagesPerSecond integer The number of messages that thecampaign can send per second.The minimum value is 50, and themaximum is 20000.

Total integer The maximum number of messagesthat an individual campaign cansend to a single endpoint over thecourse of the campaign.

CampaignsResponse

Attribute Type Description

Item array A list of campaigns.

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

26

Page 33: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

CampaignResponse

Attribute Type Description

AdditionalTreatments array Treatments that are defined inaddition to the default treatment.

ApplicationId string The ID of the application to whichthe campaign applies.

CreationDate string The date the campaign was createdin ISO 8601 format.

DefaultState CampaignState (p. 28) The status of the campaign's defaulttreatment. Only present for A/B testcampaigns.

Description string A description of the campaign.

HoldoutPercent integer The allocated percentage of endusers who will not receive messagesfrom this campaign.

Hook CampaignHook (p. 26) Campaign hook information.

Id string The unique campaign ID.

IsPaused boolean Indicates whether the campaign ispaused. A paused campaign doesnot send messages unless youresume it by setting IsPaused tofalse.

LastModifiedDate string The date the campaign was lastupdated in ISO 8601 format.

Limits CampaignLimits (p. 26) The campaign limits settings.

MessageConfiguration MessageConfiguration (p. 23) The message configuration settings.

Name string The custom name of the campaign.

Schedule Schedule (p. 25) The campaign schedule.

SegmentId string The ID of the segment to which thecampaign sends messages.

SegmentVersion integer The version of the segment to whichthe campaign sends messages.

State CampaignState (p. 28) The campaign status.

An A/B test campaign will have astatus of COMPLETED only whenall treatments have a status ofCOMPLETED.

TreatmentDescription string A custom description for thetreatment.

27

Page 34: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceCampaign

Attribute Type Description

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

Version integer The campaign version number.

TreatmentResource

Attribute Type Description

Id string The unique treatment ID.

MessageConfiguration MessageConfiguration (p. 23) The message configuration settings.

Schedule Schedule (p. 25) The campaign schedule.

SizePercent integer The allocated percentage of usersfor this treatment.

State CampaignState (p. 28) The treatment status.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

CampaignState

Attribute Type Description

CampaignStatus string The status of the campaign, or thestatus of a treatment that belongsto an A/B test campaign.

Valid values: SCHEDULED,EXECUTING, PENDING_NEXT_RUN,COMPLETED, PAUSED

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

CampaignA campaign is a messaging initiative that engages a specific segment of end users. The informationrepresented by this resource includes the segment that the campaign reaches out to, the message thatit delivers, and the schedule on which it runs. You can use this resource to look up, update, or delete acampaign.

28

Page 35: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceURI

URI/v1/apps/application-id/campaigns/campaign-id

HTTP MethodsDELETEDeletes a campaign.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

campaign-id true string

Response

Status Code Schema

200 CampaignResponse (p. 43)

GETReturns information about a campaign.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

campaign-id true string

Response

Status Code Schema

200 CampaignResponse (p. 43)

29

Page 36: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

PUT

Use to update a campaign.

Body

Name Required Type

WriteCampaignRequest true WriteCampaignRequest (p. 38)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

campaign-id true string

Response

Status Code Schema

200 CampaignResponse (p. 43)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 44) BadRequestException

403 MessageBody (p. 44) ForbiddenException

404 MessageBody (p. 44) NotFoundException

405 MessageBody (p. 44) MethodNotAllowedException

429 MessageBody (p. 44) TooManyRequestsException

500 MessageBody (p. 44) InternalServerErrorException

30

Page 37: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Schemas

Request Schemas

Example WriteCampaignRequest

{ "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string",

31

Page 38: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SegmentId": "string", "SegmentVersion": 0, "IsPaused": true, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string",

32

Page 39: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string",

33

Page 40: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SizePercent": 0 } ], "HoldoutPercent": 0, "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "Name": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }, "Description": "string"}

Response SchemasExample CampaignResponse

{ "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 },

34

Page 41: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "Id": "string",

35

Page 42: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "SegmentId": "string", "SegmentVersion": 0, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 },

36

Page 43: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SizePercent": 0, "Id": "string", "State": { "CampaignStatus": "SCHEDULED" } } ], "HoldoutPercent": 0, "Name": "string", "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "Description": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }, "State": { "CampaignStatus": "SCHEDULED" }, "DefaultState": { "CampaignStatus": "SCHEDULED" }, "Version": 0, "IsPaused": true

37

Page 44: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

}

Example MessageBody

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

AttributesWriteCampaignRequest

Attribute Type Description

AdditionalTreatments array Treatments that are defined inaddition to the default treatment.

Description string A description of the campaign.

HoldoutPercent integer The allocated percentage of endusers who will not receive messagesfrom this campaign.

Hook CampaignHook (p. 42) Campaign hook information.

IsPaused boolean Indicates whether the campaign ispaused. A paused campaign doesnot send messages unless youresume it by setting IsPaused tofalse.

Limits CampaignLimits (p. 42) The campaign limits settings.

MessageConfiguration MessageConfiguration (p. 39) The message configuration settings.

Name string The custom name of the campaign.

Schedule Schedule (p. 41) The campaign schedule.

SegmentId string The ID of the segment to which thecampaign sends messages.

SegmentVersion integer The version of the segment to whichthe campaign sends messages.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

WriteTreatmentResource

Attribute Type Description

MessageConfiguration MessageConfiguration (p. 39) The message configuration settings.

38

Page 45: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Schedule Schedule (p. 41) The campaign schedule.

SizePercent integer The allocated percentage of usersfor this treatment.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

MessageConfiguration

Attribute Type Description

ADMMessage Message (p. 39) The message that the campaigndelivers to ADM channels. Overridesthe default message.

APNSMessage Message (p. 39) The message that the campaigndelivers to APNS channels. Overridesthe default message.

BaiduMessage Message (p. 39) The message that the campaigndelivers to Baidu channels. Overridesthe default message.

DefaultMessage Message (p. 39) The default message for allchannels.

EmailMessage CampaignEmailMessage (p. 41) The email message configuration.

GCMMessage Message (p. 39) The message that the campaigndelivers to GCM channels. Overridesthe default message.

SMSMessage CampaignSmsMessage (p. 41) The SMS message configuration.

Message

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP - Yourapp launches, or it becomes theforeground app if it has been sent tothe background. This is the defaultaction.

DEEP_LINK - Uses deep linkingfeatures in iOS and Android to openyour app and display a designateduser interface within the app.

39

Page 46: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

URL - The default mobile browseron the user's device launches andopens a web page at the URL youspecify.

Body string The message body. Can include upto 140 characters.

ImageIconUrl string The URL that points to the iconimage for the push notification icon,for example, the app icon.

ImageSmallIconUrl string The URL that points to the smallicon image for the push notificationicon, for example, the app icon.

ImageUrl string The URL that points to an imageused in the push notification.

JsonBody string The JSON payload used for a silentpush.

MediaUrl string The URL that points to the mediaresource, for example a .mp4 or .giffile.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device.

Silent pushes can be used forRemote Configuration and PhoneHome use cases.

TimeToLive integer This parameter specifies how long(in seconds) the message shouldbe kept if the service is unable todeliver the notification the firsttime. If the value is 0, it treatsthe notification as if it expiresimmediately and does not store thenotification or attempt to redeliverit. This value is converted to theexpiration field when sent to theservice. It only applies to APNs andGCM

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

40

Page 47: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

CampaignEmailMessage

Attribute Type Description

Body string The email text body.

FromAddress string The email address used to sendthe email from. Defaults to useFromAddress specified in the EmailChannel.

HtmlBody string The email html body.

Title string The email title (Or subject).

CampaignSmsMessage

Attribute Type Description

Body string The SMS text body.

MessageType string Is this is a transactional SMSmessage, otherwise a promotionalmessage.

SenderId string Sender ID of sent message.

Schedule

Attribute Type Description

EndTime string The scheduled time that thecampaign ends in ISO 8601 format.

Frequency string How often the campaign deliversmessages.

Valid values: ONCE, HOURLY, DAILY,WEEKLY, MONTHLY

IsLocalTime boolean Indicates whether the campaignschedule takes effect according toeach user's local time.

QuietTime QuietTime (p. 42) The time during which the campaignsends no messages.

StartTime string The scheduled time that thecampaign begins in ISO 8601format.

Timezone string The starting UTC offset for theschedule if the value for isLocalTimeis true

Valid values: UTC UTC+01 UTC+02UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07

41

Page 48: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

UTC+08 UTC+09 UTC+09:30 UTC+10UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05UTC-06 UTC-07 UTC-08 UTC-09UTC-10 UTC-11

QuietTime

Attribute Type Description

End string The default end time for quiet timein ISO 8601 format.

Start string The default start time for quiet timein ISO 8601 format.

CampaignHook

Attribute Type Description

LambdaFunctionName string Lambda function name or arn to becalled for delivery

Mode string What mode Lambda should beinvoked in.

WebUrl string Web URL to call for hook. If the URLhas authentication specified it willbe added as authentication to therequest

CampaignLimits

Attribute Type Description

Daily integer The maximum number of messagesthat each campaign can send to asingle endpoint in a 24-hour period.

MaximumDuration integer The length of time (in seconds) thatthe campaign can run before it endsand message deliveries stop. Thisduration begins at the scheduledstart time for the campaign. Theminimum value is 60.

MessagesPerSecond integer The number of messages that thecampaign can send per second.The minimum value is 50, and themaximum is 20000.

Total integer The maximum number of messagesthat an individual campaign can

42

Page 49: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

send to a single endpoint over thecourse of the campaign.

CampaignResponse

Attribute Type Description

AdditionalTreatments array Treatments that are defined inaddition to the default treatment.

ApplicationId string The ID of the application to whichthe campaign applies.

CreationDate string The date the campaign was createdin ISO 8601 format.

DefaultState CampaignState (p. 44) The status of the campaign's defaulttreatment. Only present for A/B testcampaigns.

Description string A description of the campaign.

HoldoutPercent integer The allocated percentage of endusers who will not receive messagesfrom this campaign.

Hook CampaignHook (p. 42) Campaign hook information.

Id string The unique campaign ID.

IsPaused boolean Indicates whether the campaign ispaused. A paused campaign doesnot send messages unless youresume it by setting IsPaused tofalse.

LastModifiedDate string The date the campaign was lastupdated in ISO 8601 format.

Limits CampaignLimits (p. 42) The campaign limits settings.

MessageConfiguration MessageConfiguration (p. 39) The message configuration settings.

Name string The custom name of the campaign.

Schedule Schedule (p. 41) The campaign schedule.

SegmentId string The ID of the segment to which thecampaign sends messages.

SegmentVersion integer The version of the segment to whichthe campaign sends messages.

State CampaignState (p. 44) The campaign status.

An A/B test campaign will have astatus of COMPLETED only when

43

Page 50: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

all treatments have a status ofCOMPLETED.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

Version integer The campaign version number.

TreatmentResource

Attribute Type Description

Id string The unique treatment ID.

MessageConfiguration MessageConfiguration (p. 39) The message configuration settings.

Schedule Schedule (p. 41) The campaign schedule.

SizePercent integer The allocated percentage of usersfor this treatment.

State CampaignState (p. 44) The treatment status.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

CampaignState

Attribute Type Description

CampaignStatus string The status of the campaign, or thestatus of a treatment that belongsto an A/B test campaign.

Valid values: SCHEDULED,EXECUTING, PENDING_NEXT_RUN,COMPLETED, PAUSED

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

44

Page 51: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceCampaign Activities

Campaign ActivitiesProvides information about the activity performed by a campaign, such as the time during which thecampaign ran and the number of endpoints to which it delivered messages. You can use this resource tolook up activity information by app ID and campaign ID.

URI/v1/apps/application-id/campaigns/campaign-id/activities

HTTP MethodsGETReturns information about the activity performed by a campaign.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

campaign-id true string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 ActivitiesResponse (p. 46)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 47) BadRequestException

45

Page 52: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

403 MessageBody (p. 47) ForbiddenException

404 MessageBody (p. 47) NotFoundException

405 MessageBody (p. 47) MethodNotAllowedException

429 MessageBody (p. 47) TooManyRequestsException

500 MessageBody (p. 47) InternalServerErrorException

SchemasResponse SchemasExample ActivitiesResponse

{ "Item": [ { "Id": "string", "ApplicationId": "string", "CampaignId": "string", "TreatmentId": "string", "State": "string", "Result": "string", "ScheduledStart": "string", "Start": "string", "End": "string", "SuccessfulEndpointCount": 0, "TotalEndpointCount": 0, "TimezonesTotalCount": 0, "TimezonesCompletedCount": 0 } ]}

Example MessageBody

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

AttributesActivitiesResponse

Attribute Type Description

Item array List of campaign activities

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

46

Page 53: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

ActivityResponse

Attribute Type Description

ApplicationId string The ID of the application to whichthe campaign applies.

CampaignId string The ID of the campaign to which theactivity applies.

End string The actual time the activity wasmarked CANCELLED or COMPLETED.Provided in ISO 8601 format.

Id string The unique activity ID.

Result string Indicates whether the activitysucceeded.

Valid values: SUCCESS, FAIL

ScheduledStart string The scheduled start time for theactivity in ISO 8601 format.

Start string The actual start time of the activityin ISO 8601 format.

State string The state of the activity.

Valid values: PENDING,INITIALIZING, RUNNING, PAUSED,CANCELLED, COMPLETED

SuccessfulEndpointCount integer The total number of endpoints towhich the campaign successfullydelivered messages.

TimezonesCompletedCount integer The total number of timezonescompleted.

TimezonesTotalCount integer The total number of uniquetimezones present in the segment.

TotalEndpointCount integer The total number of endpoints towhich the campaign attempts todeliver messages.

TreatmentId string The ID of a variation of thecampaign used for A/B testing.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

47

Page 54: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceCampaign Versions

Campaign VersionsProvides a list of versions for a specific campaign.

URI/v1/apps/application-id/campaigns/campaign-id/versions

HTTP MethodsGETReturns information about your campaign versions.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

campaign-id true string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 CampaignsResponse (p. 53)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 59) BadRequestException

403 MessageBody (p. 59) ForbiddenException

404 MessageBody (p. 59) NotFoundException

48

Page 55: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

405 MessageBody (p. 59) MethodNotAllowedException

429 MessageBody (p. 59) TooManyRequestsException

500 MessageBody (p. 59) InternalServerErrorException

Schemas

Response Schemas

Example CampaignsResponse

{ "Item": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0

49

Page 56: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

}, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "SegmentId": "string", "SegmentVersion": 0, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string",

50

Page 57: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0

51

Page 58: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

}, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SizePercent": 0, "Id": "string", "State": { "CampaignStatus": "SCHEDULED" } } ], "HoldoutPercent": 0, "Name": "string", "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "Description": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }, "State": { "CampaignStatus": "SCHEDULED" }, "DefaultState": { "CampaignStatus": "SCHEDULED" }, "Version": 0, "IsPaused": true } ], "NextToken": "string"}

Example MessageBody

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

52

Page 59: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

AttributesCampaignsResponse

Attribute Type Description

Item array A list of campaigns.

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

CampaignResponse

Attribute Type Description

AdditionalTreatments array Treatments that are defined inaddition to the default treatment.

ApplicationId string The ID of the application to whichthe campaign applies.

CreationDate string The date the campaign was createdin ISO 8601 format.

DefaultState CampaignState (p. 58) The status of the campaign's defaulttreatment. Only present for A/B testcampaigns.

Description string A description of the campaign.

HoldoutPercent integer The allocated percentage of endusers who will not receive messagesfrom this campaign.

Hook CampaignHook (p. 58) Campaign hook information.

Id string The unique campaign ID.

IsPaused boolean Indicates whether the campaign ispaused. A paused campaign doesnot send messages unless youresume it by setting IsPaused tofalse.

LastModifiedDate string The date the campaign was lastupdated in ISO 8601 format.

Limits CampaignLimits (p. 58) The campaign limits settings.

MessageConfiguration MessageConfiguration (p. 54) The message configuration settings.

Name string The custom name of the campaign.

Schedule Schedule (p. 57) The campaign schedule.

SegmentId string The ID of the segment to which thecampaign sends messages.

53

Page 60: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

SegmentVersion integer The version of the segment to whichthe campaign sends messages.

State CampaignState (p. 58) The campaign status.

An A/B test campaign will have astatus of COMPLETED only whenall treatments have a status ofCOMPLETED.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

Version integer The campaign version number.

TreatmentResource

Attribute Type Description

Id string The unique treatment ID.

MessageConfiguration MessageConfiguration (p. 54) The message configuration settings.

Schedule Schedule (p. 57) The campaign schedule.

SizePercent integer The allocated percentage of usersfor this treatment.

State CampaignState (p. 58) The treatment status.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

MessageConfiguration

Attribute Type Description

ADMMessage Message (p. 55) The message that the campaigndelivers to ADM channels. Overridesthe default message.

APNSMessage Message (p. 55) The message that the campaigndelivers to APNS channels. Overridesthe default message.

BaiduMessage Message (p. 55) The message that the campaigndelivers to Baidu channels. Overridesthe default message.

54

Page 61: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

DefaultMessage Message (p. 55) The default message for allchannels.

EmailMessage CampaignEmailMessage (p. 56) The email message configuration.

GCMMessage Message (p. 55) The message that the campaigndelivers to GCM channels. Overridesthe default message.

SMSMessage CampaignSmsMessage (p. 56) The SMS message configuration.

Message

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP - Yourapp launches, or it becomes theforeground app if it has been sent tothe background. This is the defaultaction.

DEEP_LINK - Uses deep linkingfeatures in iOS and Android to openyour app and display a designateduser interface within the app.

URL - The default mobile browseron the user's device launches andopens a web page at the URL youspecify.

Body string The message body. Can include upto 140 characters.

ImageIconUrl string The URL that points to the iconimage for the push notification icon,for example, the app icon.

ImageSmallIconUrl string The URL that points to the smallicon image for the push notificationicon, for example, the app icon.

ImageUrl string The URL that points to an imageused in the push notification.

JsonBody string The JSON payload used for a silentpush.

MediaUrl string The URL that points to the mediaresource, for example a .mp4 or .giffile.

55

Page 62: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device.

Silent pushes can be used forRemote Configuration and PhoneHome use cases.

TimeToLive integer This parameter specifies how long(in seconds) the message shouldbe kept if the service is unable todeliver the notification the firsttime. If the value is 0, it treatsthe notification as if it expiresimmediately and does not store thenotification or attempt to redeliverit. This value is converted to theexpiration field when sent to theservice. It only applies to APNs andGCM

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

CampaignEmailMessage

Attribute Type Description

Body string The email text body.

FromAddress string The email address used to sendthe email from. Defaults to useFromAddress specified in the EmailChannel.

HtmlBody string The email html body.

Title string The email title (Or subject).

CampaignSmsMessage

Attribute Type Description

Body string The SMS text body.

56

Page 63: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

MessageType string Is this is a transactional SMSmessage, otherwise a promotionalmessage.

SenderId string Sender ID of sent message.

Schedule

Attribute Type Description

EndTime string The scheduled time that thecampaign ends in ISO 8601 format.

Frequency string How often the campaign deliversmessages.

Valid values: ONCE, HOURLY, DAILY,WEEKLY, MONTHLY

IsLocalTime boolean Indicates whether the campaignschedule takes effect according toeach user's local time.

QuietTime QuietTime (p. 57) The time during which the campaignsends no messages.

StartTime string The scheduled time that thecampaign begins in ISO 8601format.

Timezone string The starting UTC offset for theschedule if the value for isLocalTimeis true

Valid values: UTC UTC+01 UTC+02UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07UTC+08 UTC+09 UTC+09:30 UTC+10UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05UTC-06 UTC-07 UTC-08 UTC-09UTC-10 UTC-11

QuietTime

Attribute Type Description

End string The default end time for quiet timein ISO 8601 format.

Start string The default start time for quiet timein ISO 8601 format.

57

Page 64: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

CampaignState

Attribute Type Description

CampaignStatus string The status of the campaign, or thestatus of a treatment that belongsto an A/B test campaign.

Valid values: SCHEDULED,EXECUTING, PENDING_NEXT_RUN,COMPLETED, PAUSED

CampaignHook

Attribute Type Description

LambdaFunctionName string Lambda function name or arn to becalled for delivery

Mode string What mode Lambda should beinvoked in.

WebUrl string Web URL to call for hook. If the URLhas authentication specified it willbe added as authentication to therequest

CampaignLimits

Attribute Type Description

Daily integer The maximum number of messagesthat each campaign can send to asingle endpoint in a 24-hour period.

MaximumDuration integer The length of time (in seconds) thatthe campaign can run before it endsand message deliveries stop. Thisduration begins at the scheduledstart time for the campaign. Theminimum value is 60.

MessagesPerSecond integer The number of messages that thecampaign can send per second.The minimum value is 50, and themaximum is 20000.

Total integer The maximum number of messagesthat an individual campaign cansend to a single endpoint over thecourse of the campaign.

58

Page 65: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceCampaign Version

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Campaign VersionProvides information about a specific campaign version.

URI/v1/apps/application-id/campaigns/campaign-id/versions/version

HTTP MethodsGETReturns information about a specific version of a campaign.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

campaign-id true string

version true string

Response

Status Code Schema

200 CampaignResponse (p. 64)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 69) BadRequestException

59

Page 66: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

403 MessageBody (p. 69) ForbiddenException

404 MessageBody (p. 69) NotFoundException

405 MessageBody (p. 69) MethodNotAllowedException

429 MessageBody (p. 69) TooManyRequestsException

500 MessageBody (p. 69) InternalServerErrorException

SchemasResponse Schemas

Example CampaignResponse

{ "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string",

60

Page 67: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "SegmentId": "string", "SegmentVersion": 0, "AdditionalTreatments": [ { "TreatmentName": "string", "TreatmentDescription": "string", "MessageConfiguration": { "DefaultMessage": {

61

Page 68: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "APNSMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "GCMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string", "RawContent": "string", "TimeToLive": 0 }, "BaiduMessage": { "Title": "string", "Body": "string", "ImageUrl": "string", "ImageIconUrl": "string", "ImageSmallIconUrl": "string", "MediaUrl": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "JsonBody": "string",

62

Page 69: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"RawContent": "string", "TimeToLive": 0 }, "EmailMessage": { "Title": "string", "Body": "string", "HtmlBody": "string", "FromAddress": "string" }, "SMSMessage": { "Body": "string", "MessageType": "TRANSACTIONAL", "SenderId": "string" } }, "Schedule": { "StartTime": "string", "EndTime": "string", "Frequency": "ONCE", "IsLocalTime": true, "Timezone": "string", "QuietTime": { "Start": "string", "End": "string" } }, "SizePercent": 0, "Id": "string", "State": { "CampaignStatus": "SCHEDULED" } } ], "HoldoutPercent": 0, "Name": "string", "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "Description": "string", "Hook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }, "State": { "CampaignStatus": "SCHEDULED" }, "DefaultState": { "CampaignStatus": "SCHEDULED" }, "Version": 0, "IsPaused": true}

Example MessageBody

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

63

Page 70: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

AttributesCampaignResponse

Attribute Type Description

AdditionalTreatments array Treatments that are defined inaddition to the default treatment.

ApplicationId string The ID of the application to whichthe campaign applies.

CreationDate string The date the campaign was createdin ISO 8601 format.

DefaultState CampaignState (p. 68) The status of the campaign's defaulttreatment. Only present for A/B testcampaigns.

Description string A description of the campaign.

HoldoutPercent integer The allocated percentage of endusers who will not receive messagesfrom this campaign.

Hook CampaignHook (p. 68) Campaign hook information.

Id string The unique campaign ID.

IsPaused boolean Indicates whether the campaign ispaused. A paused campaign doesnot send messages unless youresume it by setting IsPaused tofalse.

LastModifiedDate string The date the campaign was lastupdated in ISO 8601 format.

Limits CampaignLimits (p. 69) The campaign limits settings.

MessageConfiguration MessageConfiguration (p. 65) The message configuration settings.

Name string The custom name of the campaign.

Schedule Schedule (p. 67) The campaign schedule.

SegmentId string The ID of the segment to which thecampaign sends messages.

SegmentVersion integer The version of the segment to whichthe campaign sends messages.

State CampaignState (p. 68) The campaign status.

An A/B test campaign will have astatus of COMPLETED only whenall treatments have a status ofCOMPLETED.

64

Page 71: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

Version integer The campaign version number.

TreatmentResource

Attribute Type Description

Id string The unique treatment ID.

MessageConfiguration MessageConfiguration (p. 65) The message configuration settings.

Schedule Schedule (p. 67) The campaign schedule.

SizePercent integer The allocated percentage of usersfor this treatment.

State CampaignState (p. 68) The treatment status.

TreatmentDescription string A custom description for thetreatment.

TreatmentName string The custom name of a variation ofthe campaign used for A/B testing.

MessageConfiguration

Attribute Type Description

ADMMessage Message (p. 66) The message that the campaigndelivers to ADM channels. Overridesthe default message.

APNSMessage Message (p. 66) The message that the campaigndelivers to APNS channels. Overridesthe default message.

BaiduMessage Message (p. 66) The message that the campaigndelivers to Baidu channels. Overridesthe default message.

DefaultMessage Message (p. 66) The default message for allchannels.

EmailMessage CampaignEmailMessage (p. 67) The email message configuration.

GCMMessage Message (p. 66) The message that the campaigndelivers to GCM channels. Overridesthe default message.

SMSMessage CampaignSmsMessage (p. 67) The SMS message configuration.

65

Page 72: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Message

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP - Yourapp launches, or it becomes theforeground app if it has been sent tothe background. This is the defaultaction.

DEEP_LINK - Uses deep linkingfeatures in iOS and Android to openyour app and display a designateduser interface within the app.

URL - The default mobile browseron the user's device launches andopens a web page at the URL youspecify.

Body string The message body. Can include upto 140 characters.

ImageIconUrl string The URL that points to the iconimage for the push notification icon,for example, the app icon.

ImageSmallIconUrl string The URL that points to the smallicon image for the push notificationicon, for example, the app icon.

ImageUrl string The URL that points to an imageused in the push notification.

JsonBody string The JSON payload used for a silentpush.

MediaUrl string The URL that points to the mediaresource, for example a .mp4 or .giffile.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device.

Silent pushes can be used forRemote Configuration and PhoneHome use cases.

TimeToLive integer This parameter specifies how long(in seconds) the message shouldbe kept if the service is unable todeliver the notification the firsttime. If the value is 0, it treatsthe notification as if it expires

66

Page 73: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

immediately and does not store thenotification or attempt to redeliverit. This value is converted to theexpiration field when sent to theservice. It only applies to APNs andGCM

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

CampaignEmailMessage

Attribute Type Description

Body string The email text body.

FromAddress string The email address used to sendthe email from. Defaults to useFromAddress specified in the EmailChannel.

HtmlBody string The email html body.

Title string The email title (Or subject).

CampaignSmsMessage

Attribute Type Description

Body string The SMS text body.

MessageType string Is this is a transactional SMSmessage, otherwise a promotionalmessage.

SenderId string Sender ID of sent message.

Schedule

Attribute Type Description

EndTime string The scheduled time that thecampaign ends in ISO 8601 format.

Frequency string How often the campaign deliversmessages.

Valid values: ONCE, HOURLY, DAILY,WEEKLY, MONTHLY

67

Page 74: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

IsLocalTime boolean Indicates whether the campaignschedule takes effect according toeach user's local time.

QuietTime QuietTime (p. 68) The time during which the campaignsends no messages.

StartTime string The scheduled time that thecampaign begins in ISO 8601format.

Timezone string The starting UTC offset for theschedule if the value for isLocalTimeis true

Valid values: UTC UTC+01 UTC+02UTC+03 UTC+03:30 UTC+04 UTC+04:30 UTC+05 UTC+05:30 UTC+05:45 UTC+06 UTC+06:30 UTC+07UTC+08 UTC+09 UTC+09:30 UTC+10UTC+10:30 UTC+11 UTC+12 UTC+13 UTC-02 UTC-03 UTC-04 UTC-05UTC-06 UTC-07 UTC-08 UTC-09UTC-10 UTC-11

QuietTime

Attribute Type Description

End string The default end time for quiet timein ISO 8601 format.

Start string The default start time for quiet timein ISO 8601 format.

CampaignState

Attribute Type Description

CampaignStatus string The status of the campaign, or thestatus of a treatment that belongsto an A/B test campaign.

Valid values: SCHEDULED,EXECUTING, PENDING_NEXT_RUN,COMPLETED, PAUSED

CampaignHook

Attribute Type Description

LambdaFunctionName string Lambda function name or arn to becalled for delivery

68

Page 75: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceADM Channel

Attribute Type Description

Mode string What mode Lambda should beinvoked in.

WebUrl string Web URL to call for hook. If the URLhas authentication specified it willbe added as authentication to therequest

CampaignLimits

Attribute Type Description

Daily integer The maximum number of messagesthat each campaign can send to asingle endpoint in a 24-hour period.

MaximumDuration integer The length of time (in seconds) thatthe campaign can run before it endsand message deliveries stop. Thisduration begins at the scheduledstart time for the campaign. Theminimum value is 60.

MessagesPerSecond integer The number of messages that thecampaign can send per second.The minimum value is 50, and themaximum is 20000.

Total integer The maximum number of messagesthat an individual campaign cansend to a single endpoint over thecourse of the campaign.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

ADM ChannelUse the ADM channel to send push notifications through the Amazon Device Messaging (ADM) service.With this channel, you can send notifications to apps running on Amazon devices, such as Kindle Firetablets.

URI/v1/apps/application-id/channels/adm

69

Page 76: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

HTTP Methods

DELETEDelete an ADM channel.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 ADMChannelResponse (p. 72)

GETGet an ADM channel.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 ADMChannelResponse (p. 72)

PUTUpdate an ADM channel.

70

Page 77: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Body

Name Required Type

ADMChannelRequest true ADMChannelRequest (p. 72)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 ADMChannelResponse (p. 72)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 73) BadRequestException

403 MessageBody (p. 73) ForbiddenException

404 MessageBody (p. 73) NotFoundException

405 MessageBody (p. 73) MethodNotAllowedException

429 MessageBody (p. 73) TooManyRequestsException

500 MessageBody (p. 73) InternalServerErrorException

Schemas

Request Schemas

Example ADMChannelRequest

{ "ClientId": "string", "ClientSecret": "string",

71

Page 78: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"Enabled": true}

Response Schemas

Example ADMChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string"}

Example MessageBody

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

AttributesADMChannelRequest

Attribute Type Description

ClientId string The Client ID that you obtained fromthe Amazon App Distribution Portal.

ClientSecret string The Client Secret that you obtainedfrom the Amazon App DistributionPortal.

Enabled boolean Indicates whether or not the channelis enabled for sending messages.

ADMChannelResponse

Attribute Type Description

ApplicationId string The ID of the application to whichthe channel applies.

CreationDate string The date and time when thischannel was created.

Enabled boolean Indicates whether or not the channelis enabled for sending messages.

72

Page 79: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAPNs Channel

Attribute Type Description

HasCredential boolean Not used. Retained for backwardscompatibility.

Id string (Deprecated) An identifier for thechannel. Retained for backwardscompatibility.

IsArchived boolean Indicates whether or not the channelis archived.

LastModifiedBy string The user who last updated thischannel.

LastModifiedDate string The date and time when thischannel was last modified.

Platform string The platform type. For this channel,the value is always "ADM."

Version integer The channel version.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

APNs ChannelA channel defines the types of platforms to which you can deliver messages. Before you can use AmazonPinpoint to send messages using Apple Push Notification service (APNs), you must create an APNschannel. You can use this resource to create, update, look up, or delete an APNs channel.

URI/v1/apps/application-id/channels/apns

HTTP Methods

DELETEDeletes the APNs channel for an app.

Header

Name Required Type

accept false string

73

Page 80: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSChannelResponse (p. 76)

GET

Returns information about the APNs channel for an app.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSChannelResponse (p. 76)

PUT

Use to update the APNs channel for an app.

Body

Name Required Type

APNSChannelRequest true APNSChannelRequest (p. 76)

Header

Name Required Type

accept false string

74

Page 81: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSChannelResponse (p. 76)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 77) BadRequestException

403 MessageBody (p. 77) ForbiddenException

404 MessageBody (p. 77) NotFoundException

405 MessageBody (p. 77) MethodNotAllowedException

429 MessageBody (p. 77) TooManyRequestsException

500 MessageBody (p. 77) InternalServerErrorException

SchemasRequest SchemasExample APNSChannelRequest

{ "Certificate": "string", "PrivateKey": "string", "Enabled": true, "TokenKeyId": "string", "TeamId": "string", "TokenKey": "string", "BundleId": "string", "DefaultAuthenticationMethod": "string"}

Response SchemasExample APNSChannelResponse

{ "ApplicationId": "string", "IsArchived": true,

75

Page 82: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "HasTokenKey": true, "DefaultAuthenticationMethod": "string"}

Example MessageBody

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

AttributesAPNSChannelRequest

Attribute Type Description

BundleId string The bundle id used for APNs Tokens.

Certificate string The distribution certificate fromApple.

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

PrivateKey string The certificate private key.

TeamId string The team id used for APNs Tokens.

TokenKey string The token key used for APNs Tokens.

TokenKeyId string The token key used for APNs Tokens.

APNSChannelResponse

Attribute Type Description

ApplicationId string The ID of the application that thechannel applies to.

CreationDate string The date and time when thischannel was created.

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

76

Page 83: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAPNs Sandbox Channel

Attribute Type Description

HasCredential boolean Not used. Retained for backwardscompatibility.

HasTokenKey boolean Indicates whether the channel isconfigured with a key for APNstoken authentication. Provide atoken key by setting the TokenKeyattribute.

Id string (Deprecated) An identifier for thechannel. Retained for backwardscompatibility.

IsArchived boolean Indicates whether or not the channelis archived.

LastModifiedBy string The user who last updated thischannel.

LastModifiedDate string The date and time when thischannel was last modified.

Platform string The platform type. For this channel,the value is always "ADM."

Version integer The channel version.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

APNs Sandbox ChannelA channel defines the types of platforms to which you can deliver messages. Before you can use AmazonPinpoint to send messages to the Apple Push Notification service (APNs) sandbox environment, you mustcreate an APNs sandbox channel. You can use this resource to create, update, look up, or delete an APNssandbox channel.

URI/v1/apps/application-id/channels/apns_sandbox

HTTP Methods

DELETEDelete an APNS sandbox channel.

77

Page 84: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSSandboxChannelResponse (p. 80)

GET

Get an APNS sandbox channel.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSSandboxChannelResponse (p. 80)

PUT

Update an APNS sandbox channel.

Body

Name Required Type

APNSSandboxChannelRequest true APNSSandboxChannelRequest (p. 80)

78

Page 85: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSSandboxChannelResponse (p. 80)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 81) BadRequestException

403 MessageBody (p. 81) ForbiddenException

404 MessageBody (p. 81) NotFoundException

405 MessageBody (p. 81) MethodNotAllowedException

429 MessageBody (p. 81) TooManyRequestsException

500 MessageBody (p. 81) InternalServerErrorException

Schemas

Request Schemas

Example APNSSandboxChannelRequest

{ "Certificate": "string", "PrivateKey": "string", "Enabled": true, "TokenKeyId": "string", "TeamId": "string", "TokenKey": "string", "BundleId": "string", "DefaultAuthenticationMethod": "string"}

79

Page 86: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Response Schemas

Example APNSSandboxChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "HasTokenKey": true, "DefaultAuthenticationMethod": "string"}

Example MessageBody

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

AttributesAPNSSandboxChannelRequest

Attribute Type Description

BundleId string The bundle id used for APNs Tokens.

Certificate string The distribution certificate fromApple.

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

PrivateKey string The certificate private key.

TeamId string The team id used for APNs Tokens.

TokenKey string The token key used for APNs Tokens.

TokenKeyId string The token key used for APNs Tokens.

APNSSandboxChannelResponse

Attribute Type Description

ApplicationId string The ID of the application to whichthe channel applies.

80

Page 87: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAPNs VoIP Channel

Attribute Type Description

CreationDate string When was this segment created

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

HasCredential boolean Not used. Retained for backwardscompatibility.

HasTokenKey boolean Indicates whether the channel isconfigured with a key for APNstoken authentication. Provide atoken key by setting the TokenKeyattribute.

Id string Channel ID. Not used, only forbackwards compatibility.

IsArchived boolean Is this channel archived

LastModifiedBy string Who last updated this entry

LastModifiedDate string Last date this was updated

Platform string The platform type. Will beAPNS_SANDBOX.

Version integer Version of channel

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

APNs VoIP ChannelA channel defines the types of platforms to which you can deliver messages. Before you can use AmazonPinpoint to send VoIP push notifications using Apple Push Notification service (APNs), you must create anAPNs VoIP channel. You can use this resource to create, update, look up, or delete an APNs VoIP channel.

URI/v1/apps/application-id/channels/apns_voip

81

Page 88: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

HTTP Methods

DELETEDelete an APNS VoIP channel

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSVoipChannelResponse (p. 85)

GETGet an APNS VoIP channel

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSVoipChannelResponse (p. 85)

PUTUpdate an APNS VoIP channel

82

Page 89: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Body

Name Required Type

APNSVoipChannelRequest true APNSVoipChannelRequest (p. 84)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSVoipChannelResponse (p. 85)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 85) BadRequestException

403 MessageBody (p. 85) ForbiddenException

404 MessageBody (p. 85) NotFoundException

405 MessageBody (p. 85) MethodNotAllowedException

429 MessageBody (p. 85) TooManyRequestsException

500 MessageBody (p. 85) InternalServerErrorException

Schemas

Request Schemas

Example APNSVoipChannelRequest

{ "Certificate": "string", "PrivateKey": "string",

83

Page 90: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"Enabled": true, "TokenKeyId": "string", "TeamId": "string", "TokenKey": "string", "BundleId": "string", "DefaultAuthenticationMethod": "string"}

Response Schemas

Example APNSVoipChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "HasTokenKey": true, "DefaultAuthenticationMethod": "string"}

Example MessageBody

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

AttributesAPNSVoipChannelRequest

Attribute Type Description

BundleId string The bundle id used for APNs Tokens.

Certificate string The distribution certificate fromApple.

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

PrivateKey string The certificate private key.

TeamId string The team id used for APNs Tokens.

TokenKey string The token key used for APNs Tokens.

TokenKeyId string The token key used for APNs Tokens.

84

Page 91: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAPNs VoIP Sandbox Channel

APNSVoipChannelResponse

Attribute Type Description

ApplicationId string Application id

CreationDate string When was this segment created

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

HasCredential boolean Not used. Retained for backwardscompatibility.

HasTokenKey boolean If the channel is registered with atoken key for authentication.

Id string Channel ID. Not used, only forbackwards compatibility.

IsArchived boolean Is this channel archived

LastModifiedBy string Who made the last change

LastModifiedDate string Last date this was updated

Platform string The platform type. Will be APNS.

Version integer Version of channel

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

APNs VoIP Sandbox ChannelA channel defines the types of platforms to which you can deliver messages. Before you can useAmazon Pinpoint to send VoIP push notifications to the Apple Push Notification service (APNs) sandboxenvironment, you must create an APNs VoIP sandbox channel. You can use this resource to create,update, look up, or delete an APNs VoIP sandbox channel.

URI/v1/apps/application-id/channels/apns_voip_sandbox

85

Page 92: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

HTTP Methods

DELETEDelete an APNS VoIP sandbox channel

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSVoipSandboxChannelResponse (p. 89)

GETGet an APNS VoIPSandbox channel

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSVoipSandboxChannelResponse (p. 89)

PUTUpdate an APNS VoIP sandbox channel

86

Page 93: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Body

Name Required Type

APNSVoipSandboxChannelRequest true APNSVoipSandboxChannelRequest (p. 88)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 APNSVoipSandboxChannelResponse (p. 89)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 89) BadRequestException

403 MessageBody (p. 89) ForbiddenException

404 MessageBody (p. 89) NotFoundException

405 MessageBody (p. 89) MethodNotAllowedException

429 MessageBody (p. 89) TooManyRequestsException

500 MessageBody (p. 89) InternalServerErrorException

Schemas

Request Schemas

Example APNSVoipSandboxChannelRequest

{ "Certificate": "string", "PrivateKey": "string",

87

Page 94: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"Enabled": true, "TokenKeyId": "string", "TeamId": "string", "TokenKey": "string", "BundleId": "string", "DefaultAuthenticationMethod": "string"}

Response Schemas

Example APNSVoipSandboxChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "HasTokenKey": true, "DefaultAuthenticationMethod": "string"}

Example MessageBody

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

AttributesAPNSVoipSandboxChannelRequest

Attribute Type Description

BundleId string The bundle id used for APNs Tokens.

Certificate string The distribution certificate fromApple.

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

PrivateKey string The certificate private key.

TeamId string The team id used for APNs Tokens.

TokenKey string The token key used for APNs Tokens.

TokenKeyId string The token key used for APNs Tokens.

88

Page 95: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceBaidu Channel

APNSVoipSandboxChannelResponse

Attribute Type Description

ApplicationId string Application id

CreationDate string When was this segment created

DefaultAuthenticationMethod string The default authentication methodused for APNs.

Enabled boolean If the channel is enabled for sendingmessages.

HasCredential boolean Not used. Retained for backwardscompatibility.

HasTokenKey boolean If the channel is registered with atoken key for authentication.

Id string Channel ID. Not used, only forbackwards compatibility.

IsArchived boolean Is this channel archived

LastModifiedBy string Who made the last change

LastModifiedDate string Last date this was updated

Platform string The platform type. Will be APNS.

Version integer Version of channel

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Baidu ChannelUse the Baidu channel to send notifications through the Baidu Cloud Push service. Baidu is a Chinesecloud service.

URI/v1/apps/application-id/channels/baidu

HTTP MethodsDELETEDelete a BAIDU GCM channel

89

Page 96: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 BaiduChannelResponse (p. 92)

GET

Get a BAIDU GCM channel

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 BaiduChannelResponse (p. 92)

PUT

Update a BAIDU GCM channel

Body

Name Required Type

BaiduChannelRequest true BaiduChannelRequest (p. 92)

90

Page 97: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 BaiduChannelResponse (p. 92)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 93) BadRequestException

403 MessageBody (p. 93) ForbiddenException

404 MessageBody (p. 93) NotFoundException

405 MessageBody (p. 93) MethodNotAllowedException

429 MessageBody (p. 93) TooManyRequestsException

500 MessageBody (p. 93) InternalServerErrorException

SchemasRequest SchemasExample BaiduChannelRequest

{ "ApiKey": "string", "SecretKey": "string", "Enabled": true}

Response SchemasExample BaiduChannelResponse

{

91

Page 98: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "Credential": "string"}

Example MessageBody

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

AttributesBaiduChannelRequest

Attribute Type Description

ApiKey string Platform credential API key fromBaidu.

Enabled boolean If the channel is enabled for sendingmessages.

SecretKey string Platform credential Secret key fromBaidu.

BaiduChannelResponse

Attribute Type Description

ApplicationId string Application id

CreationDate string When was this segment created

Credential string The Baidu API key from Baidu.

Enabled boolean If the channel is enabled for sendingmessages.

HasCredential boolean Not used. Retained for backwardscompatibility.

Id string Channel ID. Not used, only forbackwards compatibility.

IsArchived boolean Is this channel archived

LastModifiedBy string Who made the last change

LastModifiedDate string Last date this was updated

92

Page 99: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceEmail Channel

Attribute Type Description

Platform string The platform type. Will be BAIDU

Version integer Version of channel

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Email ChannelA channel defines the types of platforms to which you can deliver messages. To send an email, you sendthe message through the email channel type. You can use this resource to create or update an emailchannel.

URI/v1/apps/application-id/channels/email

HTTP MethodsDELETEDelete an email channel.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 EmailChannelResponse (p. 96)

GETGet an email channel.

93

Page 100: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 EmailChannelResponse (p. 96)

PUT

Update an email channel.

Body

Name Required Type

EmailChannelRequest true EmailChannelRequest (p. 96)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 EmailChannelResponse (p. 96)

94

Page 101: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 97) BadRequestException

403 MessageBody (p. 97) ForbiddenException

404 MessageBody (p. 97) NotFoundException

405 MessageBody (p. 97) MethodNotAllowedException

429 MessageBody (p. 97) TooManyRequestsException

500 MessageBody (p. 97) InternalServerErrorException

SchemasRequest SchemasExample EmailChannelRequest

{ "Enabled": true, "Identity": "string", "FromAddress": "string", "RoleArn": "string"}

Response SchemasExample EmailChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "Identity": "string", "FromAddress": "string", "RoleArn": "string", "Platform": "string", "MessagesPerSecond": 0}

Example MessageBody

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

95

Page 102: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

AttributesEmailChannelRequest

Attribute Type Description

Enabled boolean If the channel is enabled for sendingmessages.

FromAddress string The email address used to sendemails from.

Identity string The ARN of an identity verified withSES.

RoleArn string The ARN of an IAM Role used tosubmit events to Mobile Analytics'event ingestion service

EmailChannelResponse

Attribute Type Description

ApplicationId string The unique ID of the application towhich the email channel belongs.

CreationDate string The date that the settings were lastupdated in ISO 8601 format.

Enabled boolean If the channel is enabled for sendingmessages.

FromAddress string The email address used to sendemails from.

HasCredential boolean Not used. Retained for backwardscompatibility.

Id string Channel ID. Not used, only forbackwards compatibility.

Identity string The ARN of an identity verified withSES.

IsArchived boolean Is this channel archived

LastModifiedBy string Who last updated this entry

LastModifiedDate string Last date this was updated

MessagesPerSecond integer Messages per second that can besent

Platform string Platform type. Will be "EMAIL"

RoleArn string The ARN of an IAM Role used tosubmit events to Mobile Analytics'event ingestion service

96

Page 103: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceGCM Channel

Attribute Type Description

Version integer Version of channel

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

GCM ChannelA channel defines the types of platforms to which you can deliver messages. To deliver a pushnotification to an Android device, you send the message through the Google Cloud Messaging (GCM)channel type. You can use this resource to create or update a GCM channel.

URI/v1/apps/application-id/channels/gcm

HTTP MethodsDELETEDeletes the GCM channel for an app.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 GCMChannelResponse (p. 100)

GETReturns information about the GCM channel for an app.

97

Page 104: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 GCMChannelResponse (p. 100)

PUT

Use to update the GCM channel for an app.

Body

Name Required Type

GCMChannelRequest true GCMChannelRequest (p. 100)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 GCMChannelResponse (p. 100)

98

Page 105: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 100) BadRequestException

403 MessageBody (p. 100) ForbiddenException

404 MessageBody (p. 100) NotFoundException

405 MessageBody (p. 100) MethodNotAllowedException

429 MessageBody (p. 100) TooManyRequestsException

500 MessageBody (p. 100) InternalServerErrorException

Schemas

Request Schemas

Example GCMChannelRequest

{ "ApiKey": "string", "Enabled": true}

Response Schemas

Example GCMChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "HasCredential": true, "Platform": "string", "Credential": "string"}

Example MessageBody

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

99

Page 106: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

AttributesGCMChannelRequest

Attribute Type Description

ApiKey string Platform credential API key fromGoogle.

Enabled boolean If the channel is enabled for sendingmessages.

GCMChannelResponse

Attribute Type Description

ApplicationId string The ID of the application to whichthe channel applies.

CreationDate string When was this segment created

Credential string The GCM API key from Google.

Enabled boolean If the channel is enabled for sendingmessages.

HasCredential boolean Not used. Retained for backwardscompatibility.

Id string Channel ID. Not used. Present onlyfor backwards compatibility.

IsArchived boolean Is this channel archived

LastModifiedBy string Who last updated this entry

LastModifiedDate string Last date this was updated

Platform string The platform type. Will be GCM

Version integer Version of channel

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

SMS ChannelA channel defines the types of platforms to which you can deliver messages. To send a text message, yousend the message through the SMS channel type. You can use this resource to create or update an SMSchannel.

100

Page 107: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceURI

URI/v1/apps/application-id/channels/sms

HTTP Methods

DELETE

Delete an SMS channel.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 SMSChannelResponse (p. 103)

GET

Get an SMS channel.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 SMSChannelResponse (p. 103)

101

Page 108: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

PUTUpdate an SMS channel.

Body

Name Required Type

SMSChannelRequest true SMSChannelRequest (p. 103)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 SMSChannelResponse (p. 103)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 104) BadRequestException

403 MessageBody (p. 104) ForbiddenException

404 MessageBody (p. 104) NotFoundException

405 MessageBody (p. 104) MethodNotAllowedException

429 MessageBody (p. 104) TooManyRequestsException

500 MessageBody (p. 104) InternalServerErrorException

SchemasRequest SchemasExample SMSChannelRequest

{

102

Page 109: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"Enabled": true, "ShortCode": "string", "SenderId": "string"}

Response SchemasExample SMSChannelResponse

{ "ApplicationId": "string", "IsArchived": true, "Version": 0, "CreationDate": "string", "LastModifiedDate": "string", "LastModifiedBy": "string", "Id": "string", "Enabled": true, "ShortCode": "string", "SenderId": "string", "Platform": "string", "PromotionalMessagesPerSecond": 0, "TransactionalMessagesPerSecond": 0}

Example MessageBody

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

AttributesSMSChannelRequest

Attribute Type Description

Enabled boolean If the channel is enabled for sendingmessages.

SenderId string Sender identifier of your messages.

ShortCode string ShortCode registered with phoneprovider.

SMSChannelResponse

Attribute Type Description

ApplicationId string The unique ID of the application towhich the SMS channel belongs.

CreationDate string The date that the settings were lastupdated in ISO 8601 format.

Enabled boolean If the channel is enabled for sendingmessages.

103

Page 110: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceEndpoints

Attribute Type Description

HasCredential boolean Not used. Retained for backwardscompatibility.

Id string Channel ID. Not used, only forbackwards compatibility.

IsArchived boolean Is this channel archived

LastModifiedBy string Who last updated this entry

LastModifiedDate string Last date this was updated

Platform string Platform type. Will be "SMS"

PromotionalMessagesPerSecond integer Promotional messages per secondthat can be sent

SenderId string Sender identifier of your messages.

ShortCode string The short code registered with thephone provider.

TransactionalMessagesPerSecond integer Transactional messages per secondthat can be sent

Version integer Version of channel

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

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

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

URI/v1/apps/application-id/endpoints

HTTP MethodsPUTUse to update a batch of endpoints.

104

Page 111: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Body

Name Required Type

EndpointBatchRequest true EndpointBatchRequest (p. 107)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

202 MessageBody (p. 110)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 110) BadRequestException

403 MessageBody (p. 110) ForbiddenException

404 MessageBody (p. 110) NotFoundException

405 MessageBody (p. 110) MethodNotAllowedException

429 MessageBody (p. 110) TooManyRequestsException

500 MessageBody (p. 110) InternalServerErrorException

Schemas

Request Schemas

Example EndpointBatchRequest

{ "Item": [ {

105

Page 112: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"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 SchemasExample MessageBody

{

106

Page 113: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"RequestID": "string", "Message": "string"}

AttributesEndpointBatchRequest

Attribute Type Description

Item array List of items to update. Maximum100 items

EndpointBatchItem

Attribute Type Description

Address string The destination for messages thatyou send to this endpoint. Theaddress varies by channel. Formobile push channels, use the tokenprovided by the push notificationservice, such as the APNs devicetoken or the FCM registration token.For the SMS channel, use a phonenumber in E.164 format, such as+12065550100. For the emailchannel, use an email address.

Attributes object Custom attributes that describethe endpoint by associating a namewith an array of values. For example,an attribute named "interests"might have the values ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create a segment of users toengage with a messaging campaign.

The following characters are notrecommended in attribute names:# : ? \ /. The Amazon Pinpointconsole does not display attributesthat include these characters in thename. This limitation does not applyto attribute values.

ChannelType string The channel type.

Valid values: GCM | APNS |APNS_SANDBOX | APNS_VOIP |APNS_VOIP_SANDBOX | ADM | SMS |EMAIL | BAIDU

Demographic EndpointDemographic (p. 108) The endpoint demographicattributes.

107

Page 114: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

EffectiveDate string The last time the endpoint wasupdated. Provided in ISO 8601format.

EndpointStatus string Unused.

Id string The unique Id for the Endpoint inthe batch.

Location EndpointLocation (p. 109) The endpoint location attributes.

Metrics object Custom metrics that your appreports to Amazon Pinpoint.

OptOut string Indicates whether a user has optedout of receiving messages with oneof the following values:

ALL - User has opted out of allmessages.

NONE - Users has not opted out andreceives all messages.

RequestId string The unique ID for the most recentrequest to update the endpoint.

User EndpointUser (p. 109) Custom user-specific attributesthat your app reports to AmazonPinpoint.

EndpointDemographic

Attribute Type Description

AppVersion string The version of the applicationassociated with the endpoint.

Locale string The endpoint locale in the followingformat: The ISO 639-1 alpha-2 code,followed by an underscore, followedby an ISO 3166-1 alpha-2 value.

Make string The manufacturer of the endpointdevice, such as Apple or Samsung.

Model string The model name or number of theendpoint device, such as iPhone.

ModelVersion string The model version of the endpointdevice.

Platform string The platform of the endpoint device,such as iOS or Android.

PlatformVersion string The platform version of theendpoint device.

108

Page 115: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

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 islocated.

Country string The two-letter code for the countryor region of the endpoint. Specifiedas an ISO 3166-1 alpha-2 code, suchas "US" for the United States.

Latitude number The latitude of the endpointlocation, rounded to one decimalplace.

Longitude number The longitude of the endpointlocation, rounded to one decimalplace.

PostalCode string The postal code or zip code of theendpoint.

Region string The region of the endpoint location.For example, in the United States,this corresponds to a state.

EndpointUser

Attribute Type Description

UserAttributes object Custom attributes that describe theuser by associating a name withan array of values. For example, anattribute named "interests" mighthave the following values: ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create segments.

The Amazon Pinpoint console can'tdisplay attribute names that includethe following characters: hash/pound sign (#), colon (:), questionmark (?), backslash (\), and forwardslash (/). For this reason, you shouldavoid using these characters in thenames of custom attributes.

UserId string The unique ID of the user.

109

Page 116: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceEndpoint

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

EndpointAn endpoint uniquely identifies a mobile device, email address, or phone number that can receive amessage. You can use this resource to look up, create, update, or delete an endpoint.

URI/v1/apps/application-id/endpoints/endpoint-id

HTTP MethodsDELETEDeletes an endpoint.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

endpoint-id true string

Response

Status Code Schema

202 EndpointResponse (p. 117)

GETReturns information about an endpoint.

Header

Name Required Type

accept false string

110

Page 117: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Path

Name Required Type

application-id true string

endpoint-id true string

Response

Status Code Schema

200 EndpointResponse (p. 117)

PUTCreates or updates an endpoint.

Body

Name Required Type

EndpointRequest true EndpointRequest (p. 114)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

endpoint-id true string

Response

Status Code Schema

202 MessageBody (p. 118)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 118) BadRequestException

403 MessageBody (p. 118) ForbiddenException

111

Page 118: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

404 MessageBody (p. 118) NotFoundException

405 MessageBody (p. 118) MethodNotAllowedException

429 MessageBody (p. 118) TooManyRequestsException

500 MessageBody (p. 118) InternalServerErrorException

Schemas

Request Schemas

Example EndpointRequest

{ "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": [

112

Page 119: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"string" ], "additionalProp2": [ "string" ], "additionalProp3": [ "string" ] } }}

Response SchemasExample EndpointResponse

{ "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": [

113

Page 120: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"string" ], "additionalProp3": [ "string" ] } }, "ApplicationId": "string", "Id": "string", "CohortId": "string", "CreationDate": "string"}

Example MessageBody

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

AttributesEndpointRequest

Attribute Type Description

Address string The destination for messages thatyou send to this endpoint. Theaddress varies by channel. Formobile push channels, use the tokenprovided by the push notificationservice, such as the APNs devicetoken or the FCM registration token.For the SMS channel, use a phonenumber in E.164 format, such as+12065550100. For the emailchannel, use an email address.

Attributes object Custom attributes that describethe endpoint by associating a namewith an array of values. For example,an attribute named "interests"might have the values ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create a segment of users toengage with a messaging campaign.

The following characters are notrecommended in attribute names:# : ? \ /. The Amazon Pinpointconsole does not display attributesthat include these characters in thename. This limitation does not applyto attribute values.

ChannelType string The channel type.

114

Page 121: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Valid values: GCM | APNS |APNS_SANDBOX | APNS_VOIP |APNS_VOIP_SANDBOX | ADM | SMS |EMAIL | BAIDU

Demographic EndpointDemographic (p. 115) Demographic attributes for theendpoint.

EffectiveDate string The date and time when theendpoint was updated, shown in ISO8601 format.

EndpointStatus string Unused.

Location EndpointLocation (p. 116) The endpoint location attributes.

Metrics object Custom metrics that your appreports to Amazon Pinpoint.

OptOut string Indicates whether a user has optedout of receiving messages with oneof the following values:

ALL - User has opted out of allmessages.

NONE - Users has not opted out andreceives all messages.

RequestId string The unique ID for the most recentrequest to update the endpoint.

User EndpointUser (p. 116) Custom user-specific attributesthat your app reports to AmazonPinpoint.

EndpointDemographic

Attribute Type Description

AppVersion string The version of the applicationassociated with the endpoint.

Locale string The endpoint locale in the followingformat: The ISO 639-1 alpha-2 code,followed by an underscore, followedby an ISO 3166-1 alpha-2 value.

Make string The manufacturer of the endpointdevice, such as Apple or Samsung.

Model string The model name or number of theendpoint device, such as iPhone.

ModelVersion string The model version of the endpointdevice.

115

Page 122: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Platform string The platform of the endpoint device,such as iOS or Android.

PlatformVersion string The platform version of theendpoint device.

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 islocated.

Country string The two-letter code for the countryor region of the endpoint. Specifiedas an ISO 3166-1 alpha-2 code, suchas "US" for the United States.

Latitude number The latitude of the endpointlocation, rounded to one decimalplace.

Longitude number The longitude of the endpointlocation, rounded to one decimalplace.

PostalCode string The postal code or zip code of theendpoint.

Region string The region of the endpoint location.For example, in the United States,this corresponds to a state.

EndpointUser

Attribute Type Description

UserAttributes object Custom attributes that describe theuser by associating a name withan array of values. For example, anattribute named "interests" mighthave the following values: ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create segments.

The Amazon Pinpoint console can'tdisplay attribute names that includethe following characters: hash/pound sign (#), colon (:), questionmark (?), backslash (\), and forward

116

Page 123: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

slash (/). For this reason, you shouldavoid using these characters in thenames of custom attributes.

UserId string The unique ID of the user.

EndpointResponse

Attribute Type Description

Address string The address of the endpoint asprovided by your push provider.For example, the DeviceToken orRegistrationId.

ApplicationId string The ID of the application that isassociated with the endpoint.

Attributes object Custom attributes that describe theendpoint by associating a name withan array of values. For example, anattribute named "interests" mighthave the following values: ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create segments.

The Amazon Pinpoint console can'tdisplay attribute names that includethe following characters: hash/pound sign (#), colon (:), questionmark (?), backslash (\), and forwardslash (/). For this reason, you shouldavoid using these characters in thenames of custom attributes.

ChannelType string The channel type.

Valid values: GCM | APNS |APNS_SANDBOX | APNS_VOIP |APNS_VOIP_SANDBOX | ADM | SMS |EMAIL | BAIDU

CohortId string A number from 0-99 that representsthe cohort the endpoint is assignedto. Endpoints are grouped intocohorts randomly, and each cohortcontains approximately 1 percent ofthe endpoints for an app. AmazonPinpoint assigns cohorts to theholdout or treatment allocations fora campaign.

CreationDate string The date and time when theendpoint was created, shown in ISO8601 format.

117

Page 124: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceEvents

Attribute Type Description

Demographic EndpointDemographic (p. 115) The endpoint demographicattributes.

EffectiveDate string The date and time when theendpoint was last updated, shown inISO 8601 format.

EndpointStatus string Unused.

Id string The unique ID that you assigned tothe endpoint. The ID should be aglobally unique identifier (GUID) toensure that it doesn't conflict withother endpoint IDs associated withthe application.

Location EndpointLocation (p. 116) The endpoint location attributes.

Metrics object Custom metrics that your appreports to Amazon Pinpoint.

OptOut string Indicates whether a user has optedout of receiving messages with oneof the following values:

ALL - User has opted out of allmessages.

NONE - Users has not opted out andreceives all messages.

RequestId string The unique ID for the most recentrequest to update the endpoint.

User EndpointUser (p. 116) Custom user-specific attributesthat your app reports to AmazonPinpoint.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

EventsIn Amazon Pinpoint, you can create events to keep track of how users interact with your app. Forexample, you can log interactions such as logins, account creations, and purchase attempts as events.

Use to this resource to record events for endpoints. This method creates events and creates or updatesthe endpoints that those events are associated with.

118

Page 125: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceURI

URI/v1/apps/application-id/events

HTTP Methods

POSTUse to record events for endpoints. This method creates events and creates or updates the endpointsthat those events are associated with.

Body

Name Required Type

EventsRequest true EventsRequest (p. 122)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

202 EventsResponse (p. 125)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 126) BadRequestException

403 MessageBody (p. 126) ForbiddenException

404 MessageBody (p. 126) NotFoundException

405 MessageBody (p. 126) MethodNotAllowedException

429 MessageBody (p. 126) TooManyRequestsException

500 MessageBody (p. 126) InternalServerErrorException

119

Page 126: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Schemas

Request Schemas

Example EventsRequest

{ "EventsRequest":{ "EventsBatch":{ "BatchItem":{ "EndpointId":{ "Endpoint":{ "ChannelType":"string", "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":{ "attributeKey1":[ "string" ], "attributeKey2":[ "string" ] }, "User":{ "UserId":"string", "Attributes":{ "userAttributeKey1":[ "string" ], "userAttributeKey2":[ "string" ] } } }, "Events":{ "EventId":{ "EventType":"string", "ClientSdkVersion":"string", "Timestamp":"string", "Version":"string", "Attributes":{

120

Page 127: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"eventAttributeKey1":"string", "eventAttributeKey2":"string" }, "Metrics":{ "metricName":0 }, "Session":{ "Id":"string", "Duration":0, "StartTimestamp":"string", "EndTimestamp":"string" } } } } } } }}

Response Schemas

Example EventsResponse

{ "EventsResponse":{ "Results":{ "EndpointId1":{ "EndpointItemResponse":{ "Message":"string", "StatusCode":202 }, "EventsItemResponse":{ "EventId1":{ "Message":"string", "StatusCode":202 } } }, "EndpointId2":{ "EndpointItemResponse":{ "Message":"string", "StatusCode":202 }, "EventsItemResponse":{ "EventId1":{ "Message":"string", "StatusCode":202 }, "EventId2":{ "Message":"string", "StatusCode":400 } } } } }}

Example MessageBody

{

121

Page 128: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"RequestID": "string", "Message": "string"}

AttributesEventsRequest

Attribute Type Description

BatchItem object A batch of events to process. EachBatchItem consists of an endpointID as the key, and an EventsBatchobject as the value.

EventsBatch

Attribute Type Description

Endpoint PublicEndpoint (p. 122) The PublicEndpoint attached to theEndpointId from the request.

Events object An object that contains a set ofevents associated with the endpoint.

PublicEndpoint

Attribute Type Description

Address string The unique identifier for therecipient. For example, an addresscould be a device token, emailaddress, or mobile phone number.

Attributes object Custom attributes that your appreports to Amazon Pinpoint. Youcan use these attributes as selectioncriteria when you create a segment.

ChannelType string The channel type.

Valid values: APNS, GCM

Demographic EndpointDemographic (p. 123) The endpoint demographicattributes.

EffectiveDate string The date and time when theendpoint was last updated, in ISO8601 format.

EndpointStatus string The status of the endpoint. If theupdate fails, the value is INACTIVE. Ifthe endpoint is updated successfully,the value is ACTIVE.

Location EndpointLocation (p. 124) The endpoint location attributes.

122

Page 129: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Metrics object Custom metrics that your appreports to Amazon Pinpoint.

OptOut string Indicates whether a user has optedout of receiving messages with oneof the following values:

ALL - User has opted out of allmessages.

NONE - Users has not opted out andreceives all messages.

RequestId string A unique identifier that is generatedeach time the endpoint is updated.

User EndpointUser (p. 124) Custom user-specific attributesthat your app reports to AmazonPinpoint.

EndpointDemographic

Attribute Type Description

AppVersion string The version of the applicationassociated with the endpoint.

Locale string The endpoint locale in the followingformat: The ISO 639-1 alpha-2 code,followed by an underscore, followedby an ISO 3166-1 alpha-2 value.

Make string The manufacturer of the endpointdevice, such as Apple or Samsung.

Model string The model name or number of theendpoint device, such as iPhone.

ModelVersion string The model version of the endpointdevice.

Platform string The platform of the endpoint device,such as iOS or Android.

PlatformVersion string The platform version of theendpoint device.

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

123

Page 130: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

EndpointLocation

Attribute Type Description

City string The city where the endpoint islocated.

Country string The two-letter code for the countryor region of the endpoint. Specifiedas an ISO 3166-1 alpha-2 code, suchas "US" for the United States.

Latitude number The latitude of the endpointlocation, rounded to one decimalplace.

Longitude number The longitude of the endpointlocation, rounded to one decimalplace.

PostalCode string The postal code or zip code of theendpoint.

Region string The region of the endpoint location.For example, in the United States,this corresponds to a state.

EndpointUser

Attribute Type Description

UserAttributes object Custom attributes that describe theuser by associating a name withan array of values. For example, anattribute named "interests" mighthave the following values: ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create segments.

The Amazon Pinpoint console can'tdisplay attribute names that includethe following characters: hash/pound sign (#), colon (:), questionmark (?), backslash (\), and forwardslash (/). For this reason, you shouldavoid using these characters in thenames of custom attributes.

UserId string The unique ID of the user.

124

Page 131: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Event

Attribute Type Description

Attributes object Custom attributes that areassociated with the event you'readding or updating.

ClientSdkVersion string The version of the SDK that'srunning on the client device.

EventType string The name of the custom event thatyou're recording.

Metrics object Custom metrics related to the event.

Session Session (p. 125) Information about the session inwhich the event occurred.

Timestamp string The date and time when the eventoccurred, in ISO 8601 format.

Session

Attribute Type Description

Duration integer The duration of the session, inmilliseconds.

Id string A unique identifier for the session.

StartTimestamp string The date and time when the sessionbegan.

StopTimestamp string The date and time when the sessionended.

EventsResponse

Attribute Type Description

Results object A map that contains a multipartresponse for each endpoint. Eachitem in this object uses the endpointID as the key, and the item responseas the value.

If no item response exists, the valuecan also be one of the following:202 (if the request was processedsuccessfully) or 400 (if the payloadwas invalid, or required fields weremissing).

125

Page 132: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceEvent Stream

ItemResponse

Attribute Type Description

EndpointItemResponse EndpointItemResponse (p. 126) The response received after theendpoint was accepted.

EventsItemResponse object A multipart response object thatcontains a key and value for eachevent ID in the request. In eachobject, the event ID is the key, andan EventItemResponse object is thevalue.

EndpointItemResponse

Attribute Type Description

Message string A custom message associated withthe registration of an endpointwhen issuing a response.

StatusCode integer The status code associated withthe merging of an endpoint whenissuing a response.

EventItemResponse

Attribute Type Description

Message string A custom message that is associatedwith the processing of an event.

StatusCode integer The status returned in the responseas a result of processing the event.

Possible values: 400 (for invalidevents) and 202 (for events thatwere accepted).

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Event StreamUse this resource to configure Amazon Pinpoint to stream events to Amazon Kinesis. Amazon Pinpointcan send events to an Amazon Kinesis stream or an Amazon Kinesis Firehose delivery stream. Bystreaming your events, you enable more flexible options for analysis and storage. You can use thisresource to look up, create, update, or delete an event stream.

126

Page 133: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceURI

You can configure only 1 event stream for each Amazon Pinpoint app. To combine data from multipleapps, configure each app to use the same stream.

URI/v1/apps/application-id/eventstream

HTTP MethodsDELETEDeletes the event stream for an app.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 EventStream (p. 129)

GETReturns the event stream for an app.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 EventStream (p. 129)

127

Page 134: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

POSTUse to create or update the event stream for an app.

Body

Name Required Type

WriteEventStream true WriteEventStream (p. 129)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 EventStream (p. 129)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 130) BadRequestException

403 MessageBody (p. 130) ForbiddenException

404 MessageBody (p. 130) NotFoundException

405 MessageBody (p. 130) MethodNotAllowedException

429 MessageBody (p. 130) TooManyRequestsException

500 MessageBody (p. 130) InternalServerErrorException

SchemasRequest SchemasExample WriteEventStream

{

128

Page 135: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"DestinationStreamArn": "string", "RoleArn": "string"}

Response SchemasExample EventStream

{ "ApplicationId": "string", "DestinationStreamArn": "string", "RoleArn": "string", "ExternalId": "string", "LastModifiedDate": "string", "LastUpdatedBy": "string"}

Example MessageBody

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

AttributesWriteEventStream

Attribute Type Description

DestinationStreamArn string The Amazon Resource Name(ARN) of the Amazon Kinesisstream or Firehose deliverystream to which you want topublish events. Firehose ARN:arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN:arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME

RoleArn string The IAM role that authorizesAmazon Pinpoint to publish eventsto the stream in your account.

EventStream

Attribute Type Description

ApplicationId string The ID of the application from whichevents should be published.

DestinationStreamArn string The Amazon Resource Name(ARN) of the Amazon Kinesisstream or Firehose deliverystream to which you want topublish events. Firehose ARN:

129

Page 136: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceExport Jobs

Attribute Type Description

arn:aws:firehose:REGION:ACCOUNT_ID:deliverystream/STREAM_NAME Kinesis ARN:arn:aws:kinesis:REGION:ACCOUNT_ID:stream/STREAM_NAME

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

LastModifiedDate string The date the event stream was lastupdated in ISO 8601 format.

LastUpdatedBy string The IAM user who last modified theevent stream.

RoleArn string The IAM role that authorizesAmazon Pinpoint to publish eventsto the stream in your account.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Export JobsRepresents jobs that export endpoint definitions to an Amazon S3 bucket. You can use this resource tocreate export jobs, check the status of an in-progress export job, and access the history of your exportjobs.

You can export all of the endpoints that are assigned to an application, or you can export the subset ofendpoints that belong to a segment.

URI/v1/apps/application-id/jobs/export

HTTP Methods

GETReturns information about your export jobs.

130

Page 137: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 ExportJobsResponse (p. 134)

POSTCreates an export job.

Body

Name Required Type

ExportJobRequest true ExportJobRequest (p. 133)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

202 ExportJobResponse (p. 134)

131

Page 138: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 135) BadRequestException

403 MessageBody (p. 135) ForbiddenException

404 MessageBody (p. 135) NotFoundException

405 MessageBody (p. 135) MethodNotAllowedException

429 MessageBody (p. 135) TooManyRequestsException

500 MessageBody (p. 135) InternalServerErrorException

SchemasRequest SchemasExample ExportJobRequest

{ "SegmentId": "string", "S3UrlPrefix": "string", "RoleArn": "string"}

Response SchemasExample ExportJobsResponse

{ "Item": [ { "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "SegmentId": "string", "S3UrlPrefix": "string", "RoleArn": "string" } } ], "NextToken": "string"

132

Page 139: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

}

Example ExportJobResponse

{ "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "SegmentId": "string", "S3UrlPrefix": "string", "RoleArn": "string" }}

Example MessageBody

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

AttributesExportJobRequest

Attribute Type Description

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the AmazonS3 location that endpoints will beexported to.

S3UrlPrefix string A URL that points to the locationwithin an Amazon S3 bucket thatwill receive the export. The locationis typically a folder with multiplefiles.

The URL should follow this format:s3://bucket-name/folder-name/

Amazon Pinpoint will exportendpoints to this location.

SegmentId string The ID of the segment to exportendpoints from. If not present,

133

Page 140: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Amazon Pinpoint exports all ofthe endpoints that belong to theapplication.

SegmentVersion integer The version of the segment toexport if specified.

ExportJobsResponse

Attribute Type Description

Item array A list of export jobs for theapplication.

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

ExportJobResponse

Attribute Type Description

ApplicationId string The unique ID of the applicationassociated with the export job.

CompletedPieces integer The number of pieces that havesuccessfully completed as of thetime of the request.

CompletionDate string The date the job completed in ISO8601 format.

CreationDate string The date the job was created in ISO8601 format.

Definition ExportJobResource (p. 135) The export job settings.

FailedPieces integer The number of pieces that failed tobe processed as of the time of therequest.

Failures array Provides up to 100 of the first failedentries for the job, if any exist.

Id string The unique ID of the job.

JobStatus string The status of the job. Validvalues: CREATED, INITIALIZING,PROCESSING, COMPLETING,COMPLETED, FAILING, FAILED

The job status is FAILED if one ormore pieces failed.

134

Page 141: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

TotalFailures integer The number of endpoints that werenot processed; for example, becauseof syntax errors.

TotalPieces integer The total number of pieces thatmust be processed to finish the job.Each piece is an approximately equalportion of the endpoints.

TotalProcessed integer The number of endpoints that wereprocessed by the job.

Type string The job type. Will be 'EXPORT'.

ExportJobResource

Attribute Type Description

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the AmazonS3 location that endpoints will beexported to.

S3UrlPrefix string A URL that points to the locationwithin an Amazon S3 bucket thatwill receive the export. The locationis typically a folder with multiplefiles.

The URL should follow this format:s3://bucket-name/folder-name/

Amazon Pinpoint will exportendpoints to this location.

SegmentId string The ID of the segment to exportendpoints from. If not present,Amazon Pinpoint exports all ofthe endpoints that belong to theapplication.

SegmentVersion integer The version of the segment toexport if specified.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

135

Page 142: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceExport Job

Export JobRepresents a job that exports endpoint definitions to an Amazon S3 bucket. You can use this resource tolook up an export job.

URI/v1/apps/application-id/jobs/export/job-id

HTTP Methods

GETReturns information about an export job.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

job-id true string

Response

Status Code Schema

200 ExportJobResponse (p. 137)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 139) BadRequestException

403 MessageBody (p. 139) ForbiddenException

404 MessageBody (p. 139) NotFoundException

405 MessageBody (p. 139) MethodNotAllowedException

429 MessageBody (p. 139) TooManyRequestsException

500 MessageBody (p. 139) InternalServerErrorException

136

Page 143: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

SchemasResponse SchemasExample ExportJobResponse

{ "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "SegmentId": "string", "S3UrlPrefix": "string", "RoleArn": "string" }}

Example MessageBody

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

AttributesExportJobResponse

Attribute Type Description

ApplicationId string The unique ID of the applicationassociated with the export job.

CompletedPieces integer The number of pieces that havesuccessfully completed as of thetime of the request.

CompletionDate string The date the job completed in ISO8601 format.

CreationDate string The date the job was created in ISO8601 format.

Definition ExportJobResource (p. 138) The export job settings.

FailedPieces integer The number of pieces that failed tobe processed as of the time of therequest.

137

Page 144: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Failures array Provides up to 100 of the first failedentries for the job, if any exist.

Id string The unique ID of the job.

JobStatus string The status of the job. Validvalues: CREATED, INITIALIZING,PROCESSING, COMPLETING,COMPLETED, FAILING, FAILED

The job status is FAILED if one ormore pieces failed.

TotalFailures integer The number of endpoints that werenot processed; for example, becauseof syntax errors.

TotalPieces integer The total number of pieces thatmust be processed to finish the job.Each piece is an approximately equalportion of the endpoints.

TotalProcessed integer The number of endpoints that wereprocessed by the job.

Type string The job type. Will be 'EXPORT'.

ExportJobResource

Attribute Type Description

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the AmazonS3 location that endpoints will beexported to.

S3UrlPrefix string A URL that points to the locationwithin an Amazon S3 bucket thatwill receive the export. The locationis typically a folder with multiplefiles.

The URL should follow this format:s3://bucket-name/folder-name/

Amazon Pinpoint will exportendpoints to this location.

SegmentId string The ID of the segment to exportendpoints from. If not present,Amazon Pinpoint exports all ofthe endpoints that belong to theapplication.

138

Page 145: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceImport Jobs

Attribute Type Description

SegmentVersion integer The version of the segment toexport if specified.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Import JobsRepresents jobs that import endpoint definitions from an Amazon S3 bucket. You can use this resourceto create import jobs, check the status of an in-progress import job, and access the history of yourimport jobs.

You can use an import job to create a segment by importing the endpoint definitions that belong to thesegment. Creating segments with import jobs is useful if you have segments for your users outside ofAmazon Pinpoint but you want to engage your users with Amazon Pinpoint campaigns.

URI/v1/apps/application-id/jobs/import

HTTP MethodsGETReturns information about your import jobs.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Query

Name Required Type

page-size false string

139

Page 146: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Name Required Type

token false string

Response

Status Code Schema

200 ImportJobsResponse (p. 143)

POSTCreates or updates an import job.

Body

Name Required Type

ImportJobRequest true ImportJobRequest (p. 142)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

201 ImportJobResponse (p. 143)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 145) BadRequestException

403 MessageBody (p. 145) ForbiddenException

404 MessageBody (p. 145) NotFoundException

405 MessageBody (p. 145) MethodNotAllowedException

140

Page 147: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

429 MessageBody (p. 145) TooManyRequestsException

500 MessageBody (p. 145) InternalServerErrorException

Schemas

Request Schemas

Example ImportJobRequest

{ "S3Url": "string", "RoleArn": "string", "Format": "CSV", "RegisterEndpoints": true, "DefineSegment": true, "SegmentName": "string", "SegmentId": "string"}

Response Schemas

Example ImportJobsResponse

{ "Item": [ { "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "RegisterEndpoints": true, "DefineSegment": true, "SegmentName": "string", "SegmentId": "string" } } ], "NextToken": "string"}

141

Page 148: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Example ImportJobResponse

{ "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "RegisterEndpoints": true, "DefineSegment": true, "SegmentName": "string", "SegmentId": "string" }}

Example MessageBody

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

AttributesImportJobRequest

Attribute Type Description

DefineSegment boolean Sets whether the endpoints create asegment when they are imported.

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the files that containthe endpoint definitions. Validvalues: CSV, JSON

142

Page 149: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

RegisterEndpoints boolean Sets whether the endpoints areregistered with Amazon Pinpointwhen they are imported.

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the Amazon S3location that contains the endpointsto import.

S3Url string The URL of the S3 bucket thatcontains the segment information toimport. The location can be a folderor a single file. The URL should usethe following format: s3://bucket-name/folder-name/file-name

Amazon Pinpoint imports endpointsfrom this location and anysubfolders it contains.

SegmentId string The ID of the segment to update ifthe import job is meant to updatean existing segment.

SegmentName string A custom name for the segmentcreated by the import job. Use ifDefineSegment is true.

ImportJobsResponse

Attribute Type Description

Item array A list of import jobs for theapplication.

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

ImportJobResponse

Attribute Type Description

ApplicationId string The unique ID of the application towhich the import job applies.

CompletedPieces integer The number of pieces that havesuccessfully imported as of the timeof the request.

CompletionDate string The date the import job completedin ISO 8601 format.

143

Page 150: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

CreationDate string The date the import job was createdin ISO 8601 format.

Definition ImportJobResource (p. 144) The import job settings.

FailedPieces integer The number of pieces that havefailed to import as of the time of therequest.

Failures array Provides up to 100 of the first failedentries for the job, if any exist.

Id string The unique ID of the import job.

JobStatus string The status of the import job. Validvalues: CREATED, INITIALIZING,PROCESSING, COMPLETING,COMPLETED, FAILING, FAILED

The job status is FAILED if one ormore pieces failed to import.

TotalFailures integer The number of endpoints that failedto import; for example, because ofsyntax errors.

TotalPieces integer The total number of pieces thatmust be imported to finish the job.Each piece is an approximately equalportion of the endpoints to import.

TotalProcessed integer The number of endpoints that wereprocessed by the import job.

Type string The job type. Will be Import.

ImportJobResource

Attribute Type Description

DefineSegment boolean Sets whether the endpoints create asegment when they are imported.

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the files that containthe endpoint definitions. Validvalues: CSV, JSON

144

Page 151: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceImport Job

Attribute Type Description

RegisterEndpoints boolean Sets whether the endpoints areregistered with Amazon Pinpointwhen they are imported.

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the Amazon S3location that contains the endpointsto import.

S3Url string The URL of the S3 bucket thatcontains the segment information toimport. The location can be a folderor a single file. The URL should usethe following format: s3://bucket-name/folder-name/file-name

Amazon Pinpoint imports endpointsfrom this location and anysubfolders it contains.

SegmentId string The ID of the segment to update ifthe import job is meant to updatean existing segment.

SegmentName string A custom name for the segmentcreated by the import job. Use ifDefineSegment is true.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Import JobRepresents a job that imports endpoint definitions from an Amazon S3 bucket. You can use this resourceto look up an import job.

URI/v1/apps/application-id/jobs/import/job-id

HTTP MethodsGETReturns information about an import job.

145

Page 152: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

job-id true string

Response

Status Code Schema

200 ImportJobResponse (p. 147)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 149) BadRequestException

403 MessageBody (p. 149) ForbiddenException

404 MessageBody (p. 149) NotFoundException

405 MessageBody (p. 149) MethodNotAllowedException

429 MessageBody (p. 149) TooManyRequestsException

500 MessageBody (p. 149) InternalServerErrorException

SchemasResponse SchemasExample ImportJobResponse

{ "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0,

146

Page 153: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "RegisterEndpoints": true, "DefineSegment": true, "SegmentName": "string", "SegmentId": "string" }}

Example MessageBody

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

AttributesImportJobResponse

Attribute Type Description

ApplicationId string The unique ID of the application towhich the import job applies.

CompletedPieces integer The number of pieces that havesuccessfully imported as of the timeof the request.

CompletionDate string The date the import job completedin ISO 8601 format.

CreationDate string The date the import job was createdin ISO 8601 format.

Definition ImportJobResource (p. 148) The import job settings.

FailedPieces integer The number of pieces that havefailed to import as of the time of therequest.

Failures array Provides up to 100 of the first failedentries for the job, if any exist.

Id string The unique ID of the import job.

JobStatus string The status of the import job. Validvalues: CREATED, INITIALIZING,PROCESSING, COMPLETING,COMPLETED, FAILING, FAILED

The job status is FAILED if one ormore pieces failed to import.

147

Page 154: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

TotalFailures integer The number of endpoints that failedto import; for example, because ofsyntax errors.

TotalPieces integer The total number of pieces thatmust be imported to finish the job.Each piece is an approximately equalportion of the endpoints to import.

TotalProcessed integer The number of endpoints that wereprocessed by the import job.

Type string The job type. Will be Import.

ImportJobResource

Attribute Type Description

DefineSegment boolean Sets whether the endpoints create asegment when they are imported.

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the files that containthe endpoint definitions. Validvalues: CSV, JSON

RegisterEndpoints boolean Sets whether the endpoints areregistered with Amazon Pinpointwhen they are imported.

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the Amazon S3location that contains the endpointsto import.

S3Url string The URL of the S3 bucket thatcontains the segment information toimport. The location can be a folderor a single file. The URL should usethe following format: s3://bucket-name/folder-name/file-name

Amazon Pinpoint imports endpointsfrom this location and anysubfolders it contains.

148

Page 155: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceMessages

Attribute Type Description

SegmentId string The ID of the segment to update ifthe import job is meant to updatean existing segment.

SegmentName string A custom name for the segmentcreated by the import job. Use ifDefineSegment is true.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

MessagesUse this resource to send a direct message. A direct message is a one time message that you send to alimited audience without creating a campaign first.

You can send a direct message to up to 100 recipients. You can't send a direct message to a segment.When you send the message, Amazon Pinpoint delivers it immediately. You can't schedule the delivery ofdirect messages. If you want to send a message to a segment, or if you want to schedule a message to besent at a certain time, you should create a campaign rather than sending a direct message.

You can send a direct message as a push notification to users of your mobile app, or as an SMS messageto SMS-enabled devices. You can't use the email channel to send direct messages.

URI/v1/apps/application-id/messages

HTTP MethodsPOSTUsed to send a direct message.

Body

Name Required Type

MessageRequest true MessageRequest (p. 152)

Header

Name Required Type

accept false string

149

Page 156: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 MessageResponse (p. 164)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 167) BadRequestException

403 MessageBody (p. 167) ForbiddenException

404 MessageBody (p. 167) NotFoundException

405 MessageBody (p. 167) MethodNotAllowedException

429 MessageBody (p. 167) TooManyRequestsException

500 MessageBody (p. 167) InternalServerErrorException

SchemasRequest SchemasExample MessageRequest

{ "Context": {}, "MessageConfiguration": { "DefaultMessage": { "Body": "string", "Substitutions": {} }, "DefaultPushNotificationMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {} }, "APNSMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP",

150

Page 157: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Url": "string", "SilentPush": true, "Data": {}, "MediaUrl": "string", "Sound": "string", "Badge": 0, "Category": "string", "ThreadId": "string", "RawContent": "string", "PreferredAuthenticationMethod": "string", "TimeToLive": 0, "Priority": "string", "CollapseId": "string" }, "GCMMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {}, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "CollapseKey": "string", "RestrictedPackageName": "string", "TimeToLive": 0, "Priority": "string" }, "BaiduMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {}, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {}, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "ConsolidationKey": "string", "ExpiresAfter": "string", "MD5": "string"

151

Page 158: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

}, "SMSMessage": { "Body": "string", "Substitutions": {}, "SenderId": "string", "MessageType": "TRANSACTIONAL", "Keyword": "string", "OriginationNumber": "string" } }, "Addresses": {}, "Endpoints": {}}

Response SchemasExample MessageResponse

{ "RequestId": "string", "EndpointResult": {}, "ApplicationId": "string", "Result": {}}

Example MessageBody

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

AttributesMessageRequest

Attribute Type Description

Addresses object A map of key-value pairs, whereeach key is an address and eachvalue is an AddressConfigurationobject. An address can be a pushnotification token, a phone number,or an email address.

Context object A map of custom attributes toattributes to be attached tothe message. This payload isadded to the push notification's'data.pinpoint' object or added tothe email/sms delivery receipt eventattributes.

Endpoints object A map of key-value pairs,where each key is an endpointID and each value is anEndpointSendConfigurationobject. Within an

152

Page 159: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

EndpointSendConfiguration object,you can tailor the message for anendpoint by specifying messageoverrides or substitutions.

MessageConfiguration DirectMessageConfiguration (p. 154) Message configuration.

TraceId string A unique ID that you can use totrace a message. This ID is visible torecipients.

AddressConfiguration

Attribute Type Description

BodyOverride string Body override. If specified willoverride default body.

ChannelType string The channel type.

Valid values: GCM | APNS |APNS_SANDBOX | APNS_VOIP |APNS_VOIP_SANDBOX | ADM | SMS |EMAIL | BAIDU

Context object A map of custom attributes toattributes to be attached to themessage for this address. Thispayload is added to the pushnotification's 'data.pinpoint' objector added to the email/sms deliveryreceipt event attributes.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

Substitutions object A map of substitution values forthe message to be merged withthe DefaultMessage's substitutions.Substitutions on this map takeprecedence over the all othersubstitutions.

TitleOverride string Title override. If specified willoverride default title if applicable.

EndpointSendConfiguration

Attribute Type Description

BodyOverride string Body override. If specified willoverride default body.

Context object A map of custom attributes toattributes to be attached to the

153

Page 160: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

message for this address. Thispayload is added to the pushnotification's 'data.pinpoint' objector added to the email/sms deliveryreceipt event attributes.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

Substitutions object A map of substitution values forthe message to be merged withthe DefaultMessage's substitutions.Substitutions on this map takeprecedence over the all othersubstitutions.

TitleOverride string Title override. If specified willoverride default title if applicable.

DirectMessageConfiguration

Attribute Type Description

ADMMessage ADMMessage (p. 154) The message to ADM channels.Overrides the default pushnotification message.

APNSMessage APNSMessage (p. 156) The message to APNS channels.Overrides the default pushnotification message.

BaiduMessage BaiduMessage (p. 159) The message to Baidu GCMchannels. Overrides the default pushnotification message.

DefaultMessage DefaultMessage (p. 161) The default message for allchannels.

DefaultPushNotificationMessage DefaultPushNotificationMessage (p. 161)The default push notificationmessage for all push channels.

GCMMessage GCMMessage (p. 162) The message to GCM channels.Overrides the default pushnotification message.

SMSMessage SMSMessage (p. 164) The message to SMS channels.Overrides the default message.

ADMMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -

154

Page 161: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Body string The message body of thenotification.

ConsolidationKey string Optional. Arbitrary string usedto indicate multiple messagesare logically the same and thatADM is allowed to drop previouslyenqueued messages in favor of thisone.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

ExpiresAfter string Optional. Number of seconds ADMshould retain the message if thedevice is offline

IconReference string The icon image name of the assetsaved in your application.

ImageIconUrl string The URL that points to an imageused as the large icon to thenotification content view.

ImageUrl string The URL that points to an imageused in the push notification.

MD5 string Optional. Base-64-encoded MD5checksum of the data parameter.Used to verify data integrity

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

155

Page 162: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

SmallImageIconUrl string The URL that points to an imageused as the small icon for thenotification which will be used torepresent the notification in thestatus bar and content view

Sound string Indicates a sound to play when thedevice receives the notification.Supports default, or the filenameof a sound resource bundled in theapp. Android sound files must residein /res/raw/

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

APNSMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Badge integer Include this key when you want thesystem to modify the badge of yourapp icon. If this key is not includedin the dictionary, the badge is notchanged. To remove the badge, setthe value of this key to 0.

Body string The message body of thenotification.

156

Page 163: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Category string Provide this key with a string valuethat represents the notification'stype. This value corresponds tothe value in the identifier propertyof one of your app's registeredcategories.

CollapseId string An ID that, if assigned to multiplemessages, causes APNs to coalescethe messages into a single pushnotification instead of deliveringeach message individually. The valuemust not exceed 64 bytes. AmazonPinpoint uses this value to set theapns-collapse-id request headerwhen it sends the message to APNs.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

MediaUrl string The URL that points to a video usedin the push notification.

PreferredAuthenticationMethod string The preferred authenticationmethod, either "CERTIFICATE" or"TOKEN"

157

Page 164: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Priority string The message priority. AmazonPinpoint uses this value to set theapns-priority request header when itsends the message to APNs. Acceptsthe following values:

"5" - Low priority. Messages mightbe delayed, delivered in groups, andthrottled.

"10" - High priority. Messages aresent immediately. High prioritymessages must cause an alert,sound, or badge on the receivingdevice.

The default value is "10".

The equivalent values for FCM orGCM messages are "normal" and"high". Amazon Pinpoint acceptsthese values for APNs messages andconverts them.

For more information about theapns-priority parameter, seeCommunicating with APNs in theAPNs Local and Remote NotificationProgramming Guide.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

Sound string Include this key when you want thesystem to play a sound. The value ofthis key is the name of a sound filein your app's main bundle or in theLibrary/Sounds folder of your app'sdata container. If the sound filecannot be found, or if you specifydefaultfor the value, the systemplays the default alert sound.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

158

Page 165: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

ThreadId string Provide this key with a string valuethat represents the app-specificidentifier for grouping notifications.If you provide a Notification Contentapp extension, you can use thisvalue to group your notificationstogether.

TimeToLive integer The length of time (in seconds)that APNs stores and attempts todeliver the message. If the value is0, APNs does not store the messageor attempt to deliver it more thanonce. Amazon Pinpoint uses thisvalue to set the apns-expirationrequest header when it sends themessage to APNs.

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

BaiduMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Body string The message body of thenotification.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

159

Page 166: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

IconReference string The icon image name of the assetsaved in your application.

ImageIconUrl string The URL that points to an imageused as the large icon to thenotification content view.

ImageUrl string The URL that points to an imageused in the push notification.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

SmallImageIconUrl string The URL that points to an imageused as the small icon for thenotification which will be used torepresent the notification in thestatus bar and content view

Sound string Indicates a sound to play when thedevice receives the notification.Supports default, or the filenameof a sound resource bundled in theapp. Android sound files must residein /res/raw/

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

TimeToLive integer This parameter specifies how long(in seconds) the message shouldbe kept in Baidu storage if thedevice is offline. The and the defaultvalue and the maximum time tolive supported is 7 days (604800seconds)

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

160

Page 167: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

DefaultMessage

Attribute Type Description

Body string The message body of thenotification, the email body or thetext message.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

DefaultPushNotificationMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Body string The message body of thenotification.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

SilentPush boolean Indicates if the message shoulddisplay on the recipient's device. Youcan use silent pushes for remoteconfiguration or to deliver messagesto in-app notification centers.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

161

Page 168: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

GCMMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Body string The message body of thenotification.

CollapseKey string This parameter identifies a group ofmessages (e.g., with collapse_key:"Updates Available") that can becollapsed, so that only the lastmessage gets sent when deliverycan be resumed. This is intended toavoid sending too many of the samemessages when the device comesback online or becomes active.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

IconReference string The icon image name of the assetsaved in your application.

ImageIconUrl string The URL that points to an imageused as the large icon to thenotification content view.

ImageUrl string The URL that points to an imageused in the push notification.

Priority string The message priority. AmazonPinpoint uses this value to set theFCM or GCM priority parameterwhen it sends the message. Acceptsthe following values:

"Normal" - Messages might bedelayed. Delivery is optimized forbattery usage on the receiving

162

Page 169: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

device. Use normal priority unlessimmediate delivery is required.

"High" - Messages are sentimmediately and might wake asleeping device.

The equivalent values for APNsmessages are "5" and "10". AmazonPinpoint accepts these values hereand converts them.

For more information, see AboutFCM Messages in the Firebasedocumentation.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

RestrictedPackageName string This parameter specifies thepackage name of the applicationwhere the registration tokensmust match in order to receive themessage.

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

SmallImageIconUrl string The URL that points to an imageused as the small icon for thenotification which will be used torepresent the notification in thestatus bar and content view

Sound string Indicates a sound to play when thedevice receives the notification.Supports default, or the filenameof a sound resource bundled in theapp. Android sound files must residein /res/raw/

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

TimeToLive integer The length of time (in seconds) thatFCM or GCM stores and attempts todeliver the message. If unspecified,the value defaults to the maximum,which is 2,419,200 seconds (28days). Amazon Pinpoint usesthis value to set the FCM or GCMtime_to_live parameter.

163

Page 170: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

SMSMessage

Attribute Type Description

Body string The body of the SMS message.

Keyword string The SMS program name that youprovided to AWS Support when yourequested your dedicated number.

MessageType string Is this a transaction priority messageor lower priority.

OriginationNumber string The phone number that the SMSmessage originates from. Specifyone of the dedicated long codes orshort codes that you requested fromAWS Support and that is assignedto your account. If this attributeis not specified, Amazon Pinpointrandomly assigns a long code.

SenderId string The sender ID that is shown as themessage sender on the recipient'sdevice. Support for sender IDs variesby country or region.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

MessageResponse

Attribute Type Description

ApplicationId string Application id of the message.

EndpointResult object A map containing a multi partresponse for each address, with theendpointId as the key and the resultas the value.

RequestId string Original request Id for which thismessage was delivered.

Result object A map containing a multi partresponse for each address, with the

164

Page 171: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

address as the key(Email address,phone number or push token) andthe result as the value.

EndpointMessageResult

Attribute Type Description

Address string Address that endpoint message wasdelivered to.

DeliveryStatus string The delivery status of the message.Possible values:

SUCCESS - The message wassuccessfully delivered to theendpoint.

TRANSIENT_FAILURE - A temporaryerror occurred. Amazon Pinpointwill attempt to deliver the messageagain later.

FAILURE_PERMANENT - An erroroccurred when delivering themessage to the endpoint. AmazonPinpoint won't attempt to send themessage again.

TIMEOUT - The message couldn't besent within the timeout period.

QUIET_TIME - The local time for theendpoint was within the Quiet Hoursfor the campaign.

DAILY_CAP - The endpoint hasreceived the maximum number ofmessages it can receive within a 24-hour period.

HOLDOUT - The endpoint wasin a hold out treatment for thecampaign.

THROTTLED - Amazon Pinpointthrottled sending to this endpoint.

EXPIRED - The endpoint address isexpired.

CAMPAIGN_CAP - The endpointreceived the maximum number ofmessages allowed by the campaign.

165

Page 172: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

SERVICE_FAILURE - A service-levelfailure prevented Amazon Pinpointfrom delivering the message.

UNKNOWN - An unknown erroroccurred.

MessageId string Unique message identifierassociated with the message thatwas sent.

StatusCode integer Downstream service status code.

StatusMessage string Status message for messagedelivery.

UpdatedToken string If token was updated as part ofdelivery. (This is GCM Specific)

MessageResult

Attribute Type Description

DeliveryStatus string The delivery status of the message.Possible values:

SUCCESS - The message wassuccessfully delivered to theendpoint.

TRANSIENT_FAILURE - A temporaryerror occurred. Amazon Pinpointwill attempt to deliver the messageagain later.

FAILURE_PERMANENT - An erroroccurred when delivering themessage to the endpoint. AmazonPinpoint won't attempt to send themessage again.

TIMEOUT - The message couldn't besent within the timeout period.

QUIET_TIME - The local time for theendpoint was within the Quiet Hoursfor the campaign.

DAILY_CAP - The endpoint hasreceived the maximum number ofmessages it can receive within a 24-hour period.

HOLDOUT - The endpoint wasin a hold out treatment for thecampaign.

166

Page 173: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferencePhone Number Validate

Attribute Type Description

THROTTLED - Amazon Pinpointthrottled sending to this endpoint.

EXPIRED - The endpoint address isexpired.

CAMPAIGN_CAP - The endpointreceived the maximum number ofmessages allowed by the campaign.

SERVICE_FAILURE - A service-levelfailure prevented Amazon Pinpointfrom delivering the message.

UNKNOWN - An unknown erroroccurred.

MessageId string Unique message identifierassociated with the message thatwas sent.

StatusCode integer Downstream service status code.

StatusMessage string Status message for messagedelivery.

UpdatedToken string If token was updated as part ofdelivery. (This is GCM Specific)

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Phone Number ValidateUse this resource to convert an incoming phone number into E.164 format, and to get more informationabout the phone number.

This resource accepts a POST request that includes a phone number in the request body. It responds withinformation about the phone number. This information indicates whether the phone number is valid, andthe type of phone line that it's associated with (for example, whether it's a mobile or landline number).It also includes other helpful information about the number, such as the carrier that the number isregistered with, and the location where the number was originally registered.

URI/v1/phone/number/validate

167

Page 174: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

HTTP MethodsPOSTReturns information about the specified phone number.

Body

Name Required Type

NumberValidateRequest true NumberValidateRequest (p. 169)

Header

Name Required Type

accept false string

Response

Status Code Schema

200 NumberValidateResponse (p. 169)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 170) BadRequestException

403 MessageBody (p. 170) ForbiddenException

404 MessageBody (p. 170) NotFoundException

405 MessageBody (p. 170) MethodNotAllowedException

429 MessageBody (p. 170) TooManyRequestsException

500 MessageBody (p. 170) InternalServerErrorException

SchemasRequest SchemasExample NumberValidateRequest

{ "PhoneNumber": "12065550199", "IsoCountryCode": "US"}

168

Page 175: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Response SchemasExample NumberValidateResponse

{ "CountryCodeIso2": "US", "CountryCodeNumeric": "1", "Country": "United States", "City": "Seattle", "ZipCode": "98108", "County": "King", "Timezone": "America/Los Angeles", "CleansedPhoneNumberNational": "2065550199", "CleansedPhoneNumberE164": "+12065550199", "Carrier": "Example Corp.", "PhoneTypeCode": 0, "PhoneType": "MOBILE", "OriginalPhoneNumber": "12065550199", "OriginalCountryCodeIso2": "US"}

Example MessageBody

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

AttributesNumberValidateRequest

Attribute Type Description

IsoCountryCode string (Optional) The two-character ISOcountry code for the country orregion where the phone number wasoriginally registered.

PhoneNumber string The phone number to getinformation about. The phonenumber that you provide shouldinclude a country code. If thenumber doesn't include a validcountry code, the operation mightresult in an error.

NumberValidateResponse

Attribute Type Description

Carrier string The carrier or servive provider thatthe phone number is currentlyregistered with.

City string The city where the phone numberwas originally registered.

169

Page 176: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

CleansedPhoneNumberE164 string The cleansed phone number, shownin E.164 format.

CleansedPhoneNumberNational string The cleansed phone number, shownin the local phone number format.

Country string The country or region where thephone number was originallyregistered.

CountryCodeIso2 string The two-character ISO code for thecountry or region where the phonenumber was originally registered.

CountryCodeNumeric string The numeric code for the country orregion where the phone number wasoriginally registered.

County string The county where the phonenumber was originally registered.

OriginalCountryCodeIso2 string The two-character code (in ISO3166-1 alpha-2 format) for thecountry or region in the requestbody.

OriginalPhoneNumber string The phone number that youincluded in the request body.

PhoneType string A description of the phone type.Possible values are MOBILE,LANDLINE, VOIP, INVALID, PREPAID,and OTHER.

PhoneTypeCode integer The phone type, represented by aninteger. Possible values include 0(MOBILE), 1 (LANDLINE), 2 (VOIP),3 (INVALID), 4 (OTHER), and 5(PREPAID).

Timezone string The time zone for the locationwhere the phone number wasoriginally registered.

ZipCode string The postal code for the locationwhere the phone number wasoriginally registered.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

170

Page 177: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSegments

SegmentsA segment designates which users receive the messages delivered by a campaign. You can use thisresource to look up, create, update, or delete your segments.

You can create segments by making a POST request to the /segments URI. Your request body will includethe dimensions that determine which user endpoints belong to the segment.

When you use this resource to make a segment, the segment type is DIMENSIONAL, which means thatendpoints that belong to the segment vary over time based on user activity. If you want to create a staticsegment, which includes a fixed set of endpoints, you can make a POST request to the /jobs/import URIto import the endpoints that belong to the segment. For more information, see Importing Segments inthe Amazon Pinpoint Developer Guide.

URI/v1/apps/application-id/segments

HTTP MethodsGETUsed to get information about your segments.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 SegmentsResponse (p. 184)

POSTUsed to create or update a segment.

171

Page 178: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Body

Name Required Type

WriteSegmentRequest true WriteSegmentRequest (p. 179)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

201 SegmentResponse (p. 184)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 185) BadRequestException

403 MessageBody (p. 185) ForbiddenException

404 MessageBody (p. 185) NotFoundException

405 MessageBody (p. 185) MethodNotAllowedException

429 MessageBody (p. 185) TooManyRequestsException

500 MessageBody (p. 185) InternalServerErrorException

Schemas

Request Schemas

Example WriteSegmentRequest

{ "Name": "string", "SegmentGroups": { "Include": "ALL|ANY|NONE",

172

Page 179: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Groups": [ { "Type": "ALL|ANY|NONE", "Dimensions": [ { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {},

173

Page 180: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"UserAttributes": {} } ], "SourceType": "ALL|ANY", "SourceSegments": [ { "Id": "string", "Version": 0 } ] } ] }, "Dimensions": { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 }

174

Page 181: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

}, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {} }}

Response SchemasExample SegmentsResponse

{ "Item": [ { "Name": "string", "Dimensions": { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [

175

Page 182: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {} }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "Version": 0, "SegmentType": "DIMENSIONAL", "ImportDefinition": { "Size": 0, "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "ChannelCounts": {} } } ], "NextToken": "string"}

Example SegmentResponse

{ "Name": "string", "SegmentGroups": { "Include": "ALL|ANY|NONE", "Groups": [ { "Type": "ALL|ANY|NONE", "Dimensions": [ { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] },

176

Page 183: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {} } ], "SourceType": "ALL|ANY", "SourceSegments": [ { "Id": "string", "Version": 0 } ] } ] }, "Dimensions": { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [

177

Page 184: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": { "additionalProp1": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp2": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp3": { "AttributeType": "INCLUSIVE", "Values": [ "string" ]

178

Page 185: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

} }, "UserAttributes": { "additionalProp1": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp2": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp3": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] } } }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "Version": 0, "SegmentType": "DIMENSIONAL", "ImportDefinition": { "Size": 0, "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "ChannelCounts": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 } }}

Example MessageBody

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

AttributesWriteSegmentRequest

Attribute Type Description

Dimensions SegmentDimensions (p. 180) The segment dimensions attributes.

Name string The name of segment

SegmentGroups SegmentGroupList (p. 182) A segment group, which consistsof zero or more source segments,

179

Page 186: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

plus dimensions that are applied tothose source segments. Your requestcan only include one segmentgroup. Your request can includeeither a SegmentGroups object or aDimensions object, but not both.

SegmentDimensions

Attribute Type Description

Attributes object Custom segment attributes.

Behavior SegmentBehaviors (p. 180) The segment behaviors attributes.

Demographic SegmentDemographics (p. 181) The segment demographicsattributes.

Location SegmentLocation (p. 182) The segment location attributes.

Metrics object Custom segment metrics.

UserAttributes object Custom segment user attributes.

AttributeDimension

Attribute Type Description

AttributeType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

Values array The criteria values for the segmentdimension. Endpoints with matchingattribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentBehaviors

Attribute Type Description

Recency RecencyDimension (p. 181) The recency of use.

180

Page 187: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

RecencyDimension

Attribute Type Description

Duration string The length of time during whichusers have been active or inactivewith your app.

Valid values: HR_24, DAY_7, DAY_14,DAY_30

RecencyType string The recency dimension type:

ACTIVE - Users who have used yourapp within the specified duration areincluded in the segment.

INACTIVE - Users who have notused your app within the specifiedduration are included in thesegment.

SegmentDemographics

Attribute Type Description

AppVersion SetDimension (p. 181) The app version criteria for thesegment.

Channel SetDimension (p. 181) The channel criteria for thesegment.

DeviceType SetDimension (p. 181) The device type criteria for thesegment.

Make SetDimension (p. 181) The device make criteria for thesegment.

Model SetDimension (p. 181) The device model criteria for thesegment.

Platform SetDimension (p. 181) The device platform criteria for thesegment.

SetDimension

Attribute Type Description

DimensionType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

181

Page 188: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Values array The criteria values for the segmentdimension. Endpoints with matchingattribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentLocation

Attribute Type Description

Country SetDimension (p. 181) The country or region, in ISO 3166-1alpha-2 format.

GPSPoint GPSPointDimension (p. 182) The GPS Point dimension.

GPSPointDimension

Attribute Type Description

Coordinates GPSCoordinates (p. 182) Coordinate to measure distancefrom.

RangeInKilometers number Range in kilometers from thecoordinate.

GPSCoordinates

Attribute Type Description

Latitude number Latitude

Longitude number Longitude

MetricDimension

Attribute Type Description

ComparisonOperator string The operator that you'reusing to compare metricvalues. Possible values:GREATER_THAN, LESS_THAN,GREATER_THAN_OR_EQUAL,LESS_THAN_OR_EQUAL, or EQUAL

Value number Value to be compared.

SegmentGroupList

Attribute Type Description

Groups array A set of segment criteria to evaluate.

182

Page 189: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Include string Specify how to handle multiplesegment groups. For example, if thesegment includes three segmentgroups, should the resultingsegment include endpoints thatare matched by all, any, or none ofthe segment groups you created.Acceptable values: ALL, ANY, orNONE.

SegmentGroup

Attribute Type Description

Dimensions array List of dimensions to include orexclude.

SourceSegments array The base segment that you buildyour segment on. The sourcesegment defines the starting"universe" of endpoints. When youadd dimensions to the segment, itfilters the source segment basedon the dimensions that you specify.You can specify more than onedimensional segment. You can onlyspecify one imported segment.

NOTE: If you specify an importedsegment for this attribute, thesegment size estimate that appearsin the Amazon Pinpoint consoleshows the size of the importedsegment, without any filters appliedto it.

SourceType string Specify how to handle multiplesource segments. For example, ifyou specify three source segments,should the resulting segment bebased on any or all of the segments?Acceptable values: ANY or ALL.

Type string Specify how to handle multiplesegment dimensions. For example,if you specify three dimensions,should the resulting segmentinclude endpoints that arematched by all, any, or none of thedimensions? Acceptable values: ALL,ANY, or NONE.

183

Page 190: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

SegmentReference

Attribute Type Description

Id string A unique identifier for the segment.

Version integer If specified contains a specificversion of the segment included.

SegmentsResponse

Attribute Type Description

Item array The list of segments.

NextToken string An identifier used to retrieve thenext page of results. The token isnull if no additional pages exist.

SegmentResponse

Attribute Type Description

ApplicationId string The ID of the application that thesegment applies to.

CreationDate string The date and time when thesegment was created.

Dimensions SegmentDimensions (p. 180) The segment dimensions attributes.

Id string The unique segment ID.

ImportDefinition SegmentImportResource (p. 185) The import job settings.

LastModifiedDate string The date and time when thesegment was last modified.

Name string The name of the segment.

SegmentGroups SegmentGroupList (p. 182) A segment group, which consists ofzero or more source segments, plusdimensions that are applied to thosesource segments.

SegmentType string The segment type: DIMENSIONAL- A dynamic segment built fromselection criteria based on endpointdata reported by your app. Youcreate this type of segment by usingthe segment builder in the AmazonPinpoint console or by making aPOST request to the segmentsresource. IMPORT - A static segmentbuilt from an imported set ofendpoint definitions. You createthis type of segment by importinga segment in the Amazon Pinpoint

184

Page 191: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSegment

Attribute Type Description

console or by making a POSTrequest to the jobs/import resource.

Version integer The segment version number.

SegmentImportResource

Attribute Type Description

ChannelCounts object The number of channel types in theimported segment.

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the endpoint filesthat were imported to create thissegment. Valid values: CSV, JSON

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the endpoints inAmazon S3.

S3Url string The URL of the S3 bucket that thesegment was imported from.

Size integer The number of endpoints that weresuccessfully imported to create thissegment.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

SegmentA segment designates which users receive the messages delivered by a campaign. You can use thisresource to look up, create, update, or delete your segments.

You can create a segment by making a PUT request to the /segments/{segment-id} URI. Your requestbody will include the dimensions that determine which user endpoints belong to the segment.

185

Page 192: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceURI

When you use this resource to make a segment, the segment type is DIMENSIONAL, which means thatendpoints that belong to the segment vary over time based on user activity. If you want to create a staticsegment, which includes a fixed set of endpoints, you can make a POST request to the /jobs/import URIto import the endpoints that belong to the segment.

If you create a new segment that's based on an existing segment (by using the SourceSegments attributein a SegmentGroup), and the existing segment was imported, then the estimated segment size estimateshown in the Amazon Pinpoint console will be inaccurate. In this case, the segment size shown in theconsole equals the size of the imported segment, without any additonal filters applied to it.

URI/v1/apps/application-id/segments/segment-id

HTTP Methods

DELETE

Deletes a segment.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

segment-id true string

Response

Status Code Schema

200 SegmentResponse (p. 198)

GET

Returns information about a segment.

Header

Name Required Type

accept false string

186

Page 193: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Path

Name Required Type

application-id true string

segment-id true string

Response

Status Code Schema

200 SegmentResponse (p. 198)

PUTUsed to update a segment.

Body

Name Required Type

WriteSegmentRequest true WriteSegmentRequest (p. 193)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

segment-id true string

Response

Status Code Schema

200 SegmentResponse (p. 198)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 199) BadRequestException

187

Page 194: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

403 MessageBody (p. 199) ForbiddenException

404 MessageBody (p. 199) NotFoundException

405 MessageBody (p. 199) MethodNotAllowedException

429 MessageBody (p. 199) TooManyRequestsException

500 MessageBody (p. 199) InternalServerErrorException

SchemasRequest Schemas

Example WriteSegmentRequest

{ "Name": "string", "SegmentGroups": { "Include": "ALL|ANY|NONE", "Groups": [ { "Type": "ALL|ANY|NONE", "Dimensions": [ { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [

188

Page 195: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {} } ], "SourceType": "ALL|ANY", "SourceSegments": [ { "Id": "string", "Version": 0 } ] } ] }, "Dimensions": { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] },

189

Page 196: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {} }}

Response SchemasExample SegmentResponse

{ "Name": "string", "SegmentGroups": { "Include": "ALL|ANY|NONE", "Groups": [ { "Type": "ALL|ANY|NONE", "Dimensions": [ { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string"

190

Page 197: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {} } ], "SourceType": "ALL|ANY", "SourceSegments": [ { "Id": "string", "Version": 0 } ] } ] }, "Dimensions": { "Demographic": { "Channel": {

191

Page 198: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": { "additionalProp1": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp2": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp3": { "AttributeType": "INCLUSIVE", "Values": [

192

Page 199: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"string" ] } }, "UserAttributes": { "additionalProp1": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp2": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp3": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] } } }, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "Version": 0, "SegmentType": "DIMENSIONAL", "ImportDefinition": { "Size": 0, "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "ChannelCounts": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 } }}

Example MessageBody

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

AttributesWriteSegmentRequest

Attribute Type Description

Dimensions SegmentDimensions (p. 194) The segment dimensions attributes.

Name string The name of segment

193

Page 200: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

SegmentGroups SegmentGroupList (p. 196) A segment group, which consistsof zero or more source segments,plus dimensions that are applied tothose source segments. Your requestcan only include one segmentgroup. Your request can includeeither a SegmentGroups object or aDimensions object, but not both.

SegmentDimensions

Attribute Type Description

Attributes object Custom segment attributes.

Behavior SegmentBehaviors (p. 194) The segment behaviors attributes.

Demographic SegmentDemographics (p. 195) The segment demographicsattributes.

Location SegmentLocation (p. 196) The segment location attributes.

Metrics object Custom segment metrics.

UserAttributes object Custom segment user attributes.

AttributeDimension

Attribute Type Description

AttributeType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

Values array The criteria values for the segmentdimension. Endpoints with matchingattribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentBehaviors

Attribute Type Description

Recency RecencyDimension (p. 195) The recency of use.

194

Page 201: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

RecencyDimension

Attribute Type Description

Duration string The length of time during whichusers have been active or inactivewith your app.

Valid values: HR_24, DAY_7, DAY_14,DAY_30

RecencyType string The recency dimension type:

ACTIVE - Users who have used yourapp within the specified duration areincluded in the segment.

INACTIVE - Users who have notused your app within the specifiedduration are included in thesegment.

SegmentDemographics

Attribute Type Description

AppVersion SetDimension (p. 195) The app version criteria for thesegment.

Channel SetDimension (p. 195) The channel criteria for thesegment.

DeviceType SetDimension (p. 195) The device type criteria for thesegment.

Make SetDimension (p. 195) The device make criteria for thesegment.

Model SetDimension (p. 195) The device model criteria for thesegment.

Platform SetDimension (p. 195) The device platform criteria for thesegment.

SetDimension

Attribute Type Description

DimensionType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

195

Page 202: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Values array The criteria values for the segmentdimension. Endpoints with matchingattribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentLocation

Attribute Type Description

Country SetDimension (p. 195) The country or region, in ISO 3166-1alpha-2 format.

GPSPoint GPSPointDimension (p. 196) The GPS Point dimension.

GPSPointDimension

Attribute Type Description

Coordinates GPSCoordinates (p. 196) Coordinate to measure distancefrom.

RangeInKilometers number Range in kilometers from thecoordinate.

GPSCoordinates

Attribute Type Description

Latitude number Latitude

Longitude number Longitude

MetricDimension

Attribute Type Description

ComparisonOperator string The operator that you'reusing to compare metricvalues. Possible values:GREATER_THAN, LESS_THAN,GREATER_THAN_OR_EQUAL,LESS_THAN_OR_EQUAL, or EQUAL

Value number Value to be compared.

SegmentGroupList

Attribute Type Description

Groups array A set of segment criteria to evaluate.

196

Page 203: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Include string Specify how to handle multiplesegment groups. For example, if thesegment includes three segmentgroups, should the resultingsegment include endpoints thatare matched by all, any, or none ofthe segment groups you created.Acceptable values: ALL, ANY, orNONE.

SegmentGroup

Attribute Type Description

Dimensions array List of dimensions to include orexclude.

SourceSegments array The base segment that you buildyour segment on. The sourcesegment defines the starting"universe" of endpoints. When youadd dimensions to the segment, itfilters the source segment basedon the dimensions that you specify.You can specify more than onedimensional segment. You can onlyspecify one imported segment.

NOTE: If you specify an importedsegment for this attribute, thesegment size estimate that appearsin the Amazon Pinpoint consoleshows the size of the importedsegment, without any filters appliedto it.

SourceType string Specify how to handle multiplesource segments. For example, ifyou specify three source segments,should the resulting segment bebased on any or all of the segments?Acceptable values: ANY or ALL.

Type string Specify how to handle multiplesegment dimensions. For example,if you specify three dimensions,should the resulting segmentinclude endpoints that arematched by all, any, or none of thedimensions? Acceptable values: ALL,ANY, or NONE.

197

Page 204: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

SegmentReference

Attribute Type Description

Id string A unique identifier for the segment.

Version integer If specified contains a specificversion of the segment included.

SegmentResponse

Attribute Type Description

ApplicationId string The ID of the application that thesegment applies to.

CreationDate string The date and time when thesegment was created.

Dimensions SegmentDimensions (p. 194) The segment dimensions attributes.

Id string The unique segment ID.

ImportDefinition SegmentImportResource (p. 199) The import job settings.

LastModifiedDate string The date and time when thesegment was last modified.

Name string The name of the segment.

SegmentGroups SegmentGroupList (p. 196) A segment group, which consists ofzero or more source segments, plusdimensions that are applied to thosesource segments.

SegmentType string The segment type: DIMENSIONAL- A dynamic segment built fromselection criteria based on endpointdata reported by your app. Youcreate this type of segment by usingthe segment builder in the AmazonPinpoint console or by making aPOST request to the segmentsresource. IMPORT - A static segmentbuilt from an imported set ofendpoint definitions. You createthis type of segment by importinga segment in the Amazon Pinpointconsole or by making a POSTrequest to the jobs/import resource.

Version integer The segment version number.

198

Page 205: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSegment Export Jobs

SegmentImportResource

Attribute Type Description

ChannelCounts object The number of channel types in theimported segment.

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the endpoint filesthat were imported to create thissegment. Valid values: CSV, JSON

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the endpoints inAmazon S3.

S3Url string The URL of the S3 bucket that thesegment was imported from.

Size integer The number of endpoints that weresuccessfully imported to create thissegment.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Segment Export JobsUse this resource to look up the jobs that export the endpoints that belong to a segment. You can usethis resource to check the status of an in-progress export job, and you can access the history of yourexport jobs.

URI/v1/apps/application-id/segments/segment-id/jobs/export

199

Page 206: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceHTTP Methods

HTTP Methods

GET

Returns a list of export jobs for a specific segment.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

segment-id true string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 ExportJobsResponse (p. 201)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 203) BadRequestException

403 MessageBody (p. 203) ForbiddenException

404 MessageBody (p. 203) NotFoundException

405 MessageBody (p. 203) MethodNotAllowedException

429 MessageBody (p. 203) TooManyRequestsException

500 MessageBody (p. 203) InternalServerErrorException

200

Page 207: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Schemas

Response Schemas

Example ExportJobsResponse

{ "Item": [ { "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "SegmentId": "string", "S3UrlPrefix": "string", "RoleArn": "string" } } ], "NextToken": "string"}

Example MessageBody

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

AttributesExportJobsResponse

Attribute Type Description

Item array A list of export jobs for theapplication.

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

201

Page 208: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

ExportJobResponse

Attribute Type Description

ApplicationId string The unique ID of the applicationassociated with the export job.

CompletedPieces integer The number of pieces that havesuccessfully completed as of thetime of the request.

CompletionDate string The date the job completed in ISO8601 format.

CreationDate string The date the job was created in ISO8601 format.

Definition ExportJobResource (p. 202) The export job settings.

FailedPieces integer The number of pieces that failed tobe processed as of the time of therequest.

Failures array Provides up to 100 of the first failedentries for the job, if any exist.

Id string The unique ID of the job.

JobStatus string The status of the job. Validvalues: CREATED, INITIALIZING,PROCESSING, COMPLETING,COMPLETED, FAILING, FAILED

The job status is FAILED if one ormore pieces failed.

TotalFailures integer The number of endpoints that werenot processed; for example, becauseof syntax errors.

TotalPieces integer The total number of pieces thatmust be processed to finish the job.Each piece is an approximately equalportion of the endpoints.

TotalProcessed integer The number of endpoints that wereprocessed by the job.

Type string The job type. Will be 'EXPORT'.

ExportJobResource

Attribute Type Description

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the AmazonS3 location that endpoints will beexported to.

202

Page 209: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSegment Import Jobs

Attribute Type Description

S3UrlPrefix string A URL that points to the locationwithin an Amazon S3 bucket thatwill receive the export. The locationis typically a folder with multiplefiles.

The URL should follow this format:s3://bucket-name/folder-name/

Amazon Pinpoint will exportendpoints to this location.

SegmentId string The ID of the segment to exportendpoints from. If not present,Amazon Pinpoint exports all ofthe endpoints that belong to theapplication.

SegmentVersion integer The version of the segment toexport if specified.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Segment Import JobsUse this resource to look up import jobs that create audience segments. You can use this resource tocheck the status of an in-progress import job and access the history of your import jobs.

URI/v1/apps/application-id/segments/segment-id/jobs/import

HTTP Methods

GETReturns a list of import jobs for a specific segment.

Header

Name Required Type

accept false string

203

Page 210: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Path

Name Required Type

application-id true string

segment-id true string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 ImportJobsResponse (p. 205)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 207) BadRequestException

403 MessageBody (p. 207) ForbiddenException

404 MessageBody (p. 207) NotFoundException

405 MessageBody (p. 207) MethodNotAllowedException

429 MessageBody (p. 207) TooManyRequestsException

500 MessageBody (p. 207) InternalServerErrorException

Schemas

Response Schemas

Example ImportJobsResponse

{ "Item": [ { "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0,

204

Page 211: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "RegisterEndpoints": true, "DefineSegment": true, "SegmentName": "string", "SegmentId": "string" } } ], "NextToken": "string"}

Example MessageBody

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

AttributesImportJobsResponse

Attribute Type Description

Item array A list of import jobs for theapplication.

NextToken string The string that you use in asubsequent request to get thenext page of results in a paginatedresponse.

ImportJobResponse

Attribute Type Description

ApplicationId string The unique ID of the application towhich the import job applies.

CompletedPieces integer The number of pieces that havesuccessfully imported as of the timeof the request.

CompletionDate string The date the import job completedin ISO 8601 format.

205

Page 212: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

CreationDate string The date the import job was createdin ISO 8601 format.

Definition ImportJobResource (p. 206) The import job settings.

FailedPieces integer The number of pieces that havefailed to import as of the time of therequest.

Failures array Provides up to 100 of the first failedentries for the job, if any exist.

Id string The unique ID of the import job.

JobStatus string The status of the import job. Validvalues: CREATED, INITIALIZING,PROCESSING, COMPLETING,COMPLETED, FAILING, FAILED

The job status is FAILED if one ormore pieces failed to import.

TotalFailures integer The number of endpoints that failedto import; for example, because ofsyntax errors.

TotalPieces integer The total number of pieces thatmust be imported to finish the job.Each piece is an approximately equalportion of the endpoints to import.

TotalProcessed integer The number of endpoints that wereprocessed by the import job.

Type string The job type. Will be Import.

ImportJobResource

Attribute Type Description

DefineSegment boolean Sets whether the endpoints create asegment when they are imported.

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the files that containthe endpoint definitions. Validvalues: CSV, JSON

206

Page 213: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSegment Versions

Attribute Type Description

RegisterEndpoints boolean Sets whether the endpoints areregistered with Amazon Pinpointwhen they are imported.

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the Amazon S3location that contains the endpointsto import.

S3Url string The URL of the S3 bucket thatcontains the segment information toimport. The location can be a folderor a single file. The URL should usethe following format: s3://bucket-name/folder-name/file-name

Amazon Pinpoint imports endpointsfrom this location and anysubfolders it contains.

SegmentId string The ID of the segment to update ifthe import job is meant to updatean existing segment.

SegmentName string A custom name for the segmentcreated by the import job. Use ifDefineSegment is true.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Segment VersionsProvides a list of versions for a specific segment.

URI/v1/apps/application-id/segments/segment-id/versions

HTTP Methods

GETReturns information about your segment versions.

207

Page 214: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

segment-id true string

Query

Name Required Type

page-size false string

token false string

Response

Status Code Schema

200 SegmentsResponse (p. 210)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 215) BadRequestException

403 MessageBody (p. 215) ForbiddenException

404 MessageBody (p. 215) NotFoundException

405 MessageBody (p. 215) MethodNotAllowedException

429 MessageBody (p. 215) TooManyRequestsException

500 MessageBody (p. 215) InternalServerErrorException

SchemasResponse SchemasExample SegmentsResponse

{

208

Page 215: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Item": [ { "Name": "string", "Dimensions": { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {}

209

Page 216: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

}, "Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "Version": 0, "SegmentType": "DIMENSIONAL", "ImportDefinition": { "Size": 0, "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "ChannelCounts": {} } } ], "NextToken": "string"}

Example MessageBody

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

AttributesSegmentsResponse

Attribute Type Description

Item array The list of segments.

NextToken string An identifier used to retrieve thenext page of results. The token isnull if no additional pages exist.

SegmentResponse

Attribute Type Description

ApplicationId string The ID of the application that thesegment applies to.

CreationDate string The date and time when thesegment was created.

Dimensions SegmentDimensions (p. 211) The segment dimensions attributes.

Id string The unique segment ID.

ImportDefinition SegmentImportResource (p. 214) The import job settings.

LastModifiedDate string The date and time when thesegment was last modified.

Name string The name of the segment.

210

Page 217: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

SegmentGroups SegmentGroupList (p. 214) A segment group, which consists ofzero or more source segments, plusdimensions that are applied to thosesource segments.

SegmentType string The segment type: DIMENSIONAL- A dynamic segment built fromselection criteria based on endpointdata reported by your app. Youcreate this type of segment by usingthe segment builder in the AmazonPinpoint console or by making aPOST request to the segmentsresource. IMPORT - A static segmentbuilt from an imported set ofendpoint definitions. You createthis type of segment by importinga segment in the Amazon Pinpointconsole or by making a POSTrequest to the jobs/import resource.

Version integer The segment version number.

SegmentDimensions

Attribute Type Description

Attributes object Custom segment attributes.

Behavior SegmentBehaviors (p. 212) The segment behaviors attributes.

Demographic SegmentDemographics (p. 212) The segment demographicsattributes.

Location SegmentLocation (p. 213) The segment location attributes.

Metrics object Custom segment metrics.

UserAttributes object Custom segment user attributes.

AttributeDimension

Attribute Type Description

AttributeType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

Values array The criteria values for the segmentdimension. Endpoints with matching

211

Page 218: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

attribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentBehaviors

Attribute Type Description

Recency RecencyDimension (p. 212) The recency of use.

RecencyDimension

Attribute Type Description

Duration string The length of time during whichusers have been active or inactivewith your app.

Valid values: HR_24, DAY_7, DAY_14,DAY_30

RecencyType string The recency dimension type:

ACTIVE - Users who have used yourapp within the specified duration areincluded in the segment.

INACTIVE - Users who have notused your app within the specifiedduration are included in thesegment.

SegmentDemographics

Attribute Type Description

AppVersion SetDimension (p. 213) The app version criteria for thesegment.

Channel SetDimension (p. 213) The channel criteria for thesegment.

DeviceType SetDimension (p. 213) The device type criteria for thesegment.

Make SetDimension (p. 213) The device make criteria for thesegment.

Model SetDimension (p. 213) The device model criteria for thesegment.

Platform SetDimension (p. 213) The device platform criteria for thesegment.

212

Page 219: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

SetDimension

Attribute Type Description

DimensionType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

Values array The criteria values for the segmentdimension. Endpoints with matchingattribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentLocation

Attribute Type Description

Country SetDimension (p. 213) The country or region, in ISO 3166-1alpha-2 format.

GPSPoint GPSPointDimension (p. 213) The GPS Point dimension.

GPSPointDimension

Attribute Type Description

Coordinates GPSCoordinates (p. 213) Coordinate to measure distancefrom.

RangeInKilometers number Range in kilometers from thecoordinate.

GPSCoordinates

Attribute Type Description

Latitude number Latitude

Longitude number Longitude

MetricDimension

Attribute Type Description

ComparisonOperator string The operator that you'reusing to compare metricvalues. Possible values:GREATER_THAN, LESS_THAN,

213

Page 220: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

GREATER_THAN_OR_EQUAL,LESS_THAN_OR_EQUAL, or EQUAL

Value number Value to be compared.

SegmentImportResource

Attribute Type Description

ChannelCounts object The number of channel types in theimported segment.

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the endpoint filesthat were imported to create thissegment. Valid values: CSV, JSON

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the endpoints inAmazon S3.

S3Url string The URL of the S3 bucket that thesegment was imported from.

Size integer The number of endpoints that weresuccessfully imported to create thissegment.

SegmentGroupList

Attribute Type Description

Groups array A set of segment criteria to evaluate.

Include string Specify how to handle multiplesegment groups. For example, if thesegment includes three segmentgroups, should the resultingsegment include endpoints thatare matched by all, any, or none ofthe segment groups you created.Acceptable values: ALL, ANY, orNONE.

214

Page 221: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

SegmentGroup

Attribute Type Description

Dimensions array List of dimensions to include orexclude.

SourceSegments array The base segment that you buildyour segment on. The sourcesegment defines the starting"universe" of endpoints. When youadd dimensions to the segment, itfilters the source segment basedon the dimensions that you specify.You can specify more than onedimensional segment. You can onlyspecify one imported segment.

NOTE: If you specify an importedsegment for this attribute, thesegment size estimate that appearsin the Amazon Pinpoint consoleshows the size of the importedsegment, without any filters appliedto it.

SourceType string Specify how to handle multiplesource segments. For example, ifyou specify three source segments,should the resulting segment bebased on any or all of the segments?Acceptable values: ANY or ALL.

Type string Specify how to handle multiplesegment dimensions. For example,if you specify three dimensions,should the resulting segmentinclude endpoints that arematched by all, any, or none of thedimensions? Acceptable values: ALL,ANY, or NONE.

SegmentReference

Attribute Type Description

Id string A unique identifier for the segment.

Version integer If specified contains a specificversion of the segment included.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

215

Page 222: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSegment Version

Attribute Type Description

RequestID string The unique message body ID.

Segment VersionProvides information about a specific segment version.

URI/v1/apps/application-id/segments/segment-id/versions/version

HTTP Methods

GETReturns information about a segment version.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

segment-id true string

version true string

Response

Status Code Schema

200 SegmentResponse (p. 220)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 225) BadRequestException

403 MessageBody (p. 225) ForbiddenException

216

Page 223: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

404 MessageBody (p. 225) NotFoundException

405 MessageBody (p. 225) MethodNotAllowedException

429 MessageBody (p. 225) TooManyRequestsException

500 MessageBody (p. 225) InternalServerErrorException

Schemas

Response Schemas

Example SegmentResponse

{ "Name": "string", "SegmentGroups": { "Include": "ALL|ANY|NONE", "Groups": [ { "Type": "ALL|ANY|NONE", "Dimensions": [ { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ]

217

Page 224: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

} }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "GPSPoint": { "Coordinates": { "Latitude": 0, "Longitude": 0 }, "RangeInKilometers": 0 } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": {}, "Metrics": {}, "UserAttributes": {} } ], "SourceType": "ALL|ANY", "SourceSegments": [ { "Id": "string", "Version": 0 } ] } ] }, "Dimensions": { "Demographic": { "Channel": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Platform": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "DeviceType": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "AppVersion": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] }, "Make": { "DimensionType": "INCLUSIVE",

218

Page 225: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Values": [ "string" ] }, "Model": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Location": { "Country": { "DimensionType": "INCLUSIVE", "Values": [ "string" ] } }, "Behavior": { "Recency": { "RecencyType": "ACTIVE", "Duration": "HR_24" } }, "Attributes": { "additionalProp1": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp2": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp3": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] } }, "UserAttributes": { "additionalProp1": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp2": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] }, "additionalProp3": { "AttributeType": "INCLUSIVE", "Values": [ "string" ] } } },

219

Page 226: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"Id": "string", "ApplicationId": "string", "CreationDate": "string", "LastModifiedDate": "string", "Version": 0, "SegmentType": "DIMENSIONAL", "ImportDefinition": { "Size": 0, "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "ChannelCounts": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 } }}

Example MessageBody

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

AttributesSegmentResponse

Attribute Type Description

ApplicationId string The ID of the application that thesegment applies to.

CreationDate string The date and time when thesegment was created.

Dimensions SegmentDimensions (p. 221) The segment dimensions attributes.

Id string The unique segment ID.

ImportDefinition SegmentImportResource (p. 223) The import job settings.

LastModifiedDate string The date and time when thesegment was last modified.

Name string The name of the segment.

SegmentGroups SegmentGroupList (p. 224) A segment group, which consists ofzero or more source segments, plusdimensions that are applied to thosesource segments.

SegmentType string The segment type: DIMENSIONAL- A dynamic segment built fromselection criteria based on endpointdata reported by your app. Youcreate this type of segment by using

220

Page 227: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

the segment builder in the AmazonPinpoint console or by making aPOST request to the segmentsresource. IMPORT - A static segmentbuilt from an imported set ofendpoint definitions. You createthis type of segment by importinga segment in the Amazon Pinpointconsole or by making a POSTrequest to the jobs/import resource.

Version integer The segment version number.

SegmentDimensions

Attribute Type Description

Attributes object Custom segment attributes.

Behavior SegmentBehaviors (p. 221) The segment behaviors attributes.

Demographic SegmentDemographics (p. 222) The segment demographicsattributes.

Location SegmentLocation (p. 223) The segment location attributes.

Metrics object Custom segment metrics.

UserAttributes object Custom segment user attributes.

AttributeDimension

Attribute Type Description

AttributeType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

Values array The criteria values for the segmentdimension. Endpoints with matchingattribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentBehaviors

Attribute Type Description

Recency RecencyDimension (p. 222) The recency of use.

221

Page 228: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

RecencyDimension

Attribute Type Description

Duration string The length of time during whichusers have been active or inactivewith your app.

Valid values: HR_24, DAY_7, DAY_14,DAY_30

RecencyType string The recency dimension type:

ACTIVE - Users who have used yourapp within the specified duration areincluded in the segment.

INACTIVE - Users who have notused your app within the specifiedduration are included in thesegment.

SegmentDemographics

Attribute Type Description

AppVersion SetDimension (p. 222) The app version criteria for thesegment.

Channel SetDimension (p. 222) The channel criteria for thesegment.

DeviceType SetDimension (p. 222) The device type criteria for thesegment.

Make SetDimension (p. 222) The device make criteria for thesegment.

Model SetDimension (p. 222) The device model criteria for thesegment.

Platform SetDimension (p. 222) The device platform criteria for thesegment.

SetDimension

Attribute Type Description

DimensionType string The type of dimension:

INCLUSIVE - Endpoints that matchthe criteria are included in thesegment.

EXCLUSIVE - Endpoints that matchthe criteria are excluded from thesegment.

222

Page 229: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Values array The criteria values for the segmentdimension. Endpoints with matchingattribute values are includedor excluded from the segment,depending on the setting for Type.

SegmentLocation

Attribute Type Description

Country SetDimension (p. 222) The country or region, in ISO 3166-1alpha-2 format.

GPSPoint GPSPointDimension (p. 223) The GPS Point dimension.

GPSPointDimension

Attribute Type Description

Coordinates GPSCoordinates (p. 223) Coordinate to measure distancefrom.

RangeInKilometers number Range in kilometers from thecoordinate.

GPSCoordinates

Attribute Type Description

Latitude number Latitude

Longitude number Longitude

MetricDimension

Attribute Type Description

ComparisonOperator string The operator that you'reusing to compare metricvalues. Possible values:GREATER_THAN, LESS_THAN,GREATER_THAN_OR_EQUAL,LESS_THAN_OR_EQUAL, or EQUAL

Value number Value to be compared.

SegmentImportResource

Attribute Type Description

ChannelCounts object The number of channel types in theimported segment.

223

Page 230: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

ExternalId string (Deprecated) Your AWS accountID, which you assigned to theExternalID key in an IAM trust policy.Used by Amazon Pinpoint to assumean IAM role. This requirement isremoved, and external IDs arenot recommended for IAM rolesassumed by Amazon Pinpoint.

Format string The format of the endpoint filesthat were imported to create thissegment. Valid values: CSV, JSON

RoleArn string The Amazon Resource Name (ARN)of an IAM role that grants AmazonPinpoint access to the endpoints inAmazon S3.

S3Url string The URL of the S3 bucket that thesegment was imported from.

Size integer The number of endpoints that weresuccessfully imported to create thissegment.

SegmentGroupList

Attribute Type Description

Groups array A set of segment criteria to evaluate.

Include string Specify how to handle multiplesegment groups. For example, if thesegment includes three segmentgroups, should the resultingsegment include endpoints thatare matched by all, any, or none ofthe segment groups you created.Acceptable values: ALL, ANY, orNONE.

SegmentGroup

Attribute Type Description

Dimensions array List of dimensions to include orexclude.

SourceSegments array The base segment that you buildyour segment on. The sourcesegment defines the starting"universe" of endpoints. When youadd dimensions to the segment, itfilters the source segment basedon the dimensions that you specify.

224

Page 231: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSettings

Attribute Type Description

You can specify more than onedimensional segment. You can onlyspecify one imported segment.

NOTE: If you specify an importedsegment for this attribute, thesegment size estimate that appearsin the Amazon Pinpoint consoleshows the size of the importedsegment, without any filters appliedto it.

SourceType string Specify how to handle multiplesource segments. For example, ifyou specify three source segments,should the resulting segment bebased on any or all of the segments?Acceptable values: ANY or ALL.

Type string Specify how to handle multiplesegment dimensions. For example,if you specify three dimensions,should the resulting segmentinclude endpoints that arematched by all, any, or none of thedimensions? Acceptable values: ALL,ANY, or NONE.

SegmentReference

Attribute Type Description

Id string A unique identifier for the segment.

Version integer If specified contains a specificversion of the segment included.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

SettingsThe default settings for an app in Amazon Pinpoint. You can use this resource to look up and update thesettings for an app.

225

Page 232: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceURI

URI/v1/apps/application-id/settings

HTTP Methods

GET

Used to request the settings for an app.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 ApplicationSettingsResource (p. 229)

PUT

Used to update the settings for an app.

Body

Name Required Type

WriteApplicationSettingsRequest true WriteApplicationSettingsRequest (p. 228)

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

226

Page 233: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Response

Status Code Schema

200 ApplicationSettingsResource (p. 229)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 230) BadRequestException

403 MessageBody (p. 230) ForbiddenException

404 MessageBody (p. 230) NotFoundException

405 MessageBody (p. 230) MethodNotAllowedException

429 MessageBody (p. 230) TooManyRequestsException

500 MessageBody (p. 230) InternalServerErrorException

SchemasRequest SchemasExample WriteApplicationSettingsRequest

{ "QuietTime": { "Start": "string", "End": "string" }, "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "CampaignHook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }}

Response SchemasExample ApplicationSettingsResource

{ "ApplicationId": "string", "LastModifiedDate": "string", "QuietTime": {

227

Page 234: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"Start": "string", "End": "string" }, "Limits": { "Daily": 0, "Total": 0, "MessagesPerSecond": 0, "MaximumDuration": 0 }, "CampaignHook": { "LambdaFunctionName": "string", "WebUrl": "string", "Mode": "DELIVERY" }}

Example MessageBody

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

AttributesWriteApplicationSettingsRequest

Attribute Type Description

CampaignHook CampaignHook (p. 228) Default campaign hook information.

CloudWatchMetricsEnabled boolean The CloudWatchMetrics settings forthe app.

Limits CampaignLimits (p. 229) The limits that apply to eachcampaign in the project by default.Campaigns can also have their ownlimits, which override the settings atthe project level.

QuietTime QuietTime (p. 229) The default quiet time for the app.Each campaign for this app sends nomessages during this time unless thecampaign overrides the default witha quiet time of its own.

CampaignHook

Attribute Type Description

LambdaFunctionName string Lambda function name or arn to becalled for delivery

Mode string What mode Lambda should beinvoked in.

WebUrl string Web URL to call for hook. If the URLhas authentication specified it will

228

Page 235: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

be added as authentication to therequest

CampaignLimits

Attribute Type Description

Daily integer The maximum number of messagesthat each campaign can send to asingle endpoint in a 24-hour period.

MaximumDuration integer The length of time (in seconds) thatthe campaign can run before it endsand message deliveries stop. Thisduration begins at the scheduledstart time for the campaign. Theminimum value is 60.

MessagesPerSecond integer The number of messages that thecampaign can send per second.The minimum value is 50, and themaximum is 20000.

Total integer The maximum number of messagesthat an individual campaign cansend to a single endpoint over thecourse of the campaign.

QuietTime

Attribute Type Description

End string The default end time for quiet timein ISO 8601 format.

Start string The default start time for quiet timein ISO 8601 format.

ApplicationSettingsResource

Attribute Type Description

ApplicationId string The unique ID for the application.

CampaignHook CampaignHook (p. 228) Default campaign hook.

LastModifiedDate string The date that the settings were lastupdated in ISO 8601 format.

Limits CampaignLimits (p. 229) The default campaign limits forthe app. These limits apply to eachcampaign for the app, unless thecampaign overrides the default withlimits of its own.

229

Page 236: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceUsers Messages

Attribute Type Description

QuietTime QuietTime (p. 229) The default quiet time for the app.Each campaign for this app sends nomessages during this time unless thecampaign overrides the default witha quiet time of its own.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

Users MessagesUse this resource to message a list of users. Amazon Pinpoint sends the message to all of the endpointsthat are associated with each user.

A user represents an individual who is assigned a unique user ID, and this ID is assigned to one or moreendpoints. For example, if an individual uses your app on multiple devices, your app could assign thatperson's user ID to the endpoint for each device.

With the users-messages resource, you specify the message recipients as user IDs. For each user ID,Amazon Pinpoint delivers the message to all of the user's endpoints. Within the body of your request,you can specify a default message, and you can tailor your message for different channels, includingthose for mobile push and SMS.

With this resource, you send a direct message, which is a one time message that you send to a limitedaudience without creating a campaign. You can send the message to up to 100 users per request. Youcan't use the message to engage a segment. When you send the message, Amazon Pinpoint deliversit immediately, and you can't schedule the delivery. To engage a user segment, and to schedule themessage delivery, create a campaign instead of using the users-messages resource.

URI/v1/apps/application-id/users-messages

HTTP Methods

POSTUsed to send a message to a list of users.

Body

Name Required Type

SendUsersMessageRequest true SendUsersMessageRequest (p. 233)

230

Page 237: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

Response

Status Code Schema

200 SendUsersMessageResponse (p. 244)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 246) BadRequestException

403 MessageBody (p. 246) ForbiddenException

404 MessageBody (p. 246) NotFoundException

405 MessageBody (p. 246) MethodNotAllowedException

429 MessageBody (p. 246) TooManyRequestsException

500 MessageBody (p. 246) InternalServerErrorException

Schemas

Request Schemas

Example SendUsersMessageRequest

{ "Context": {}, "MessageConfiguration": { "DefaultMessage": { "Body": "string", "Substitutions": {} }, "DefaultPushNotificationMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP",

231

Page 238: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

"Url": "string", "SilentPush": true, "Data": {} }, "APNSMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {}, "MediaUrl": "string", "Sound": "string", "Badge": 0, "Category": "string", "ThreadId": "string", "RawContent": "string", "PreferredAuthenticationMethod": "string", "TimeToLive": 0, "Priority": "string", "CollapseId": "string" }, "GCMMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {}, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "CollapseKey": "string", "RestrictedPackageName": "string", "TimeToLive": 0, "Priority": "string" }, "BaiduMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {}, "IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "TimeToLive": 0 }, "ADMMessage": { "Body": "string", "Substitutions": {}, "Title": "string", "Action": "OPEN_APP", "Url": "string", "SilentPush": true, "Data": {},

232

Page 239: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"IconReference": "string", "Sound": "string", "ImageUrl": "string", "ImageIconUrl": "string", "SmallImageIconUrl": "string", "RawContent": "string", "ConsolidationKey": "string", "ExpiresAfter": "string", "MD5": "string" }, "SMSMessage": { "Body": "string", "Substitutions": {}, "SenderId": "string", "MessageType": "TRANSACTIONAL", "Keyword": "string", "OriginationNumber": "string" } }, "Users": {}}

Response SchemasExample SendUsersMessageResponse

{ "RequestId": "string", "ApplicationId": "string", "Result": {}}

Example MessageBody

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

AttributesSendUsersMessageRequest

Attribute Type Description

Context object A map of custom attribute-valuepairs. Amazon Pinpoint adds theseattributes to the data.pinpointobject in the body of the pushnotification payload. AmazonPinpoint also provides theseattributes in the events that itgenerates for users-messagesdeliveries.

MessageConfiguration DirectMessageConfiguration (p. 234) Message definitions for the defaultmessage and any messages that aretailored for specific channels.

233

Page 240: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

TraceId string A unique ID that you can use totrace a message. This ID is visible torecipients.

Users object A map that associates user IDswith EndpointSendConfigurationobjects. Within anEndpointSendConfiguration object,you can tailor the message for a userby specifying message overrides orsubstitutions.

DirectMessageConfiguration

Attribute Type Description

ADMMessage ADMMessage (p. 234) The message to ADM channels.Overrides the default pushnotification message.

APNSMessage APNSMessage (p. 236) The message to APNS channels.Overrides the default pushnotification message.

BaiduMessage BaiduMessage (p. 238) The message to Baidu GCMchannels. Overrides the default pushnotification message.

DefaultMessage DefaultMessage (p. 240) The default message for allchannels.

DefaultPushNotificationMessage DefaultPushNotificationMessage (p. 240)The default push notificationmessage for all push channels.

GCMMessage GCMMessage (p. 241) The message to GCM channels.Overrides the default pushnotification message.

SMSMessage SMSMessage (p. 243) The message to SMS channels.Overrides the default message.

ADMMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interface

234

Page 241: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

within the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Body string The message body of thenotification.

ConsolidationKey string Optional. Arbitrary string usedto indicate multiple messagesare logically the same and thatADM is allowed to drop previouslyenqueued messages in favor of thisone.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

ExpiresAfter string Optional. Number of seconds ADMshould retain the message if thedevice is offline

IconReference string The icon image name of the assetsaved in your application.

ImageIconUrl string The URL that points to an imageused as the large icon to thenotification content view.

ImageUrl string The URL that points to an imageused in the push notification.

MD5 string Optional. Base-64-encoded MD5checksum of the data parameter.Used to verify data integrity

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

SmallImageIconUrl string The URL that points to an imageused as the small icon for thenotification which will be used torepresent the notification in thestatus bar and content view

235

Page 242: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Sound string Indicates a sound to play when thedevice receives the notification.Supports default, or the filenameof a sound resource bundled in theapp. Android sound files must residein /res/raw/

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

APNSMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Badge integer Include this key when you want thesystem to modify the badge of yourapp icon. If this key is not includedin the dictionary, the badge is notchanged. To remove the badge, setthe value of this key to 0.

Body string The message body of thenotification.

Category string Provide this key with a string valuethat represents the notification'stype. This value corresponds tothe value in the identifier property

236

Page 243: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

of one of your app's registeredcategories.

CollapseId string An ID that, if assigned to multiplemessages, causes APNs to coalescethe messages into a single pushnotification instead of deliveringeach message individually. The valuemust not exceed 64 bytes. AmazonPinpoint uses this value to set theapns-collapse-id request headerwhen it sends the message to APNs.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

MediaUrl string The URL that points to a video usedin the push notification.

PreferredAuthenticationMethod string The preferred authenticationmethod, either "CERTIFICATE" or"TOKEN"

Priority string The message priority. AmazonPinpoint uses this value to set theapns-priority request header when itsends the message to APNs. Acceptsthe following values:

"5" - Low priority. Messages mightbe delayed, delivered in groups, andthrottled.

"10" - High priority. Messages aresent immediately. High prioritymessages must cause an alert,sound, or badge on the receivingdevice.

The default value is "10".

The equivalent values for FCM orGCM messages are "normal" and"high". Amazon Pinpoint acceptsthese values for APNs messages andconverts them.

For more information about theapns-priority parameter, seeCommunicating with APNs in theAPNs Local and Remote NotificationProgramming Guide.

237

Page 244: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

Sound string Include this key when you want thesystem to play a sound. The value ofthis key is the name of a sound filein your app's main bundle or in theLibrary/Sounds folder of your app'sdata container. If the sound filecannot be found, or if you specifydefaultfor the value, the systemplays the default alert sound.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

ThreadId string Provide this key with a string valuethat represents the app-specificidentifier for grouping notifications.If you provide a Notification Contentapp extension, you can use thisvalue to group your notificationstogether.

TimeToLive integer The length of time (in seconds)that APNs stores and attempts todeliver the message. If the value is0, APNs does not store the messageor attempt to deliver it more thanonce. Amazon Pinpoint uses thisvalue to set the apns-expirationrequest header when it sends themessage to APNs.

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

BaiduMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification delivered

238

Page 245: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

by the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Body string The message body of thenotification.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

IconReference string The icon image name of the assetsaved in your application.

ImageIconUrl string The URL that points to an imageused as the large icon to thenotification content view.

ImageUrl string The URL that points to an imageused in the push notification.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

SmallImageIconUrl string The URL that points to an imageused as the small icon for thenotification which will be used torepresent the notification in thestatus bar and content view

Sound string Indicates a sound to play when thedevice receives the notification.Supports default, or the filenameof a sound resource bundled in theapp. Android sound files must residein /res/raw/

239

Page 246: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

TimeToLive integer This parameter specifies how long(in seconds) the message shouldbe kept in Baidu storage if thedevice is offline. The and the defaultvalue and the maximum time tolive supported is 7 days (604800seconds)

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

DefaultMessage

Attribute Type Description

Body string The message body of thenotification, the email body or thetext message.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

DefaultPushNotificationMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

240

Page 247: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Body string The message body of thenotification.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

SilentPush boolean Indicates if the message shoulddisplay on the recipient's device. Youcan use silent pushes for remoteconfiguration or to deliver messagesto in-app notification centers.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

GCMMessage

Attribute Type Description

Action string The action that occurs if the usertaps a push notification deliveredby the campaign: OPEN_APP -Your app launches, or it becomesthe foreground app if it has beensent to the background. This isthe default action. DEEP_LINK -Uses deep linking features in iOSand Android to open your app anddisplay a designated user interfacewithin the app. URL - The defaultmobile browser on the user's devicelaunches and opens a web page atthe URL you specify. Possible valuesinclude: OPEN_APP | DEEP_LINK |URL

Body string The message body of thenotification.

CollapseKey string This parameter identifies a group ofmessages (e.g., with collapse_key:"Updates Available") that can becollapsed, so that only the lastmessage gets sent when deliverycan be resumed. This is intended to

241

Page 248: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

avoid sending too many of the samemessages when the device comesback online or becomes active.

Data object The data payload used for asilent push. This payload isadded to the notifications'data.pinpoint.jsonBody' object

IconReference string The icon image name of the assetsaved in your application.

ImageIconUrl string The URL that points to an imageused as the large icon to thenotification content view.

ImageUrl string The URL that points to an imageused in the push notification.

Priority string The message priority. AmazonPinpoint uses this value to set theFCM or GCM priority parameterwhen it sends the message. Acceptsthe following values:

"Normal" - Messages might bedelayed. Delivery is optimized forbattery usage on the receivingdevice. Use normal priority unlessimmediate delivery is required.

"High" - Messages are sentimmediately and might wake asleeping device.

The equivalent values for APNsmessages are "5" and "10". AmazonPinpoint accepts these values hereand converts them.

For more information, see AboutFCM Messages in the Firebasedocumentation.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

RestrictedPackageName string This parameter specifies thepackage name of the applicationwhere the registration tokensmust match in order to receive themessage.

242

Page 249: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

SilentPush boolean Indicates if the message shoulddisplay on the users device. Silentpushes can be used for RemoteConfiguration and Phone Home usecases.

SmallImageIconUrl string The URL that points to an imageused as the small icon for thenotification which will be used torepresent the notification in thestatus bar and content view

Sound string Indicates a sound to play when thedevice receives the notification.Supports default, or the filenameof a sound resource bundled in theapp. Android sound files must residein /res/raw/

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

TimeToLive integer The length of time (in seconds) thatFCM or GCM stores and attempts todeliver the message. If unspecified,the value defaults to the maximum,which is 2,419,200 seconds (28days). Amazon Pinpoint usesthis value to set the FCM or GCMtime_to_live parameter.

Title string The message title that displaysabove the message on the user'sdevice.

Url string The URL to open in the user's mobilebrowser. Used if the value for Actionis URL.

SMSMessage

Attribute Type Description

Body string The body of the SMS message.

Keyword string The SMS program name that youprovided to AWS Support when yourequested your dedicated number.

MessageType string Is this a transaction priority messageor lower priority.

OriginationNumber string The phone number that the SMSmessage originates from. Specifyone of the dedicated long codes or

243

Page 250: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

short codes that you requested fromAWS Support and that is assignedto your account. If this attributeis not specified, Amazon Pinpointrandomly assigns a long code.

SenderId string The sender ID that is shown as themessage sender on the recipient'sdevice. Support for sender IDs variesby country or region.

Substitutions object Default message substitutions. Canbe overridden by individual addresssubstitutions.

EndpointSendConfiguration

Attribute Type Description

BodyOverride string Body override. If specified willoverride default body.

Context object A map of custom attributes toattributes to be attached to themessage for this address. Thispayload is added to the pushnotification's 'data.pinpoint' objector added to the email/sms deliveryreceipt event attributes.

RawContent string The Raw JSON formatted string tobe used as the payload. This valueoverrides the message.

Substitutions object A map of substitution values forthe message to be merged withthe DefaultMessage's substitutions.Substitutions on this map takeprecedence over the all othersubstitutions.

TitleOverride string Title override. If specified willoverride default title if applicable.

SendUsersMessageResponse

Attribute Type Description

ApplicationId string The unique ID of the AmazonPinpoint project used to send themessage.

RequestId string The unique ID assigned to the users-messages request.

244

Page 251: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

Result object An object that shows the endpointsthat were messaged for each user.The object provides a list of userIDs. For each user ID, it provides theendpoint IDs that were messaged.For each endpoint ID, it provides anEndpointMessageResult object.

EndpointMessageResult

Attribute Type Description

Address string Address that endpoint message wasdelivered to.

DeliveryStatus string The delivery status of the message.Possible values:

SUCCESS - The message wassuccessfully delivered to theendpoint.

TRANSIENT_FAILURE - A temporaryerror occurred. Amazon Pinpointwill attempt to deliver the messageagain later.

FAILURE_PERMANENT - An erroroccurred when delivering themessage to the endpoint. AmazonPinpoint won't attempt to send themessage again.

TIMEOUT - The message couldn't besent within the timeout period.

QUIET_TIME - The local time for theendpoint was within the Quiet Hoursfor the campaign.

DAILY_CAP - The endpoint hasreceived the maximum number ofmessages it can receive within a 24-hour period.

HOLDOUT - The endpoint wasin a hold out treatment for thecampaign.

THROTTLED - Amazon Pinpointthrottled sending to this endpoint.

EXPIRED - The endpoint address isexpired.

245

Page 252: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceUser

Attribute Type Description

CAMPAIGN_CAP - The endpointreceived the maximum number ofmessages allowed by the campaign.

SERVICE_FAILURE - A service-levelfailure prevented Amazon Pinpointfrom delivering the message.

UNKNOWN - An unknown erroroccurred.

MessageId string Unique message identifierassociated with the message thatwas sent.

StatusCode integer Downstream service status code.

StatusMessage string Status message for messagedelivery.

UpdatedToken string If token was updated as part ofdelivery. (This is GCM Specific)

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

UserA user is an individual who has a unique user ID. This ID can be associated with zero or more endpoints.For example, if a person uses your app on more than one device, your app could associate that person'suser ID with the endpoint for each of those devices.

Use this resource to list all of the endpoints associated with a user ID, or to delete all of the endpointsthat are associated with a user ID.

URI/v1/apps/application-id/users/user-id

HTTP Methods

DELETE

Deletes endpoints that are associated with a User ID.

246

Page 253: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceErrors

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

user-id true string

Response

Status Code Schema

202 EndpointsResponse (p. 249)

GETReturns information about the endpoints that are associated with a User ID.

Header

Name Required Type

accept false string

Path

Name Required Type

application-id true string

user-id true string

Response

Status Code Schema

200 EndpointsResponse (p. 249)

ErrorsErrors

Status Code Schema Error Type

400 MessageBody (p. 252) BadRequestException

403 MessageBody (p. 252) ForbiddenException

247

Page 254: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceSchemas

Status Code Schema Error Type

404 MessageBody (p. 252) NotFoundException

405 MessageBody (p. 252) MethodNotAllowedException

429 MessageBody (p. 252) TooManyRequestsException

500 MessageBody (p. 252) InternalServerErrorException

Schemas

Response Schemas

Example EndpointsResponse

{ "Address": "string", "Attributes": { "additionalProp1": [ "string" ], "additionalProp2": [ "string" ], "additionalProp3": [ "string" ] }, "ChannelType": "GCM", "Demographic": { "Make": "string", "Model": "string", "ModelVersion": "string", "Timezone": "string", "Locale": "string", "AppVersion": "string", "Platform": "string", "PlatformVersion": "string" }, "EffectiveDate": "string", "EndpointStatus": "string",

"Location": { "Latitude": 0, "Longitude": 0, "PostalCode": "string", "City": "string", "Region": "string", "Country": "string" }, "Metrics": { "additionalProp1": 0, "additionalProp2": 0, "additionalProp3": 0 }, "OptOut": "string", "RequestId": "string", "User": { "UserId": "string", "UserAttributes": {

248

Page 255: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

"additionalProp1": [ "string" ], "additionalProp2": [ "string" ], "additionalProp3": [ "string" ] } }, "ApplicationId": "string", "Id": "string", "CohortId": "string", "CreationDate": "string",}

Example MessageBody

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

AttributesEndpointsResponse

Attribute Type Description

Item array The list of endpoints.

EndpointResponse

Attribute Type Description

Address string The address of the endpoint asprovided by your push provider.For example, the DeviceToken orRegistrationId.

ApplicationId string The ID of the application that isassociated with the endpoint.

Attributes object Custom attributes that describe theendpoint by associating a name withan array of values. For example, anattribute named "interests" mighthave the following values: ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create segments.

The Amazon Pinpoint console can'tdisplay attribute names that includethe following characters: hash/pound sign (#), colon (:), questionmark (?), backslash (\), and forward

249

Page 256: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

slash (/). For this reason, you shouldavoid using these characters in thenames of custom attributes.

ChannelType string The channel type.

Valid values: GCM | APNS |APNS_SANDBOX | APNS_VOIP |APNS_VOIP_SANDBOX | ADM | SMS |EMAIL | BAIDU

CohortId string A number from 0-99 that representsthe cohort the endpoint is assignedto. Endpoints are grouped intocohorts randomly, and each cohortcontains approximately 1 percent ofthe endpoints for an app. AmazonPinpoint assigns cohorts to theholdout or treatment allocations fora campaign.

CreationDate string The date and time when theendpoint was created, shown in ISO8601 format.

Demographic EndpointDemographic (p. 251) The endpoint demographicattributes.

EffectiveDate string The date and time when theendpoint was last updated, shown inISO 8601 format.

EndpointStatus string Unused.

Id string The unique ID that you assigned tothe endpoint. The ID should be aglobally unique identifier (GUID) toensure that it doesn't conflict withother endpoint IDs associated withthe application.

Location EndpointLocation (p. 251) The endpoint location attributes.

Metrics object Custom metrics that your appreports to Amazon Pinpoint.

OptOut string Indicates whether a user has optedout of receiving messages with oneof the following values:

ALL - User has opted out of allmessages.

NONE - Users has not opted out andreceives all messages.

RequestId string The unique ID for the most recentrequest to update the endpoint.

250

Page 257: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

User EndpointUser (p. 252) Custom user-specific attributesthat your app reports to AmazonPinpoint.

EndpointDemographic

Attribute Type Description

AppVersion string The version of the applicationassociated with the endpoint.

Locale string The endpoint locale in the followingformat: The ISO 639-1 alpha-2 code,followed by an underscore, followedby an ISO 3166-1 alpha-2 value.

Make string The manufacturer of the endpointdevice, such as Apple or Samsung.

Model string The model name or number of theendpoint device, such as iPhone.

ModelVersion string The model version of the endpointdevice.

Platform string The platform of the endpoint device,such as iOS or Android.

PlatformVersion string The platform version of theendpoint device.

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 islocated.

Country string The two-letter code for the countryor region of the endpoint. Specifiedas an ISO 3166-1 alpha-2 code, suchas "US" for the United States.

Latitude number The latitude of the endpointlocation, rounded to one decimalplace.

Longitude number The longitude of the endpointlocation, rounded to one decimalplace.

251

Page 258: Amazon Pinpoint - REST API Reference · Amazon Pinpoint REST API Reference Amazon Pinpoint Endpoint Welcome This is the Amazon Pinpoint REST API reference. It contains examples of

Amazon Pinpoint REST API ReferenceAttributes

Attribute Type Description

PostalCode string The postal code or zip code of theendpoint.

Region string The region of the endpoint location.For example, in the United States,this corresponds to a state.

EndpointUser

Attribute Type Description

UserAttributes object Custom attributes that describe theuser by associating a name withan array of values. For example, anattribute named "interests" mighthave the following values: ["science","politics", "travel"]. You can use theseattributes as selection criteria whenyou create segments.

The Amazon Pinpoint console can'tdisplay attribute names that includethe following characters: hash/pound sign (#), colon (:), questionmark (?), backslash (\), and forwardslash (/). For this reason, you shouldavoid using these characters in thenames of custom attributes.

UserId string The unique ID of the user.

MessageBody

Attribute Type Description

Message string The error message that's returnedfrom the API.

RequestID string The unique message body ID.

252