Overview
REST API

Get started with the SheetWA WhatsApp API

The SheetWA WhatsApp API lets your own code send templates, manage contacts, run broadcasts and answer the inbox. It is a REST API: JSON over HTTPS with one key.

Before you start#

  • A SheetWA workspace with a WhatsApp number connected through the WhatsApp API.
  • An API Growth or API Ultra plan, or the free trial. The REST API comes with the same plans as the MCP server.
  • An API key. The workspace owner can make one for anyone in the workspace, and an admin for themselves or a member.

Get an API key#

  1. 1

    Open API keys

    In the SheetWA dashboard, open the API keys page.

  2. 2

    Create a key

    Name it after the app that will use it, like "Order sync", and pick who it belongs to. The key acts as that person.

  3. 3

    Store it on your server

    The key starts with sk_live_. Keep it in an environment variable such as SHEETWA_API_KEY, never in front-end code or a repository.

It is the same workspace API key the MCP server uses, so one key can serve both.

Treat the key like a password

Anyone holding it can act in your workspace as the person it belongs to. If it leaks, revoke it on the API keys page and make a new one.

Base URL#

Every path in these docs sits under this base URL.

urlBase URL
https://backend.sheetwa.com/v1

The OpenAPI 3.1 document is at GET /v1/openapi.json and needs no key. Load it into your API client or a code generator.

urlOpenAPI document
https://backend.sheetwa.com/v1/openapi.json

Make your first call#

Check the connection. A 200 answer means the key works and shows whether your number is live.

bashFirst call: curl
export SHEETWA_API_KEY=sk_live_your_key_here

curl "https://backend.sheetwa.com/v1/connection" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"

Send a template message#

Send an approved template to one person. Give the country code digits and the local number apart, the template's name and language, and one value per placeholder, in order.

bashSend a template: curl
curl -X POST "https://backend.sheetwa.com/v1/messages" \
  -H "Authorization: Bearer $SHEETWA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042-shipped" \
  -d '{
    "country_code": "91",
    "phone": "9876543210",
    "template_name": "order_update",
    "language_code": "en",
    "variables": [
      "Asha",
      "#1042"
    ]
  }'

Add an Idempotency-Key to every send

This call reaches a real phone and is billed. With the header, a retry after a timeout gets the first answer back and the message is not sent twice.

How requests work#

  • GET endpoints take query parameters. Send a list as ?tag_ids=a,b or repeat the key: ?tag_ids=a&tag_ids=b.
  • POST, PATCH and DELETE take a JSON object body, sent with Content-Type: application/json.
  • A parameter the endpoint does not know is refused with 400, so a typo never passes silently.
  • Phones come back in E.164 with the plus sign, like +919876543210. When you send, give country_code digits and the local phone.
  • Every answer has an X-Request-Id header: req_ and 24 hex characters. Quote it when you contact support.

Pagination#

Lists come one page at a time. Set page_size: 20 by default and up to 100 on most lists, and each endpoint's parameters show its own. Each answer has next_cursor and has_more: pass next_cursor as cursor to get the next page, and stop when has_more is false.

bashNext page
curl "https://backend.sheetwa.com/v1/contacts?page_size=100&cursor=NEXT_CURSOR" \
  -H "Authorization: Bearer $SHEETWA_API_KEY"

Next steps#