Base URL
https://api.tellicai.com/v1POST
/otpsSend OTP
Send a one-time password to a phone number.
Parameters
| Name | Type | Description |
|---|---|---|
| to | string | Phone number in E.164 format |
| length | integer | OTP length (4-8, default: 6) |
Example
curl -X POST https://api.tellicai.com/v1/otps -H "Authorization: Bearer YOUR_API_KEY" -d "to=+1234567890" -d "length=6"Response
{
"id": "otp_xyz789",
"status": "pending",
"expires_at": 1710000300
}POST
/otps/:id/verifyVerify OTP
Verify the OTP code entered by the user.
Parameters
| Name | Type | Description |
|---|---|---|
| code | string | The OTP code entered by the user |
Example
curl -X POST https://api.tellicai.com/v1/otps/otp_xxx/verify -H "Authorization: Bearer YOUR_API_KEY" -d "code=123456"Response
{
"id": "otp_xyz789",
"status": "verified",
"valid": true
}