SendNotifyVoiceMessage - AWS End User Messaging SMS

SendNotifyVoiceMessage

Sends a templated voice message through a notify configuration to a recipient's phone number.

Request Syntax

{ "ConfigurationSetName": "string", "Context": { "string" : "string" }, "DestinationPhoneNumber": "string", "DryRun": boolean, "MessageFeedbackEnabled": boolean, "NotifyConfigurationId": "string", "TemplateId": "string", "TemplateVariables": { "string" : "string" }, "TimeToLive": number, "VoiceId": "string" }

Request Parameters

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

The request accepts the following data in JSON format.

ConfigurationSetName

The name of the configuration set to use. This can be either the ConfigurationSetName or ConfigurationSetArn.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [A-Za-z0-9_:/-]+

Required: No

Context

You can specify custom data in this field. If you do, that data is logged to the event destination.

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 5 items.

Key Length Constraints: Minimum length of 1. Maximum length of 100.

Key Pattern: \S+

Value Length Constraints: Minimum length of 1. Maximum length of 800.

Value Pattern: (?!\s)^[\s\S]+(?<!\s)

Required: No

DestinationPhoneNumber

The destination phone number in E.164 format.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 20.

Pattern: \+?[1-9][0-9]{1,18}

Required: Yes

DryRun

When set to true, the message is checked and validated, but isn't sent to the end recipient.

Type: Boolean

Required: No

MessageFeedbackEnabled

Set to true to enable message feedback for the message. When a user receives the message you need to update the message status using PutMessageFeedback.

Type: Boolean

Required: No

NotifyConfigurationId

The unique identifier of the notify configuration to use for sending the message. This can be either the NotifyConfigurationId or NotifyConfigurationArn.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: [A-Za-z0-9_:/-]+

Required: Yes

TemplateId

The unique identifier of the template to use for the message.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: ([A-Za-z0-9_-]*|UNSET_DEFAULT_TEMPLATE)

Required: No

TemplateVariables

A map of template variable names and their values. All variable values are passed as strings regardless of the declared variable type. For example, pass INTEGER values as "42" and BOOLEAN values as "true" or "false".

Type: String to string map

Map Entries: Minimum number of 0 items. Maximum number of 20 items.

Key Length Constraints: Minimum length of 1. Maximum length of 64.

Key Pattern: [A-Za-z0-9_]+

Value Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: Yes

TimeToLive

How long the voice message is valid for, in seconds. By default this is 72 hours.

Type: Integer

Valid Range: Minimum value of 5. Maximum value of 259200.

Required: No

VoiceId

The voice ID to use for the voice message.

Type: String

Valid Values: AMY | ASTRID | BIANCA | BRIAN | CAMILA | CARLA | CARMEN | CELINE | CHANTAL | CONCHITA | CRISTIANO | DORA | EMMA | ENRIQUE | EWA | FILIZ | GERAINT | GIORGIO | GWYNETH | HANS | INES | IVY | JACEK | JAN | JOANNA | JOEY | JUSTIN | KARL | KENDRA | KIMBERLY | LEA | LIV | LOTTE | LUCIA | LUPE | MADS | MAJA | MARLENE | MATHIEU | MATTHEW | MAXIM | MIA | MIGUEL | MIZUKI | NAJA | NICOLE | PENELOPE | RAVEENA | RICARDO | RUBEN | RUSSELL | SALLI | SEOYEON | TAKUMI | TATYANA | VICKI | VITORIA | ZEINA | ZHIYU

Required: No

Response Syntax

{ "MessageId": "string", "ResolvedMessageBody": "string", "TemplateId": "string" }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

MessageId

The unique identifier for the message.

Type: String

ResolvedMessageBody

The message body after template variable substitution has been applied.

Type: String

TemplateId

The unique identifier of the template used for the message.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: ([A-Za-z0-9_-]*|UNSET_DEFAULT_TEMPLATE)

Errors

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

AccessDeniedException

The request was denied because you don't have sufficient permissions to access the resource.

Reason

The reason for the exception.

HTTP Status Code: 400

ConflictException

Your request has conflicting operations. This can occur if you're trying to perform more than one operation on the same resource at the same time or it could be that the requested action isn't valid for the current state or configuration of the resource.

Reason

The reason for the exception.

ResourceId

The unique identifier of the request.

ResourceType

The type of resource that caused the exception.

HTTP Status Code: 400

InternalServerException

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.

RequestId

The unique identifier of the request.

HTTP Status Code: 500

ResourceNotFoundException

A requested resource couldn't be found.

ResourceId

The unique identifier of the resource.

ResourceType

The type of resource that caused the exception.

HTTP Status Code: 400

ServiceQuotaExceededException

The request would cause a service quota to be exceeded.

Reason

The reason for the exception.

HTTP Status Code: 400

ThrottlingException

An error that occurred because too many requests were sent during a certain amount of time.

HTTP Status Code: 400

ValidationException

A validation exception for a field.

Fields

The field that failed validation.

Reason

The reason for the exception.

HTTP Status Code: 400

See Also

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