Communication

Z-API

Z-API is a Brazilian service that drives an ordinary WhatsApp account through a REST API: it holds a WhatsApp Web session for a phone number you pair by scanning a QR code, and lets you send and read through it.

Authentication

  • Instance credentials

Actions

Generic API request. Call any Z-API endpoint on this connection, for the case where no shipped action covers it yet. The connection supplies the base URL, the instance path segments, the Client-Token header and the egress route, so only the path after the instance and token, the query and the body are yours to fill.

  • Check number on WhatsAppCheck whether a phone number holds a WhatsApp account.
  • Get chat metadataRead one chat's details: unread count, when it was last active, whether it is muted or flagged as spam, the profile photo and the contact's status text.
  • Get instance statusReport whether this Z-API instance is currently connected to a paired WhatsApp account.
  • Get pairing QR codeFetch the QR code that pairs a WhatsApp account to this instance, as an image data URI ready to render.
  • List chatsList the chats on the paired WhatsApp account, newest interaction first.
  • List contactsList the WhatsApp contacts visible to the paired number, with the several names WhatsApp keeps for each one.
  • List groupsList the WhatsApp groups the paired number belongs to.
  • Send action buttonsSend a message carrying tappable action buttons: a button that dials a number, a button that opens a link, or a quick-reply button that sends a canned answer back.
  • Send audioSend an audio clip to a WhatsApp chat, either by public URL or as a base64 data URI.
  • Send documentSend a document — a PDF, a spreadsheet, a slide deck — to a WhatsApp chat, either by public URL or as a base64 data URI.
  • Send imageSend an image to a WhatsApp chat, either by public URL or as a base64 data URI.
  • Send option listSend a message with a selectable list of options, opened by a button in the chat.
  • Send text messageSend a plain WhatsApp text message from the number this connection is paired to.
  • Send videoSend a video to a WhatsApp chat, either by public URL or as a base64 data URI.

Triggers

  • Message receivedStarts when the connected WhatsApp number receives a message — in a one-to-one chat or a group — or a call, group or account notification Z-API reports on the same webhook.
  • Messages to the numberAnswers as an agent on WhatsApp through Z-API: when someone messages the connected number in a one-to-one chat, the agent replies in that chat.

Product names, logos and brands are the property of their respective owners and are used here for identification only. Their use does not imply endorsement by, or affiliation with, those owners.