WhatsApp — API reference

Base URL https://iqcore.ai/api/public/v1. Every request needs Authorization: Bearer iqk_… (authentication); errors follow one envelope.

WhatsApp campaigns

GET /whatsapp/campaigns

  • Operation whatsapp_campaigns_list
  • Scope whatsapp.read
  • Lowest role viewer
  • Read only

The account's WhatsApp campaigns, running ones first: id, name, status, category, number, template, counts (recipients, sent, delivered, read, replied, clicked, failed, skipped, opted out), dates and the pause reason. Filter active, draft or done.

Parameters

  • status query string — Only these campaigns (default all). One of: all, active, draft, done.
  • limit query integer — At most this many (default 10). min 1 · max 20
  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • campaigns array of object required max items 20
    • id string required — The campaign id.
    • name string required
    • status string required — draft, scheduled, queued, sending, paused, completed, cancelled or failed.
    • category string — The template category (marketing, utility …).
    • number string — The WhatsApp number it sends from.
    • template string — The template: name (language).
    • counts object required — total = recipients; the others count recipients per state.
      • total integer required min 0
      • pending_count integer required min 0
      • sent_count integer required min 0
      • delivered_count integer required min 0
      • read_count integer required min 0
      • replied_count integer required min 0
      • clicked_count integer required min 0
      • failed_count integer required min 0
      • skipped_count integer required min 0
      • opted_out_count integer required min 0
    • scheduled_at string — When it is planned to start.
    • started_at string — When sending started.
    • finished_at string — When sending finished.
    • pause_reason string — Why it is paused.
    • held_by_iqcore boolean — Present (true) when IQCore holds the campaign.

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/whatsapp/campaigns" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/campaigns", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/whatsapp/campaigns",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "campaigns": [
        {
            "id": "<id>",
            "name": "Summer sale",
            "status": "status",
            "category": "category",
            "number": "number",
            "template": "template",
            "counts": {
                "total": 1,
                "pending_count": 1,
                "sent_count": 1,
                "delivered_count": 1,
                "read_count": 1,
                "replied_count": 1,
                "clicked_count": 1,
                "failed_count": 1,
                "skipped_count": 1,
                "opted_out_count": 1
            },
            "scheduled_at": "2026-12-05T09:00:00Z",
            "started_at": "2026-12-05T09:00:00Z",
            "finished_at": "2026-12-05T09:00:00Z",
            "pause_reason": "pause_reason",
            "held_by_iqcore": false
        }
    ]
}

WhatsApp campaign

GET /whatsapp/campaigns/{id}

  • Operation whatsapp_campaign_get
  • Scope whatsapp.read
  • Lowest role viewer
  • Read only

One WhatsApp campaign by its id (from whatsapp_campaigns_list): status, template, counts (sent, delivered, read, replied, failed …), schedule, quiet hours, the cost estimate, pause details and the failures grouped by reason. No recipients.

Parameters

  • id path string required — The campaign id (uuid). max length 64
  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • id string required — The campaign id.
  • name string required
  • status string required — draft, scheduled, queued, sending, paused, completed, cancelled or failed.
  • category string — The template category (marketing, utility …).
  • number string — The WhatsApp number it sends from.
  • template string — The template: name (language).
  • counts object required — total = recipients; the others count recipients per state.
    • total integer required min 0
    • pending_count integer required min 0
    • sent_count integer required min 0
    • delivered_count integer required min 0
    • read_count integer required min 0
    • replied_count integer required min 0
    • clicked_count integer required min 0
    • failed_count integer required min 0
    • skipped_count integer required min 0
    • opted_out_count integer required min 0
  • scheduled_at string — When it is planned to start.
  • started_at string — When sending started.
  • finished_at string — When sending finished.
  • pause_reason string — Why it is paused.
  • held_by_iqcore boolean — Present (true) when IQCore holds the campaign.
  • timezone string — The time zone of the schedule and the quiet hours.
  • quiet_hours boolean required — No sends at night in the recipient's time.
  • estimate object
    • total number | null required — Meta's estimated cost.
    • currency string | null required
    • complete boolean required — Every recipient could be priced.
  • pause_detail string — Details of the pause (may quote Meta). max length 200
  • launched_at string
  • paused_at string
  • cancelled_at string
  • failures array of object required — Failed and skipped recipients grouped by reason (counts only). max items 15
    • reason string required — A skip reason, a Meta error code, rate_limit or other.
    • status string required — failed or skipped.
    • count integer required min 0

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/whatsapp/campaigns/<id>" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/campaigns/<id>", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/whatsapp/campaigns/<id>",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "id": "<id>",
    "name": "Summer sale",
    "status": "status",
    "category": "category",
    "number": "number",
    "template": "template",
    "counts": {
        "total": 1,
        "pending_count": 1,
        "sent_count": 1,
        "delivered_count": 1,
        "read_count": 1,
        "replied_count": 1,
        "clicked_count": 1,
        "failed_count": 1,
        "skipped_count": 1,
        "opted_out_count": 1
    },
    "scheduled_at": "2026-12-05T09:00:00Z",
    "started_at": "2026-12-05T09:00:00Z",
    "finished_at": "2026-12-05T09:00:00Z",
    "pause_reason": "pause_reason",
    "held_by_iqcore": false,
    "timezone": "timezone",
    "quiet_hours": false,
    "estimate": {
        "total": 1.5,
        "currency": "currency",
        "complete": false
    },
    "pause_detail": "pause_detail",
    "launched_at": "2026-12-05T09:00:00Z",
    "paused_at": "2026-12-05T09:00:00Z",
    "cancelled_at": "2026-12-05T09:00:00Z",
    "failures": [
        {
            "reason": "reason",
            "status": "status",
            "count": 1
        }
    ]
}

