---
title: "Update 2FA Email message template"
method: PUT
path: "/2fa/2/applications/{appId}/email/messages/{msgId}"
tags: ["platform", "2fa", "2fa-configuration", "manage-message-templates"]
---

# Update 2FA Email message template

`PUT /2fa/2/applications/{appId}/email/messages/{msgId}`

## Request

- Base URL: `https://api.infobip.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.infobip.com/2fa/2/applications/{appId}/email/messages/{msgId}`
- Auth: one of:
  - HTTP basic
  - API key in header `Authorization`
  - API key in header `Authorization`
  - OAuth 2
    - Client credentials
    - Token URL: `https://api.infobip.com/auth/1/oauth2/token`

Change configuration options for your existing 2FA application Email message template.

## Path parameters

- `appId` string, required
- `msgId` string, required

## Request body

- C3b21d2ffef2552e10577daa67c904ac80618665b001ef386a4faefc515e78f3UpdateEmailMessageRequest
  - `emailTemplateId` integer: Email template ID that should reference a previously created Email template.
  - `from` string: The sender of the 2FA message, an email address with an optional sender name (e.g. `company@example.com` or `Jane Smith <jane.smith@somecompany.com>`).
  - `landingPageId` string: Opt out landing page ID that should reference a previously created landing page template.
  - `pinLength` integer: PIN code length.
  - `pinType` 'NUMERIC' | 'ALPHA' | 'HEX' | 'ALPHANUMERIC'

## Response `200`

successful response

- C3b21d2ffef2552e10577daa67c904ac80618665b001ef386a4faefc515e78f3EmailMessage
  - `applicationId` string: 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.
  - `emailTemplateId` integer: Email template ID that should reference a previously created Email template.
  - `from` string: The sender of the 2FA message, an email address with an optional sender name (e.g. `company@example.com` or `Jane Smith <jane.smith@somecompany.com>`).
  - `landingPageId` string: Opt out landing page ID that should reference a previously created landing page template.
  - `messageId` string: The ID of the message template (message body with the PIN placeholder) that is sent to the recipient.
  - `pinLength` integer: PIN code length.
  - `pinType` 'NUMERIC' | 'ALPHA' | 'HEX' | 'ALPHANUMERIC'

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `429`: Too Many Requests
- `500`: Internal Server Error
- `4XX`: Error responses
- `5XX`: Error responses

---

[API](https://skmtc.dev/infobip/apis/infobip-openapi-specification.md) - [All operations](https://skmtc.dev/infobip/apis/infobip-openapi-specification/llms.txt) - [OpenAPI document](https://skmtc.dev/infobip/apis/infobip-openapi-specification/revisions/9dcbbaf902de?raw)
