Skip to main content
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"
  }'
{
  "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"
}

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"
  }'

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

x-api-key
string
header
required

API Key for authentication

x-api-secret
string
header
required

API Secret for authentication

Headers

x-api-version
enum<string>
required

API version header (required for full JSON response)

Available options:
2025-08-01

Body

application/json
code
string
required

The OTP code to validate

Example:

"0216"

recipient
string
required

The recipient phone number that received the OTP

Example:

"233559400612"

Response

OTP validation successful

statusCode
string

HTTP status code

Example:

"200"

statusMessage
string

Status message

Example:

"Verification successful"

transactionId
string

Unique transaction identifier

Example:

"60642211-155a-48cc-8d90-82fa62897b37"

sequenceNo
string | null

Sequence number

Example:

null

data
object
timestamp
string<date-time>

ISO 8601 timestamp

Example:

"2025-10-03T15:14:34.919Z"