Home › Documentation › API Reference › Create Customer

Create Customer

Buat customer baru dan masukkan ke dalam group.

POST https://api.alatwa.com/customer

Headers

NameTypeDescription
Authorization string required API Key akun Alat WA Anda
Content-Type string required application/json

Body Parameters

NameTypeDescription
generate_prefix_number string required Generate nomor dengan prefix 62 ("true"/"false")
filter_duplicate string required Filter nomor duplikat ("true"/"false")
group string required Nama group customer
customers array required Array objek customer: {phone*, name, opt1-opt7}

Try It

Body Parameters

Code Examples

curl -X POST https://api.alatwa.com/customer \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "generate_prefix_number": "true", "filter_duplicate": "true", "group": "Pelanggan Baru", "customers": [ { "phone": "08111111111", "name": "John Doe" } ] }'
$ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.alatwa.com/customer'); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: YOUR_API_KEY', 'Content-Type: application/json' ]); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch);
const response = await fetch('https://api.alatwa.com/customer', { method: 'POST', headers: { 'Authorization': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ "generate_prefix_number": "true", "filter_duplicate": "true", "group": "Pelanggan Baru", "customers": [ { "phone": "08111111111", "name": "John Doe" } ] }) });
import requests response = requests.post( 'https://api.alatwa.com/customer', headers={ 'Authorization': 'YOUR_API_KEY', 'Content-Type': 'application/json' }, json={ "generate_prefix_number": "true", "filter_duplicate": "true", "group": "Pelanggan Baru", "customers": [ { "phone": "08111111111", "name": "John Doe" } ] } )

Response

200 Success
{ "status": "ok", "message": "Success", "total_customer": "1", "group": "Pelanggan Baru" }

Response Fields

FieldTypeDescription
status string "ok" atau "error"
message string Pesan status
total_customer string Total customer yang dibuat
group string Nama group
Get Message by ID Filter WhatsApp Number

Biar WhatsApp yang kerja, kamu fokus jualan

Tanpa server, tanpa coding. Daftar, scan QR WhatsApp, dan auto reply pertamamu bisa langsung jalan.

WhatsApp