Maton

WATI

Access the WATI (WhatsApp Team Inbox) API with managed authentication. Send WhatsApp messages, manage contacts, and work with message templates.

Reference

Get Contacts

GET /wati/api/v1/getContacts?pageSize=10&pageNumber=1

Query Parameters:

  • pageSize - Number of results per page
  • pageNumber - Page number (1-indexed)
  • name (optional) - Filter by contact name
  • attribute (optional) - Filter by attribute (format: [{"name": "name", "operator": "contain", "value": "test"}])
  • createdDate (optional) - Filter by created date (YYYY-MM-DD)

Attribute operators: contain, notContain, exist, notExist, ==, !=, valid, invalid

Add Contact

POST /wati/api/v1/addContact/{whatsappNumber}
Content-Type: application/json

{
  "name": "John Doe",
  "customParams": [
    {
      "name": "member",
      "value": "VIP"
    }
  ]
}

Update Contact Attributes

POST /wati/api/v1/updateContactAttributes/{whatsappNumber}
Content-Type: application/json

{
  "customParams": [
    {
      "name": "member",
      "value": "VIP"
    }
  ]
}

Get Messages

GET /wati/api/v1/getMessages/{whatsappNumber}?pageSize=10&pageNumber=1

Query Parameters:

  • pageSize - Number of results per page
  • pageNumber - Page number (1-indexed)

Send Session Message

Send a text message within an active session (24-hour window):

POST /wati/api/v1/sendSessionMessage/{whatsappNumber}
Content-Type: application/x-www-form-urlencoded

messageText=Hello%20from%20WATI!

Send Session File

Send a file within an active session:

POST /wati/api/v1/sendSessionFile/{whatsappNumber}?caption=Check%20this%20out
Content-Type: multipart/form-data

file=@document.pdf

Get Message Templates

GET /wati/api/v1/getMessageTemplates?pageSize=10&pageNumber=1

Send Template Message

Send a pre-approved template message to a single contact:

POST /wati/api/v1/sendTemplateMessage?whatsappNumber={whatsappNumber}
Content-Type: application/json

{
  "template_name": "order_update",
  "broadcast_name": "order_update",
  "parameters": [
    {
      "name": "name",
      "value": "John"
    },
    {
      "name": "ordernumber",
      "value": "12345"
    }
  ]
}

Send Template Messages (Bulk)

Send template messages to multiple contacts:

POST /wati/api/v1/sendTemplateMessages
Content-Type: application/json

{
  "template_name": "order_update",
  "broadcast_name": "order_update",
  "receivers": [
    {
      "whatsappNumber": "14155551234",
      "customParams": [
        {
          "name": "name",
          "value": "John"
        },
        {
          "name": "ordernumber",
          "value": "12345"
        }
      ]
    },
    {
      "whatsappNumber": "14155555678",
      "customParams": [
        {
          "name": "name",
          "value": "Jane"
        },
        {
          "name": "ordernumber",
          "value": "67890"
        }
      ]
    }
  ]
}

Send Template Message via CSV

POST /wati/api/v1/sendTemplateMessageCSV?template_name=order_update&broadcast_name=order_update
Content-Type: multipart/form-data

whatsapp_numbers_csv=@contacts.csv

Send Template Message (v2)

POST /wati/api/v2/sendTemplateMessage?whatsappNumber={whatsappNumber}
Content-Type: application/json

{
  "template_name": "order_update",
  "broadcast_name": "order_update",
  "parameters": [
    {
      "name": "name",
      "value": "John"
    }
  ]
}

Response:

{
  "result": true,
  "error": null,
  "templateName": "order_update",
  "receivers": [
    {
      "localMessageId": "38aca0c0-f80a-409c-81ed-607fa5206529",
      "waId": "14155551234",
      "isValidWhatsAppNumber": true,
      "errors": []
    }
  ],
  "parameters": [
    {"name": "name", "value": "John"}
  ]
}

Send Template Messages (v2 - Bulk)

POST /wati/api/v2/sendTemplateMessages
Content-Type: application/json

{
  "template_name": "order_update",
  "broadcast_name": "order_update",
  "receivers": [
    {
      "whatsappNumber": "14155551234",
      "customParams": [
        {"name": "name", "value": "John"}
      ]
    },
    {
      "whatsappNumber": "14155555678",
      "customParams": [
        {"name": "name", "value": "Jane"}
      ]
    }
  ]
}

Response:

{
  "result": true,
  "error": null,
  "templateName": "order_update",
  "receivers": [
    {
      "localMessageId": "c486f386-d86d-431d-aa3b-fb1b6c494e58",
      "waId": "14155551234",
      "isValidWhatsAppNumber": true,
      "errors": []
    },
    {
      "localMessageId": "d597f497-e97e-542e-bb4c-718gb6d5a069",
      "waId": "14155555678",
      "isValidWhatsAppNumber": true,
      "errors": []
    }
  ]
}

Send Interactive Buttons Message

POST /wati/api/v1/sendInteractiveButtonsMessage?whatsappNumber={whatsappNumber}
Content-Type: application/json

{
  "header": {
    "type": "text",
    "text": "Order Status"
  },
  "body": "Your order #12345 is ready. What would you like to do?",
  "footer": "Reply within 24 hours",
  "buttons": [
    {
      "text": "Track Order"
    },
    {
      "text": "Contact Support"
    }
  ]
}

Send Interactive List Message

POST /wati/api/v1/sendInteractiveListMessage?whatsappNumber={whatsappNumber}
Content-Type: application/json

{
  "header": "Choose an option",
  "body": "Please select from the menu below",
  "footer": "Powered by WATI",
  "buttonText": "View Options",
  "sections": [
    {
      "title": "Products",
      "rows": [
        {
          "title": "Product A",
          "description": "Best seller item"
        },
        {
          "title": "Product B",
          "description": "New arrival"
        }
      ]
    }
  ]
}

Assign Operator

POST /wati/api/v1/assignOperator?email=agent@example.com&whatsappNumber={whatsappNumber}

Get Media

GET /wati/api/v1/getMedia?fileName={fileName}

Resources

On this page