WhatsApp insights

GET /whatsapp/insights

  • Operation whatsapp_insights
  • Scope whatsapp.read
  • Lowest role viewer
  • Read only

WhatsApp figures of the last 7, 30 or 90 days: conversations, messages in and out, median first response (person and AI, seconds), AI and person replies, Meta's cost estimate, the template funnel (sent, delivered, read, replied) and the top templates.

Parameters

  • days query integer — Period: 7, 30 or 90 days (default 30). min 7 · max 90
  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • days integer — The period in days (only when the account has no number).
  • numbers integer — 0: the account has no WhatsApp number (only then).
  • period object
    • days integer required
    • from string required
    • to string required
  • kpis object | null required
    • conversations integer required — Conversations with a message in the period. min 0
    • new_conversations integer required min 0
    • new_by_customer integer required — New conversations the customer started. min 0
    • messages_in integer required min 0
    • messages_out integer required min 0
    • first_response integer | null required — Median first response of a person, in seconds. min 0
    • first_response_ai integer | null required — Median first response of the AI, in seconds. min 0
    • ai_replies integer required min 0
    • human_replies integer required min 0
    • ai_share integer | null required — Percentage of replies the AI sent. min 0 · max 100
    • cost object required — Meta's cost estimate of the billable messages.
      • total number | null required
      • currency string | null required
      • missing integer required — Billable messages without a known rate. min 0
      • billable integer required min 0
  • template_funnel object
    • sent integer required min 0
    • delivered integer required min 0
    • read integer required min 0
    • replied integer required min 0
    • clicked integer required min 0
    • failed integer required min 0
  • top_templates array of object max items 5
    • name string | null required
    • language string | null required
    • category string | null required
    • status string | null required — null for a template deleted since.
    • sent integer required min 0
    • delivered integer required min 0
    • read integer required min 0
    • replied integer required min 0
    • failed integer required min 0
    • cost number | null required — Meta's estimated cost (null = unknown).

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/whatsapp/insights" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/insights", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/whatsapp/insights",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "days": 1,
    "numbers": 1,
    "period": {
        "days": 1,
        "from": "from",
        "to": "to"
    },
    "kpis": {
        "conversations": 1,
        "new_conversations": 1,
        "new_by_customer": 1,
        "messages_in": 1,
        "messages_out": 1,
        "first_response": 1,
        "first_response_ai": 1,
        "ai_replies": 1,
        "human_replies": 1,
        "ai_share": 1,
        "cost": {
            "total": 1.5,
            "currency": "currency",
            "missing": 1,
            "billable": 1
        }
    },
    "template_funnel": {
        "sent": 1,
        "delivered": 1,
        "read": 1,
        "replied": 1,
        "clicked": 1,
        "failed": 1
    },
    "top_templates": [
        {
            "name": "Summer sale",
            "language": "language",
            "category": "category",
            "status": "status",
            "sent": 1,
            "delivered": 1,
            "read": 1,
            "replied": 1,
            "failed": 1,
            "cost": 1.5
        }
    ]
}

Save an Inbox label

POST /whatsapp/labels

  • Operation whatsapp_label_save
  • Scope settings.write
  • Lowest role admin
  • Changes data

Add an Inbox label (name up to 40 characters, optional color), or change an existing label: send its current name and rename_to and / or color. Labels are shared by the WhatsApp and social conversations of the Inbox. Runs at once.

