OTP
Resend OTP
Sends a new code to your customer, for example if they didn’t receive the first one.
POST
/
api
/
v1
/
otp
/
{reference}
/
resend
Resend OTP
curl --request POST \
--url https://app.chatflows.io/api/v1/otp/{reference}/resend \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.chatflows.io/api/v1/otp/{reference}/resend"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.chatflows.io/api/v1/otp/{reference}/resend', 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://app.chatflows.io/api/v1/otp/{reference}/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.chatflows.io/api/v1/otp/{reference}/resend"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.chatflows.io/api/v1/otp/{reference}/resend")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.chatflows.io/api/v1/otp/{reference}/resend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"reference": "9b1f8c2a-4e7d-4a1b-9c3e-2f5a6b7c8d9e",
"phone": "+919876543210",
"channel_id": 2,
"purpose": "authentication",
"status": "pending",
"expires_at": "2026-06-26T10:10:00+00:00",
"verified_at": null,
"verification_attempts": 0,
"remaining_attempts": 5,
"created_at": "2026-06-26T10:00:00+00:00"
}
}The new code works for 10 minutes, and your customer gets 5 new tries to enter it.
You can resend a code once every 60 seconds.
⌘I
Resend OTP
curl --request POST \
--url https://app.chatflows.io/api/v1/otp/{reference}/resend \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.chatflows.io/api/v1/otp/{reference}/resend"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.chatflows.io/api/v1/otp/{reference}/resend', 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://app.chatflows.io/api/v1/otp/{reference}/resend",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.chatflows.io/api/v1/otp/{reference}/resend"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.chatflows.io/api/v1/otp/{reference}/resend")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.chatflows.io/api/v1/otp/{reference}/resend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"reference": "9b1f8c2a-4e7d-4a1b-9c3e-2f5a6b7c8d9e",
"phone": "+919876543210",
"channel_id": 2,
"purpose": "authentication",
"status": "pending",
"expires_at": "2026-06-26T10:10:00+00:00",
"verified_at": null,
"verification_attempts": 0,
"remaining_attempts": 5,
"created_at": "2026-06-26T10:00:00+00:00"
}
}
