{"__v":2,"_id":"56249df185a31117001c53de","category":{"__v":7,"_id":"5624bbb785a31117001c5403","pages":["5653264657978b1700df716a","5655bcf8dd82540d00278c26","5655bfd81a06b61900c66873","5655c7c0a66be71700968dd7","5660588e4320a80d00bec124","56618ad455e4450d00e62b89","56f1685a2a85600e00ea3dca"],"project":"54eb50e5615ffc1900305a16","version":"54eb63b859b1172100334fae","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-10-19T09:45:27.364Z","from_sync":false,"order":8,"slug":"2-factor-authentication","title":"2-factor authentication"},"editedParams":true,"editedParams2":true,"parentDoc":null,"project":"54eb50e5615ffc1900305a16","user":"54eb4fdedf7add210007b29b","version":{"__v":21,"_id":"54eb63b859b1172100334fae","forked_from":"54eb63a1867e1917009b711d","project":"54eb50e5615ffc1900305a16","createdAt":"2015-02-23T17:30:32.501Z","releaseDate":"2015-02-23T17:30:32.501Z","categories":["54eb63b959b1172100334faf","54eb63b959b1172100334fb0","54eb63b959b1172100334fb1","54eb63b959b1172100334fb2","54ed8dd4ab373e2300f50eae","54ed99b2ab373e2300f50ede","55153a6de68daa2f00cff838","551546edbc466623002afe72","5515472ac28d6125001b8884","55154749c28d6125001b8885","555d9b4106dfec0d00d38ea7","5613e06e433e5735007c7708","5624bbb785a31117001c5403","56669e857cc81e0d00253f8e","568b8d837a42220d00498311","56a632277ef6620d00e2f18a","56d8147c3eb4dd0b00201aac","57a9ce2fac6db30e000d7efd","57a9cf4e944ea60e00dc3f74","58172386715dce0f00da4aa0","582dc59ee1b8692300c0dd03","589b19b4fec2730f0082e040","58b04a023529383900a759b5","58b92d1598157a0f004869bf"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-10-19T07:38:25.939Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"name":"","code":"PUT /2fa/1/applications/HJ675435E3A6EA43432G5F37A635KJ8B/messages/F66D67327326FCC HTTP/1.1\nHost: api.infobip.com\nAuthorization: Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==\nContent-Type: application/json\n\n{\n  \"pinType\":\"ALPHANUMERIC\",\n  \"pinLength\":6\n}","language":"json"}]},"method":"put","results":{"codes":[{"status":200,"language":"json","code":"{\n \"messageId\": \"F66D67327326FCC\",\n \"applicationId\": \"HJ675435E3A6EA43432G5F37A635KJ8B\",\n \"pinPlaceholder\": \"<pin>\",\n \"messageText\": \"Your pin is <pin>\",\n \"pinLength\": 6,\n \"pinType\": \"ALPHANUMERIC\",\n \"senderId\": \"Infobip 2FA\",\n \"language\": \"en\",\n \"repeatDTMF\": \"1#\",\n \"speechRate\": 1\n}","name":""},{"status":400,"language":"json","code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"INVALID_ARGUMENT\",\n      \"text\": \"Invalid argument\"\n    }\n  }\n}","name":"Invalid argument"},{"status":404,"language":"json","code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"MESSAGE_NOT_FOUND\",\n      \"text\": \"Message with given id cannot be found.\"\n    }\n  }\n}"},{"status":429,"language":"json","code":"{\n  \"requestError\": {\n    \"serviceException\": {\n      \"messageId\": \"THROTTLE_EXCEPTION\",\n      \"text\": \"Too many requests. Try again later.\"\n    }\n  }\n}"}]},"settings":"554860d6d2c8410d006c215e","auth":"required","params":[{"_id":"56249c2bce14050d008085e6","ref":"","in":"path","required":true,"desc":"2FA application ID for which the message was created.","default":"","type":"string","name":"applicationId"},{"_id":"56249df185a31117001c53df","ref":"","in":"path","required":true,"desc":"Requested message ID.","default":"","type":"string","name":"messageId"},{"_id":"56249c2bce14050d008085e5","ref":"","in":"body","required":false,"desc":"Type of PIN code that will be generated and sent as part of 2FA message. <br>You can set PIN type to numeric, alpha, alphanumeric or hex so parameter must have one of these values:<br> 1. **NUMERIC**<br> 2. **ALPHA**<br>3. **ALPHANUMERIC**<br>4. **HEX**<br>","default":"","type":"string","name":"pinType"},{"_id":"56249c2bce14050d008085e4","ref":"","in":"body","required":false,"desc":"PIN placeholder.<br>This value should be part of a message text and it will be replaced with generated PIN code.","default":"","type":"string","name":"pinPlaceholder"},{"_id":"56249c2bce14050d008085e3","ref":"","in":"body","required":false,"desc":"Text of a message that will be sent. <br>Message text should contain PIN placeholder.","default":"","type":"string","name":"messageText"},{"_id":"56249c2bce14050d008085e2","ref":"","in":"body","required":false,"desc":"PIN code length. <br>PIN code length should be between **1** and **8** characters.","default":"","type":"int","name":"pinLength"},{"_id":"56249c2bce14050d008085e1","ref":"","in":"body","required":false,"desc":"The name that will appear as the sender of the 2FA message (*Example:* CompanyName).","default":"","type":"string","name":"senderId"},{"_id":"5626123fd0f87e190014c526","ref":"","in":"body","required":false,"desc":"Language code of language in which message text is written. It is used for reading the message when it is sent via voice.<br>If no language is set, message will be read in English. Supported languages are listed in the table below.","default":"","type":"string","name":"language"},{"_id":"57e3ebd74d659c0e0006e954","ref":"","in":"body","required":false,"desc":"DTMF code which enables repeating message if subscriber enters it.","default":"","type":"string","name":"repeatDTMF"},{"_id":"57e3ebd74d659c0e0006e953","ref":"","in":"body","required":false,"desc":"The speed of speech for the resulting message. Supported range is from 0.5 to 2.","default":"1","type":"double","name":"speechRate"}],"url":"/2fa/:version/applications/:applicationId/messages/:messageId"},"isReference":true,"order":7,"body":"## Response format\n\nOn success, response header HTTP status code will be `200 OK`  and the body will contain created [application object](#application-response-body-parameters) in JSON format. \n\nOn error, you will receive an [error response status code](doc:2fa-status-codes-and-error-details) in the header and the response body will contain an [error object](doc:2fa-status-codes-and-error-details). If you try to create an application when you do not have the user’s authorization, you will receive an error `401` Unauthorized.\n\n### Response\n\n|Parameter|Type|Description|\n|-|-|-|\n|*messageId*|String|2FA message ID.|\n|*applicationId*|String|2FA application ID for which the message was created.|\n|*pinPlaceholder*|String|PIN code placeholder. Right before sending SMS, PIN code placeholder will be replaced with generated PIN code.|\n|*messageText*|String|Text of a message that will be sent. |\n|*pinLength*|Integer|PIN code length.|\n|*pinType*|String|Type of PIN code that will be generated and sent as part of 2FA message.|\n|*senderId*|String| The name that will appear as the sender of the 2FA message (Example: CompanyName).|\n|*language*|String|Language code of language in which message text is written. It is used for reading the message when it is sent via voice. If no language is set, message will be read in English. Supported languages are listed in the table below.|\n\n#### Suported languages\n\n|Language code|Language|\n|-|-|\n|*en*|English|\n|*es*|Spanish|\n|*ca*|Catalan|\n|*zh-cn*|Chinese - simplified|\n|*zh-tw*|Chinese - traditional|\n|*da*|Danish|\n|*nl*|Dutch|\n|*fr*|French|\n|*de*|German|\n|*it*|Italian|\n|*ja*|Japanese|\n|*ko*|Korean|\n|*no*|Norwegian|\n|*pl*|Polish|\n|*pt-pt*|Portuguese|\n|*ru*|Russian|\n|*sv*|Swedish|\n|*fi*|Finnish|","excerpt":"This method allows you to update 2FA message for specific application.","slug":"message-update","type":"endpoint","title":"Message: Update"}

