Developer API

Send WhatsApp campaigns with the Nexagrowthhub API

Trigger approved WhatsApp templates from your website, app, or CRM using a live API campaign and workspace API key. Successful sends also appear in Inbox, unassigned by default.

Overview

How API access works

Create a live campaign, generate a key, then POST one recipient at a time — the same model used by leading WhatsApp BSPs.

API campaigns

Create a live API campaign in Nexagrowthhub, bind it to an approved WhatsApp template, then trigger that template from your website, app, or CRM.

API key

Owner and Admin accounts generate a workspace API key in Settings → API Key after WhatsApp Business API status is Connected. Staff members can manage campaigns but cannot access keys.

Inbox + reports

Every successful API send (HTTP 200) appears in Inbox as an unassigned conversation. Delivery, read, failed, and reply counts show on the campaign report.

Setup

Create an API campaign and key

Complete these steps in Nexagrowthhub before calling the send endpoint.

  1. 01

    Connect WhatsApp Business API

    In Settings → WhatsApp API, add Meta Cloud API credentials. Dashboard WhatsApp Business API status must show Connected before API keys work.

  2. 02

    Approve a WhatsApp template

    Create and get Meta approval for the template you want to send. API campaigns can only use approved templates.

  3. 03

    Create a live API campaign

    Open Campaigns → API Campaigns → New API campaign. Enter a name (3–50 characters), select the template, then click Set Live. You can pause or delete later from the 3-dot menu.

  4. 04

    Generate an API key

    In Settings → API Key, generate (or regenerate) a key and copy it immediately. The full key is shown only once. Regenerating invalidates the previous key.

  5. 05

    Send from your system

    POST JSON to /api/v1/campaign/send with apiKey, campaignName, destination, userName, and any templateParams / media / location your template requires.

HTTP request

POST /api/v1/campaign/send

Send JSON with Content-Type: application/json. A successful send returns HTTP 200.

{
  "apiKey": "ngh_your_workspace_api_key",
  "campaignName": "Order updates API",
  "destination": "+917428526285",
  "userName": "Priya Sharma",
  "source": "Website lead",
  "media": {
    "url": "https://example.com/invoice.pdf",
    "filename": "invoice.pdf"
  },
  "location": {
    "latitude": "12.9716",
    "longitude": "77.5946",
    "name": "Nexagrowthhub",
    "address": "Banaswadi, Bangalore"
  },
  "templateParams": [
    "Priya",
    "ORD-2048"
  ],
  "tags": [
    "api",
    "checkout"
  ],
  "attributes": {
    "order_id": "ORD-2048",
    "city": "Bangalore"
  }
}

POST https://nexagrowthhub.com/api/v1/campaign/send
Fields

Request body reference

Populate each key according to the table. Optional fields can be omitted.

FieldTypeRequiredDescription
apiKeystringYesWorkspace API key from Settings → API Key. Invalid or revoked keys return 401.
campaignNamestringYesExact name of a live API campaign. Paused campaigns reject sends. Create the campaign in Campaigns → API Campaigns first.
destinationstringYesRecipient mobile number with country dial code, e.g. +917428526285. For Indian numbers, +91 is optional. Numbers that cannot be resolved default to India (+91). Outside India, include +(country code).
userNamestringYesName of the user receiving the campaign. Used to create or update the contact. New numbers are added to Contacts automatically.
sourcestringNoLead source, e.g. Website lead or Facebook forms. Stored on the contact for retargeting.
mediaobjectNourl (required) and filename (optional) for IMAGE / VIDEO / DOCUMENT template headers. The URL must be publicly accessible or the request is rejected.
locationobjectNoRequired when the template has a LOCATION header. Provide latitude, longitude, name, and address.
templateParamsstring[]NoDynamic body values for the template, in order. Length must equal the number of variables in the campaign template or the request is rejected.
tagsstring[]NoTag names to assign to the contact. New tags are added to the contact.
attributesobjectNoKey-value pairs (string values only) stored on the contact. Use this for custom CRM fields.
Notes

Before you go live

These rules match the send API validation.

Optional fields can be omitted from the JSON body.

The media URL must be publicly reachable; otherwise the request is rejected.

templateParams length must match the live campaign template. Extra or missing values are rejected.

Paused API campaigns cannot send until you resume them.

A successful 200 response also creates or updates an unassigned Inbox conversation.

You can keep up to 50 API campaigns per workspace.

Prerequisites

What you need in place

The send API returns 4xx until these are complete.

  • WhatsApp Business API connected (Dashboard status: Connected).
  • At least one approved WhatsApp template.
  • A live API campaign with the exact campaignName you will send.
  • A workspace API key generated by Owner or Admin.
Next step

Open your workspace

Create an API campaign, generate a key, then send your first template from Nexagrowthhub.