{
    "info": {
        "name": "Watily API",
        "_postman_id": "watily-api-v1",
        "description": "Public REST API for Watily — contacts, segments, campaigns, messages, media, templates, loyalty,\nconversations, instances, analytics and webhooks. Built for ERP / POS systems and merchant developers.\n\nواجهة واتيلي البرمجية العامة لجهات ERP/POS ومطوّري التجار: جهات الاتصال، الشرائح، الحملات، الرسائل،\nالوسائط، القوالب، الولاء، المحادثات، الأرقام، التحليلات والويبهوكات.\n\n## Base URL\n\nAll paths in this document are relative to `https://site.watily.com/api/v1`\n(for example `GET https://site.watily.com/api/v1/contacts`). The API is versioned in the URL;\nbreaking changes ship under a new prefix, additive changes (new fields, new endpoints, new webhook\nfields) can appear in `v1` at any time — ignore unknown fields.\n\n(`multipart/form-data` only for `POST /media`). Responses are always JSON.\n\n## Authentication\n\nCreate a key in the dashboard under **WhatsApp → Integrations → API keys**. The key is shown once.\n\n* Format: `wtly_live_<40 random characters>`. The dashboard only keeps the first 12 characters\n  (`key_prefix`) for identification — a lost key cannot be recovered, create a new one.\n* Send it as `Authorization: Bearer <key>` **or** `X-Api-Key: <key>`. If both headers are present,\n  the Bearer token wins (an invalid Bearer token is not rescued by a valid `X-Api-Key`).\n* Each key carries an explicit list of **scopes** (see the table below). Pick only what you need.\n  Keys created before scopes existed carry no scope list and are treated as full access — rotate them.\n* A key belongs to one company and, when created in the dashboard, is **bound to one store**\n  (the store picked at creation, otherwise the company's primary active store). Contacts, segments,\n  campaigns, webhooks, loyalty and conversations are filtered to that store.\n  `X-Store-Id: <store id>` may only repeat the key's own store: any other store answers\n  `403 store_forbidden`; a value that is not a positive integer answers `422 invalid_store_id`.\n  Only legacy company-wide keys (no bound store) can choose a store per request with this header.\n* A company can hold at most 10 active keys. Revoked keys answer `401 invalid_api_key` immediately.\n\n| Status | `code` | Meaning |\n|---|---|---|\n| 401 | `invalid_api_key` | Missing, malformed or revoked key |\n| 403 | `insufficient_scope` | The key lacks the scope listed for the endpoint |\n| 403 | `store_forbidden` | `X-Store-Id` names a store this key cannot use |\n| 403 | `module_not_in_plan` | The company's plan does not include the module (for example loyalty) |\n| 403 | `subscription_expired` / `quota_exceeded` | Sending is blocked by an expired plan or the monthly message quota |\n\n## Scopes\n\n| Scope | Grants |\n|---|---|\n| `contacts:read` | `GET /contacts`, `GET /contacts/{phone}`, `GET /contacts/{phone}/exists`, `GET /segments` |\n| `contacts:write` | `POST /contacts`, `PATCH /contacts/{phone}`, `POST /contacts/import`, `POST /contacts/{phone}/unsubscribe`, `POST /contacts/{phone}/resubscribe`, `POST /segments` |\n| `campaigns:read` | `GET /campaigns/{campaign}` |\n| `campaigns:write` | `POST /campaigns`, `POST /campaigns/{campaign}/start`, `/pause`, `/resume` |\n| `messages:send` | `POST /messages`, `POST /media`, `GET /templates` |\n| `loyalty:read` | every `GET /loyalty/...` endpoint |\n| `loyalty:write` | enroll, stamps, points and their reversals (`POST /loyalty/...` except notifications) |\n| `loyalty:notify` | `POST /loyalty/notifications` (reaches the customer's lock screen — separate trust level) |\n| `conversations:read` | `GET /instances`, `GET /analytics/summary`, `GET /conversations`, `GET /conversations/{id}`, `GET /conversations/{id}/messages` |\n| `conversations:write` | `POST /conversations/{id}/assign`, `/archive`, `/unarchive`, `/tags`, `/read` |\n| `webhooks:manage` | `GET/POST /webhooks`, `PATCH/DELETE /webhooks/{id}`, `POST /webhooks/{id}/test` |\n\nEvery operation below starts its description with its scope and rate-limit bucket.\n\n## Rate limits\n\nLimits are counted **per API key** in two independent one-minute buckets:\n\n* **read bucket** — 120 requests/min, shared by every `GET` endpoint of the key;\n* **write bucket** — 60 requests/min, shared by every `POST`/`PATCH`/`DELETE` endpoint of the key.\n\nA company's plan can raise or lower both numbers (the effective values apply to all of the company's keys).\nRequests rejected with 401/403 are not counted. When a bucket is exhausted the API answers\n`429` with the body `{\"ok\": false, \"status\": \"error\", \"code\": \"rate_limited\", \"message\": \"...\"}` and the headers\n`Retry-After` (seconds until you may retry), `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (Unix timestamp)\n(the two limit headers are also present on successful responses). Back off for `Retry-After` seconds.\n`POST /messages` can additionally answer `429 governor_blocked` when the line's burst / daily sending ceiling is reached\n— that one is about the WhatsApp line, not your key, and is retried later, not immediately.\n\n## Response envelope and errors\n\nSuccess bodies are JSON envelopes. Newer endpoints return\n`{\"ok\": true, \"status\": \"success\", \"data\": { ... }}`; some older endpoints omit `ok`\n(`{\"status\": \"success\", \"data\": ... }`). Always branch on the HTTP status code and read `data`.\nThe exact shape of every endpoint is in its `200`/`201` example.\n\nErrors come in three shapes (all `application/json`, even when `Accept` is missing):\n\n1. **Business error** — `{\"ok\": false, \"status\": \"error\", \"code\": \"<machine_code>\", \"message\": \"<human text>\"}`\n   (extra keys such as `reason` / `action` are possible). Switch on `code`, never on `message`.\n   Used for 401, 403, 404 `*_not_found`, 409, 429 `rate_limited`, 402, 503 and endpoint-specific 422 codes.\n2. **Validation error (422)** — Laravel shape `{\"message\": \"...\", \"errors\": {\"field\": [\"...\", ...]}}`.\n   There is no `code`. Dotted keys address array items (`contacts.2.phone`).\n3. **Framework error** — `{\"message\": \"...\"}` for an unknown route (404), a wrong HTTP method (405) and server errors (500).\n\nIdempotency: `POST /messages` and `POST /campaigns` accept an `Idempotency-Key` header (max 80 characters, scoped\nto the API key). Resend the same key after a timeout: a stored successful response is replayed with the header\n`Idempotency-Replayed: true`. Loyalty endpoints take an `idempotency_key` in the body instead.\n\n## Pagination\n\nList endpoints accept `page` (starts at 1) and `per_page` (1–100, default 25) and return\n`meta: {\"current_page\", \"per_page\", \"total\", \"last_page\"}` next to the items.\n`GET /contacts` returns `{\"status\": \"success\", \"data\": [...], \"meta\": {...}}`; most other lists return\n`{\"ok\": true, \"status\": \"success\", \"data\": {\"<collection>\": [...], \"meta\": {...}}}`. Keep requesting pages until\n`current_page >= last_page`.\n\n## Phone numbers\n\nSend phones in any common form — `0551234567`, `551234567`, `+966551234567`, `00966551234567`, Arabic-Indic digits.\nThe server normalizes to digits with the country code and no `+` (`966551234567`); a number that already starts with\na known international prefix keeps it, otherwise the Saudi code `966` is assumed. Responses always return the\nnormalized form. Contact endpoints reject numbers with fewer than 9 digits (`invalid_phone`); `POST /messages`\nrequires the normalized number to be 10–15 digits. Path parameters named `{phone}` accept any of the forms above.\n\n## Webhooks\n\nRegister an HTTPS endpoint with `POST /webhooks` and Watily pushes events to it. The delivery contract:\n\n* `POST` with a JSON body `{\"event\": \"...\", \"timestamp\": \"...\", \"company_id\": 123, \"data\": { ... }}`.\n  `timestamp` is ISO-8601 in Riyadh time with an explicit offset (for example `2026-08-14T10:00:00+03:00`).\n* Headers: `Content-Type: application/json`, `User-Agent: Watily-Webhooks/1.0 (+https://watily.com)`,\n  `X-Watily-Event` (the event name), `X-Watily-Delivery` (delivery id — **stable across retries, use it to\n  deduplicate**), `X-Watily-Signature`.\n* There is **no** `Authorization` header: authenticity is proven only by the signature.\n* **Verify the signature**: `X-Watily-Signature: sha256=<hex>` where `<hex>` is `HMAC-SHA256` over the **exact raw\n  request bytes** (before JSON parsing) with the **entire secret string as key, including the `whsec_` prefix**.\n  Compare in constant time, and compare lengths first (Node's `timingSafeEqual` throws on unequal lengths).\n  Reject and return 401 if the header is missing or wrong. The secret is returned once, as `data.secret` of the\n  `POST /webhooks` response, and never again (not in `GET` or `PATCH`); to rotate it delete the endpoint and create a new one.\n* **Success** is any `2xx` response within **10 seconds** (5 seconds to connect). Redirects are **not** followed\n  (a `3xx` counts as a failure). Any other result is retried: up to **4 attempts in total** — at +30 seconds,\n  +5 minutes and +30 minutes after the previous attempt — then the delivery is marked failed.\n* Delivery is **at-least-once** and **not ordered**: deduplicate on `X-Watily-Delivery` and use the payload\n  state (for example `message.status` rank) rather than arrival order. Respond fast and process asynchronously.\n* Only `https://` URLs resolving to public addresses are accepted (no localhost, private or reserved ranges;\n  re-checked on every delivery, so a later DNS change to a private address makes the delivery fail).\n* A company can register at most **5** endpoints (disabled ones count). `events` omitted or empty = all events.\n* An endpoint created with a store-bound key receives events for that store and company-wide events without a store.\n  API message receipts with a store context go only to that store's endpoints and company-wide endpoints;\n  receipts without a store and company-wide instance events go to all enabled endpoints of the company.\n* `POST /webhooks/{id}/test` queues a synthetic `message.incoming` event with `data.test = true`.\n\n```php\n<?php\n$raw = file_get_contents('php://input');\n$expected = 'sha256=' . hash_hmac('sha256', $raw, $webhookSecret); // $webhookSecret = \"whsec_...\" (whole string)\n$received = $_SERVER['HTTP_X_WATILY_SIGNATURE'] ?? '';\nif (! hash_equals($expected, $received)) { // hash_equals is length-safe\n    http_response_code(401);\n    exit('Invalid signature');\n}\n// dedupe on $_SERVER['HTTP_X_WATILY_DELIVERY'], then process\n```\n\n```js\nconst crypto = require('crypto');\n\n// Use a raw-body parser (e.g. express.raw({ type: 'application/json' })) — not the parsed JSON.\nfunction verifySignature(rawBody, signatureHeader, secret) {\n  const expected = Buffer.from(\n    'sha256=' + crypto.createHmac('sha256', secret).update(rawBody).digest('hex')\n  );\n  const received = Buffer.from(String(signatureHeader || ''));\n  return received.length === expected.length && crypto.timingSafeEqual(received, expected);\n}\n```\n\n## Customer-visible side effects\n\nSome write endpoints message real customers. First stamp, or enrolling with a `program_id`, sends the\n`loyalty_card_issued` WhatsApp template once per new card; `send_welcome` (default `false`) sends\n`loyalty_new_customer` only to newly created members on points stores; wallet passes (Apple / Google) are pushed on\nevery stamp or points change; `POST /messages`, `POST /campaigns/{campaign}/start` and `POST /loyalty/notifications`\nsend immediately. Use test numbers while integrating.\n",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
    },
    "variable": [
        {
            "key": "base_url",
            "value": "https://site.watily.com/api/v1",
            "type": "string"
        },
        {
            "key": "api_key",
            "value": "",
            "type": "string"
        }
    ],
    "auth": {
        "type": "apikey",
        "apikey": [
            {
                "key": "key",
                "value": "Authorization",
                "type": "string"
            },
            {
                "key": "value",
                "value": "Bearer {{api_key}}",
                "type": "string"
            },
            {
                "key": "in",
                "value": "header",
                "type": "string"
            }
        ]
    },
    "item": [
        {
            "name": "Contacts",
            "description": "Create, look up and manage a company's WhatsApp contacts (leads).",
            "item": [
                {
                    "name": "List contacts",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "1",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "25",
                                    "disabled": true
                                },
                                {
                                    "key": "q",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "tag",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "lead_status",
                                    "value": "",
                                    "disabled": true
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Create a contact",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"0551234567\",\n    \"name\": \"Ahmed\",\n    \"email\": \"ahmed@example.com\",\n    \"tags\": [\n        \"vip\"\n    ],\n    \"custom_fields\": {\n        \"city\": \"Riyadh\"\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Bulk import contacts (up to 500 per call)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts/import",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts",
                                "import"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"update_existing\": false,\n    \"contacts\": [\n        {\n            \"phone\": \"0551234567\",\n            \"name\": \"Ahmed\",\n            \"tags\": [\n                \"vip\"\n            ]\n        },\n        {\n            \"phone\": \"12\",\n            \"name\": \"Bad\"\n        }\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Get a contact by phone",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts/{phone}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts",
                                ":phone"
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Update a contact",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts/{phone}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts",
                                ":phone"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"email\": \"new@example.com\",\n    \"tags\": [\n        \"vip\",\n        \"gold\"\n    ],\n    \"custom_fields\": {\n        \"city\": \"Jeddah\",\n        \"old_key\": null\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Check if a phone number has WhatsApp (QR lines only)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts/{phone}/exists",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts",
                                ":phone",
                                "exists"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "0551234567"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Unsubscribe a contact from marketing messages",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts/{phone}/unsubscribe",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts",
                                ":phone",
                                "unsubscribe"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "0551234567"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Resubscribe a contact",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/contacts/{phone}/resubscribe",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "contacts",
                                ":phone",
                                "resubscribe"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "0551234567"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Segments",
            "description": "Named, reusable audience filters for campaigns.",
            "item": [
                {
                    "name": "List saved segments",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/segments",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "segments"
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Create a segment",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/segments",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "segments"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"VIP Riyadh\",\n    \"filters\": {\n        \"tags\": [\n            \"vip\"\n        ],\n        \"lead_status\": [\n            \"New\"\n        ],\n        \"custom_fields\": {\n            \"city\": \"Riyadh\"\n        }\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Campaigns",
            "description": "Bulk WhatsApp broadcast campaigns.",
            "item": [
                {
                    "name": "Create a campaign (draft)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/campaigns",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "campaigns"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"name\": \"Ramadan offer\",\n    \"message\": \"Special offer for you!\",\n    \"audience\": {\n        \"phones\": [\n            \"966500000000\",\n            \"0501234567\"\n        ]\n    }\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Get a campaign",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/campaigns/{campaign}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "campaigns",
                                ":campaign"
                            ],
                            "variable": [
                                {
                                    "key": "campaign",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Start a campaign (sends immediately)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/campaigns/{campaign}/start",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "campaigns",
                                ":campaign",
                                "start"
                            ],
                            "variable": [
                                {
                                    "key": "campaign",
                                    "value": "1"
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"refresh_audience\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Pause a running campaign",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/campaigns/{campaign}/pause",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "campaigns",
                                ":campaign",
                                "pause"
                            ],
                            "variable": [
                                {
                                    "key": "campaign",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Resume a paused campaign",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/campaigns/{campaign}/resume",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "campaigns",
                                ":campaign",
                                "resume"
                            ],
                            "variable": [
                                {
                                    "key": "campaign",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Removed — Automation Journeys was replaced by Growth Engine",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/journeys/{key}/enroll",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "journeys",
                                ":key",
                                "enroll"
                            ],
                            "variable": [
                                {
                                    "key": "key",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Messages",
            "description": "Send a single WhatsApp message.",
            "item": [
                {
                    "name": "Send a WhatsApp message",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Idempotency-Key",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/messages",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "messages"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"to\": \"966501234567\",\n    \"type\": \"text\",\n    \"message\": \"Hello from the API\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Media",
            "description": "Upload a file to reference by `media_id` when sending a message.",
            "item": [
                {
                    "name": "Upload media for use in a later message",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/media",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "media"
                            ]
                        },
                        "body": {
                            "mode": "formdata",
                            "formdata": [
                                {
                                    "key": "file",
                                    "type": "file",
                                    "src": []
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Templates",
            "description": "List the company's approved WhatsApp message templates.",
            "item": [
                {
                    "name": "List approved WhatsApp templates",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/templates",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "templates"
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Loyalty",
            "description": "Points and stamp-card loyalty programs (POS/ERP integration).",
            "item": [
                {
                    "name": "List active loyalty programs for the store",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/programs",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "programs"
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Get a loyalty member by phone",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/members/{phone}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "members",
                                ":phone"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "966500000000"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Get the Apple/Google Wallet card links for a member",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/members/{phone}/wallet-card",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "members",
                                ":phone",
                                "wallet-card"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "966500000000"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "List a member's points ledger",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/members/{phone}/transactions",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "members",
                                ":phone",
                                "transactions"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "1",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "25",
                                    "disabled": true
                                }
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "966500000000"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Cheap POS balance check",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/members/{phone}/points",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "members",
                                ":phone",
                                "points"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "966500000000"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Award points to an existing member (idempotent, does not auto-enroll)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/members/{phone}/points",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "members",
                                ":phone",
                                "points"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "966500000000"
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"amount\": 150.5,\n    \"idempotency_key\": \"order-1001\",\n    \"reason\": \"POS order #1001\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Add a stamp to a member's card (legacy two-call flow)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/members/{phone}/stamps",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "members",
                                ":phone",
                                "stamps"
                            ],
                            "variable": [
                                {
                                    "key": "phone",
                                    "value": "966500000000"
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"program_id\": 12,\n    \"idempotency_key\": \"visit-2001\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Enroll a loyalty member",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/members",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "members"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"966500000000\",\n    \"name\": \"Sara\",\n    \"program_id\": 12,\n    \"send_welcome\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "One-call POS/ERP flow - enroll + issue card + stamp (idempotent)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/stamps",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "stamps"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"966500000000\",\n    \"idempotency_key\": \"visit-2001\",\n    \"program_id\": 12,\n    \"customer_name\": \"Sara\",\n    \"auto_enroll\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Reverse a stamp recorded through POST /loyalty/stamps",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/stamps/reverse",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "stamps",
                                "reverse"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"idempotency_key\": \"visit-2001\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "One-call POS/ERP flow - enroll + award points (idempotent)",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/points",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "points"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"phone\": \"966500000000\",\n    \"amount\": 150.5,\n    \"idempotency_key\": \"order-1001\",\n    \"customer_name\": \"Sara\",\n    \"auto_enroll\": true,\n    \"send_welcome\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Reverse a points award by idempotency_key",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/points/reverse",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "points",
                                "reverse"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"idempotency_key\": \"order-1001\"\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Delivery history for wallet-push broadcasts sent from this store",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/notifications",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "notifications"
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Push a wallet lock-screen notification to loyalty members",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/notifications",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "notifications"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"message_ar\": \"عرض خاص لأعضاء الولاء هذا الأسبوع\",\n    \"message_en\": \"Special offer for loyalty members this week\",\n    \"idempotency_key\": \"promo-2026-11-01\",\n    \"audience\": \"cards\",\n    \"phones\": [\n        \"966500000000\"\n    ],\n    \"dry_run\": true\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Look up a member by their printed/scanned card number",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/loyalty/cards/{cardNumber}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "loyalty",
                                "cards",
                                ":cardNumber"
                            ],
                            "variable": [
                                {
                                    "key": "cardNumber",
                                    "value": "LC-AB12-CD34"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Conversations",
            "description": "Inbox conversations — read, assign, tag, archive.",
            "item": [
                {
                    "name": "List inbox conversations",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations"
                            ],
                            "query": [
                                {
                                    "key": "page",
                                    "value": "1",
                                    "disabled": true
                                },
                                {
                                    "key": "per_page",
                                    "value": "25",
                                    "disabled": true
                                },
                                {
                                    "key": "status",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "assigned_to",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "search",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "updated_since",
                                    "value": "",
                                    "disabled": true
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Get a conversation",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations/{id}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations",
                                ":id"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "List messages in a conversation",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations/{id}/messages",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations",
                                ":id",
                                "messages"
                            ],
                            "query": [
                                {
                                    "key": "limit",
                                    "value": "25",
                                    "disabled": true
                                },
                                {
                                    "key": "before_id",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "q",
                                    "value": "",
                                    "disabled": true
                                }
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Assign (or unassign) a conversation to a user",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations/{id}/assign",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations",
                                ":id",
                                "assign"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"user_id\": 7\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Archive a conversation",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations/{id}/archive",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations",
                                ":id",
                                "archive"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Unarchive a conversation",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations/{id}/unarchive",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations",
                                ":id",
                                "unarchive"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Replace a conversation's tags",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations/{id}/tags",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations",
                                ":id",
                                "tags"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"tags\": [\n        \"VIP\",\n        \"follow-up\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Mark a conversation as read",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/conversations/{id}/read",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "conversations",
                                ":id",
                                "read"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Instances",
            "description": "Connected WhatsApp lines (QR or official/Cloud API).",
            "item": [
                {
                    "name": "List WhatsApp lines",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/instances",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "instances"
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Analytics",
            "description": "Aggregate WhatsApp usage counters.",
            "item": [
                {
                    "name": "Aggregate WhatsApp usage counters for a date range (default last 30 days)",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/analytics/summary",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "analytics",
                                "summary"
                            ],
                            "query": [
                                {
                                    "key": "from",
                                    "value": "",
                                    "disabled": true
                                },
                                {
                                    "key": "to",
                                    "value": "",
                                    "disabled": true
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        },
        {
            "name": "Webhooks",
            "description": "Register endpoints to receive real-time event push notifications. See the \"Webhooks\" section of the introduction for the delivery contract and signature verification.",
            "item": [
                {
                    "name": "List webhook endpoints",
                    "request": {
                        "method": "GET",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks"
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Register a webhook endpoint",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks"
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"url\": \"https://example.com/hooks/watily\",\n    \"events\": [\n        \"message.incoming\",\n        \"campaign.completed\"\n    ]\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Update a webhook endpoint",
                    "request": {
                        "method": "PATCH",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            },
                            {
                                "key": "Content-Type",
                                "value": "application/json"
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/{id}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                ":id"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        },
                        "body": {
                            "mode": "raw",
                            "raw": "{\n    \"enabled\": false\n}",
                            "options": {
                                "raw": {
                                    "language": "json"
                                }
                            }
                        }
                    },
                    "response": []
                },
                {
                    "name": "Delete a webhook endpoint",
                    "request": {
                        "method": "DELETE",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/{id}",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                ":id"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                },
                {
                    "name": "Send a test delivery to a webhook endpoint",
                    "request": {
                        "method": "POST",
                        "header": [
                            {
                                "key": "Accept",
                                "value": "application/json"
                            },
                            {
                                "key": "X-Store-Id",
                                "value": "",
                                "disabled": true
                            }
                        ],
                        "url": {
                            "raw": "{{base_url}}/webhooks/{id}/test",
                            "host": [
                                "{{base_url}}"
                            ],
                            "path": [
                                "webhooks",
                                ":id",
                                "test"
                            ],
                            "variable": [
                                {
                                    "key": "id",
                                    "value": "1"
                                }
                            ]
                        }
                    },
                    "response": []
                }
            ]
        }
    ]
}
