Send Workflow Email OTP
curl --request POST \
--url https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp \
--header 'Content-Type: application/json' \
--data '
{
"key": "user@example.com"
}
'import requests
url = "https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp"
payload = { "key": "user@example.com" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({key: 'user@example.com'})
};
fetch('https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp"
payload := strings.NewReader("{\n \"key\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_bodyWorkflows
Send Workflow Email OTP
Sends a one-time password via email to verify the user’s email address as part of the workflow. This is typically used during the EMAIL_CHECK verification process.
Use Cases
- Email verification during user onboarding
- Confirming a user’s email address before completing verification
- Adding an extra layer of authentication to the verification process
Notes
- The OTP code is valid for 10 minutes
- Maximum 5 OTP requests per email address per hour
- Email templates can be customized in the Urtentic Dashboard
POST
/
workflows
/
{workflowId}
/
email-otp
Send Workflow Email OTP
curl --request POST \
--url https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp \
--header 'Content-Type: application/json' \
--data '
{
"key": "user@example.com"
}
'import requests
url = "https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp"
payload = { "key": "user@example.com" }
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({key: 'user@example.com'})
};
fetch('https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => 'user@example.com'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp"
payload := strings.NewReader("{\n \"key\": \"user@example.com\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"user@example.com\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.urtentic.com/api/v1/workflows/{workflowId}/email-otp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"user@example.com\"\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
Unique identifier of the workflow
Body
application/json
Request body containing the email address to send the OTP to.
The email address or identifier to send the OTP to. This should be the user's email address that will receive the verification code.
Example:
"user@example.com"
Response
204
OTP email sent successfully. No content is returned in the response body.