Send 2FA PIN code over Email

Send a PIN code over Email using previously created Email message template.

Please log in to see full path URL. Learn why.
post
/2fa/2/pin/email
Request Body schema:
collapse all -
applicationId
required
string

The ID of the application that represents your service, e.g. 2FA for login, 2FA for changing the password, etc.

from
string

Use this parameter if you wish to override the sender from the created Email message template parameter from.

messageId
required
string

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

placeholders
object

Key value pairs that will be replaced during message sending. Placeholder keys should NOT contain curly brackets and should NOT contain a pin placeholder. Valid example: "placeholders":{"firstName":"John"}

property name*
string
to
required
string

Email address to which the 2FA message will be sent. Example: john.smith@example.com.

Responses

default

successful response

400

Bad Request

401

Unauthorized

403

Forbidden

4XX

Error responses

500

Internal Server Error

5XX

Error responses

Request samples

Content type
Copy
Collapse all
{
  • "applicationId": "1234567",
  • "messageId": "7654321",
  • "to": "john.smith@example.com",
  • "placeholders":
    {
    • "firstName": "John"
    }
}

Response samples

Content type
Copy
Collapse all
{
  • "pinId": "9C817C6F8AF3D48F9FE553282AFA2B67",
  • "to": "john.smith@example.com",
  • "emailStatus":
    {
    • "name": "PENDING_ACCEPTED",
    • "description": "Message accepted, pending for delivery."
    }
}

Encountering issues

Contact our support

What's new? Check out

Release Notes

Unsure about a term? See

Glossary

Research panel

Help shape the future of our products
Learn more
Service status

Copyright @ 2006-2025 Infobip ltd.