REST API · v1

AI CLOUD AGENT API

Integrate Voice OTP, automated sales confirmation and voice broadcasting into your application with simple HTTPS requests.

Development referenceReplace example credentials, numbers and URLs with values issued for your production account.
BASE URLhttps://api.aicloudagent.net/v1
01

Authentication

Send your API key as a Bearer token in the Authorization header. Keep API keys on your server and never expose them in browser JavaScript.

HTTP Header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
POST/voice/otp

Send a Voice OTP

Call a customer and securely read a one-time password using the selected language and voice.

ParameterTypeDescription
tostringDestination in E.164 format
codestringOTP digits to read
voicestringVoice profile, such as ava-en
languagestringLanguage code, such as en-MY
cURL
curl --request POST \
  --url https://api.aicloudagent.net/v1/voice/otp \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "to": "+60123456789",
    "code": "482913",
    "voice": "ava-en",
    "language": "en-MY"
  }'
POST/voice/confirmations

Create a Sales Confirmation Call

Confirm an order and capture the customer's yes or no response automatically.

JSON Request
{
  "to": "+60123456789",
  "order_id": "ORD-10492",
  "customer_name": "Aiman",
  "amount": 189.00,
  "currency": "MYR",
  "callback_url": "https://example.com/webhooks/confirmation"
}
POST/voice/campaigns

Create a Voice Blasting Campaign

Send a recorded message to a recipient list immediately or at a scheduled time.

JSON Request
{
  "name": "July service update",
  "audio_url": "https://example.com/audio/message.wav",
  "recipients": ["+60123456789", "+60198765432"],
  "schedule_at": "2026-07-18T02:00:00Z"
}
02

Successful Response

A successful request returns an ID for status queries and webhook matching.

201 Createdapplication/json
{
  "id": "call_01JZ8G9PQK3M",
  "status": "queued",
  "to": "+60123456789",
  "service": "voice_otp",
  "created_at": "2026-07-17T07:18:42Z"
}
03

Webhook Events

Configure a secure callback URL to receive call progress and final results.

call.queuedRequest accepted
call.answeredCustomer answered
call.completedCall finished
call.failedCall could not complete
04

Error Codes

400Bad RequestInvalid or missing request value.
401UnauthorizedAPI key is missing or invalid.
429Rate LimitedToo many requests were sent.
500Server ErrorThe request could not be processed.
Copied to clipboard