API Documentation

WA Gateway is API-compatible with Wablas. Swap the base URL and your existing integrations work out of the box.

Getting Started

Base URLs

Wablas-compatible endpoint

POST https://wa.fujicon.id/api/send-message

Native REST API

GET https://wa.fujicon.id/api/v1/devices

Quick start

  1. 1

    Get an API key

    Go to Settings → API Keys and create a new key. Copy the token — it won't be shown again.

  2. 2

    Get a Device ID

    Go to Devices and copy the ID of the device you want to send from. Pass it as device_id in the body or via the X-Device-ID header.

  3. 3

    Send your first message

    Make a POST to /api/send-message with your token and device ID. Done.

Authentication

Bearer header (recommended)

Authorization: Bearer YOUR_TOKEN

Query parameter (alternative)

https://wa.fujicon.id/api/send-message?token=YOUR_TOKEN

Obtain an API key from Settings → API Keys. Keys are scoped to your account and can be revoked at any time.

Example — curl

curl -X POST https://wa.fujicon.id/api/send-message \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"phone":"628xxxxxxxxx","message":"Hello!","device_id":"YOUR_DEVICE_ID"}'

Device

GET/api/device/info

Returns the current status and details of a connected device.

Request headers / query

NameTypeRequiredDescription
AuthorizationheaderrequiredBearer token. e.g. Authorization: Bearer YOUR_TOKEN
X-Device-IDheaderoptionalDevice ID. Alternative: ?device_id= query param.
device_idqueryoptionalDevice ID (alternative to X-Device-ID header).

Response

{
  "status": true,
  "message": "Device info",
  "data": {
    "phone": "628xxxxxxxxx",
    "device": "My iPhone",
    "status": "connected",
    "battery": 87,
    "platform": "ios"
  }
}

Send Text Message

POST/api/send-message

Send a plain-text WhatsApp message to one recipient.

Request body (JSON)

NameTypeRequiredDescription
phonestringrequiredRecipient phone in international format. e.g. 628xxxxxxxxx
messagestringrequiredPlain-text message content.
device_idstringoptionalDevice to send from. Can be passed via X-Device-ID header instead.

Response

{
  "status": true,
  "message": "Message sent",
  "data": {
    "messages": [
      {
        "phone": "628xxxxxxxxx",
        "messageId": "3EB0C767D97B1C6A1C23",
        "status": "sent"
      }
    ]
  }
}

Example — curl

curl -X POST https://wa.fujicon.id/api/send-message \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "628xxxxxxxxx",
    "message": "Hello from WA Gateway!",
    "device_id": "YOUR_DEVICE_ID"
  }'

Example — JavaScript (axios)

import axios from 'axios'

const res = await axios.post('https://wa.fujicon.id/api/send-message', {
  phone: '628xxxxxxxxx',
  message: 'Hello from WA Gateway!',
  device_id: 'YOUR_DEVICE_ID',
}, {
  headers: { Authorization: 'Bearer YOUR_TOKEN' },
})

console.log(res.data)

Send Image

POST/api/send-image

Send an image with an optional caption. The image field accepts a public URL or a base64-encoded data URI.

Request body (JSON)

NameTypeRequiredDescription
phonestringrequiredRecipient phone in international format.
imagestringrequiredPublic URL or base64-encoded data URI of the image.
captionstringoptionalOptional caption shown below the image.
device_idstringoptionalDevice to send from.

Example — curl

curl -X POST https://wa.fujicon.id/api/send-image \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "628xxxxxxxxx",
    "image": "https://example.com/photo.jpg",
    "caption": "Check this out!",
    "device_id": "YOUR_DEVICE_ID"
  }'

Broadcast

POST/api/broadcast

Send personalised messages to multiple recipients in one request. Supports template variables — use {{name}}, {{order}}, etc. and provide matching keys per recipient object.

Request body (JSON)

NameTypeRequiredDescription
dataarrayrequiredArray of recipient objects. Each must have phone and message keys.
data[].phonestringrequiredRecipient phone in international format.
data[].messagestringrequiredMessage text. May contain {{variable}} placeholders.
data[].*stringoptionalAny extra keys become template variables, e.g. name, order.
device_idstringoptionalDevice to send from (applied to the entire batch).

Example — curl

curl -X POST https://wa.fujicon.id/api/broadcast \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "device_id": "YOUR_DEVICE_ID",
    "data": [
      {
        "phone": "628111111111",
        "message": "Hi {{name}}, your order {{order}} is ready!",
        "name": "Alice",
        "order": "#1001"
      },
      {
        "phone": "628222222222",
        "message": "Hi {{name}}, your order {{order}} is ready!",
        "name": "Bob",
        "order": "#1002"
      }
    ]
  }'

Example — JavaScript (axios)

import axios from 'axios'

