Skip to content

API & integrations ​

API & Integrations lets your own systems talk to Midlr: your website, online shop, ERP or CRM. For example, your website can create a lead when someone fills in a form, or your shop can send a WhatsApp order update when an order ships.

This page is mainly for your developer or IT partner. As a business owner, your job is to create the token and hand it over safely.

Before you start ​

  • API & Integrations is switched on per business and is available on selected plans. If you don't see it under Settings & Support, contact support.
  • You need permission to view integrations. To create or replace the token you need permission to manage integrations. See Roles & permissions.

Open API & Integrations ​

In the sidebar, open Settings & Support and click API & Integrations.

The page has two parts:

  • Authentication Setup: your business's API token.
  • Available Integration APIs: the full list of what your systems can do, with documentation for each.

Create your API token ​

Your systems prove they belong to your business by sending this token with every request.

  1. Under Authentication Setup, click Generate API Token.
  2. Copy the token straight away and give it to your developer through a safe channel (not a group chat or a public email thread).

Token Status changes from Not Configured to Active.

WARNING

The token is shown only once. If you lose it, you'll have to make a new one. Anyone with the token can read and send messages as your business, so treat it like a password.

If you can view the page but not create a token, you see Ask your admin to give you a token.

Replace your token ​

If the token may have leaked, or a developer has left:

  1. Click Regenerate API Token.
  2. Click Yes, regenerate.
  3. Give the new token to your developer.

WARNING

The old token stops working immediately. Any system still using it will fail until it's updated with the new token.

What your systems can do ​

The Available Integration APIs list is grouped by topic. Use Search APIs by name, endpoint, method or group... to find one, and View Documentation to see its details and examples.

GroupWhat it's for
LeadsCreate, list, view, update and delete leads.
TemplatesList and view your message templates, and submit new ones.
MessagesSend WhatsApp messages: text, templates, images, video, documents, audio, buttons, product messages, carousels, forms, catalog links, reactions and the typing indicator.
Chat ConversationsList conversations, read messages, mark as read, archive and unarchive.
Client NumbersList and view contacts, block or unblock them, and pause or resume the bot for one contact.
LabelsList, create and delete labels, and put labels on contacts.
Orders and CartList and create orders, change their status or items, and manage a customer's cart through to checkout.
Catalog ProductsList and search the products in your catalog.
BookingsList bookings, check availability, create bookings, change their status, and list services and staff. See Bookings.
FlowsList, view and update forms.
Business NumbersList and view your connected business numbers.
SMSSend an SMS and check its status. See SMS.
LogsSee a log of the API calls your systems made.
WebhooksExplains event forwarding: Midlr sending each incoming WhatsApp message to your system. You set it up in Business Config.

Two groups only work if your business has the matching feature:

  • Bookings works only on the Premium plan. On other plans, requests are refused with a message that your plan doesn't include it.
  • SMS works only if SMS is switched on for your business. You also need an approved SMS template, an approved sender and enough money in your SMS Wallet, the same as for SMS campaigns. See SMS.

Hand the documentation to your developer ​

  • Each API's documentation shows the headers, parameters, an EXAMPLE JSON PAYLOAD, a RESPONSE EXAMPLE and the possible status responses. Every request sends your token in the x-business-token header.
  • Click Export All to Postman to download every API as a Postman collection, or Export to Postman on one API. Postman is a free tool developers use to try APIs.

TIP

Sending messages through the API follows the same WhatsApp rules as sending from Midlr. Outside the 24-hour window you can only send approved templates.

Need more help? Open a support ticket from inside Midlr.