ใช้ REST API เดียวส่ง SMS โทรออก ยืนยันตัวตน ตรวจสอบเบอร์ และสร้างลิงก์สั้น ทดลองฟรีด้วย key แซนด์บ็อกซ์ แล้วค่อยเปลี่ยนเป็น key จริงเมื่อพร้อม
curl -X POST 'https://nexora-ai-call.com/api/v1/messages' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"to":"+66000000001","body":"Hello","category":"transactional"}'ใส่ key ในเฮดเดอร์ Authorization ทุกคำขอ key ที่ขึ้นต้น sv_test_ คือแซนด์บ็อกซ์ ส่วน sv_live_ คือของจริง ใช้บนเซิร์ฟเวอร์เท่านั้น ห้ามฝังในแอปหรือหน้าเว็บ
Authorization: Bearer sv_live_xxxxxxxxxxxxxxxxใช้ลายเซ็นแทนการส่ง key ผ่านเครือข่ายได้: ส่งรหัส key, Unix timestamp (คลาดเคลื่อนได้ ±5 นาที) และลายเซ็น ซึ่งคือ HMAC-SHA256 ของ timestamp, method, path พร้อม query และ SHA-256 ของ body แต่ละลายเซ็นใช้ได้ครั้งเดียว ตั้งเป็น “บังคับ” ได้ในการตั้งค่า key
X-SV-Key: <key id>
X-SV-Timestamp: <unix seconds>
X-SV-Signature: hex(HMAC_SHA256(hmac_secret, ts + "\n" + METHOD + "\n" + path_and_query + "\n" + sha256_hex(body)))import { createHash, createHmac } from 'node:crypto';
// key id (X-SV-Key) and hmac secret are shown once when you create the key
export function sign(hmacSecret, method, pathAndQuery, body = '') {
const ts = Math.floor(Date.now() / 1000);
const canonical = [ts, method.toUpperCase(), pathAndQuery, createHash('sha256').update(body).digest('hex')].join('\n');
const signature = createHmac('sha256', hmacSecret).update(canonical).digest('hex');
return { 'X-SV-Timestamp': String(ts), 'X-SV-Signature': signature };
}
const body = JSON.stringify({ to: '+66000000001', body: 'Hello', category: 'transactional' });
const res = await fetch('https://nexora-ai-call.com/api/v1/messages', {
method: 'POST', body,
headers: { 'Content-Type': 'application/json', 'X-SV-Key': KEY_ID, ...sign(HMAC_SECRET, 'POST', '/api/v1/messages', body) },
});กำหนด IP หรือช่วงเครือข่ายที่อนุญาตให้แต่ละ key คำขอจากที่อื่นจะถูกปฏิเสธ บัญชีที่มีวงเงินสูงต้องตั้งรายการนี้
mTLS ทำที่พร็อกซีของคุณ: พร็อกซีตรวจใบรับรองไคลเอนต์แล้วส่งต่อมาพร้อมเฮดเดอร์ที่ตกลงกันไว้ เปิด “บังคับใช้ mTLS” ในการตั้งค่า key เพื่อบังคับ
แต่ละ key มีเฉพาะสิทธิ์ที่เลือกตอนสร้าง: messages:send, calls:create, read:logs, read:balance, verify:send, lookups:read, links:write ในส่วนอ้างอิง API ระบุสิทธิ์ที่แต่ละ API ต้องใช้
key sv_test_ ทำงานในแซนด์บ็อกซ์: มีกระเป๋าเงินจำลองของตัวเอง (เติมเป็น ฿1,000 ได้ในคอนโซล) ไม่มีค่าใช้จ่ายจริง และไม่ส่ง SMS หรือโทรจริง ส่งคำขอไปยังเบอร์ด้านล่างเพื่อให้ได้ผลลัพธ์ตามที่กำหนด
| เบอร์ | ผลลัพธ์ |
|---|---|
| +66000000001 | ส่งถึงแล้ว |
| +66000000002 | ส่งไม่ถึง (30003) |
| +66000000003 | ล้มเหลว (33004) ไม่คิดเงิน |
| +66000000004 | ถูกปฏิเสธเป็นสแปม (30007) |
| +66000000005 | หมดอายุ (30011) |
| +66000000006 | ส่งถึงหลังจาก 60 วินาที |
| +66000000007 | ไม่มีใบรับรอง: สถานะค้างที่ “ส่งแล้ว” และ dlr_unknown = true |
| +66000000008 | ส่งถึงแล้ว (ใบรับรองซ้ำจะถูกละเว้น) |
| +66000000009 | ส่งถึงแล้ว (ใบรับรองมาไม่เรียงลำดับ) |
| เบอร์ | ผลลัพธ์ |
|---|---|
| +66000000001 | รับสาย โทรนาน 30 วินาที |
| +66000000002 | สายไม่ว่าง |
| +66000000003 | ไม่มีผู้รับสาย |
| +66000000004 | ปฏิเสธสาย (34003) |
| +66000000005 | เบอร์ไม่ถูกต้อง |
| +66000000006 | ล้มเหลว (503) |
| +66000000007 | เครื่องตอบรับรับสาย (ต้องเปิด machine_detection) |
| เบอร์ | ผลลัพธ์ |
|---|---|
| +66000000001 | รหัส 123456 ผ่านการยืนยัน |
| +66000000002 | รหัสจะไม่ผ่านเลย (ใช้ทดสอบกรณีรหัสผิด) |
| +66000000003 | หมดอายุทันที |
| เบอร์ | ผลลัพธ์ |
|---|---|
| +66000000001 | เบอร์ใช้งานอยู่ |
| +66000000002 | เบอร์ไม่ใช้งาน (ต้องเปิดตัวจำลอง HLR) |
| +66000000003 | ย้ายค่ายมาที่ NT (ต้องเปิดตัวจำลอง HLR) |
ส่ง Idempotency-Key ตอนสร้าง SMS การโทร หรือการยืนยัน ถ้าใช้ key เดิมกับเนื้อหาเดิม ระบบจะตอบผลครั้งแรกซ้ำโดยไม่ส่งหรือหักเงินซ้ำ แต่ถ้าเนื้อหาต่างกันจะตอบ 409 IDEMPOTENCY_CONFLICT
Idempotency-Key: 6f1c2d54-0001แต่ละ key มีถังโทเคน: เติมตาม TPS ของระดับบัญชี และรับช่วงพุ่งได้ 2 เท่าของ TPS ทุกการตอบกลับมีเฮดเดอร์บอกโควตาที่เหลือ เมื่อเกินจะได้ 429 พร้อม Retry-After (วินาที) รอตามนั้นแล้วลองใหม่
X-RateLimit-Limit: 20
X-RateLimit-Remaining: 17
X-RateLimit-Reset: 1700000000
Retry-After: 2 # only on 429ข้อผิดพลาดทั้งหมดใช้โครงสร้างเดียวกัน ให้ตรวจที่ code อย่าแยกวิเคราะห์ message trace_id ใช้ค้นคำขอเต็มในคอนโซลนักพัฒนา ถ้ามี fix_url ให้เปิดเพื่อแก้ไขทันที (เช่น เติมเงิน ยืนยันตัวตน เพิ่มวงเงิน) และ permanent เป็น true หมายความว่าลองซ้ำเหมือนเดิมก็ไม่สำเร็จ
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"numeric": 21608,
"message": "...",
"trace_id": "tr_...",
"fix_url": "https://nexora-ai-call.com/wallet/topup",
"permanent": false
}
}| รหัส | รหัสตัวเลข | HTTP | ถาวร | ความหมาย |
|---|---|---|---|---|
| VALIDATION_ERROR | 20001 | 400 | ใช่ | ข้อมูลไม่ถูกต้อง โปรดตรวจสอบ |
| UNAUTHENTICATED | 20003 | 401 | ใช่ | โปรดเข้าสู่ระบบก่อน |
| FORBIDDEN | 20004 | 403 | ใช่ | คุณไม่มีสิทธิ์ทำรายการนี้ |
| TENANT_FORBIDDEN | 20005 | 403 | ใช่ | คุณไม่มีสิทธิ์เข้าถึงบัญชีนี้ |
| ORIGIN_MISMATCH | 20006 | 403 | ใช่ | ต้นทางคำขอไม่ได้รับอนุญาต โปรดรีเฟรชแล้วลองใหม่ |
| NOT_FOUND | 20404 | 404 | ใช่ | ไม่พบข้อมูล |
| CONFLICT | 20409 | 409 | ไม่ | ข้อมูลซ้ำหรือขัดแย้ง |
| INVALID_STATE | 20410 | 409 | ไม่ | ไม่สามารถทำรายการนี้ในสถานะปัจจุบัน |
| UNSUPPORTED | 20501 | 501 | ใช่ | ไม่รองรับรายการนี้ |
| RATE_LIMITED | 20429 | 429 | ไม่ | ทำรายการถี่เกินไป โปรดลองใหม่ภายหลัง |
| IDEMPOTENCY_CONFLICT | 20422 | 422 | ใช่ | คีย์คำขอซ้ำกับคำขออื่น |
| IDEMPOTENCY_IN_PROGRESS | 20423 | 409 | ไม่ | คำขอกำลังประมวลผล |
| IDEMPOTENCY_KEY_REQUIRED | 20002 | 400 | ใช่ | ต้องมีคีย์ป้องกันซ้ำ |
| INSUFFICIENT_BALANCE | 30402 | 402 | ไม่ | ยอดเงินไม่พอ โปรดเติมเงิน |
| BUDGET_EXCEEDED | 30403 | 402 | ไม่ | เกินวงเงินงบประมาณ |
| PAYMENT_FAILED | 30404 | 402 | ไม่ | ชำระเงินไม่สำเร็จ |
| DNC_BLOCKED | 21610 | 403 | ใช่ | ผู้รับปฏิเสธการติดต่อ |
| CALLING_HOURS | 21411 | 403 | ไม่ | อยู่นอกช่วงเวลาที่โทรได้ |
| FREQUENCY_LIMIT | 21412 | 429 | ไม่ | ถึงขีดจำกัดความถี่การติดต่อ |
| LAWFUL_BASIS_REQUIRED | 21413 | 422 | ใช่ | ต้องระบุฐานทางกฎหมาย |
| CONSENT_REQUIRED | 21414 | 403 | ใช่ | ต้องได้รับความยินยอม |
| KYC_REQUIRED | 21415 | 403 | ไม่ | ต้องยืนยันตัวตนก่อน |
| CALLER_ID_NOT_VERIFIED | 21212 | 403 | ไม่ | หมายเลขผู้โทรยังไม่ยืนยัน |
| NUMBER_SUSPENDED | 21416 | 403 | ไม่ | หมายเลขถูกระงับ |
| TENANT_SUSPENDED | 21417 | 403 | ไม่ | บัญชีถูกระงับ |
| RISK_BLOCKED | 21418 | 403 | ไม่ | ถูกระงับโดยระบบความเสี่ยง |
| REVIEW_REQUIRED | 21419 | 202 | ไม่ | ส่งตรวจสอบโดยเจ้าหน้าที่แล้ว |
| CIRCUIT_OPEN | 50301 | 503 | ไม่ | บริการถูกหยุดชั่วคราว |
| APPROVAL_REQUIRED | 20411 | 409 | ไม่ | ต้องได้รับการอนุมัติ |
| PROVIDER_ERROR | 40002 | 502 | ไม่ | ผู้ให้บริการต้นทางผิดพลาด |
| PROVIDER_UNAVAILABLE | 40003 | 503 | ไม่ | บริการไม่พร้อมใช้งาน โปรดลองใหม่หรือเปลี่ยนวิธี |
| SIGNATURE_INVALID | 20007 | 401 | ใช่ | ลายเซ็นไม่ถูกต้อง |
| INTERNAL_ERROR | 50000 | 500 | ไม่ | ระบบผิดพลาด โปรดลองใหม่ |
| LEDGER_INVARIANT | 50010 | 500 | ใช่ | การตรวจสอบบัญชีไม่ผ่าน รายการถูกปฏิเสธ |
| TENANT_FROZEN | 50011 | 423 | ไม่ | บัญชีถูกระงับชั่วคราวเพื่อตรวจสอบยอด |
| LICENSE_GATE_CLOSED | 21420 | 403 | ไม่ | ความสามารถนี้ยังไม่เปิด (ใบอนุญาต) |
| LEGAL_GATE_CLOSED | 21421 | 403 | ไม่ | ความสามารถนี้ยังไม่เปิด (กฎหมาย) |
| INVALID_DESTINATION | 21211 | 400 | ใช่ | หมายเลขปลายทางไม่ถูกต้อง |
| DESTINATION_NOT_PERMITTED | 21408 | 403 | ใช่ | ไม่อนุญาตให้ส่งไปปลายทางนี้ |
| CONTENT_FILTERED | 30007 | 422 | ใช่ | เนื้อหาถูกกรอง |
| LEASE_EXHAUSTED | 30405 | 402 | ไม่ | วงเงินที่จองไว้หมด |
| CREDIT_LIMIT_EXCEEDED | 32002 | 402 | ไม่ | ถึงวงเงินเครดิตแล้ว โปรดชำระใบแจ้งหนี้ที่ค้างหรือติดต่อผู้จัดการบัญชี |
| STORAGE_ERROR | 40010 | 502 | ไม่ | ที่เก็บไฟล์ผิดพลาด |
| MFA_REQUIRED | 20008 | 403 | ไม่ | โปรดยืนยันตัวตนขั้นที่สองก่อน |
| STEP_UP_REQUIRED | 20009 | 403 | ไม่ | ต้องยืนยันตัวตนอีกครั้งเพื่อทำรายการนี้ |
| SECOND_FACTOR_REQUIRED | 20010 | 403 | ไม่ | โปรดตั้งค่าพาสคีย์หรือแอปยืนยันก่อนทำรายการนี้ |
| SENSITIVE_FROZEN | 20011 | 423 | ไม่ | เพื่อความปลอดภัย การทำรายการสำคัญถูกระงับ 24 ชั่วโมง |
| ACCEPT_REQUIRED | 20012 | 422 | ไม่ | โปรดยอมรับข้อกำหนดก่อนดำเนินการต่อ |
| LIMIT_EXCEEDED | 21430 | 403 | ไม่ | ถึงขีดจำกัดของบัญชีแล้ว ยืนยันตัวตนหรือรอเพื่อเพิ่มวงเงิน |
| CAPABILITY_PAUSED | 21431 | 423 | ไม่ | ฟีเจอร์นี้ถูกหยุดชั่วคราวเพื่อความปลอดภัย ปลดล็อกได้ในขั้นตอนเดียว |
| SENDER_NOT_APPROVED | 31001 | 403 | ไม่ | ชื่อผู้ส่งยังไม่ได้รับอนุมัติสำหรับข้อความประเภทนี้ โปรดลงทะเบียนหรือเลือกชื่อที่อนุมัติแล้ว |
| NO_ROUTE | 33001 | 503 | ไม่ | ขณะนี้ไม่มีเส้นทางส่งไปยังหมายเลขนี้ โปรดลองใหม่ภายหลัง |
| NO_RATE | 32005 | 422 | ใช่ | ยังไม่มีราคาสำหรับปลายทางนี้ จึงยังส่งไม่ได้ |
/v1 จะเพิ่มฟิลด์เท่านั้น ไม่แก้ไขหรือลบฟิลด์เดิม จึงควรเมินฟิลด์ที่ไม่รู้จัก เมื่อจะเลิกใช้ API จะประกาศล่วงหน้าอย่างน้อย 12 เดือน และใส่เฮดเดอร์ Deprecation กับ Sunset ในการตอบกลับ
Deprecation: true
Sunset: Wed, 01 Dec 2027 00:00:00 GMT
Link: <https://...>; rel="deprecation"เพิ่ม URL แบบ https ในคอนโซลและเลือกเหตุการณ์ เมื่อสถานะเปลี่ยนเราจะส่ง POST (JSON) ไปให้ ตอบ 2xx ภายใน 10 วินาที และใช้ id ของเหตุการณ์เพื่อกันข้อมูลซ้ำ เพราะเหตุการณ์เดียวอาจถูกส่งมาซ้ำได้
ทุกการส่งมีเฮดเดอร์ X-SV-Signature: t=<Unix วินาที>,v1=<เลขฐานสิบหก> โดย v1 = HMAC-SHA256(ความลับ, t + "." + body ดิบ) ให้คำนวณจาก body ดิบ และปฏิเสธคำขอที่เวลาคลาดเคลื่อนมาก ใน 24 ชั่วโมงหลังเปลี่ยนความลับ จะมี v1 สองค่า
import { createHmac, timingSafeEqual } from 'node:crypto';
// header: X-SV-Signature: t=1700000000,v1=<hex>[,v1=<hex of the previous secret>]
export function verify(secret, header, rawBody, toleranceSec = 300) {
const parts = header.split(',').map((p) => p.split('='));
const t = parts.find(([k]) => k === 't')?.[1];
if (!t || Math.abs(Date.now() / 1000 - Number(t)) > toleranceSec) return false;
const expected = createHmac('sha256', secret).update(t + '.' + rawBody).digest('hex');
return parts.some(([k, v]) => k === 'v1' && v?.length === expected.length && timingSafeEqual(Buffer.from(v), Buffer.from(expected)));
}หากส่งไม่สำเร็จ ระบบจะลองใหม่อัตโนมัติสูงสุด 10 ครั้งโดยเว้นระยะเพิ่มขึ้น endpoint ที่ล้มเหลวติดต่อกันจะถูกปิดอัตโนมัติ บันทึกเก็บ 30 วัน และกด “ส่งซ้ำ” ได้ทุกรายการในคอนโซล
รับเฉพาะ https ที่อยู่ภายใน loopback link-local และ metadata ของคลาวด์จะถูกปฏิเสธ ชื่อโดเมนจะถูกแปลงใหม่ทุกครั้งที่ส่งและล็อกไว้กับผลที่ได้ และตรวจทุกขั้นของการ redirect
message.status
ข้อความเปลี่ยนสถานะ (ส่งแล้ว ส่งถึง ส่งไม่ถึง ล้มเหลว หมดอายุ ถูกปฏิเสธ)
{
"id": "evt_...",
"type": "message.status",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "msg_x",
"status": "delivered",
"error_code": null,
"client_ref": "order-1",
"to": "+66812345678"
}
}message.received
มีข้อความเข้าที่เบอร์ของคุณ (ข้อความ STOP ระบบจัดการก่อนและไม่ส่งต่อ)
{
"id": "evt_...",
"type": "message.received",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "msg_y",
"from": "+66812345678",
"to": "+6620000000",
"body": "YES"
}
}message.priced
ราคาสุดท้ายของข้อความถูกบันทึกแล้ว
{
"id": "evt_...",
"type": "message.priced",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "msg_x",
"price": "-0.75000",
"price_unit": "THB"
}
}batch.completed
งานส่งแบบกลุ่มหรือแคมเปญเสร็จสิ้น
{
"id": "evt_...",
"type": "batch.completed",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "batch_1",
"total": 100,
"delivered": 97
}
}call.status
การโทรเปลี่ยนสถานะ
{
"id": "evt_...",
"type": "call.status",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "call_x",
"status": "completed",
"error_code": null
}
}call.recording_ready
ไฟล์บันทึกเสียงการโทรพร้อมให้ดาวน์โหลด
{
"id": "evt_...",
"type": "call.recording_ready",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "call_x"
}
}sender_id.status
Sender ID ได้รับอนุมัติ ถูกปฏิเสธ หรือถูกระงับ
{
"id": "evt_...",
"type": "sender_id.status",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "snd_1",
"value": "ACME",
"status": "approved"
}
}balance.low
ยอดเงินในกระเป๋าต่ำกว่าเกณฑ์ที่คุณตั้งไว้
{
"id": "evt_...",
"type": "balance.low",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"balance": "120.00",
"threshold": "200.00"
}
}credit_limit.threshold
การใช้วงเงินเครดิตถึง 80%, 90% หรือ 100%
{
"id": "evt_...",
"type": "credit_limit.threshold",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"percent": 80
}
}invoice.issued
ออกใบแจ้งหนี้แล้ว
{
"id": "evt_...",
"type": "invoice.issued",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "inv_1"
}
}sla.credit_issued
devx.event.sla_credit_issued
{
"id": "evt_...",
"type": "sla.credit_issued",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"period": "2026-10",
"credit_net": "1200.00"
}
}invoice.paid
devx.event.invoice_paid
{
"id": "evt_...",
"type": "invoice.paid",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "inv_1",
"status": "paid"
}
}report.ready
devx.event.report_ready
{
"id": "evt_...",
"type": "report.ready",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"name": "Monthly usage",
"format": "csv",
"period": "2026-10",
"rows": 120
}
}limit.raised
วงเงินของบัญชีคุณถูกเพิ่มแล้ว
{
"id": "evt_...",
"type": "limit.raised",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"tier": "L2"
}
}key.auto_revoked
API key ถูกระบบเพิกถอนอัตโนมัติ (สงสัยว่ารั่วไหล ใช้วงเงินจากเครือข่ายใหม่ หรือปริมาณผิดปกติ) กรุณาสร้าง key ใหม่
{
"id": "evt_...",
"type": "key.auto_revoked",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"key_id": "key_1",
"prefix": "sv_live_ab12",
"reason": "spend_cap_reached_from_new_network"
}
}verification.approved
ผู้ใช้กรอกรหัสยืนยันถูกต้อง
{
"id": "evt_...",
"type": "verification.approved",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "vf_1",
"to": "+66812345678",
"channel": "sms"
}
}verification.expired
การยืนยันหมดอายุโดยไม่ผ่าน
{
"id": "evt_...",
"type": "verification.expired",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "vf_1",
"to": "+66812345678"
}
}link.clicked
มีคนจริงเปิดลิงก์สั้นที่ควบคุมไว้ (ไม่นับบอต)
{
"id": "evt_...",
"type": "link.clicked",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "k3m9x2p7qa",
"label": "promo",
"at": "2026-11-22T03:00:00Z"
}
}slot.booked
devx.event.slot_booked
{
"id": "evt_...",
"type": "slot.booked",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "bkg_1",
"ref": "BK-7F3K9Q",
"status": "booked",
"slot_id": "slt_1",
"starts_at": "2026-12-01T03:00:00.000Z",
"phone": "+66812345678",
"source": "ai"
}
}slot.changed
devx.event.slot_changed
{
"id": "evt_...",
"type": "slot.changed",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "bkg_2",
"ref": "BK-9M2XQ4",
"previous_id": "bkg_1",
"slot_id": "slt_2",
"previous_slot_id": "slt_1"
}
}slot.cancelled
devx.event.slot_cancelled
{
"id": "evt_...",
"type": "slot.cancelled",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"id": "bkg_1",
"ref": "BK-7F3K9Q",
"status": "canceled",
"slot_id": "slt_1"
}
}webhook.test
ส่งจากปุ่ม “ส่งเหตุการณ์ทดสอบ”
{
"id": "evt_...",
"type": "webhook.test",
"created": "2026-11-22T03:00:00Z",
"livemode": true,
"data": {
"hello": "world"
}
}SDK สร้างอัตโนมัติจากเอกสาร OpenAPI รองรับ Node, Python, PHP, Java, Go และ .NET รันคำสั่งด้านล่างที่รากของโปรเจกต์ ระบบจะสร้างแต่ละภาษาไว้ในโฟลเดอร์ sdk/
pnpm sdk:gencd sdk/node && npm install && npm run build
import { NexoraAICall } from './sdk/node';
const sv = new NexoraAICall({ apiKey: process.env.SV_KEY });pip install ./sdk/python
from nexora import Client
sv = Client(api_key=os.environ["SV_KEY"])composer require nexora/sdk # path repository: ./sdk/php
$sv = new NexoraAICall\Client(getenv("SV_KEY"));cd sdk/java && mvn install
NexoraAICall sv = new NexoraAICall(System.getenv("SV_KEY"));go get ./sdk/go
sv := nexora.New(os.Getenv("SV_KEY"))dotnet add package NexoraAICall --source ./sdk/dotnet
var sv = new NexoraAICallClient(Environment.GetEnvironmentVariable("SV_KEY"));ดาวน์โหลด Postman collection ซึ่งมีคำขอตัวอย่างของทุก API
/api/v1/postman.jsonใช้ API สไตล์ Twilio หรือ ThaiBulkSMS อยู่แล้ว ไม่ต้องเขียนโค้ดใหม่ เปลี่ยนแค่ที่อยู่และ key เป็นของเรา และเริ่มด้วยโหมดเงาเพื่อเทียบผลโดยไม่ส่งจริงและไม่คิดเงิน
| API เดิม | API ที่เทียบเท่าของเรา |
|---|---|
| POST /2010-04-01/Accounts/{sid}/Messages.json | POST /api/v1/messages |
| POST /2010-04-01/Accounts/{sid}/Calls.json | POST /api/v1/calls |
| To / From / Body / StatusCallback | to / from / body / status_callback |
| X-Twilio-Signature | X-Twilio-Signature (optional) |
| ThaiBulkSMS msisdn / message / sender | to / body / from |
ตารางเทียบฟิลด์ทั้งหมดและเช็กลิสต์การย้ายระบบอยู่ในโปรเจกต์:
docs/compat/twilio.md
docs/compat/thaibulksms.mdรายการ API ทั้งหมดที่เรียกด้วย API key จัดกลุ่มตามหมวด พร้อมตัวอย่าง curl ที่คัดลอกไปใช้ได้ทันที
/api/v1/balanceAvailable prepaid balance (THB, decimal string)
read:balanceไม่มีพารามิเตอร์
curl -X GET 'https://nexora-ai-call.com/api/v1/balance' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/call-campaignsList call campaigns
read:logsไม่มีพารามิเตอร์
curl -X GET 'https://nexora-ai-call.com/api/v1/call-campaigns' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/call-campaignsCreate a call campaign from a recipient list (draft until started)
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| name | body | string | ใช่ |
| recipients | body | object[] | ใช่ |
| from | body | string | ไม่ |
| mode | body | line | ai_proxy | ไม่ |
| agent_id | body | string | ไม่ |
| lawful_basis_ref | body | string | ไม่ |
| pace_per_minute | body | integer | ไม่ |
| max_concurrent | body | integer | ไม่ |
| max_attempts | body | integer | ไม่ |
| retry_after_min | body | integer | ไม่ |
| window_start | body | string | ไม่ |
| window_end | body | string | ไม่ |
| days | body | integer[] | ไม่ |
| budget_cap_satang | body | string | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/call-campaigns' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"name":"My key","recipients":[{"to":"+66000000001"}]}'/api/v1/call-campaigns/{id}Campaign status, summary and per-recipient results
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
| cursor | query | integer | ไม่ |
| limit | query | integer | ไม่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/call-campaigns/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/call-campaigns/{id}/actionsStart, pause, resume or cancel a campaign
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
| action | body | start | pause | resume | cancel | ใช่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/call-campaigns/ID/actions' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"action":"start"}'/api/v1/callsList calls (cursor pagination)
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| to | query | string | ไม่ |
| from | query | string | ไม่ |
| status | query | queued | initiated | ringing | in-progress | completed | busy | no-answer | failed | canceled | rejected | timeout | blocked | ไม่ |
| direction | query | inbound | outbound | ไม่ |
| date_created_gte | query | string (date-time) | ไม่ |
| date_created_lt | query | string (date-time) | ไม่ |
| page_token | query | string | ไม่ |
| page_size | query | integer | ไม่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/calls' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/callsPlace one call (async; returns the call in queued / initiated). Needs Idempotency-Key and, for non-personal calls, lawful_basis_ref
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| to | body | string | ใช่ |
| from | body | string | ไม่ |
| mode | body | line | ai_proxy | translation_bridge | ไม่ |
| agent_id | body | string | ไม่ |
| category | body | otp | transactional | marketing | ไม่ |
| purpose | body | string | ไม่ |
| language | body | zh | th | en | my | ไม่ |
| lawful_basis_ref | body | string | ไม่ |
| personal | body | boolean | ไม่ |
| caller_id_purpose | body | campaign | trial | transfer | callback | ไม่ |
| max_duration | body | integer | ไม่ |
| max_cost | body | string | ไม่ |
| machine_detection | body | boolean | ไม่ |
| record | body | boolean | ไม่ |
| status_callback | body | string (uri) | ไม่ |
| scheduled_for | body | string (date-time) | ไม่ |
| transfer_to | body | string | ไม่ |
| bridge_to | body | string | ไม่ |
| client_ref | body | string | ไม่ |
| task_id | body | string | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/calls' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"to":"+66000000001"}'/api/v1/calls/{id}Fetch one call
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/calls/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/calls/{id}/callbackCall back the caller of an inbound call (caller ID = the number they dialled)
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/callback' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001'/api/v1/calls/{id}/detailCall detail: cost breakdown, legs, events, transcript, recordings
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/calls/ID/detail' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/calls/{id}/hangupEnd a call (cancels it while queued or ringing)
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/hangup' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001'/api/v1/calls/{id}/transferTransfer a call in progress (cold or warm)
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
| to | body | string | ใช่ |
| type | body | cold | warm | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/calls/ID/transfer' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"to":"+66000000001"}'/api/v1/calls/estimatePrice, caller ID and compliance checks for a call without placing it
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| to | body | string | ใช่ |
| from | body | string | ไม่ |
| mode | body | line | ai_proxy | translation_bridge | ไม่ |
| agent_id | body | string | ไม่ |
| category | body | otp | transactional | marketing | ไม่ |
| lawful_basis_ref | body | string | ไม่ |
| personal | body | boolean | ไม่ |
| caller_id_purpose | body | campaign | trial | transfer | callback | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/calls/estimate' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"to":"+66000000001"}'/2010-04-01/Accounts/{sid}/Calls.jsonTwilio-compatible: list calls
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| sid | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Calls.json' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'To=+66000000001' \
--data-urlencode 'From=+6620000000' \
--data-urlencode 'Url=https://example.com/voice.xml'/2010-04-01/Accounts/{sid}/Calls.jsonTwilio-compatible: place a call (To, From, Url|Twiml, StatusCallback, MachineDetection); needs an Idempotency-Key header
calls:create| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| sid | path | string | ใช่ |
curl -X POST 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Calls.json' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'To=+66000000001' \
--data-urlencode 'From=+6620000000' \
--data-urlencode 'Url=https://example.com/voice.xml'/2010-04-01/Accounts/{sid}/Calls/{csid}Twilio-compatible: fetch a call (SID.json)
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| sid | path | string | ใช่ |
| csid | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Calls/CSID' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'To=+66000000001' \
--data-urlencode 'From=+6620000000' \
--data-urlencode 'Url=https://example.com/voice.xml'/2010-04-01/Accounts/{sid}/Messages.jsonTwilio-compatible: list messages
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| sid | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Messages.json' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'To=+66000000001' \
--data-urlencode 'From=ACME' \
--data-urlencode 'Body=Hello from Nexora AI Call'/2010-04-01/Accounts/{sid}/Messages.jsonTwilio-compatible: send a message (form-encoded To, From, Body, StatusCallback)
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| sid | path | string | ใช่ |
curl -X POST 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Messages.json' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'To=+66000000001' \
--data-urlencode 'From=ACME' \
--data-urlencode 'Body=Hello from Nexora AI Call'/2010-04-01/Accounts/{sid}/Messages/{msid}Twilio-compatible: fetch a message (SID.json)
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| sid | path | string | ใช่ |
| msid | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/2010-04-01/Accounts/ACCOUNT_SID/Messages/MSID' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'To=+66000000001' \
--data-urlencode 'From=ACME' \
--data-urlencode 'Body=Hello from Nexora AI Call'/compat/thaibulksms/creditThaiBulkSMS-style: remaining credit
read:balanceไม่มีพารามิเตอร์
curl -X GET 'https://nexora-ai-call.com/compat/thaibulksms/credit' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'msisdn=+66000000001' \
--data-urlencode 'message=Hello' \
--data-urlencode 'sender=ACME'/compat/thaibulksms/smsThaiBulkSMS-style: send (msisdn, message, sender, force, scheduled_delivery)
messages:sendไม่มีพารามิเตอร์
curl -X POST 'https://nexora-ai-call.com/compat/thaibulksms/sms' \
-u 'ACCOUNT_SID_OR_KEY_ID:sv_test_YOUR_KEY' \
--data-urlencode 'msisdn=+66000000001' \
--data-urlencode 'message=Hello' \
--data-urlencode 'sender=ACME'/api/v1/consentsWithdraw a consent
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | body | string | ใช่ |
curl -X DELETE 'https://nexora-ai-call.com/api/v1/consents' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"id":"string"}'/api/v1/consentsRecord a recipient consent (wording version, granularity, evidence)
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| number | body | string | ใช่ |
| purpose | body | marketing_sms | marketing_call | service_call | recording | data_processing | cross_border | ai_processing | line_messaging | ใช่ |
| lawful_basis | body | consent | contract | legitimate_interest | legal_obligation | vital_interest | public_task | ไม่ |
| source | body | web_form | verbal_call | sms_reply | api | import | contract | own_number | ไม่ |
| text_version | body | string | ไม่ |
| notice_version | body | string | ไม่ |
| granularity | body | object | ไม่ |
| evidence | body | object | ไม่ |
| expires_at | body | string (date-time) | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/consents' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"number":"+66000000001","purpose":"marketing_sms"}'/api/v1/linksList short links
read:logsไม่มีพารามิเตอร์
curl -X GET 'https://nexora-ai-call.com/api/v1/links' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/linksCreate a controlled short link (our own domain; destination is reviewed)
links:write| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| destination | body | string (uri) | ใช่ |
| label | body | string | ไม่ |
| expires_in_days | body | integer | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/links' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"destination":"https://example.com/promo"}'/api/v1/links/{id}Revoke a link at once (the short URL answers 410 afterwards)
links:write| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X DELETE 'https://nexora-ai-call.com/api/v1/links/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/links/{id}One short link with its clicks
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/links/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/lookups/{number}Look up one number (format, country, carrier, line type, active, ported); cached 24 h
lookups:read| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| number | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/lookups/%2B66000000001' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/lookups/batchClean a CSV list of numbers (plain UTF-8 CSV text, ≤ 10 000 rows); the result CSV comes back inline
lookups:read| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| csv | body | string | ใช่ |
| file_name | body | string | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/lookups/batch' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"csv":"number\n+66000000001\n"}'/api/v1/messagesList messages (cursor pagination)
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| to | query | string | ไม่ |
| from | query | string | ไม่ |
| status | query | queued | sent | delivered | failed | rejected | expired | received | blocked | scheduled | accepted | sending | undelivered | canceled | ไม่ |
| category | query | otp | transactional | marketing | ไม่ |
| client_ref | query | string | ไม่ |
| date_created_gte | query | string (date-time) | ไม่ |
| date_created_lt | query | string (date-time) | ไม่ |
| page_token | query | string | ไม่ |
| page_size | query | integer | ไม่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/messages' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messagesSend one SMS (async; returns the message in queued / scheduled)
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| to | body | string | ใช่ |
| body | body | string | ไม่ |
| template_id | body | string | ไม่ |
| template_vars | body | object | ไม่ |
| from | body | string | ไม่ |
| category | body | otp | transactional | marketing | ไม่ |
| status_callback | body | string (uri) | ไม่ |
| validity_period | body | integer | ไม่ |
| send_at | body | string (date-time) | ไม่ |
| smart_encoding | body | boolean | ไม่ |
| client_ref | body | string | ไม่ |
| lawful_basis_ref | body | string | ไม่ |
| max_segments | body | integer | ไม่ |
| priority | body | normal | urgent | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/messages' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"to":"+66000000001"}'/api/v1/messages/{id}Delete message content after it is final (PDPA); the record stays
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X DELETE 'https://nexora-ai-call.com/api/v1/messages/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messages/{id}Fetch one message
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/messages/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messages/{id}Cancel a scheduled or queued message
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
| status | body | string | ใช่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/messages/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"status":"canceled"}'/api/v1/messages/{id}/detailMessage detail with cost breakdown and timeline
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/messages/ID/detail' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messages/{id}/eventsStatus event history of a message
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/messages/ID/events' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messages/batchesList batches
read:logsไม่มีพารามิเตอร์
curl -X GET 'https://nexora-ai-call.com/api/v1/messages/batches' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messages/batchesSend an SMS batch (≤ 10 000 recipients, async; dry_run validates and prices only)
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| recipients | body | object[] | ใช่ |
| body | body | string | ไม่ |
| template_id | body | string | ไม่ |
| from | body | string | ไม่ |
| category | body | otp | transactional | marketing | ไม่ |
| status_callback | body | string (uri) | ไม่ |
| client_ref | body | string | ไม่ |
| dry_run | body | boolean | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/messages/batches' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"recipients":[{"to":"+66000000001"}]}'/api/v1/messages/batches/{id}Batch status with per-state counts
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/messages/batches/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messages/batches/{id}/cancelCancel what has not been handed to a provider yet
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/messages/batches/ID/cancel' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001'/api/v1/messages/batches/{id}/itemsPer-recipient status of a batch (live message status)
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
| cursor | query | integer | ไม่ |
| limit | query | integer | ไม่ |
| status | query | string | ไม่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/messages/batches/ID/items' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/messages/estimateEstimate segments, price and compliance checks without sending
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| to | body | string | ใช่ |
| body | body | string | ใช่ |
| category | body | otp | transactional | marketing | ไม่ |
| smart_encoding | body | boolean | ไม่ |
| from | body | string | ไม่ |
| lawful_basis_ref | body | string | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/messages/estimate' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"to":"+66000000001","body":"Your order has shipped"}'/api/v1/sendersSender IDs of the account
read:logsไม่มีพารามิเตอร์
curl -X GET 'https://nexora-ai-call.com/api/v1/senders' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/sendersRequest a sender ID (reviewed by the platform)
messages:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| value | body | string | ใช่ |
| category | body | otp | transactional | marketing | ใช่ |
| urls | body | string (uri)[] | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/senders' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"value":"ACME","category":"transactional"}'/api/v1/verification-checksCheck a code entered by the end user
verify:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| verification_id | body | string | ไม่ |
| to | body | string | ไม่ |
| code | body | string | ใช่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/verification-checks' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{"code":"123456"}'/api/v1/verificationsRecent verifications (no codes)
read:logsไม่มีพารามิเตอร์
curl -X GET 'https://nexora-ai-call.com/api/v1/verifications' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/verificationsSend a verification code (SMS, with optional LINE / voice fallback)
verify:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| to | body | string | ใช่ |
| channel | body | sms | line | voice | ไม่ |
| fallback | body | sms | line | voice[] | ไม่ |
| locale | body | zh | th | en | ไม่ |
| brand | body | string | ไม่ |
| code_length | body | integer | ไม่ |
| expiry_sec | body | integer | ไม่ |
| client_ref | body | string | ไม่ |
curl -X POST 'https://nexora-ai-call.com/api/v1/verifications' \
-H 'Authorization: Bearer sv_test_YOUR_KEY' \
-H 'Idempotency-Key: 6f1c2d54-0001' \
-H 'Content-Type: application/json' \
-d '{"to":"+66000000001"}'/api/v1/verifications/{id}Cancel a pending verification
verify:send| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X DELETE 'https://nexora-ai-call.com/api/v1/verifications/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'/api/v1/verifications/{id}Fetch one verification (another account's id answers 404)
read:logs| ฟิลด์ | ตำแหน่ง | ชนิด | จำเป็น |
|---|---|---|---|
| id | path | string | ใช่ |
curl -X GET 'https://nexora-ai-call.com/api/v1/verifications/ID' \
-H 'Authorization: Bearer sv_test_YOUR_KEY'