const res = await axios.post('https://wa.fujicon.id/api/broadcast', {
  device_id: 'YOUR_DEVICE_ID',
  data: [
    {
      phone: '628111111111',
      message: 'Hi {{name}}, order {{order}} is ready!',
      name: 'Alice',
      order: '#1001',
    },
    {
      phone: '628222222222',
      message: 'Hi {{name}}, order {{order}} is ready!',
      name: 'Bob',
      order: '#1002',
    },
  ],
}, {
  headers: { Authorization: 'Bearer YOUR_TOKEN' },
})

Send Button (Interactive)

POST/api/send-button

Send an interactive message with up to 3 quick-reply buttons. Buttons are rendered natively in WhatsApp.

Request body (JSON)

NameTypeRequiredDescription
phonestringrequiredRecipient phone in international format.
bodystringrequiredMain message text shown in the bubble.
footerstringoptionalSmall italic text shown below the body.
buttonsarrayrequiredArray of button objects. Maximum 3.
buttons[].idstringrequiredUnique ID returned in the button reply event.
buttons[].titlestringrequiredButton label shown to the user.
device_idstringoptionalDevice to send from.

Example body

{
  "phone": "628xxxxxxxxx",
  "body": "Which plan would you like?",
  "footer": "Reply by tapping a button below",
  "buttons": [
    { "id": "plan_basic", "title": "Basic - Rp 99k/mo" },
    { "id": "plan_pro",   "title": "Pro - Rp 199k/mo" },
    { "id": "plan_talk",  "title": "Talk to sales" }
  ],
  "device_id": "YOUR_DEVICE_ID"
}

Send List / Menu

POST/api/send-list

Send an interactive list message. Recipients tap a button to open a grouped menu and select an option.

Request body (JSON)

NameTypeRequiredDescription
phonestringrequiredRecipient phone in international format.
bodystringrequiredMessage body text.
footerstringoptionalSmall italic text below the body.
buttonTextstringrequiredLabel of the button that opens the list.
sectionsarrayrequiredArray of section groups.
sections[].titlestringrequiredSection heading.
sections[].rowsarrayrequiredArray of row items in this section.
sections[].rows[].idstringrequiredUnique ID returned when the row is selected.
sections[].rows[].titlestringrequiredRow label.
sections[].rows[].descriptionstringoptionalOptional sub-text shown below the title.
device_idstringoptionalDevice to send from.

Example body

{
  "phone": "628xxxxxxxxx",
  "body": "Please select your preferred delivery time:",
  "footer": "We will confirm by WhatsApp",
  "buttonText": "Choose time slot",
  "sections": [
    {
      "title": "Today",
      "rows": [
        { "id": "slot_morning",   "title": "09:00 - 12:00", "description": "Morning delivery" },
        { "id": "slot_afternoon", "title": "13:00 - 17:00", "description": "Afternoon delivery" }
      ]
    },
    {
      "title": "Tomorrow",
      "rows": [
        { "id": "slot_tomorrow_am", "title": "09:00 - 12:00" },
        { "id": "slot_tomorrow_pm", "title": "13:00 - 17:00" }
      ]
    }
  ],
  "device_id": "YOUR_DEVICE_ID"
}

Webhook

POST/api/webhook/set

Register a URL to receive incoming messages and device events. WA Gateway will POST a JSON payload to your URL whenever a message arrives or a device status changes.

Request body (JSON)

NameTypeRequiredDescription
urlstringrequiredHTTPS URL that will receive POST requests on incoming events.
device_idstringoptionalScope to a specific device. Omit to receive events from all devices.

Webhook payload shape (sent to your URL)

{
  "phone":     "628xxxxxxxxx",
  "message":   "Hello back!",
  "device":    "YOUR_DEVICE_ID",
  "timestamp": "2025-06-01T10:30:00Z"
}

Example — curl

curl -X POST https://wa.fujicon.id/api/webhook/set \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-app.com/webhook/whatsapp"}'

Error Codes

CodeMeaning
200Success — request processed.
400Bad request — required field missing or malformed body.
401Unauthorized — invalid or missing API token.
404Not found — device ID does not exist or is offline.
500Internal server error — please retry or contact support.

Migration from Wablas

WA Gateway is a drop-in replacement for Wablas. Only three changes are needed:

1

Change the base URL

Before (Wablas)

https://pati.wablas.com/

After (WA Gateway)

https://wa.fujicon.id/api/
2

Pass the device ID explicitly

In Wablas the device was embedded in the token. In WA Gateway it is explicit — add an X-Device-ID: YOUR_DEVICE_ID header (or device_id in the body).

3

Swap the auth token

Replace your Wablas token with a WA Gateway API key. The header format is identical: Authorization: Bearer YOUR_TOKEN.

All other request and response shapes are identical to Wablas. No further code changes are needed.

© 2026 WA Gateway