Parameters

  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • name string required — The label name (an existing one to change it). min length 1 · max length 40
  • rename_to string — A new name for an existing label. min length 1 · max length 40
  • color string One of: slate, sky, violet, rose, amber, emerald, orange, pink, teal.
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • label string required — The label's name now.
  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/whatsapp/labels" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Summer sale"
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/labels", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "name": "Summer sale"
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/whatsapp/labels",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "name": "Summer sale"
    },
)
print(res.status_code, res.json())
json
{
    "label": "label",
    "message": "message"
}

WhatsApp numbers

GET /whatsapp/numbers

The account's WhatsApp numbers: id, number, display name, status (connected, restricted, needs_reconnect, disconnected), quality rating (green, yellow, red), messaging limit, display-name review status, when the connection expires, whether Meta needs a payment method, AI replies on or off and the reply mode. Fixes are on the WhatsApp page (page key whatsapp_numbers).

Parameters

  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • numbers array of object required max items 20
    • id string required — The WhatsApp number id.
    • number string required — The phone number as shown (or the display name).
    • display_name string | null required — The display name Meta verified.
    • status string required — connected, restricted, needs_reconnect or disconnected.
    • quality string | null required — Meta's quality rating: green, yellow or red.
    • messaging_limit string | null required — Meta's messaging limit tier.
    • name_status string | null required — The display-name review status.
    • connection_expires_at string | null required — When the connection expires (null = it does not).
    • payment_method_needed boolean required — Meta asks for a payment method in WhatsApp Manager.
    • ai_replies boolean required — The AI answers this number.
    • reply_mode string required — auto = the AI sends its replies, approve = a person approves each one. One of: auto, approve.

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/whatsapp/numbers" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/numbers", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/whatsapp/numbers",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "numbers": [
        {
            "id": "<id>",
            "number": "number",
            "display_name": "display_name",
            "status": "status",
            "quality": "quality",
            "messaging_limit": "messaging_limit",
            "name_status": "name_status",
            "connection_expires_at": "2026-12-05T09:00:00Z",
            "payment_method_needed": false,
            "ai_replies": false,
            "reply_mode": "auto"
        }
    ]
}

Change WhatsApp number settings

PATCH /whatsapp/numbers/{number}

  • Operation whatsapp_number_settings_update
  • Scope settings.write
  • Lowest role admin
  • Changes data

Change the AI settings of one WhatsApp number: reply mode, persona, instructions for the AI, hand-over words (comma separated), welcome message, away message, the replies to STOP / START, and business hours. Send only the fields to change; the rest keeps its value. The texts are what the WhatsApp AI says to your customers. Owner or admin only. Runs at once.

Parameters

  • number path string required — The WhatsApp number id (uuid, from whatsapp_numbers_list). max length 64
  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • mode string — auto = the AI sends its replies, approve = a person approves each reply. One of: auto, approve.
  • persona string max length 500
  • instructions string max length 4000
  • handover_keywords string max length 500
  • welcome_message string max length 1000
  • away_message string max length 1000
  • optout_reply string max length 500
  • optin_reply string max length 500
  • hours object
    • enabled boolean required — Business hours on (outside them the away message is sent).
    • timezone string — e.g. Europe/Amsterdam. max length 64
    • days object — Per weekday (sun … sat) up to 3 ranges ["09:00", "17:30"]; an empty list = closed.
      • sun array of array of string max items 3
      • mon array of array of string max items 3
      • tue array of array of string max items 3
      • wed array of array of string max items 3
      • thu array of array of string max items 3
      • fri array of array of string max items 3
      • sat array of array of string max items 3
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X PATCH "https://iqcore.ai/api/public/v1/whatsapp/numbers/<number>" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/numbers/<number>", {
  method: "PATCH",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({}),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.patch(
    "https://iqcore.ai/api/public/v1/whatsapp/numbers/<number>",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={},
)
print(res.status_code, res.json())
json
{
    "message": "message"
}

Switch the WhatsApp AI

POST /whatsapp/numbers/{number}/ai

  • Operation whatsapp_number_ai_set
  • Scope settings.write
  • Lowest role admin
  • Changes data

Switch the AI replies of one WhatsApp number on or off (on: true / false). Owner or admin only. Switching on needs a connected number. Runs at once.

Parameters

  • number path string required — The WhatsApp number id (uuid, from whatsapp_numbers_list). max length 64
  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • on boolean required — true = the AI answers this number, false = it does not.
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • ai_on boolean required — The AI answers this number now.
  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/whatsapp/numbers/<number>/ai" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "on": false
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/numbers/<number>/ai", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "on": false
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/whatsapp/numbers/<number>/ai",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "on": False
    },
)
print(res.status_code, res.json())
json
{
    "ai_on": false,
    "message": "message"
}

