{
  "info": {
    "name": "Mursilat Public API",
    "description": "x-api-key endpoints of the Mursilat public API. Set baseUrl and apiKey in the collection variables.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://mursilat.com"
    },
    {
      "key": "apiKey",
      "value": "wa_live_xxxxxxxxxxxxxxxx"
    }
  ],
  "item": [
    {
      "name": "Send text (with link preview)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"to\": \"201001234567\",\n  \"type\": \"text\",\n  \"text\": \"طلبك اتشحن 🚚 *شكرًا*\\nتتبع: https://example.com/t/1042\",\n  \"reference\": \"order-1042\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "One endpoint for every type a linked number can send: text, image, video (GIF / round video note), audio, voice note, document, sticker, location, contact cards, poll, event (experimental), reply buttons, list, link button. JSON, or multipart/form-data with a `file` for media types. Types that a linked device cannot send (live location, payments, catalog/orders, status, calls, templates) return 400 MESSAGE_TYPE_NOT_SUPPORTED with the reason."
      }
    },
    {
      "name": "Send image by URL",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"to\": \"201001234567\",\n  \"type\": \"image\",\n  \"media\": {\n    \"url\": \"https://example.com/catalog.jpg\"\n  },\n  \"caption\": \"الكتالوج الجديد\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "One endpoint for every type a linked number can send: text, image, video (GIF / round video note), audio, voice note, document, sticker, location, contact cards, poll, event (experimental), reply buttons, list, link button. JSON, or multipart/form-data with a `file` for media types. Types that a linked device cannot send (live location, payments, catalog/orders, status, calls, templates) return 400 MESSAGE_TYPE_NOT_SUPPORTED with the reason."
      }
    },
    {
      "name": "Send poll (votes → poll.vote webhook)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"to\": \"201001234567\",\n  \"type\": \"poll\",\n  \"name\": \"أنسب يوم للتوصيل؟\",\n  \"options\": [\n    \"الأحد\",\n    \"الاثنين\",\n    \"الثلاثاء\"\n  ],\n  \"selectableCount\": 1,\n  \"reference\": \"survey-7\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "One endpoint for every type a linked number can send: text, image, video (GIF / round video note), audio, voice note, document, sticker, location, contact cards, poll, event (experimental), reply buttons, list, link button. JSON, or multipart/form-data with a `file` for media types. Types that a linked device cannot send (live location, payments, catalog/orders, status, calls, templates) return 400 MESSAGE_TYPE_NOT_SUPPORTED with the reason."
      }
    },
    {
      "name": "Send reply buttons (numbered fallback)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"to\": \"201001234567\",\n  \"type\": \"buttons\",\n  \"body\": {\n    \"text\": \"هل تؤكد طلبك؟\"\n  },\n  \"footer\": {\n    \"text\": \"متجر النور\"\n  },\n  \"buttons\": [\n    {\n      \"id\": \"confirm\",\n      \"title\": \"تأكيد\"\n    },\n    {\n      \"id\": \"cancel_order\",\n      \"title\": \"إلغاء الطلب\"\n    }\n  ],\n  \"fallback\": \"numbered\",\n  \"reference\": \"order-1042\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "One endpoint for every type a linked number can send: text, image, video (GIF / round video note), audio, voice note, document, sticker, location, contact cards, poll, event (experimental), reply buttons, list, link button. JSON, or multipart/form-data with a `file` for media types. Types that a linked device cannot send (live location, payments, catalog/orders, status, calls, templates) return 400 MESSAGE_TYPE_NOT_SUPPORTED with the reason."
      }
    },
    {
      "name": "Send location pin",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"to\": \"201001234567\",\n  \"type\": \"location\",\n  \"latitude\": 30.0444,\n  \"longitude\": 31.2357,\n  \"name\": \"فرع وسط البلد\",\n  \"address\": \"12 شارع طلعت حرب، القاهرة\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "One endpoint for every type a linked number can send: text, image, video (GIF / round video note), audio, voice note, document, sticker, location, contact cards, poll, event (experimental), reply buttons, list, link button. JSON, or multipart/form-data with a `file` for media types. Types that a linked device cannot send (live location, payments, catalog/orders, status, calls, templates) return 400 MESSAGE_TYPE_NOT_SUPPORTED with the reason."
      }
    },
    {
      "name": "Send a document (multipart file)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages"
          ]
        },
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "to",
              "type": "text",
              "value": "201001234567"
            },
            {
              "key": "type",
              "type": "text",
              "value": "document"
            },
            {
              "key": "caption",
              "type": "text",
              "value": "فاتورتك"
            },
            {
              "key": "file",
              "type": "file",
              "src": []
            }
          ]
        },
        "description": "One endpoint for every type a linked number can send: text, image, video (GIF / round video note), audio, voice note, document, sticker, location, contact cards, poll, event (experimental), reply buttons, list, link button. JSON, or multipart/form-data with a `file` for media types. Types that a linked device cannot send (live location, payments, catalog/orders, status, calls, templates) return 400 MESSAGE_TYPE_NOT_SUPPORTED with the reason."
      }
    },
    {
      "name": "Upload media for a later send",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/media/upload",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "media",
            "upload"
          ]
        },
        "body": {
          "mode": "formdata",
          "formdata": [
            {
              "key": "file",
              "type": "file",
              "src": []
            }
          ]
        },
        "description": "Stores a file privately for 24 hours and returns a `mediaId` to use as `media: { \"id\": … }` in POST /whatsapp/public/messages (scope `media`). Idempotency-Key is optional here."
      }
    },
    {
      "name": "React to a message (emoji, \"\" removes)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages/:messageId/react",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages",
            ":messageId",
            "react"
          ],
          "variable": [
            {
              "key": "messageId",
              "value": "3EB0A1B2C3D4E5F60718"
            }
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"emoji\": \"👍\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": ""
      }
    },
    {
      "name": "Edit a sent text message (within 15 minutes)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages/:messageId/edit",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages",
            ":messageId",
            "edit"
          ],
          "variable": [
            {
              "key": "messageId",
              "value": "3EB0A1B2C3D4E5F60718"
            }
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"text\": \"الموعد اتغير لـ 5 مساءً\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": ""
      }
    },
    {
      "name": "Delete a message (for everyone ≤48 h, or for me)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/messages/:messageId/delete",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "messages",
            ":messageId",
            "delete"
          ],
          "variable": [
            {
              "key": "messageId",
              "value": "3EB0A1B2C3D4E5F60718"
            }
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"forEveryone\": true\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": ""
      }
    },
    {
      "name": "Interaction status and answer",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/interactions/:interactionId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "interactions",
            ":interactionId"
          ],
          "variable": [
            {
              "key": "interactionId",
              "value": ""
            }
          ]
        },
        "description": "Poll alternative to the interactive.reply webhook."
      }
    },
    {
      "name": "Download inbound media",
      "request": {
        "method": "GET",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/media/:mediaId",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "media",
            ":mediaId"
          ],
          "variable": [
            {
              "key": "mediaId",
              "value": ""
            }
          ]
        },
        "description": "Use the signed `media.url` from a webhook (valid 24 hours) as is, or call with the media id and your x-api-key (scope `media`)."
      }
    },
    {
      "name": "Send a text message (legacy)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/message/send",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "message",
            "send"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"phoneNumber\": \"201001234567\",\n  \"content\": \"طلبك اتشحن 🚚\",\n  \"reference\": \"order-1042-shipped\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Legacy — still supported, unchanged. New integrations: POST /whatsapp/public/messages. Sends a text message using the session linked to x-api-key. Message usage is deducted from the session package quota (or allowed for unlimited packages)."
      }
    },
    {
      "name": "Send media (image, video, document, audio) (legacy)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/media/send",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "media",
            "send"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"phoneNumber\": \"201001234567\",\n  \"mediaType\": \"image\",\n  \"mediaUrl\": \"https://example.com/invoice.jpg\",\n  \"caption\": \"فاتورتك\",\n  \"reference\": \"invoice-77\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Legacy — still supported, unchanged. New integrations: POST /whatsapp/public/messages. Sends media using the session linked to x-api-key. Supports multipart file upload or mediaUrl."
      }
    },
    {
      "name": "Send an interactive message (buttons, list or link button) (legacy)",
      "request": {
        "method": "POST",
        "header": [
          {
            "key": "x-api-key",
            "value": "{{apiKey}}"
          },
          {
            "key": "Idempotency-Key",
            "value": "{{$guid}}"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/whatsapp/public/interactive/send",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "whatsapp",
            "public",
            "interactive",
            "send"
          ]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"to\": \"201001234567\",\n  \"type\": \"buttons\",\n  \"header\": {\n    \"text\": \"طلبك #1042\"\n  },\n  \"body\": {\n    \"text\": \"هل تؤكد طلبك؟\"\n  },\n  \"footer\": {\n    \"text\": \"متجر النور\"\n  },\n  \"buttons\": [\n    {\n      \"id\": \"confirm\",\n      \"title\": \"تأكيد\"\n    },\n    {\n      \"id\": \"cancel_order\",\n      \"title\": \"إلغاء الطلب\"\n    }\n  ],\n  \"reference\": \"order-1042\"\n}",
          "options": {
            "raw": {
              "language": "json"
            }
          }
        },
        "description": "Legacy — still supported, unchanged. New integrations: POST /whatsapp/public/messages. Linked-device numbers: buttons may show as plain text on some phones. With `fallback: \"numbered\"` (default) the options are also listed as numbered text, so the customer can always answer by tapping, typing the number or the title. Replies arrive as `interactive.reply` webhooks."
      }
    }
  ]
}
