platform
2fa
2fa-configuration
manage-message-templates

Create 2FA SMS or Voice message template

Once you have your 2FA application, create one or more message templates where your PIN will be dynamically included when you send the PIN message over SMS or Voice.

post/2fa/2/applications/{appId}/messages

Request

  • Base URL
    https://api.infobip.com (the document declares no server; this is the origin it was published from)
  • Auth
    • HTTP basic
    • or API key in header Authorization
    • or API key in header Authorization
    • or OAuth 2
      Client credentials
      Token URL: https://api.infobip.com/auth/1/oauth2/token

Path parameters

appIdstring required

ID of application for which requested message was created.

Request body

languagestring

Language code which message is written in. This is used when sending text-to-speech messages. More about Text-to-speech functionality and supported TTS languages can be found here. If not set, default language is English [en]. If voice is not set, then default voice for that specific language is used. In the case of English language, the voice is [Joanna].

messageTextstring required

Content of the message being sent which contains at minimum one placeholder for a PIN code ({{pin}}). Placeholder format is {{placeholderName}}.

pinLengthinteger

PIN code length.

pinType'NUMERIC' | 'ALPHA' | 'HEX' | 'ALPHANUMERIC' required
repeatDTMFstring

If the PIN is sent as a voice message, the DTMF code allows the recipient to replay the message.

senderIdstring

The name that will appear as the sender of the 2FA message (Example: CompanyName).

speechRatenumber double

The speed of narration for messages sent as voice. Supported range is from 0.5 to 2.

voiceNamestring

Defines the voice that will be used for the chosen language (example: Joanna). For each supported language, we may offer different voices (learn more here). You can use this method to retrieve all voices for the given language. If not defined, it will default to the standard voice for the selected language (if available). If the standard voice is not available, the request will fail. To avoid that, you can choose one of the neural voices (charges will apply).

Response

successful response

applicationIdstring

The ID of the application that represents your service (e.g. 2FA for login, 2FA for changing the password, etc.) for which the requested message has been created.

languagestring

Language code which message is written in. This is used when sending text-to-speech messages. More about Text-to-speech functionality and supported TTS languages can be found here. If not set, default language is English [en]. If voice is not set, then default voice for that specific language is used. In the case of English language, the voice is [Joanna].

messageIdstring

The ID of the message template (message body with the PIN placeholder) that is sent to the recipient.

messageTextstring

Text of a message that will be sent. Message text must contain pinPlaceholder.

pinLengthinteger

PIN code length.

pinPlaceholderstring

The PIN code placeholder that will be replaced with a generated PIN code.

pinType'NUMERIC' | 'ALPHA' | 'HEX' | 'ALPHANUMERIC'
repeatDTMFstring

In case PIN message is sent by Voice, DTMF code will enable replaying the message.

senderIdstring

The name that will appear as the sender of the 2FA message (Example: CompanyName).

speechRatenumber double

In case PIN message is sent by Voice, the speed of speech can be set for the message. Supported range is from 0.5 to 2.

voiceNamestring

Defines the voice that will be used for the chosen language (example: Joanna). For each supported language, we may offer different voices (learn more here). You can use this method to retrieve all voices for the given language. If not defined, it will default to the standard voice for the selected language (if available). If the standard voice is not available, the request will fail. To avoid that, you can choose one of the neural voices (charges will apply).

Changes

No recorded changes to this operation across all 1 revision of this API.