put_keyword

PinpointSMSVoiceV2.Client.put_keyword(**kwargs)

Creates or updates a keyword configuration on an origination phone number or pool.

A keyword is a word that you can search for on a particular phone number or pool. It is also a specific word or phrase that an end user can send to your number to elicit a response, such as an informational message or a special offer. When your number receives a message that begins with a keyword, Amazon Pinpoint responds with a customizable message.

If you specify a keyword that isn't valid, an Error is returned.

See also: AWS API Documentation

Request Syntax

response = client.put_keyword(
    OriginationIdentity='string',
    Keyword='string',
    KeywordMessage='string',
    KeywordAction='AUTOMATIC_RESPONSE'|'OPT_OUT'|'OPT_IN'
)
Parameters
  • OriginationIdentity (string) --

    [REQUIRED]

    The origination identity to use such as a PhoneNumberId, PhoneNumberArn, SenderId or SenderIdArn. You can use DescribePhoneNumbers get the values for PhoneNumberId and PhoneNumberArn while DescribeSenderIds can be used to get the values for SenderId and SenderIdArn.

  • Keyword (string) --

    [REQUIRED]

    The new keyword to add.

  • KeywordMessage (string) --

    [REQUIRED]

    The message associated with the keyword.

    • AUTOMATIC_RESPONSE: A message is sent to the recipient.
    • OPT_OUT: Keeps the recipient from receiving future messages.
    • OPT_IN: The recipient wants to receive future messages.
  • KeywordAction (string) -- The action to perform for the new keyword when it is received.
Return type

dict

Returns

Response Syntax

{
    'OriginationIdentityArn': 'string',
    'OriginationIdentity': 'string',
    'Keyword': 'string',
    'KeywordMessage': 'string',
    'KeywordAction': 'AUTOMATIC_RESPONSE'|'OPT_OUT'|'OPT_IN'
}

Response Structure

  • (dict) --

    • OriginationIdentityArn (string) --

      The PhoneNumberArn or PoolArn that the keyword was associated with.

    • OriginationIdentity (string) --

      The PhoneNumberId or PoolId that the keyword was associated with.

    • Keyword (string) --

      The keyword that was added.

    • KeywordMessage (string) --

      The message associated with the keyword.

    • KeywordAction (string) --

      The action to perform when the keyword is used.

Exceptions

  • PinpointSMSVoiceV2.Client.exceptions.ServiceQuotaExceededException
  • PinpointSMSVoiceV2.Client.exceptions.ThrottlingException
  • PinpointSMSVoiceV2.Client.exceptions.AccessDeniedException
  • PinpointSMSVoiceV2.Client.exceptions.ResourceNotFoundException
  • PinpointSMSVoiceV2.Client.exceptions.ValidationException
  • PinpointSMSVoiceV2.Client.exceptions.ConflictException
  • PinpointSMSVoiceV2.Client.exceptions.InternalServerException