curl --request POST \
--url https://api.kairosafrika.com/v1/external/validate/otp \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'x-api-version: 2025-08-01' \
--header 'Content-Type: application/json' \
--data '{
"code": "0216",
"recipient": "233559400612"
}'
const response = await fetch('https://api.kairosafrika.com/v1/external/validate/otp', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'x-api-secret': 'YOUR_API_SECRET',
'x-api-version': '2025-08-01',
'Content-Type': 'application/json'
},
body: JSON.stringify({
code: '0216',
recipient: '233559400612'
})
});
const result = await response.json();
console.log(result);
import requests
response = requests.post(
'https://api.kairosafrika.com/v1/external/validate/otp',
headers={
'x-api-key': 'YOUR_API_KEY',
'x-api-secret': 'YOUR_API_SECRET',
'x-api-version': '2025-08-01',
'Content-Type': 'application/json'
},
json={
'code': '0216',
'recipient': '233559400612'
}
)
result = response.json()
print(result)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.kairosafrika.com/v1/external/validate/otp',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode(array(
'code' => '0216',
'recipient' => '233559400612'
)),
CURLOPT_HTTPHEADER => array(
'x-api-key: YOUR_API_KEY',
'x-api-secret: YOUR_API_SECRET',
'x-api-version: 2025-08-01',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
{
"statusCode": "200",
"statusMessage": "Verification successful",
"transactionId": "60642211-155a-48cc-8d90-82fa62897b37",
"sequenceNo": null,
"data": {
"uuid": "60642211-155a-48cc-8d90-82fa62897b37",
"code": "*************"
},
"timestamp": "2025-10-03T15:14:34.919Z"
}{
"error": "INVALID_PHONE_NUMBER",
"message": "The provided phone number is not valid",
"details": {}
}{
"error": "INVALID_PHONE_NUMBER",
"message": "The provided phone number is not valid",
"details": {}
}Endpoints
Validate OTP
Validate a one-time password (OTP) code sent to a recipient
POST
/
v1
/
external
/
validate
/
otp
curl --request POST \
--url https://api.kairosafrika.com/v1/external/validate/otp \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'x-api-version: 2025-08-01' \
--header 'Content-Type: application/json' \
--data '{
"code": "0216",
"recipient": "233559400612"
}'
const response = await fetch('https://api.kairosafrika.com/v1/external/validate/otp', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'x-api-secret': 'YOUR_API_SECRET',
'x-api-version': '2025-08-01',
'Content-Type': 'application/json'
},
body: JSON.stringify({
code: '0216',
recipient: '233559400612'
})
});
const result = await response.json();
console.log(result);
import requests
response = requests.post(
'https://api.kairosafrika.com/v1/external/validate/otp',
headers={
'x-api-key': 'YOUR_API_KEY',
'x-api-secret': 'YOUR_API_SECRET',
'x-api-version': '2025-08-01',
'Content-Type': 'application/json'
},
json={
'code': '0216',
'recipient': '233559400612'
}
)
result = response.json()
print(result)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.kairosafrika.com/v1/external/validate/otp',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode(array(
'code' => '0216',
'recipient' => '233559400612'
)),
CURLOPT_HTTPHEADER => array(
'x-api-key: YOUR_API_KEY',
'x-api-secret: YOUR_API_SECRET',
'x-api-version: 2025-08-01',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
{
"statusCode": "200",
"statusMessage": "Verification successful",
"transactionId": "60642211-155a-48cc-8d90-82fa62897b37",
"sequenceNo": null,
"data": {
"uuid": "60642211-155a-48cc-8d90-82fa62897b37",
"code": "*************"
},
"timestamp": "2025-10-03T15:14:34.919Z"
}{
"error": "INVALID_PHONE_NUMBER",
"message": "The provided phone number is not valid",
"details": {}
}{
"error": "INVALID_PHONE_NUMBER",
"message": "The provided phone number is not valid",
"details": {}
}Validate OTP
This endpoint allows you to validate a one-time password (OTP) code that was sent to a recipient. Endpoint:POST /v1/external/validate/otp
curl --request POST \
--url https://api.kairosafrika.com/v1/external/validate/otp \
--header 'x-api-key: YOUR_API_KEY' \
--header 'x-api-secret: YOUR_API_SECRET' \
--header 'x-api-version: 2025-08-01' \
--header 'Content-Type: application/json' \
--data '{
"code": "0216",
"recipient": "233559400612"
}'
const response = await fetch('https://api.kairosafrika.com/v1/external/validate/otp', {
method: 'POST',
headers: {
'x-api-key': 'YOUR_API_KEY',
'x-api-secret': 'YOUR_API_SECRET',
'x-api-version': '2025-08-01',
'Content-Type': 'application/json'
},
body: JSON.stringify({
code: '0216',
recipient: '233559400612'
})
});
const result = await response.json();
console.log(result);
import requests
response = requests.post(
'https://api.kairosafrika.com/v1/external/validate/otp',
headers={
'x-api-key': 'YOUR_API_KEY',
'x-api-secret': 'YOUR_API_SECRET',
'x-api-version': '2025-08-01',
'Content-Type': 'application/json'
},
json={
'code': '0216',
'recipient': '233559400612'
}
)
result = response.json()
print(result)
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.kairosafrika.com/v1/external/validate/otp',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode(array(
'code' => '0216',
'recipient' => '233559400612'
)),
CURLOPT_HTTPHEADER => array(
'x-api-key: YOUR_API_KEY',
'x-api-secret: YOUR_API_SECRET',
'x-api-version: 2025-08-01',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
Request Body
- code (string, required): The OTP code to validate.
- recipient (string, required): The recipient phone number that received the OTP (without + prefix).
Responses
- 200 OK: OTP validation successful.
- 400 Bad Request: Invalid OTP code or recipient.
- 401 Unauthorized: Invalid or missing API key.
Response Example
{
"statusCode": "200",
"statusMessage": "Verification successful",
"transactionId": "60642211-155a-48cc-8d90-82fa62897b37",
"sequenceNo": null,
"data": {
"uuid": "60642211-155a-48cc-8d90-82fa62897b37",
"code": "*************"
},
"timestamp": "2025-10-03T15:14:34.919Z"
}
Response Fields
- statusCode (string): HTTP status code.
- statusMessage (string): Status message (e.g., “Verification successful”).
- transactionId (string): Unique transaction identifier.
- sequenceNo (string|null): Sequence number (typically null for OTP validation).
- data (object): Validation result data.
- uuid (string): Unique identifier for the validation.
- code (string): Masked OTP code for security.
- timestamp (string): ISO 8601 timestamp of the response.
Authorizations
API Key for authentication
API Secret for authentication
Headers
API version header (required for full JSON response)
Available options:
2025-08-01 Body
application/json
Response
OTP validation successful
HTTP status code
Example:
"200"
Status message
Example:
"Verification successful"
Unique transaction identifier
Example:
"60642211-155a-48cc-8d90-82fa62897b37"
Sequence number
Example:
null
Show child attributes
Show child attributes
ISO 8601 timestamp
Example:
"2025-10-03T15:14:34.919Z"