putMessage: Update

This method allows you to update 2FA message for specific application.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

applicationId:
required
string
2FA application ID for which the message was created.
messageId:
required
string
Requested message ID.

Body Params

pinType:
string
Type of PIN code that will be generated and sent as part of 2FA message. <br>You can set PIN type to numeric, alpha, alphanumeric or hex so parameter must have one of these values:<br> 1. **NUMERIC**<br> 2. **ALPHA**<br>3. **ALPHANUMERIC**<br>4. **HEX**<br>
pinPlaceholder:
string
PIN placeholder.<br>This value should be part of a message text and it will be replaced with generated PIN code.
messageText:
string
Text of a message that will be sent. <br>Message text should contain PIN placeholder.
pinLength:
integer
PIN code length. <br>PIN code length should be between **1** and **8** characters.
senderId:
string
The name that will appear as the sender of the 2FA message (*Example:* CompanyName).
language:
string
Language code of language in which message text is written. It is used for reading the message when it is sent via voice.<br>If no language is set, message will be read in English. Supported languages are listed in the table below.
repeatDTMF:
string
DTMF code which enables repeating message if subscriber enters it.
speechRate:
double1
The speed of speech for the resulting message. Supported range is from 0.5 to 2.

Examples


Result Format


Documentation

## Response format On success, response header HTTP status code will be `200 OK` and the body will contain created [application object](#application-response-body-parameters) in JSON format. On error, you will receive an [error response status code](doc:2fa-status-codes-and-error-details) in the header and the response body will contain an [error object](doc:2fa-status-codes-and-error-details). If you try to create an application when you do not have the user’s authorization, you will receive an error `401` Unauthorized. ### Response |Parameter|Type|Description| |-|-|-| |*messageId*|String|2FA message ID.| |*applicationId*|String|2FA application ID for which the message was created.| |*pinPlaceholder*|String|PIN code placeholder. Right before sending SMS, PIN code placeholder will be replaced with generated PIN code.| |*messageText*|String|Text of a message that will be sent. | |*pinLength*|Integer|PIN code length.| |*pinType*|String|Type of PIN code that will be generated and sent as part of 2FA message.| |*senderId*|String| The name that will appear as the sender of the 2FA message (Example: CompanyName).| |*language*|String|Language code of language in which message text is written. It is used for reading the message when it is sent via voice. If no language is set, message will be read in English. Supported languages are listed in the table below.| #### Suported languages |Language code|Language| |-|-| |*en*|English| |*es*|Spanish| |*ca*|Catalan| |*zh-cn*|Chinese - simplified| |*zh-tw*|Chinese - traditional| |*da*|Danish| |*nl*|Dutch| |*fr*|French| |*de*|German| |*it*|Italian| |*ja*|Japanese| |*ko*|Korean| |*no*|Norwegian| |*pl*|Polish| |*pt-pt*|Portuguese| |*ru*|Russian| |*sv*|Swedish| |*fi*|Finnish|