Developer Guide

API Documentation

AuFlow provides a powerful, multi-tenant HTTP API to interact with WhatsApp at scale. Our API is RESTful and uses standard HTTP status codes.

Authentication

Authentication is handled via Bearer tokens in the `Authorization` header. You can generate API keys within your AuFlow Dashboard.

curl -X GET "https://api.auflow.my.id/api/v1/health" \
  -H "Authorization: Bearer ak_your_api_key"

Session Management

POSTCreate Session

Initialize a new WhatsApp instance. Returns session details and QR code if required.

curl -X POST "https://api.auflow.my.id/api/v1/sessions" \
  -H "Authorization: Bearer ak_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Instance"
  }'
Nano Strategy

Sessions are strictly isolated at the infrastructure level. Your instance will never share resources with other tenants.

Messaging

POSTSend Text Message

curl -X POST "https://api.auflow.my.id/api/v1/messages/send" \
  -H "Authorization: Bearer ak_your_api_key" \
  -d '{
    "sessionId": "sess_123",
    "to": "628123456789",
    "text": "Hello from AuFlow API!"
  }'

POSTSend Media File

Upload documents or images directly to WhatsApp.

curl -X POST "https://api.auflow.my.id/api/v1/messages/file" \
  -H "Authorization: Bearer ak_your_api_key" \
  -F "sessionId=sess_123" \
  -F "to=628123456789" \
  -F "file=@/path/to/invoice.pdf" \
  -F "caption=Your monthly invoice"

Webhooks

Configure webhooks to receive real-time notifications for incoming messages, status updates, and session changes.

Event Signature Verification

All webhook events include an `X-AuFlow-Signature` header. We recommend verifying this signature to ensure events originate from our platform.

Webhooks are delivered with a retry strategy: 5 attempts over 2 hours.