Save a quick reply

POST /whatsapp/quick-replies

  • Operation whatsapp_quick_reply_save
  • Scope settings.write
  • Lowest role admin
  • Changes data

Save a quick reply for the Inbox: a short shortcut (letters, digits, - and _; typed as /shortcut) and its text. An existing shortcut gets the new text. Saving sends nothing. Runs at once.

Parameters

  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • shortcut string required min length 1 · max length 33
  • body string required min length 1 · max length 1024
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • shortcut string required — The saved shortcut, with its slash (e.g. /hours).
  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/whatsapp/quick-replies" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "shortcut": "shortcut",
    "body": "body"
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/quick-replies", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "shortcut": "shortcut",
      "body": "body"
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/whatsapp/quick-replies",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "shortcut": "shortcut",
        "body": "body"
    },
)
print(res.status_code, res.json())
json
{
    "shortcut": "shortcut",
    "message": "message"
}

WhatsApp templates

GET /whatsapp/templates

The account's WhatsApp message templates (at most 30): name, language, category, status (approved, pending, rejected, paused, disabled …), quality and Meta's reason for a rejection. Filter problem = rejected, paused or disabled.

Parameters

  • status query string — Only these templates (default all). One of: all, approved, pending, problem.
  • organization_id query string — The organization to act in. Required when the key works in several organizations.

Response 200

  • templates array of object required max items 30
    • name string required
    • language string required — e.g. en_US.
    • category string — marketing, utility or authentication.
    • status string — approved, pending, rejected, paused, disabled …
    • quality string
    • rejected_reason string — Meta's reason for a rejection (Meta's text). max length 160

Errors: 400 401 403 404 422 429 500 — codes

Example

curl
curl "https://iqcore.ai/api/public/v1/whatsapp/templates" \
  -H "Authorization: Bearer $IQCORE_KEY"
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/templates", {
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}` },
});
console.log(res.status, await res.json());
Python
import os
import requests

res = requests.get(
    "https://iqcore.ai/api/public/v1/whatsapp/templates",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}"},
)
print(res.status_code, res.json())
json
{
    "templates": [
        {
            "name": "Summer sale",
            "language": "language",
            "category": "category",
            "status": "status",
            "quality": "quality",
            "rejected_reason": "rejected_reason"
        }
    ]
}

Refresh WhatsApp templates

POST /whatsapp/templates/sync

  • Operation whatsapp_templates_sync
  • Scope settings.write
  • Lowest role admin
  • Changes data

Read the message templates of one WhatsApp number from Meta again (new ones, status changes such as approved or rejected, removed ones). Submits and sends nothing.

Parameters

  • Idempotency-Key header string — Your own id for this request (1–100 of A–Z a–z 0–9 . _ : -). The same key and request within 24 hours returns the first answer (Idempotent-Replayed: true) instead of acting twice; the same key with another request is refused (422 idempotency_key_reused); while the first one runs, 409 request_in_progress. Refusals before any effect are not stored.

Request body application/json

  • number string required — The WhatsApp number id (uuid, from whatsapp_numbers_list). max length 64
  • organization_id string — An organization id (uuid) of this key.

Response 200

  • added integer required — Templates new in the list. min 0
  • updated integer required — Templates whose status or content changed. min 0
  • removed integer required — Templates Meta no longer lists. min 0
  • message string required — A short sentence for a person.

Errors: 400 401 403 404 409 422 429 500 — codes

Example

curl
curl -X POST "https://iqcore.ai/api/public/v1/whatsapp/templates/sync" \
  -H "Authorization: Bearer $IQCORE_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "number"
}'
JavaScript
const res = await fetch("https://iqcore.ai/api/public/v1/whatsapp/templates/sync", {
  method: "POST",
  headers: { Authorization: `Bearer ${process.env.IQCORE_KEY}`, "Idempotency-Key": crypto.randomUUID(), "Content-Type": "application/json" },
  body: JSON.stringify({
      "number": "number"
  }),
});
console.log(res.status, await res.json());
Python
import os, uuid
import requests

res = requests.post(
    "https://iqcore.ai/api/public/v1/whatsapp/templates/sync",
    headers={"Authorization": f"Bearer {os.environ['IQCORE_KEY']}", "Idempotency-Key": str(uuid.uuid4())},
    json={
        "number": "number"
    },
)
print(res.status_code, res.json())
json
{
    "added": 1,
    "updated": 1,
    "removed": 1,
    "message": "message"
}