Amazon Pinpoint SMS and Voice
REST API Reference
Amazon Pinpoint SMS and Voice: REST API Reference
Copyright © 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 manner that is likely to cause confusion among customers, or in any manner that disparages or discredits Amazon. All other trademarks not owned by Amazon are the property of their respective owners, who may or may not be affiliated with, connected to, or sponsored by Amazon.
Table of Contents
Welcome ... 1
Regional Availability ... 1
Resources ... 2
Configuration Set ... 2
URI ... 2
HTTP methods ... 2
Schemas ... 3
Properties ... 4
See also ... 5
Configuration Sets ... 5
URI ... 5
HTTP methods ... 5
Schemas ... 7
Properties ... 8
See also ... 10
Event Destination ... 10
URI ... 11
HTTP methods ... 11
Schemas ... 12
Properties ... 14
See also ... 17
Event Destinations ... 18
URI ... 18
HTTP methods ... 18
Schemas ... 20
Properties ... 22
See also ... 27
Voice Message ... 28
URI ... 28
HTTP methods ... 28
Schemas ... 29
Properties ... 30
See also ... 33
Operations ... 34
AWS glossary ... 35
Document History ... 36
Regional Availability
Welcome
Welcome to the Amazon Pinpoint SMS and Voice API Reference. This guide provides information about Amazon Pinpoint SMS and Voice API resources, including supported HTTP methods, parameters, and schemas.
Amazon Pinpoint is an AWS service that you can use to engage with your customers across multiple messaging channels. You can use Amazon Pinpoint to send SMS text messages and voice messages, in addition to push notifications and email. The Amazon Pinpoint SMS and Voice API provides programmatic access to options that are unique to the SMS and voice channels and supplement the resources provided by the Amazon Pinpoint API.
If you're new to Amazon Pinpoint, you might find it helpful to also review the Amazon Pinpoint
Developer Guide. The Amazon Pinpoint Developer Guide provides tutorials, code samples, and procedures that demonstrate how to use Amazon Pinpoint features programmatically and how to integrate Amazon Pinpoint functionality into mobile apps and other types of applications. The guide also provides
information about key topics such as Amazon Pinpoint integration with other AWS services and the quotas that apply to using the service.
Regional Availability
The Amazon Pinpoint SMS and Voice API is available in several AWS Regions and it provides an endpoint for each of these Regions. For a list of all the Regions and endpoints where the API is currently available, see AWS Service Endpoints in the Amazon Web Services General Reference. To learn more about AWS Regions, see Managing AWS Regions in the Amazon Web Services General Reference.
In each Region, AWS maintains multiple Availability Zones. These Availability Zones are physically isolated from each other, but are united by private, low-latency, high-throughput, and highly redundant network connections. These Availability Zones enable us to provide very high levels of availability and redundancy, while also minimizing latency. To learn more about the number of Availability Zones that are available in each Region, see AWS Global Infrastructure.
Configuration Set
Resources
The Amazon Pinpoint SMS and Voice REST API includes the following resources.
Topics
• Configuration Set (p. 2)
• Configuration Sets (p. 5)
• Event Destination (p. 10)
• Event Destinations (p. 18)
• Voice Message (p. 28)
Configuration Set
A configuration set is a set of rules that you apply to the voice messages that you send. In a configuration set, you can specify a destination for specific types of events related to voice messages. For example, when a message is successfully delivered, you can log that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.
When you send a voice message, you have to specify one (and only one) configuration set.
URI
/v1/sms-voice/configuration-sets/ConfigurationSetName
HTTP methods
DELETE
Operation ID: DeleteConfigurationSet Deletes an existing configuration set.
Path parameters
Name Type Required Description
ConfigurationSetNameString True The name of the configuration set that you want to delete.
Responses
Status code Response model Description
200 DeleteConfigurationSetResponse (p. 3)An empty object that indicates that the configuration set was deleted successfully.
400 BadRequestException (p. 3)The request contained syntax that the API couldn't interpret.
Modify the request and try again.
Schemas
Status code Response model Description
404 NotFoundException (p. 3) The requested resource wasn't found.
429 TooManyRequestsException (p. 3)You've issued too many requests to the resource. Wait a few minutes, and then try again.
500 InternalServiceErrorException (p. 4)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
OPTIONS
Responses
Status code Response model Description
200 None 200 response
Schemas
Response bodies
DeleteConfigurationSetResponse schema
{}
BadRequestException schema
{ "Message": "string"
}
NotFoundException schema
{ "Message": "string"
}
TooManyRequestsException schema
{
"Message": "string"
}
Properties
InternalServiceErrorException schema
{ "Message": "string"
}
Properties
BadRequestException
The input that you provided to the API is invalid.
Message
A description of the error that the API encountered.
Type: string Required: False
DeleteConfigurationSetResponse
An empty object that indicates that the configuration set was deleted successfully.
InternalServiceErrorException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
NotFoundException
The resource you attempted to access doesn't exist.
Message
A description of the error that the API encountered.
Type: string Required: False
TooManyRequestsException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
See also
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following:
DeleteConfigurationSet
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
Configuration Sets
A configuration set is a set of rules that you apply to the voice messages that you send. In a configuration set, you can specify a destination for specific types of events related to voice messages. For example, when a message is successfully delivered, you can log that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.
When you send a voice message, you have to specify one (and only one) configuration set.
URI
/v1/sms-voice/configuration-sets
HTTP methods
GET
Operation ID: ListConfigurationSets
Retrieves a list of configuration sets that are associated with your account in the current AWS Region.
Query parameters
Name Type Required Description
PageSize String False Used to specify the
number of items that should be returned in the response.
NextToken String False A token returned from
a previous call to the API that indicates the position in the list of results.
HTTP methods
Responses
Status code Response model Description
200 ListConfigurationSetsResponse (p. 7)An object that contains information about the configuration sets for your account in the current AWS Region.
400 BadRequestException (p. 7)The request contained syntax that the API couldn't interpret.
Modify the request and try again.
429 TooManyRequestsException (p. 8)You've issued too many requests to the resource. Wait a few minutes, and then try again.
500 InternalServiceErrorException (p. 8)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
POST
Operation ID: CreateConfigurationSet
Creates a new configuration set. After you create the configuration set, you can add one or more event destinations to it.
Responses
Status code Response model Description
200 CreateConfigurationSetResponse (p. 7)An empty object that indicates that the configuration set was successfully created.
400 BadRequestException (p. 7)The request contained syntax that the API couldn't interpret.
Modify the request and try again.
409 AlreadyExistsException (p. 8)The resource you tried to create already exists.
412 LimitExceededException (p. 8)You've tried to create a number of resources that exceeds the maximum number of resources for your account. For more information, see Amazon Pinpoint Quotas in the Amazon Pinpoint Developer Guide.
429 TooManyRequestsException (p. 8)You've issued too many requests to the resource. Wait a few minutes, and then try again.
Schemas
Status code Response model Description
500 InternalServiceErrorException (p. 8)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
OPTIONS
Responses
Status code Response model Description
200 None Indicates that the API
successfully received the request.
Schemas
Request bodies
POST schema
{
"ConfigurationSetName": "string"
}
Response bodies
ListConfigurationSetsResponse schema
{ "NextToken": "string", "ConfigurationSets": [ "string"
]}
CreateConfigurationSetResponse schema
{}
BadRequestException schema
{
"Message": "string"
}
Properties
AlreadyExistsException schema
{ "Message": "string"
}
LimitExceededException schema
{
"Message": "string"
}
TooManyRequestsException schema
{ "Message": "string"
}
InternalServiceErrorException schema
{ "Message": "string"
}
Properties
AlreadyExistsException
The resource that you specified in your request already exists.
Message
A description of the error that the API encountered.
Type: string Required: False
BadRequestException
The input that you provided to the API is invalid.
Message
A description of the error that the API encountered.
Type: string Required: False
CreateConfigurationSetRequest
A request to create a new configuration set.
Properties
ConfigurationSetName
The name that you want to give the configuration set.
Type: string Required: True
CreateConfigurationSetResponse
An empty object that indicates that the configuration set was successfully created.
InternalServiceErrorException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
LimitExceededException
There are too many instances of the specified resource type.
Message
A description of the error that the API encountered.
Type: string Required: False
ListConfigurationSetsResponse
An object that contains information about configuration sets.
NextToken
A token returned from a previous call to ListConfigurationSets to indicate the position in the list of configuration sets.
Type: string Required: False
ConfigurationSets
An object that contains a list of configuration sets for your account in the current AWS Region.
Type: Array of type string Required: False
TooManyRequestsException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
See also
Message
A description of the error that the API encountered.
Type: string Required: False
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following:
ListConfigurationSets
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
CreateConfigurationSet
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
Event Destination
A configuration set is a set of rules that you apply to the voice messages that you send. In a configuration set, you can specify an event destination for specific types of events related to voice messages. An event destination is a location that you publish information about your voice calls to. For example, when a message is successfully delivered, you can log that event to an Amazon CloudWatch destination, or send notifications to endpoints that are subscribed to an Amazon SNS topic.
Each configuration set can contain between 0 and 10 event destinations. Each event destination can contain a reference to one (and only one) destination, such as an Amazon CloudWatch log or Amazon Kinesis Data Firehose destination.
URI
URI
/v1/sms-voice/configuration-sets/ConfigurationSetName/event- destinations/EventDestinationName
HTTP methods
PUT
Operation ID: UpdateConfigurationSetEventDestination Updates an event destination in a configuration set.
Path parameters
Name Type Required Description
EventDestinationNameString True The name of the event destination that you want to update.
ConfigurationSetNameString True The name of the configuration set that contains the event destination that you want to update.
Responses
Status code Response model Description
200 UpdateConfigurationSetEventDestinationResponse (p. 13)An empty object that indicates that the event destination was updated successfully.
400 BadRequestException (p. 13)The request contained syntax that the API couldn't interpret.
Modify the request and try again.
404 NotFoundException (p. 13) The requested resource wasn't found.
429 TooManyRequestsException (p. 13)You've made too many PUT requests in one second. Requests are limited to 1 per second.
500 InternalServiceErrorException (p. 13)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
DELETE
Operation ID: DeleteConfigurationSetEventDestination
Schemas
Deletes an event destination from a configuration set.
Path parameters
Name Type Required Description
EventDestinationNameString True The name of the event destination that you want to delete.
ConfigurationSetNameString True The name of the configuration set that you want to delete.
Responses
Status code Response model Description
200 DeleteConfigurationSetEventDestinationResponse (p. 13)An empty object that indicates that the event destination was deleted successfully.
400 BadRequestException (p. 13)The request contained syntax that the API couldn't interpret.
Modify the request and try again.
404 NotFoundException (p. 13) The requested resource wasn't found.
429 TooManyRequestsException (p. 13)You've made too many DELETE requests in one second. Requests are limited to 1 per second.
500 InternalServiceErrorException (p. 13)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
OPTIONS
Responses
Status code Response model Description
200 None 200 response
Schemas
Request bodies
PUT schema
{
Schemas
"EventDestination": { "SnsDestination": { "TopicArn": "string"
},
"Enabled": boolean, "MatchingEventTypes": [ enum
],
"CloudWatchLogsDestination": { "IamRoleArn": "string", "LogGroupArn": "string"
},
"KinesisFirehoseDestination": { "DeliveryStreamArn": "string", "IamRoleArn": "string"
} }}
Response bodies
UpdateConfigurationSetEventDestinationResponse schema
{}
DeleteConfigurationSetEventDestinationResponse schema
{}
BadRequestException schema
{ "Message": "string"
}
NotFoundException schema
{ "Message": "string"
}
TooManyRequestsException schema
{
"Message": "string"
}
InternalServiceErrorException schema
{ "Message": "string"
Properties
}
Properties
BadRequestException
The input that you provided to the API is invalid.
Message
A description of the error that the API encountered.
Type: string Required: False
CloudWatchLogsDestination
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
IamRoleArn
The Amazon Resource Name (ARN) of an Amazon Identity and Access Management (IAM) role that is able to write event data to an Amazon CloudWatch destination.
Type: string Required: True
LogGroupArn
The name of the Amazon CloudWatch Log Group that you want to record events in.
Type: string Required: True
DeleteConfigurationSetEventDestinationResponse
An empty object that indicates that the event destination was deleted successfully.
EventDestinationDefinition
An object that defines a single event destination.
SnsDestination
An object that contains information about an event destination that sends data to Amazon SNS.
Type: SnsDestination (p. 16) Required: False
Enabled
Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
Properties
Type: boolean Required: False
MatchingEventTypes
The types of events that you want to send to the event destination. Possible values:
• INITIATED_CALL - Amazon Pinpoint started trying to deliver the message to the recipient.
• RINGING - Amazon Pinpoint initiated the phone call, and the recipient's phone is ringing.
• ANSWERED - Amazon Pinpoint established a connection with the recipient.
Note
This status doesn't necessarily mean that Amazon Pinpoint made a connection with a human recipient. For example, it could indicate that Amazon Pinpoint established a connection with a voicemail system.• COMPLETED_CALL - Amazon Pinpoint played the audio message to the recipient.
Note
This status doesn't necessarily mean that the message was delivered to a human recipient. For example, it could indicate that the audio message was delivered to a voicemail system.• BUSY - Amazon Pinpoint attempted to deliver the voice message, but received a busy signal.
• FAILED - Amazon Pinpoint wasn't able to deliver the message.
• NO_ANSWER - Amazon Pinpoint attempted to deliver the message, but the recipient didn't answer.
Type: Array of type EventType (p. 15) Required: True
CloudWatchLogsDestination
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
Type: CloudWatchLogsDestination (p. 14) Required: False
KinesisFirehoseDestination
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
Type: KinesisFirehoseDestination (p. 16) Required: False
EventType
The types of events that are sent to the event destination. Possible values are:
INITIATED_CALL RINGING
ANSWERED COMPLETED_CALL BUSYFAILED
NO_ANSWER
Properties
InternalServiceErrorException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
KinesisFirehoseDestination
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
DeliveryStreamArn
The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose destination that you want to use in the event destination.
Type: string Required: True
IamRoleArn
The Amazon Resource Name (ARN) of an IAM role that can write data to an Amazon Kinesis Data Firehose stream.
Type: string Required: True
NotFoundException
The resource you attempted to access doesn't exist.
Message
A description of the error that the API encountered.
Type: string Required: False
SnsDestination
An object that contains information about an event destination that sends data to Amazon SNS.
TopicArn
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
Type: string Required: True
See also
TooManyRequestsException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
UpdateConfigurationSetEventDestinationRequest
An object that defines a request to update an existing event destination.
EventDestination
An object that defines a single event destination.
Type: EventDestinationDefinition (p. 14) Required: True
UpdateConfigurationSetEventDestinationResponse
An empty object that indicates that the event destination was updated successfully.
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following:
UpdateConfigurationSetEventDestination
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
DeleteConfigurationSetEventDestination
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
Event Destinations
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
Event Destinations
An event destination is a location where you send response information about the voice messages that you send. For example, when a voice message is delivered successfully, you can send information about that event to an Amazon CloudWatch destination.
Each configuration set can contain between 0 and 10 event destinations. Each event destination can contain a reference to one (and only one) destination, such as an Amazon CloudWatch log or Amazon Kinesis Data Firehose destination.
URI
/v1/sms-voice/configuration-sets/ConfigurationSetName/event-destinations
HTTP methods
GET
Operation ID: GetConfigurationSetEventDestinations
Retrieves information about an event destination, including the types of events it reports, the Amazon Resource Name (ARN) of the destination, and the name of the event destination.
Path parameters
Name Type Required Description
ConfigurationSetNameString True The name of the configuration set that contains the event destination that you want to obtain information about.
Responses
Status code Response model Description
200 GetConfigurationSetEventDestinationsResponse (p. 20)An object that contains information about an event destination.
400 BadRequestException (p. 21)The request contained syntax that the API couldn't interpret.
Modify the request and try again.
404 NotFoundException (p. 21) The requested resource wasn't found.
HTTP methods
Status code Response model Description
429 TooManyRequestsException (p. 21)You've made too many GET requests in one second. Requests are limited to 1 per second.
500 InternalServiceErrorException (p. 22)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
POST
Operation ID: CreateConfigurationSetEventDestination Creates a new event destination in a configuration set.
Path parameters
Name Type Required Description
ConfigurationSetNameString True The name of the configuration set that you want to create the event destination in.
Responses
Status code Response model Description
200 CreateConfigurationSetEventDestinationResponse (p. 21)An empty object that indicates that the event destination was created successfully.
400 BadRequestException (p. 21)The request contained syntax that the API couldn't interpret.
Modify the request and try again.
404 NotFoundException (p. 21) The requested resource wasn't found.
409 AlreadyExistsException (p. 21)The resource you tried to create already exists.
412 LimitExceededException (p. 21)You've tried to create a number of resources that exceeds the maximum number of resources for your account. For more information, see Amazon Pinpoint Quotas in the Amazon Pinpoint Developer Guide.
429 TooManyRequestsException (p. 21)You've issued too many requests to the resource. Wait a few minutes, and then try again.
Schemas
Status code Response model Description
500 InternalServiceErrorException (p. 22)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
OPTIONS
Responses
Status code Response model Description
200 None 200 response
Schemas
Request bodies
POST schema
{ "EventDestinationName": "string", "EventDestination": {
"SnsDestination": { "TopicArn": "string"
},
"Enabled": boolean, "MatchingEventTypes": [ enum
],
"CloudWatchLogsDestination": { "IamRoleArn": "string", "LogGroupArn": "string"
},
"KinesisFirehoseDestination": { "DeliveryStreamArn": "string", "IamRoleArn": "string"
} }}
Response bodies
GetConfigurationSetEventDestinationsResponse schema
{
"EventDestinations": [ {
"SnsDestination": { "TopicArn": "string"
},
"Enabled": boolean, "MatchingEventTypes": [
Schemas
enum ],
"CloudWatchLogsDestination": { "IamRoleArn": "string", "LogGroupArn": "string"
},
"KinesisFirehoseDestination": { "DeliveryStreamArn": "string", "IamRoleArn": "string"
},
"Name": "string"
} ]}
CreateConfigurationSetEventDestinationResponse schema
{}
BadRequestException schema
{ "Message": "string"
}
NotFoundException schema
{
"Message": "string"
}
AlreadyExistsException schema
{
"Message": "string"
}
LimitExceededException schema
{ "Message": "string"
}
TooManyRequestsException schema
{ "Message": "string"
}
Properties
InternalServiceErrorException schema
{ "Message": "string"
}
Properties
AlreadyExistsException
The resource that you specified in your request already exists.
Message
A description of the error that the API encountered.
Type: string Required: False
BadRequestException
The input that you provided to the API is invalid.
Message
A description of the error that the API encountered.
Type: string Required: False
CloudWatchLogsDestination
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
IamRoleArn
The Amazon Resource Name (ARN) of an Amazon Identity and Access Management (IAM) role that is able to write event data to an Amazon CloudWatch destination.
Type: string Required: True
LogGroupArn
The name of the Amazon CloudWatch Log Group that you want to record events in.
Type: string Required: True
CreateConfigurationSetEventDestinationRequest
An object that is used to define an event destination.
Properties
EventDestinationName
A name that identifies the event destination.
Type: string Required: True
EventDestination
An EventDestinationDefinition object that includes information about the event destination itself.
Type: EventDestinationDefinition (p. 24) Required: True
CreateConfigurationSetEventDestinationResponse
An empty object that indicates that the event destination was created successfully.
EventDestination
An object that defines an event destination.
SnsDestination
An object that contains information about an event destination that sends data to Amazon SNS.
Type: SnsDestination (p. 27) Required: False
Enabled
Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
Type: boolean Required: False
MatchingEventTypes
The types of events that you want to send to the event destination. Possible values:
• INITIATED_CALL - Amazon Pinpoint started trying to deliver the message to the recipient.
• RINGING - Amazon Pinpoint initiated the phone call, and the recipient's phone is ringing.
• ANSWERED - Amazon Pinpoint established a connection with the recipient.
Note
This status doesn't necessarily mean that Amazon Pinpoint made a connection with a human recipient. For example, it could indicate that Amazon Pinpoint established a connection with a voicemail system.• COMPLETED_CALL - Amazon Pinpoint played the audio message to the recipient.
Note
This status doesn't necessarily mean that the message was delivered to a human recipient. For example, it could indicate that the audio message was delivered to a voicemail system.• BUSY - Amazon Pinpoint attempted to deliver the voice message, but received a busy signal.
Properties
• FAILED - Amazon Pinpoint wasn't able to deliver the message.
• NO_ANSWER - Amazon Pinpoint attempted to deliver the message, but the recipient didn't answer.
Type: Array of type EventType (p. 25) Required: False
CloudWatchLogsDestination
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
Type: CloudWatchLogsDestination (p. 22) Required: False
KinesisFirehoseDestination
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
Type: KinesisFirehoseDestination (p. 26) Required: False
Name
A name that identifies the event destination configuration.
Type: string Required: False
EventDestinationDefinition
An object that defines a single event destination.
SnsDestination
An object that contains information about an event destination that sends data to Amazon SNS.
Type: SnsDestination (p. 27) Required: False
Enabled
Indicates whether or not the event destination is enabled. If the event destination is enabled, then Amazon Pinpoint sends response data to the specified event destination.
Type: boolean Required: False
MatchingEventTypes
The types of events that you want to send to the event destination. Possible values:
• INITIATED_CALL - Amazon Pinpoint started trying to deliver the message to the recipient.
• RINGING - Amazon Pinpoint initiated the phone call, and the recipient's phone is ringing.
Properties
• ANSWERED - Amazon Pinpoint established a connection with the recipient.
Note
This status doesn't necessarily mean that Amazon Pinpoint made a connection with a human recipient. For example, it could indicate that Amazon Pinpoint established a connection with a voicemail system.
• COMPLETED_CALL - Amazon Pinpoint played the audio message to the recipient.
Note
This status doesn't necessarily mean that the message was delivered to a human recipient. For example, it could indicate that the audio message was delivered to a voicemail system.
• BUSY - Amazon Pinpoint attempted to deliver the voice message, but received a busy signal.
• FAILED - Amazon Pinpoint wasn't able to deliver the message.
• NO_ANSWER - Amazon Pinpoint attempted to deliver the message, but the recipient didn't answer.
Type: Array of type EventType (p. 25) Required: True
CloudWatchLogsDestination
An object that contains information about an event destination that sends data to Amazon CloudWatch Logs.
Type: CloudWatchLogsDestination (p. 22) Required: False
KinesisFirehoseDestination
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
Type: KinesisFirehoseDestination (p. 26) Required: False
EventType
The types of events that are sent to the event destination. Possible values are:
INITIATED_CALL RINGING
ANSWERED COMPLETED_CALL BUSYFAILED
NO_ANSWER
GetConfigurationSetEventDestinationsResponse
An object that contains information about an event destination.
EventDestinations
An array of EventDestination objects. Each EventDestination object includes ARNs and other information that define an event destination.
Properties
Type: Array of type EventDestination (p. 23) Required: False
InternalServiceErrorException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
KinesisFirehoseDestination
An object that contains information about an event destination that sends data to Amazon Kinesis Data Firehose.
DeliveryStreamArn
The Amazon Resource Name (ARN) of the Amazon Kinesis Data Firehose destination that you want to use in the event destination.
Type: string Required: True
IamRoleArn
The Amazon Resource Name (ARN) of an IAM role that can write data to an Amazon Kinesis Data Firehose stream.
Type: string Required: True
LimitExceededException
There are too many instances of the specified resource type.
Message
A description of the error that the API encountered.
Type: string Required: False
NotFoundException
The resource you attempted to access doesn't exist.
Message
A description of the error that the API encountered.
See also
Type: string Required: False
SnsDestination
An object that contains information about an event destination that sends data to Amazon SNS.
TopicArn
The Amazon Resource Name (ARN) of the Amazon SNS topic that you want to publish events to.
Type: string Required: True
TooManyRequestsException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following:
GetConfigurationSetEventDestinations
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
CreateConfigurationSetEventDestination
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
Voice Message
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
Voice Message
The Amazon Pinpoint SMS and Voice API lets you create voice messages from a text script, and then deliver those messages to your customers over the phone.
URI
/v1/sms-voice/voice/message
HTTP methods
POST
Operation ID: SendVoiceMessage
Creates a new voice message and sends it to a recipient's phone number.
Responses
Status code Response model Description
200 SendVoiceMessageResponse (p. 29)An object that contains the Message ID of a voice message that was sent successfully.
400 BadRequestException (p. 29)The destination number is blocked by AWS because it has a high risk of being used for fraudulent activities, or because of regulatory reasons.
429 TooManyRequestsException (p. 29)You've issued too many requests to the resource. Wait a few minutes, and then try again.
500 InternalServiceErrorException (p. 29)The API encountered an unexpected error and couldn't complete the request. You might be able to successfully issue the request again in the future.
OPTIONS
Responses
Status code Response model Description
200 None 200 response
Schemas
Schemas
Request bodies
POST schema
{ "Content": {
"CallInstructionsMessage": { "Text": "string"
},
"PlainTextMessage": { "LanguageCode": "string", "Text": "string",
"VoiceId": "string"
},
"SSMLMessage": {
"LanguageCode": "string", "Text": "string",
"VoiceId": "string"
}
}, "OriginationPhoneNumber": "string", "ConfigurationSetName": "string", "DestinationPhoneNumber": "string", "CallerId": "string"
}
Response bodies
SendVoiceMessageResponse schema
{ "MessageId": "string"
}
BadRequestException schema
{
"Message": "string"
}
TooManyRequestsException schema
{
"Message": "string"
}
InternalServiceErrorException schema
{ "Message": "string"
}
Properties
Properties
BadRequestException
The input that you provided to the API is invalid.
Message
A description of the error that the API encountered.
Type: string Required: False
CallInstructionsMessageType
An object that defines a message that contains text formatted using Amazon Pinpoint Call Instructions markup.
Note
The ability to send messages using Amazon Pinpoint Call Instructions is currently a pre- production feature. It isn't currently available to all customers.Text
The text, in Amazon Pinpoint Call Instructions markup, to deliver to the recipient.
Type: string Required: True
InternalServiceErrorException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
PlainTextMessageType
An object that defines a message that contains unformatted text.
LanguageCode
The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.
Type: string Required: False
Text
The plain (not SSML-formatted) text to deliver to the recipient.
Properties
Type: string Required: True
VoiceId
The name of the voice that you want to use to deliver the message. For a complete list of supported voices, see the Amazon Polly Developer Guide.
Type: string Required: False
SSMLMessageType
An object that defines a message that contains SSML-formatted text.
LanguageCode
The language to use when delivering the message. For a complete list of supported languages, see the Amazon Polly Developer Guide.
Type: string Required: False
Text
The SSML-formatted text to deliver to the recipient.
Type: string Required: True
VoiceId
The name of the voice that you want to use to deliver the message. For a complete list of supported voices, see the Amazon Polly Developer Guide.
Type: string Required: False
SendVoiceMessageRequest
A request to create and send a new voice message.
Content
An object that contains a voice message and information about the recipient that you want to send it to.
Type: VoiceMessageContent (p. 33) Required: False
OriginationPhoneNumber
The long code to send the message from. This value should be one of the dedicated long codes that's assigned to your AWS account. Although it isn't required, we recommend that you specify the long code in E.164 format, for example +12065550100, to ensure prompt and accurate delivery of your message.
Properties
This isn't necessarily the phone number that appears on recipients' devices when they receive the message, because you can specify the CallerId property in the request.
Type: string Required: True
ConfigurationSetName
The name of the configuration set that you want to use to send the message.
Type: string Required: False
DestinationPhoneNumber
The phone number that you want to send the voice message to.
Although it isn't required, we recommend that you specify the phone number in E.164 format to ensure prompt and accurate delivery. You can use the Phone Number Validate resource in the Amazon Pinpoint API to convert phone numbers to E.164 format.
Type: string Required: True
CallerId
The phone number that appears on recipients' devices when they receive the message.
Note
You can't specify a CallerId parameter if your account is in the sandbox.Type: string Required: False
SendVoiceMessageResponse
An object that contains the Message ID of a voice message that was sent successfully.
MessageId
A unique identifier for the voice message.
Type: string Required: False
TooManyRequestsException
This error occurs when there is an unexpected issue with the Amazon Pinpoint SMS and Voice API service.
Message
A description of the error that the API encountered.
Type: string Required: False
See also
VoiceMessageContent
An object that contains the voice message that you want to send.
CallInstructionsMessage
An object that defines a message formatted using Amazon Pinpoint Call Instructions markup.
Type: CallInstructionsMessageType (p. 30) Required: False
PlainTextMessage
An object that defines a message that contains unformatted text.
Type: PlainTextMessageType (p. 30) Required: False
SSMLMessage
An object that defines a message that contains SSML-formatted text.
Type: SSMLMessageType (p. 31) Required: False
See also
For more information about using this API in one of the language-specific AWS SDKs and references, see the following:
SendVoiceMessage
• AWS Command Line Interface
• AWS SDK for .NET
• AWS SDK for C++
• AWS SDK for Go
• AWS SDK for Java V2
• AWS SDK for JavaScript
• AWS SDK for PHP V3
• AWS SDK for Python
• AWS SDK for Ruby V3
Operations
The Amazon Pinpoint SMS and Voice REST API includes the following operations.
• CreateConfigurationSet (p. 6)
Creates a new configuration set. After you create the configuration set, you can add one or more event destinations to it.
• CreateConfigurationSetEventDestination (p. 19) Creates a new event destination in a configuration set.
• DeleteConfigurationSet (p. 2) Deletes an existing configuration set.
• DeleteConfigurationSetEventDestination (p. 11) Deletes an event destination from a configuration set.
• GetConfigurationSetEventDestinations (p. 18)
Retrieves information about an event destination, including the types of events it reports, the Amazon Resource Name (ARN) of the destination, and the name of the event destination.
• ListConfigurationSets (p. 5)
Retrieves a list of configuration sets that are associated with your account in the current AWS Region.
• SendVoiceMessage (p. 28)
Creates a new voice message and sends it to a recipient's phone number.
• UpdateConfigurationSetEventDestination (p. 11) Updates an event destination in a configuration set.
AWS glossary
For the latest AWS terminology, see the AWS glossary in the AWS General Reference.
Document History
The following table describes the important changes to the documentation since the last release of the Amazon Pinpoint SMS and Voice API.
• API version: 2018-09-05 (latest)
• Latest documentation update: April 25, 2019
Change Description Date
Regional availability The Amazon Pinpoint SMS and Voice API is now available in the AWS Asia Pacific (Mumbai) and Asia Pacific (Sydney) Regions.
April 25, 2019
New operation Added the
ListConfigurationSets operation, which returns a list of the configuration sets that are associated with your account.
January 24, 2019
New feature Configuration sets can now use
Amazon Simple Notification Service (Amazon SNS) as an event destination.
December 21, 2018
Regional availability The Amazon Pinpoint SMS and Voice API is now available in the AWS US West (Oregon) and Europe (Frankfurt) Regions.
December 21, 2018
Initial release This release introduces the Amazon Pinpoint SMS and Voice API.
November 15, 2018