{
  "info": {
    "_postman_id": "b20dfdb8-fb1a-a52a-b0df-3cf2d49d9717",
    "name": "ChatKomodo WhatsApp API",
    "description": "Every public endpoint of the ChatKomodo WhatsApp API, with example requests. Generated from the OpenAPI document; the latest version is always at https://chatkomodo.com/docs/chatkomodo.postman_collection.json.\n\nSet the collection variables before sending:\n- `apiKey`: your API key (dashboard → API keys). Keep it out of shared workspaces.\n- `deviceId`: the id of a connected device (`GET /v1/sessions`). A test device works too: no WhatsApp needed, see https://chatkomodo.com/docs/sandbox/.\n\nGuides: https://chatkomodo.com/docs/",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "auth": {
    "type": "bearer",
    "bearer": [
      {
        "key": "token",
        "value": "{{apiKey}}",
        "type": "string"
      }
    ]
  },
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://api.chatkomodo.com"
    },
    {
      "key": "apiKey",
      "value": ""
    },
    {
      "key": "deviceId",
      "value": "YOUR_DEVICE_ID"
    }
  ],
  "item": [
    {
      "name": "Messaging",
      "item": [
        {
          "name": "Devices",
          "description": "A device is one WhatsApp number linked to ChatKomodo (shown as a session in the API: its id is the `sessionId` in the paths). Create one, scan its QR code from WhatsApp → Linked devices (or use a pairing code), then send through it. `GET /v1/sessions` lists them with their status.",
          "item": [
            {
              "name": "List devices",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions"
                  ]
                },
                "description": "List all WhatsApp devices for the calling tenant.\n\nDocs: https://chatkomodo.com/docs/api/devices/#get-v1-sessions"
              }
            },
            {
              "name": "Create a device",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions"
                  ]
                },
                "description": "Create a new WhatsApp device (session). Poll `qr_polling_url` for the QR code and scan it from WhatsApp, or link with a pairing code (`POST /v1/sessions/{id}/pairing-code`). Limited by the plan's device quota.\n\nWith `{\"sandbox\": true}` it creates a **test device** instead: connected at once, no QR code, nothing ever reaches WhatsApp. Sends go through the normal pipeline (logs, webhooks, statuses move to `delivered` after about 1 s and `read` after about 3 s); numbers ending in `0000` always fail; customer messages are simulated with `POST /v1/sessions/{id}/sandbox/inbound`. One test device per business, outside the device quota, and its messages do not count toward the monthly quota.\n\nDocs: https://chatkomodo.com/docs/api/devices/#post-v1-sessions"
              }
            },
            {
              "name": "Simulate a customer message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"from\": \"+447700900123\",\n  \"text\": \"What time do you open on Saturday?\",\n  \"name\": \"Sam Carter\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/sandbox/inbound",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "sandbox",
                    "inbound"
                  ]
                },
                "description": "Test devices only: a message \"from\" a customer arrives on the test device and is handled like a real one. It is logged, fires the `message.received` webhook, appears in the inbox, and triggers welcome messages, auto-replies, chatbot flows and AI replies (whose answers go back through the test device). Nothing is sent over WhatsApp.\n\nDocs: https://chatkomodo.com/docs/api/devices/#post-v1-sessions-id-sandbox-inbound"
              }
            },
            {
              "name": "Get a device",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}"
                  ]
                },
                "description": "Get a single session by id.\n\nDocs: https://chatkomodo.com/docs/api/devices/#get-v1-sessions-id"
              }
            },
            {
              "name": "Delete a device",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}"
                  ]
                },
                "description": "Closes the live connection, deletes the stored WhatsApp credentials and removes the session together with its auto-reply rules, blast campaigns, blocklist entries and message history. The inbox and scheduled messages are left in place, and WhatsApp is not asked to unlink the device. This cannot be undone.\n\nDocs: https://chatkomodo.com/docs/api/devices/#delete-v1-sessions-id"
              }
            },
            {
              "name": "Get the current QR code",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/qr",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "qr"
                  ]
                },
                "description": "Returns the QR payload for linking the device: render the `qr` string with any QR library and scan it from WhatsApp (Linked devices). A code lasts about 60 seconds; `qr` is null while none is available, so keep polling until `status` is `qr_ready`. Answers 410 once the device is connected.\n\nDocs: https://chatkomodo.com/docs/api/devices/#get-v1-sessions-sessionid-qr"
              }
            },
            {
              "name": "Get the WhatsApp profile of a device",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/profile",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "profile"
                  ]
                },
                "description": "Returns the linked account: number, display name, picture, About text and, for Business accounts, the business profile and catalog. A connected device is queried live with a 10-second limit, and parts that do not answer in time come back null or empty (`syncing: true` marks a timed-out lookup). A device that is not connected returns the cached values with `connected: false`.\n\nDocs: https://chatkomodo.com/docs/api/devices/#get-v1-sessions-sessionid-profile"
              }
            },
            {
              "name": "Request a phone-number pairing code",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"phone_number\": \"+447700900123\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/pairing-code",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "pairing-code"
                  ]
                },
                "description": "Links the device with a code instead of a QR scan: enter the returned `code` on the phone (WhatsApp, Linked devices, Link with phone number). Needs a session that has a live connection manager, so create it with `POST /v1/sessions` or call `/reconnect` first.\n\nDocs: https://chatkomodo.com/docs/api/devices/#post-v1-sessions-sessionid-pairing-code"
              }
            },
            {
              "name": "Reconnect a device",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"clear_creds\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/reconnect",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "reconnect"
                  ]
                },
                "description": "Restarts the WhatsApp connection of the session. With `clear_creds: true` the stored credentials are wiped first and the status goes back to `pending`, so the device has to be linked again (QR or pairing code); this flag only takes effect when the session already has a live connection manager. Poll `GET /v1/sessions/{id}` for the resulting status.\n\nDocs: https://chatkomodo.com/docs/api/devices/#post-v1-sessions-sessionid-reconnect"
              }
            },
            {
              "name": "Resync groups and chats",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/sync",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "sync"
                  ]
                },
                "description": "Re-fetches the participating groups and the WhatsApp app-state (chats, contacts) and refreshes group names in the inbox; waits up to 15 seconds for the app-state part. `contacts` counts the one-to-one chats known in the inbox, not an address book.\n\nDocs: https://chatkomodo.com/docs/api/devices/#post-v1-sessions-sessionid-sync"
              }
            },
            {
              "name": "Check numbers on WhatsApp",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"targets\": [\n    \"+447700900123\",\n    \"+12025550123\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/validate",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "validate"
                  ]
                },
                "description": "Checks which of up to 1 000 numbers or JIDs have a WhatsApp account. Targets are normalised like recipients elsewhere (international format, or local format resolved against the business country or `country_code`); targets that cannot be normalised are dropped. If the lookup itself fails, every target is reported in `not_registered`. Limited to 10 calls per minute per key.\n\nDocs: https://chatkomodo.com/docs/api/devices/#post-v1-sessions-sessionid-validate"
              }
            }
          ]
        },
        {
          "name": "Messages",
          "description": "Send every kind of WhatsApp message, read the message history, retry, cancel, edit, react and unsend. See the [sending guide](/docs/sending) for message types, statuses and pacing.",
          "item": [
            {
              "name": "List message history",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages?limit=50&status=failed",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages"
                  ],
                  "query": [
                    {
                      "key": "limit",
                      "value": "50"
                    },
                    {
                      "key": "status",
                      "value": "failed"
                    }
                  ]
                },
                "description": "Paged history of the messages of a session, optionally filtered by chat, status, direction or text. Each page is ordered oldest first; to go further back pass `next_cursor` as `cursor`. Error texts are PII-redacted (numbers, JIDs, e-mail addresses) and cut to 160 characters.\n\nDocs: https://chatkomodo.com/docs/api/messages/#get-v1-sessions-sessionid-messages"
              }
            },
            {
              "name": "Send a message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"chat_id\": \"+447700900123\",\n  \"type\": \"text\",\n  \"body\": \"Hi Sam, your order #1042 has shipped 🚚\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages"
                  ]
                },
                "description": "Send a WhatsApp message via the given session. Supports text, media (image/video/document/audio/sticker), location, poll, and contact. If the recipient has opted out the message is still sent and the response carries a `RECIPIENT_OPTED_OUT` warning, unless the tenant enabled `enforce_api` in the consent config, in which case the call fails with 409 `RECIPIENT_OPTED_OUT`.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages"
              }
            },
            {
              "name": "Search message text",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/search?q=string",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    "search"
                  ],
                  "query": [
                    {
                      "key": "q",
                      "value": "string"
                    }
                  ]
                },
                "description": "Substring search over the message bodies of one session, newest first. Matching is case-insensitive for ASCII letters; `%` and `_` in `q` are literal.\n\nDocs: https://chatkomodo.com/docs/api/messages/#get-v1-sessions-sessionid-messages-search"
              }
            },
            {
              "name": "Get a message with its surroundings",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:id/context",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":id",
                    "context"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Returns the message together with the messages around it from the same chat, oldest first. Messages with exactly the same timestamp as the anchor are left out.\n\nDocs: https://chatkomodo.com/docs/api/messages/#get-v1-sessions-sessionid-messages-id-context"
              }
            },
            {
              "name": "Download stored media",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:id/media",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":id",
                    "media"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Returns the media file stored for a message as raw bytes. The response is always `application/octet-stream`; the original MIME type is not sent.\n\nDocs: https://chatkomodo.com/docs/api/messages/#get-v1-sessions-sessionid-messages-id-media"
              }
            },
            {
              "name": "Cancel queued messages",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"ids\": [\n    \"01JA5V6Q8M2H7G4K9P3T0R1S2X\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    "cancel"
                  ]
                },
                "description": "Marks messages that are still `queued` as `cancelled` and removes them from the send queue. Messages in any other status are left alone; duplicate ids are ignored.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-cancel"
              }
            },
            {
              "name": "Delete messages from history",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"ids\": [\n    \"01JA5V6Q8M2H7G4K9P3T0R1S2X\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/delete",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    "delete"
                  ]
                },
                "description": "Removes messages from the stored history and from the send queue. Nothing is unsent on WhatsApp; use `/messages/unsend` for that.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-delete"
              }
            },
            {
              "name": "Unsend messages for everyone",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"ids\": [\n    \"01JA5V6Q8M2H7G4K9P3T0R1S2X\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/unsend",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    "unsend"
                  ]
                },
                "description": "Revokes your own sent messages on WhatsApp (\"delete for everyone\") and marks them `deleted` in the history. Each id is processed on its own and the call answers 200 even if some fail: check `results[].error`.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-unsend"
              }
            },
            {
              "name": "Forward a message to another chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"to_chat_id\": \"+12025550123\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:msgId/forward",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":msgId",
                    "forward"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Sends the stored type, text and media key of a logged message to another chat as a new message. It goes through the same opt-out check as `POST /messages`: an opted-out recipient yields a `RECIPIENT_OPTED_OUT` warning, or a 409 when strict mode (`enforce_api`) is on.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-msgid-forward"
              }
            },
            {
              "name": "Resend an outbound message",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:msgId/retry",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":msgId",
                    "retry"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Sends a logged outbound message again as a new message with a new id. Only text, image, document, audio, video and sticker messages that still have their content can be retried. The same opt-out check as `POST /messages` applies, and the send is paced like any other.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-msgid-retry"
              }
            },
            {
              "name": "Delete a sent message for everyone",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:msgId/delete",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":msgId",
                    "delete"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Revokes one of your sent messages on WhatsApp and marks it `deleted` in the history. The message must already have a WhatsApp id, i.e. it was handed to WhatsApp.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-msgid-delete"
              }
            },
            {
              "name": "Edit a sent message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"body\": \"Hi Sam, your order has shipped.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:msgId/edit",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":msgId",
                    "edit"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Replaces the text of one of your sent messages on WhatsApp and updates the stored body. `msgId` is the gateway message id; the message must already have a WhatsApp id.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-msgid-edit"
              }
            },
            {
              "name": "Edit a message by WhatsApp id",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"chat_id\": \"+447700900123\",\n  \"new_text\": \"Hi Sam, your order has shipped.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:msgId/edit",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":msgId",
                    "edit"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Edits a message addressed by its WhatsApp message id instead of the gateway id. Unlike `POST …/messages/{msgId}/edit` it does not look the message up and does not update the stored history.\n\nDocs: https://chatkomodo.com/docs/api/messages/#put-v1-sessions-sessionid-messages-msgid-edit"
              }
            },
            {
              "name": "React to a message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"emoji\": \"👍\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:msgId/react",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":msgId",
                    "react"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Sends an emoji reaction to a message through the normal send pipeline. `msgId` may be the gateway id or the WhatsApp id of the message.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-msgid-react"
              }
            },
            {
              "name": "Mark a message as read",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/:msgId/read",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    ":msgId",
                    "read"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Sends a read receipt for the message to WhatsApp. The local unread counter of the inbox is not changed; use `POST …/inbox/{chatId}/read` for that.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-msgid-read"
              }
            },
            {
              "name": "Send a buttons or list message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"chat_id\": \"+447700900123\",\n  \"type\": \"buttons\",\n  \"body\": \"Your order #1042 is ready. What next?\",\n  \"footer\": \"Acme Store\",\n  \"buttons\": [\n    {\n      \"text\": \"Track my order\"\n    },\n    {\n      \"text\": \"Talk to us\"\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/messages/interactive",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "messages",
                    "interactive"
                  ]
                },
                "description": "Sends a button or list message straight through the WhatsApp connection. Unlike `POST /messages` it is not queued or paced, not written to the message history and not checked against the opt-out list, and `chat_id` must already be a JID. A `type` other than `buttons` or `list` sends nothing but still answers 200.\n\nDocs: https://chatkomodo.com/docs/api/messages/#post-v1-sessions-sessionid-messages-interactive"
              }
            },
            {
              "name": "Fetch a link preview",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/link-preview?url=https%3A%2F%2Fexample.com%2Ffile.jpg",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "link-preview"
                  ],
                  "query": [
                    {
                      "key": "url",
                      "value": "https://example.com/file.jpg"
                    }
                  ]
                },
                "description": "Fetches an http(s) page (max 1 MB, 5 second timeout; private and internal addresses are refused and redirects are not followed) and extracts its Open Graph title, description and image, falling back to the `<title>`. If the page cannot be fetched, or the address is refused, the call still succeeds with null fields.\n\nDocs: https://chatkomodo.com/docs/api/messages/#get-v1-link-preview"
              }
            },
            {
              "name": "List messages across all devices",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/messages?since=1767225600000&limit=1000",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "messages"
                  ],
                  "query": [
                    {
                      "key": "since",
                      "value": "1767225600000"
                    },
                    {
                      "key": "limit",
                      "value": "1000"
                    }
                  ]
                },
                "description": "Message log of all the tenant's devices, newest first, filtered and paged with a cursor. Filters with an unrecognised value (`direction`, `status`) are ignored rather than rejected. Pass the returned `next_cursor` as `cursor` for the next page.\n\nDocs: https://chatkomodo.com/docs/api/messages/#get-v1-messages"
              }
            }
          ]
        },
        {
          "name": "Media",
          "description": "Upload images, videos, audio and documents once and send them by key (`media_r2_key`), or send straight from a public `url`.",
          "item": [
            {
              "name": "Reserve an upload key and URL",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"filename\": \"price-list.pdf\",\n  \"content_type\": \"application/pdf\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/media/upload-url",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "media",
                    "upload-url"
                  ]
                },
                "description": "Reserves a media key for the caller and returns the URL to upload the bytes to with `PUT` (same Authorization header). Use the returned `r2_key` as `media_r2_key` when sending. The body is optional; the extension of the key comes from `filename` (`bin` when absent).\n\nDocs: https://chatkomodo.com/docs/api/media/#post-v1-media-upload-url"
              }
            },
            {
              "name": "Upload bytes to a reserved key",
              "request": {
                "method": "PUT",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/media/put/:key",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "media",
                    "put",
                    ":key"
                  ],
                  "variable": [
                    {
                      "key": "key",
                      "value": "uploads/abc123.jpg"
                    }
                  ]
                },
                "description": "Stores the request body as the media file for a key reserved with `POST /v1/media/upload-url`. The `Content-Type` header is recorded as the file type. Only keys of the form `uploads/<32 hex>.<ext>` are accepted, and a key reserved by another tenant is refused.\n\nDocs: https://chatkomodo.com/docs/api/media/#put-v1-media-put-key"
              }
            },
            {
              "name": "Upload a file (multipart)",
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "key": "file",
                      "type": "file",
                      "src": []
                    }
                  ]
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/media/upload",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "media",
                    "upload"
                  ]
                },
                "description": "Uploads one file in a single multipart request and returns its media key, to use as `media_r2_key`. The key is generated by the server; the extension comes from the file name.\n\nDocs: https://chatkomodo.com/docs/api/media/#post-v1-media-upload"
              }
            },
            {
              "name": "List uploaded media",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/media",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "media"
                  ]
                },
                "description": "Completed uploads of the tenant (reserved keys that have no bytes yet are left out), newest first.\n\nDocs: https://chatkomodo.com/docs/api/media/#get-v1-media"
              }
            },
            {
              "name": "Download a media file",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/media/:key",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "media",
                    ":key"
                  ],
                  "variable": [
                    {
                      "key": "key",
                      "value": "uploads/abc123.jpg"
                    }
                  ]
                },
                "description": "Returns the file bytes. Only the owning tenant can read a file. The `Content-Type` is the recorded type for images (png, jpeg, gif, webp), video (mp4, 3gpp, quicktime, webm), audio and PDF, and `application/octet-stream` for anything else. Cached privately for 5 minutes.\n\nDocs: https://chatkomodo.com/docs/api/media/#get-v1-media-key"
              }
            },
            {
              "name": "Delete a media file",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/media/:key",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "media",
                    ":key"
                  ],
                  "variable": [
                    {
                      "key": "key",
                      "value": "uploads/abc123.jpg"
                    }
                  ]
                },
                "description": "Deletes the file and its record. Only the owning tenant can delete it. Message templates or recurring messages that still reference the key will no longer find the file.\n\nDocs: https://chatkomodo.com/docs/api/media/#delete-v1-media-key"
              }
            }
          ]
        },
        {
          "name": "Scheduled messages",
          "description": "One-off messages sent at a chosen time (`scheduled_at`, Unix milliseconds).",
          "item": [
            {
              "name": "List scheduled messages",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/scheduled",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "scheduled"
                  ]
                },
                "description": "All scheduled messages of the session, sent or not, ordered by due time (oldest first).\n\nDocs: https://chatkomodo.com/docs/api/scheduled/#get-v1-sessions-sessionid-scheduled"
              }
            },
            {
              "name": "Schedule a message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"chat_id\": \"+447700900123\",\n  \"message_type\": \"text\",\n  \"body\": \"Reminder: your appointment is tomorrow at 10:00.\",\n  \"scheduled_at\": 1767258000000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/scheduled",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "scheduled"
                  ]
                },
                "description": "Queues a message for later delivery. A worker checks every 10 seconds and sends due messages once the session is connected; the bulk send window does not apply. A recipient who opted out before delivery makes the message `failed` with error `opted_out`. The body is not validated: `chat_id` is stored as given and must be a full JID, and a missing `scheduled_at` ends in a 500. Limited to 20 calls per minute per key.\n\nDocs: https://chatkomodo.com/docs/api/scheduled/#post-v1-sessions-sessionid-scheduled"
              }
            },
            {
              "name": "Cancel a scheduled message",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/scheduled/:msgId",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "scheduled",
                    ":msgId"
                  ],
                  "variable": [
                    {
                      "key": "msgId",
                      "value": "MSG_ID"
                    }
                  ]
                },
                "description": "Deletes a scheduled message that has not been sent yet. Messages that are already `sending`, `sent` or `failed` cannot be removed.\n\nDocs: https://chatkomodo.com/docs/api/scheduled/#delete-v1-sessions-sessionid-scheduled-msgid"
              }
            },
            {
              "name": "List scheduled messages",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/scheduled",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "scheduled"
                  ]
                },
                "description": "All scheduled messages of the tenant across devices, earliest first, with their current status.\n\nDocs: https://chatkomodo.com/docs/api/scheduled/#get-v1-scheduled"
              }
            },
            {
              "name": "Schedule a message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"session_id\": \"{{deviceId}}\",\n  \"chat_id\": \"+447700900123\",\n  \"message_type\": \"text\",\n  \"body\": \"Reminder: your appointment is tomorrow at 10:00.\",\n  \"scheduled_at\": 1767258000000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/scheduled",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "scheduled"
                  ]
                },
                "description": "Queues one message to be sent through a device at `scheduled_at`. The server sends it once the time has passed and the device is connected; a recipient who has opted out by then is skipped and the message is marked `failed`. Limited to 20 requests per minute per key. The handler validates only that the device is yours: `chat_id`, `scheduled_at` and the content fields are stored as given, so send a full JID and a millisecond timestamp.\n\nDocs: https://chatkomodo.com/docs/api/scheduled/#post-v1-scheduled"
              }
            },
            {
              "name": "Cancel a scheduled message",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/scheduled/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "scheduled",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Deletes a scheduled message that has not been sent yet. A message that is already sending, sent or failed cannot be deleted.\n\nDocs: https://chatkomodo.com/docs/api/scheduled/#delete-v1-scheduled-id"
              }
            }
          ]
        },
        {
          "name": "Recurring messages",
          "description": "Messages repeated daily, weekly, monthly or every N days.",
          "item": [
            {
              "name": "List recurring messages",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/recurring",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "recurring"
                  ]
                },
                "description": "Recurring messages of the tenant, newest first (max 1 000).\n\nDocs: https://chatkomodo.com/docs/api/recurring/#get-v1-recurring"
              }
            },
            {
              "name": "Create a recurring message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Monday reminder\",\n  \"session_id\": \"{{deviceId}}\",\n  \"targets\": [\n    \"+447700900123\",\n    \"+12025550123\"\n  ],\n  \"message\": \"Weekly reminder: team meeting at 09:00.\",\n  \"schedule_type\": \"weekly\",\n  \"schedule_config\": {\n    \"day\": 1,\n    \"hour\": 8,\n    \"minute\": 30\n  },\n  \"timezone\": \"Asia/Jakarta\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/recurring",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "recurring"
                  ]
                },
                "description": "Schedules a message to be sent to a list of recipients every day, week, month or N days. `next_run_at` is computed by the server in the schedule timezone. These sends are not held back by the blast send window.\n\nDocs: https://chatkomodo.com/docs/api/recurring/#post-v1-recurring"
              }
            },
            {
              "name": "Edit a recurring message",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"message\": \"Weekly reminder: team meeting moved to 10:00.\",\n  \"is_active\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/recurring/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "recurring",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Changes any of the fields given at creation (send only those to change). `next_run_at` is recomputed on every edit. The message must still have a `message` or a `media_r2_key` afterwards. Use `is_active: false` to pause.\n\nDocs: https://chatkomodo.com/docs/api/recurring/#patch-v1-recurring-id"
              }
            },
            {
              "name": "Delete a recurring message",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/recurring/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "recurring",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Permanently deletes a recurring message.\n\nDocs: https://chatkomodo.com/docs/api/recurring/#delete-v1-recurring-id"
              }
            }
          ]
        },
        {
          "name": "Templates",
          "description": "Reusable message texts with personalization tokens such as `{first_name}`.",
          "item": [
            {
              "name": "List message templates",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/templates",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "templates"
                  ]
                },
                "description": "All templates of the tenant, newest first.\n\nDocs: https://chatkomodo.com/docs/api/templates/#get-v1-templates"
              }
            },
            {
              "name": "Create a message template",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Order shipped\",\n  \"message_type\": \"text\",\n  \"body\": \"Hi {{first_name|there}}, your order is on its way.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/templates",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "templates"
                  ]
                },
                "description": "Saves a template. Only `name` is required; `message_type` defaults to `text`.\n\nDocs: https://chatkomodo.com/docs/api/templates/#post-v1-templates"
              }
            },
            {
              "name": "Edit a message template",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Order shipped\",\n  \"message_type\": \"text\",\n  \"body\": \"Hi Sam, your order has shipped.\",\n  \"media_r2_key\": \"uploads/abc123.jpg\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/templates/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "templates",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Edits a template in place (id and `created_at` are kept). Send only the fields to change; `null` clears `body`, `media_r2_key` and `caption`.\n\nDocs: https://chatkomodo.com/docs/api/templates/#patch-v1-templates-id"
              }
            },
            {
              "name": "Delete a message template",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/templates/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "templates",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Permanently deletes a template.\n\nDocs: https://chatkomodo.com/docs/api/templates/#delete-v1-templates-id"
              }
            }
          ]
        },
        {
          "name": "Rotators",
          "description": "Spread sending over a pool of devices, round-robin or at random.",
          "item": [
            {
              "name": "List rotators",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/rotators",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "rotators"
                  ]
                },
                "description": "Rotators of the tenant, newest first.\n\nDocs: https://chatkomodo.com/docs/api/rotators/#get-v1-rotators"
              }
            },
            {
              "name": "Create a rotator",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Sales numbers\",\n  \"session_ids\": [\n    \"{{deviceId}}\"\n  ],\n  \"strategy\": \"round-robin\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/rotators",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "rotators"
                  ]
                },
                "description": "Creates a pool of devices that outgoing messages are spread over (see `POST /v1/rotators/{id}/send`). The handler does not validate `name`, but it is required.\n\nDocs: https://chatkomodo.com/docs/api/rotators/#post-v1-rotators"
              }
            },
            {
              "name": "Edit a rotator",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Sales numbers\",\n  \"session_ids\": [\n    \"{{deviceId}}\"\n  ],\n  \"strategy\": \"round-robin\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/rotators/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "rotators",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Changes the name, device list and/or strategy. Send only the fields to change; an empty `name` or `strategy` is ignored.\n\nDocs: https://chatkomodo.com/docs/api/rotators/#patch-v1-rotators-id"
              }
            },
            {
              "name": "Delete a rotator",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/rotators/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "rotators",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Permanently deletes a rotator. The devices in it are not affected.\n\nDocs: https://chatkomodo.com/docs/api/rotators/#delete-v1-rotators-id"
              }
            },
            {
              "name": "Send through a rotator",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"chat_id\": \"+447700900123\",\n  \"type\": \"text\",\n  \"body\": \"Thanks for your order! We will confirm shortly.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/rotators/:id/send",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "rotators",
                    ":id",
                    "send"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Sends one message through one of the rotator's connected devices, picked by its strategy (round-robin or random). It is a 1:1 send like `POST /v1/sessions/{id}/messages`: an opted-out recipient still receives it with a `RECIPIENT_OPTED_OUT` warning, or is refused with 409 when the tenant enabled strict consent (`enforce_api`). The body fields are passed to the device as given and are not validated here beyond `chat_id`.\n\nDocs: https://chatkomodo.com/docs/api/rotators/#post-v1-rotators-id-send"
              }
            }
          ]
        },
        {
          "name": "Broadcasts",
          "description": "Campaigns to many recipients: explicit lists or CRM audiences (segments, groups, tags), personalization, consent checks, the daily send window and progress counters.",
          "item": [
            {
              "name": "List the campaigns of a device",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blasts",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blasts"
                  ]
                },
                "description": "List the campaigns of a session, newest first.\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#get-v1-sessions-sessionid-blasts"
              }
            },
            {
              "name": "Create a campaign",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"October promo\",\n  \"body\": \"Hi {{first_name|there}}, 20% off everything this week!\",\n  \"recipients\": [\n    {\n      \"chat_id\": \"+447700900123\",\n      \"name\": \"Sam Carter\",\n      \"attrs\": {\n        \"plan\": \"Pro\"\n      }\n    },\n    {\n      \"chat_id\": \"+12025550123\",\n      \"name\": \"Alex Kim\"\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blasts",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blasts"
                  ]
                },
                "description": "Create a blast campaign (status `draft`). The audience is the explicit `recipients` plus the contacts matched by `segment_id`, `group_id` and/or `tag` (CRM filters combine with AND), deduplicated, max 50 000. Nothing is sent until `/start`. The server applies anti-ban pacing and per-country warm-up; recipients who opted out are skipped automatically just before sending, and bulk sends are only released inside the tenant's send window (see `send_window` in `/v1/settings/send_window`).\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#post-v1-sessions-sessionid-blasts"
              }
            },
            {
              "name": "Get a campaign and its progress",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blasts/:campaignId",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blasts",
                    ":campaignId"
                  ],
                  "variable": [
                    {
                      "key": "campaignId",
                      "value": "CAMPAIGN_ID"
                    }
                  ]
                },
                "description": "Campaign detail with per-recipient status and progress counters. `skipped_count` counts recipients removed because they opted out.\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#get-v1-sessions-sessionid-blasts-campaignid"
              }
            },
            {
              "name": "Delete a campaign",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blasts/:campaignId",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blasts",
                    ":campaignId"
                  ],
                  "variable": [
                    {
                      "key": "campaignId",
                      "value": "CAMPAIGN_ID"
                    }
                  ]
                },
                "description": "Deletes the campaign and all its recipient rows, whatever its status. Messages that were already sent stay in the message history.\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#delete-v1-sessions-sessionid-blasts-campaignid"
              }
            },
            {
              "name": "Start or resume a campaign",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"consent_attested\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blasts/:campaignId/start",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blasts",
                    ":campaignId",
                    "start"
                  ],
                  "variable": [
                    {
                      "key": "campaignId",
                      "value": "CAMPAIGN_ID"
                    }
                  ]
                },
                "description": "Start or resume a campaign. If the tenant turned on `require_attestation` (consent config) and the campaign was not attested at creation, the body must contain `{\"consent_attested\": true}`, otherwise the call fails with 400 `CONSENT_ATTESTATION_REQUIRED`. Opted-out recipients are removed (status `skipped`) before the first message.\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#post-v1-sessions-sessionid-blasts-campaignid-start"
              }
            },
            {
              "name": "Pause a campaign",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blasts/:campaignId/pause",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blasts",
                    ":campaignId",
                    "pause"
                  ],
                  "variable": [
                    {
                      "key": "campaignId",
                      "value": "CAMPAIGN_ID"
                    }
                  ]
                },
                "description": "Pause a running campaign (resume with `/start`).\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#post-v1-sessions-sessionid-blasts-campaignid-pause"
              }
            },
            {
              "name": "Cancel a campaign",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blasts/:campaignId/cancel",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blasts",
                    ":campaignId",
                    "cancel"
                  ],
                  "variable": [
                    {
                      "key": "campaignId",
                      "value": "CAMPAIGN_ID"
                    }
                  ]
                },
                "description": "Cancel a campaign; recipients that were still pending are cancelled.\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#post-v1-sessions-sessionid-blasts-campaignid-cancel"
              }
            },
            {
              "name": "List blast campaigns of all devices",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/blasts",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "blasts"
                  ]
                },
                "description": "Every blast campaign of the tenant across devices, newest first, without pagination. Campaigns are created per device with `POST /v1/sessions/{sessionId}/blasts`.\n\nDocs: https://chatkomodo.com/docs/api/broadcasts/#get-v1-blasts"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Conversations",
      "item": [
        {
          "name": "AI assistant",
          "description": "AI replies from the business information, knowledge documents and web pages, saved answers, questions the assistant could not answer, the AI report, and the inbox helpers (suggested reply, chat summary). Changing settings, documents and saved answers needs the owner's dashboard login.",
          "item": [
            {
              "name": "Get AI reply settings and quota",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply"
                  ]
                },
                "description": "AI auto-reply settings and this month's quota. AI answers a 1:1 message only when no auto-reply rule or chatbot flow did, and steps back in a chat for `pause_hours` after a person from the business sends a message from the dashboard.\n\nDocs: https://chatkomodo.com/docs/api/ai/#get-v1-ai-reply"
              }
            },
            {
              "name": "Update AI reply settings",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enabled\": true,\n  \"knowledge\": \"Acme Dental, Jl. Sudirman 12, Jakarta. Open Mon–Sat 9:00–17:00. Check-up Rp150.000. We accept BPJS and QRIS.\",\n  \"instructions\": \"Friendly and short. Call customers \\\"Kak\\\". Never promise discounts.\",\n  \"handoff_keywords\": [\n    \"admin\",\n    \"human\",\n    \"complaint\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply"
                  ]
                },
                "description": "Change AI auto-reply settings (any subset). Owner login only. Turning it on needs some `knowledge`, `instructions` or a ready knowledge document. Audited as `ai_reply.update`.\n\nDocs: https://chatkomodo.com/docs/api/ai/#put-v1-ai-reply"
              }
            },
            {
              "name": "Try a question on the assistant",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"message\": \"What time do you open on Saturday?\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/preview",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "preview"
                  ]
                },
                "description": "Ask the assistant one question with the saved settings, or with draft `settings` before saving. Counts as one AI reply. Owner only, 10 per minute.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-preview"
              }
            },
            {
              "name": "Pause AI replies in a chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"session_id\": \"{{deviceId}}\",\n  \"chat_id\": \"447700900123@s.whatsapp.net\",\n  \"hours\": 12\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/chats/pause",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "chats",
                    "pause"
                  ]
                },
                "description": "Stop AI replies in one chat for `hours` (1–720; default the tenant's `pause_hours`). Allowed for support agents.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-chats-pause"
              }
            },
            {
              "name": "Resume AI replies in a chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"session_id\": \"{{deviceId}}\",\n  \"chat_id\": \"447700900123@s.whatsapp.net\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/chats/resume",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "chats",
                    "resume"
                  ]
                },
                "description": "Let AI reply in this chat again.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-chats-resume"
              }
            },
            {
              "name": "List knowledge documents",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/documents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "documents"
                  ]
                },
                "description": "Knowledge documents for AI replies: files the business uploaded (price lists, menus, policies, FAQs), their reading status, and the plan's limits. When a customer writes, the passages that best match the message are given to the AI with the typed knowledge — the AI answers from them and says a person will follow up when they do not cover the question.\n\nDocs: https://chatkomodo.com/docs/api/ai/#get-v1-ai-reply-documents"
              }
            },
            {
              "name": "Upload a knowledge document",
              "request": {
                "method": "POST",
                "header": [],
                "body": {
                  "mode": "formdata",
                  "formdata": [
                    {
                      "key": "file",
                      "type": "file",
                      "src": []
                    }
                  ]
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/documents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "documents"
                  ]
                },
                "description": "Upload one file (multipart field `file`): PDF with selectable text, Word (.docx), Excel (.xlsx), CSV, text, Markdown or HTML, up to 8 MB. The knowledge engine reads it in the background (`status` `parsing` → `ready`); when the engine is not set up, unreachable or fails the file, the backup reader on the API server reads it instead (`engine: local`, usually `ready` at once). Owner login only; 30 uploads (files and links) per 10 minutes. Audited as `ai_kb.upload`.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-documents"
              }
            },
            {
              "name": "Delete a knowledge document",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/documents/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "documents",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Delete a document: AI replies stop using it at once. Owner login only. Audited as `ai_kb.delete`.\n\nDocs: https://chatkomodo.com/docs/api/ai/#delete-v1-ai-reply-documents-id"
              }
            },
            {
              "name": "Read a failed document again",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/documents/:id/retry",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "documents",
                    ":id",
                    "retry"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Read a `failed` document again. Owner login only.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-documents-id-retry"
              }
            },
            {
              "name": "Search the knowledge documents",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"question\": \"How much is delivery to Bandung?\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/documents/search",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "documents",
                    "search"
                  ]
                },
                "description": "The document passages an AI reply would get for `question` — to check that a document answers what customers ask. Does not call the AI and does not use the AI quota. Owner login only.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-documents-search"
              }
            },
            {
              "name": "Add a web page as a document",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"https://example.com/faq\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/documents/url",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "documents",
                    "url"
                  ]
                },
                "description": "Add a public web page (FAQ, shipping, prices) as a document: its text is read once (HTML or plain text, up to 3 MB, up to 4 redirects; private and local addresses are refused) and kept with `Source:` and `Title:` lines; `name` is the page title and `source_url` the final address. Pages that need JavaScript to show their text cannot be read (`NO_TEXT`). Counts as one file of the plan. Owner login only; shares the upload limit. Audited as `ai_kb.upload` (detail `link <url>`).\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-documents-url"
              }
            },
            {
              "name": "Read a web page again",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/documents/:id/refresh",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "documents",
                    ":id",
                    "refresh"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Read a web document's page again (after the page changed). The new copy gets a new id and replaces the old one once it is in; the plan limit counts them as one. Owner login only. Audited as `ai_kb.upload` (detail `refresh <url>`).\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-documents-id-refresh"
              }
            },
            {
              "name": "List saved answers",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/faq",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "faq"
                  ]
                },
                "description": "Saved answers: question/answer pairs written by the business. AI replies find them like document passages and prefer them (the business wrote them for exactly that question). Readable by agents.\n\nDocs: https://chatkomodo.com/docs/api/ai/#get-v1-ai-reply-faq"
              }
            },
            {
              "name": "Add a saved answer",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"question\": \"Do you deliver on Sunday?\",\n  \"answer\": \"Yes, Sunday deliveries leave at 10:00 and arrive the same day in Jakarta.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/faq",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "faq"
                  ]
                },
                "description": "Add a saved answer (at most 500 per business). Used by the next AI reply at once. Owner login only. Audited as `ai_kb.faq` (detail `add`).\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-faq"
              }
            },
            {
              "name": "Change a saved answer",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"question\": \"Do you deliver on Sunday?\",\n  \"answer\": \"Yes, from 10:00.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/faq/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "faq",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Change a saved answer. Owner login only. Audited as `ai_kb.faq` (detail `edit`).\n\nDocs: https://chatkomodo.com/docs/api/ai/#put-v1-ai-reply-faq-id"
              }
            },
            {
              "name": "Delete a saved answer",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/faq/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "faq",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Delete a saved answer. Owner login only. Audited as `ai_kb.faq` (detail `delete`).\n\nDocs: https://chatkomodo.com/docs/api/ai/#delete-v1-ai-reply-faq-id"
              }
            },
            {
              "name": "List unanswered questions",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/unanswered",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "unanswered"
                  ]
                },
                "description": "Questions the AI assistant could not answer from the business information (it told the customer the team will follow up). Open ones first, most asked first; `status=all` also lists answered and dismissed ones. At most 300 open per business (the least asked make room). Readable by agents.\n\nDocs: https://chatkomodo.com/docs/api/ai/#get-v1-ai-reply-unanswered"
              }
            },
            {
              "name": "Answer an unanswered question",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"answer\": \"Yes, we take children from age 2.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/unanswered/:id/answer",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "unanswered",
                    ":id",
                    "answer"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Answer a question once: it becomes a saved answer (optionally with a cleaner `question`) that the next AI reply uses, and leaves the open list. Owner login only. Audited as `ai_kb.faq` (detail `answer`).\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-unanswered-id-answer"
              }
            },
            {
              "name": "Dismiss an unanswered question",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/unanswered/:id/dismiss",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "unanswered",
                    ":id",
                    "dismiss"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Close an open question without answering it. Owner login only.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-unanswered-id-dismiss"
              }
            },
            {
              "name": "Get the AI report",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/report?days=30",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "report"
                  ],
                  "query": [
                    {
                      "key": "days",
                      "value": "30"
                    }
                  ]
                },
                "description": "What the AI assistant did over the last 7, 30 or 90 days (default 30), by day in the business's time zone: replies, replies where it was unsure, handoffs to a person, chats served, answered rate (`replies / all`), most asked questions, documents used most, open unanswered questions, and this month's quota. Kept 90 days.\n\nDocs: https://chatkomodo.com/docs/api/ai/#get-v1-ai-reply-report"
              }
            },
            {
              "name": "Suggest a reply for a chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"session_id\": \"{{deviceId}}\",\n  \"chat_id\": \"447700900123@s.whatsapp.net\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/suggest",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "suggest"
                  ]
                },
                "description": "A draft of the next reply in a chat for the person answering it, from the last week of the conversation, the business information and the documents. Nothing is sent. Counts as one AI reply. Owner, and agents for chats assigned to them or unassigned.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-suggest"
              }
            },
            {
              "name": "Summarize a chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"session_id\": \"{{deviceId}}\",\n  \"chat_id\": \"447700900123@s.whatsapp.net\",\n  \"lang\": \"en\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/ai-reply/summary",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "ai-reply",
                    "summary"
                  ]
                },
                "description": "A 3–5 line summary of a conversation (last two weeks) for whoever takes it over: what the customer wants, what was promised, open questions, next step. Counts as one AI reply. Same access as `suggest`.\n\nDocs: https://chatkomodo.com/docs/api/ai/#post-v1-ai-reply-summary"
              }
            }
          ]
        },
        {
          "name": "Push notifications",
          "description": "Web Push for the dashboard: a browser subscribes and gets a notification when a customer writes. For dashboard logins (owner and agents).",
          "item": [
            {
              "name": "Get the push public key",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/push/key",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "push",
                    "key"
                  ]
                },
                "description": "The platform's VAPID public key, to pass as `applicationServerKey` to `PushManager.subscribe()`.\n\nDocs: https://chatkomodo.com/docs/api/push/#get-v1-push-key"
              }
            },
            {
              "name": "Turn on notifications for a browser",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"endpoint\": \"https://example.com/file.jpg\",\n  \"keys\": {\n    \"p256dh\": \"BP4z9KsN6nGRTbVYI_c7VJSPQTBtkgcy27mlmlMoZIIgDll6e3vCYLocInmYWAmS6TlzAC8wEqKK6PBru3jl7A8\",\n    \"auth\": \"BTBZMqHH6r4Tts7J_aSIgg\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/push/subscribe",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "push",
                    "subscribe"
                  ]
                },
                "description": "Notify this browser when a customer writes in a 1:1 chat: the owner for every chat, an agent for chats assigned to them or unassigned. At most one notification per chat and device every 30 s; the preview is encrypted for the device. Dashboard logins only.\n\nDocs: https://chatkomodo.com/docs/api/push/#post-v1-push-subscribe"
              }
            },
            {
              "name": "Turn off notifications for a browser",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"endpoint\": \"https://example.com/file.jpg\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/push/subscribe",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "push",
                    "subscribe"
                  ]
                },
                "description": "Stop notifications on this browser.\n\nDocs: https://chatkomodo.com/docs/api/push/#delete-v1-push-subscribe"
              }
            },
            {
              "name": "Send a test notification",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"endpoint\": \"https://example.com/file.jpg\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/push/test",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "push",
                    "test"
                  ]
                },
                "description": "Send a test notification to this browser (header `X-Lang: id` for Indonesian).\n\nDocs: https://chatkomodo.com/docs/api/push/#post-v1-push-test"
              }
            }
          ]
        },
        {
          "name": "Inbox",
          "description": "Conversations: chat lists, messages of a chat, read state, tags, notes, pin, archive and close.",
          "item": [
            {
              "name": "List the chats of a device",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox"
                  ]
                },
                "description": "List chats with last message, unread count, and group flag.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#get-v1-sessions-sessionid-inbox"
              }
            },
            {
              "name": "List chats seen in history",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/contacts",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "contacts"
                  ]
                },
                "description": "Distinct chat ids found in the stored message history of the session, most recently active first (max 100). Derived from the message log, not from the WhatsApp address book.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#get-v1-sessions-sessionid-contacts"
              }
            },
            {
              "name": "List the messages of a chat",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/messages",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "messages"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Messages of one chat, oldest first within the page. Pass `next_cursor` as `before` to load older messages. Rows are returned as stored in the message log (more columns than listed may be present).\n\nDocs: https://chatkomodo.com/docs/api/inbox/#get-v1-sessions-sessionid-inbox-chatid-messages"
              }
            },
            {
              "name": "Close a chat",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/close",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "close"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Marks the inbox chat `closed` and resolves its agent assignment. If the tenant enabled the CSAT survey (setting `csat_config`), the session is connected and the chat is a one-to-one chat, the survey question is sent and a pending response is recorded.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#post-v1-sessions-sessionid-inbox-chatid-close"
              }
            },
            {
              "name": "Reset the unread counter",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/read",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "read"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Sets the unread counter of the inbox chat to zero. This is local only: no read receipt is sent to WhatsApp (see `POST …/messages/{msgId}/read`). Answers 200 even when the chat is unknown.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#post-v1-sessions-sessionid-inbox-chatid-read"
              }
            },
            {
              "name": "Get tags, notes, pin and archive state",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/metadata",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "metadata"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Returns the organisation data of a chat. A chat without any stored data returns empty tags and notes with `pinned` and `archived` false.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#get-v1-sessions-sessionid-inbox-chatid-metadata"
              }
            },
            {
              "name": "Replace tags, notes, pin and archive state",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"tags\": [\n    {\n      \"name\": \"VIP\",\n      \"color\": \"#0a7350\"\n    }\n  ],\n  \"notes\": [\n    \"Prefers delivery after 5 pm\"\n  ],\n  \"pinned\": true,\n  \"archived\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/metadata",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "metadata"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Replaces the whole record: fields left out are reset (tags and notes to empty, `pinned` and `archived` to false). The body is not validated; use the dedicated tag, note, pin and archive calls to change a single thing.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#put-v1-sessions-sessionid-inbox-chatid-metadata"
              }
            },
            {
              "name": "Add a tag to a chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"vip\",\n  \"color\": \"#0a7350\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/tags",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "tags"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Appends a tag to the chat. The call does not de-duplicate: adding the same name twice stores it twice.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#post-v1-sessions-sessionid-inbox-chatid-tags"
              }
            },
            {
              "name": "Add a note to a chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"text\": \"Hi Sam, your order has shipped.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/notes",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "notes"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Adds an internal note at the top of the chat notes. Notes are never sent to the contact.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#post-v1-sessions-sessionid-inbox-chatid-notes"
              }
            },
            {
              "name": "Toggle the pin of a chat",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/pin",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "pin"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Flips the pinned flag of the chat (pinned becomes unpinned and the other way round). The response does not return the new state; read it from the metadata.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#post-v1-sessions-sessionid-inbox-chatid-pin"
              }
            },
            {
              "name": "Toggle the archive flag of a chat",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/archive",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "archive"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Flips the archived flag of the chat. The response does not return the new state; read it from the metadata.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#post-v1-sessions-sessionid-inbox-chatid-archive"
              }
            },
            {
              "name": "Set local message expiry for a chat",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"duration_ms\": 604800000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/inbox/:chatId/disappearing",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "inbox",
                    ":chatId",
                    "disappearing"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Stores a retention time for the chat. A background job that runs every 5 minutes deletes the messages of the chat older than that time from the stored history. It does not change the disappearing-messages setting of the chat on WhatsApp (for groups see `PUT …/groups/{gid}/ephemeral`). `null` or 0 turns it off.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#post-v1-sessions-sessionid-inbox-chatid-disappearing"
              }
            },
            {
              "name": "List chats across all devices",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/inbox",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "inbox"
                  ]
                },
                "description": "Chats of all the tenant's devices, most recent first. For an agent login only chats assigned to that agent or unassigned are returned. Per-device listing is `GET /v1/sessions/{sessionId}/inbox`.\n\nDocs: https://chatkomodo.com/docs/api/inbox/#get-v1-inbox"
              }
            }
          ]
        },
        {
          "name": "Agents & assignment",
          "description": "Customer-service agents who work the shared inbox, the queue of unassigned chats, assignment and resolving.",
          "item": [
            {
              "name": "List customer-service agents",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/agents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "agents"
                  ]
                },
                "description": "Agents of the tenant, ordered by name. Secrets (access code hash, authenticator secret) are never included.\n\nDocs: https://chatkomodo.com/docs/api/agents/#get-v1-cs-agents"
              }
            },
            {
              "name": "Create a customer-service agent",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Sam Carter\",\n  \"phone\": \"+447700900123\",\n  \"max_chats\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/agents",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "agents"
                  ]
                },
                "description": "Adds an agent who can sign in to the dashboard and work the shared inbox. An agent signs in with a WhatsApp number plus one-time code (`phone`), or with an `access_code`. The phone number must not already belong to another agent or to a tenant owner login.\n\nDocs: https://chatkomodo.com/docs/api/agents/#post-v1-cs-agents"
              }
            },
            {
              "name": "Edit a customer-service agent",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Sam Carter\",\n  \"is_online\": true,\n  \"max_chats\": 1,\n  \"access_code\": \"482913\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/agents/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "agents",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Changes the name, online flag, chat cap and/or access code of one of the tenant's agents. Send only the fields to change. An id that does not exist (or belongs to another tenant) changes nothing but still returns `ok: true`. The phone number cannot be changed here.\n\nDocs: https://chatkomodo.com/docs/api/agents/#patch-v1-cs-agents-id"
              }
            },
            {
              "name": "Delete a customer-service agent",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/agents/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "agents",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Deletes the agent. Chats assigned to them become unassigned.\n\nDocs: https://chatkomodo.com/docs/api/agents/#delete-v1-cs-agents-id"
              }
            },
            {
              "name": "Sign an agent out everywhere",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/agents/:id/revoke-sessions",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "agents",
                    ":id",
                    "revoke-sessions"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Deletes all refresh tokens of the agent so they can no longer renew their login. An access token that was already issued stays valid until it expires. Recorded in the audit log as `agent.revoke_sessions`.\n\nDocs: https://chatkomodo.com/docs/api/agents/#post-v1-cs-agents-id-revoke-sessions"
              }
            },
            {
              "name": "List unassigned open chats",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/queue",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "queue"
                  ]
                },
                "description": "Open chats on the tenant's devices that no agent is assigned to yet, most recent activity first. Available to agents as well as the owner.\n\nDocs: https://chatkomodo.com/docs/api/agents/#get-v1-cs-queue"
              }
            },
            {
              "name": "Assign a chat to an agent",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"session_id\": \"{{deviceId}}\",\n  \"chat_id\": \"447700900123@s.whatsapp.net\",\n  \"agent_id\": \"01JA5V6Q8M2H7G4K9P3T0R1S2X\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/assign",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "assign"
                  ]
                },
                "description": "Assigns a chat to one of the tenant's agents (replacing any earlier assignment) and updates the agent's active-chat count. Available to agents as well as the owner. The body is not validated beyond ownership of `agent_id` and `session_id`.\n\nDocs: https://chatkomodo.com/docs/api/agents/#post-v1-cs-assign"
              }
            },
            {
              "name": "Mark a chat as resolved",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"session_id\": \"{{deviceId}}\",\n  \"chat_id\": \"447700900123@s.whatsapp.net\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/cs/resolve",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "cs",
                    "resolve"
                  ]
                },
                "description": "Marks a chat resolved, which removes it from the open queue, and frees one slot of the assigned agent. Available to agents as well as the owner.\n\nDocs: https://chatkomodo.com/docs/api/agents/#post-v1-cs-resolve"
              }
            }
          ]
        },
        {
          "name": "Auto-reply rules",
          "description": "Keyword rules that answer incoming messages per device (exact, contains, regex), with cooldowns.",
          "item": [
            {
              "name": "List auto-reply rules",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/auto-reply",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "auto-reply"
                  ]
                },
                "description": "List auto-reply rules for a session.\n\nDocs: https://chatkomodo.com/docs/api/auto-reply/#get-v1-sessions-sessionid-auto-reply"
              }
            },
            {
              "name": "Create an auto-reply rule",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Opening hours\",\n  \"trigger_type\": \"contains\",\n  \"trigger_text\": \"open\",\n  \"reply_type\": \"text\",\n  \"reply_body\": \"We are open Monday to Saturday, 9:00–17:00.\",\n  \"cooldown_ms\": 3600000\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/auto-reply",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "auto-reply"
                  ]
                },
                "description": "Adds a rule that answers inbound messages of this session. Only the first matching active rule answers, and only chats that are not groups, channels or Status. Booleans accept `true`/`false`, `1`/`0` and the strings `\"true\"`, `\"false\"`, `\"1\"`, `\"0\"`.\n\nDocs: https://chatkomodo.com/docs/api/auto-reply/#post-v1-sessions-sessionid-auto-reply"
              }
            },
            {
              "name": "Update an auto-reply rule",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"reply_body\": \"We are open Monday to Saturday, 9:00–18:00.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/auto-reply/:ruleId",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "auto-reply",
                    ":ruleId"
                  ],
                  "variable": [
                    {
                      "key": "ruleId",
                      "value": "RULE_ID"
                    }
                  ]
                },
                "description": "Changes the given fields of a rule; omitted fields keep their value. The resulting regular expression is re-checked when the rule is or becomes a `regex` rule.\n\nDocs: https://chatkomodo.com/docs/api/auto-reply/#patch-v1-sessions-sessionid-auto-reply-ruleid"
              }
            },
            {
              "name": "Delete an auto-reply rule",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/auto-reply/:ruleId",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "auto-reply",
                    ":ruleId"
                  ],
                  "variable": [
                    {
                      "key": "ruleId",
                      "value": "RULE_ID"
                    }
                  ]
                },
                "description": "Deletes the rule and its per-chat cooldown records.\n\nDocs: https://chatkomodo.com/docs/api/auto-reply/#delete-v1-sessions-sessionid-auto-reply-ruleid"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Customers",
      "item": [
        {
          "name": "Contacts",
          "description": "The phone book: import up to 10 000 contacts per call with tags and custom attributes, groups, update and delete.",
          "item": [
            {
              "name": "List contacts",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/contacts?tag=vip&limit=100",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contacts"
                  ],
                  "query": [
                    {
                      "key": "tag",
                      "value": "vip"
                    },
                    {
                      "key": "limit",
                      "value": "100"
                    }
                  ]
                },
                "description": "List contacts (max 10 000 per call; page with `offset`).\n\nDocs: https://chatkomodo.com/docs/api/contacts/#get-v1-contacts"
              }
            },
            {
              "name": "Import contacts",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"contacts\": [\n    {\n      \"phone\": \"+447700900123\",\n      \"name\": \"Sam Carter\",\n      \"tags\": [\n        \"vip\"\n      ],\n      \"attrs\": {\n        \"plan\": \"Pro\",\n        \"city\": \"London\"\n      },\n      \"opt_in\": true\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/contacts",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contacts"
                  ]
                },
                "description": "Import up to 10 000 contacts. A number that already exists is merged into the existing contact (tags are unioned) instead of duplicated. Rows that cannot be stored are returned in `rejected` (first 50).\n\nDocs: https://chatkomodo.com/docs/api/contacts/#post-v1-contacts"
              }
            },
            {
              "name": "Update a contact",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Sam Carter-Jones\",\n  \"tags\": [\n    \"vip\",\n    \"newsletter\"\n  ],\n  \"attrs\": {\n    \"city\": \"Bristol\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/contacts/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contacts",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Update one contact. `attrs` is merged: an empty string removes a key.\n\nDocs: https://chatkomodo.com/docs/api/contacts/#patch-v1-contacts-id"
              }
            },
            {
              "name": "Delete a contact",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/contacts/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contacts",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Delete one contact.\n\nDocs: https://chatkomodo.com/docs/api/contacts/#delete-v1-contacts-id"
              }
            },
            {
              "name": "Delete or move many contacts",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"ids\": [\n    \"01JA5V6Q8M2H7G4K9P3T0R1S2X\"\n  ],\n  \"action\": \"move\",\n  \"group_id\": \"01JA5V6Q8M2H7G4K9P3T0R1S2X\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/contacts/bulk",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contacts",
                    "bulk"
                  ]
                },
                "description": "Delete or move many contacts at once.\n\nDocs: https://chatkomodo.com/docs/api/contacts/#post-v1-contacts-bulk"
              }
            },
            {
              "name": "List contact groups",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/contact-groups",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contact-groups"
                  ]
                },
                "description": "Phone-book groups of the tenant, ordered by name, with the number of contacts in each.\n\nDocs: https://chatkomodo.com/docs/api/contacts/#get-v1-contact-groups"
              }
            },
            {
              "name": "Create a contact group",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"VIP customers\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/contact-groups",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contact-groups"
                  ]
                },
                "description": "Creates a phone-book group. The handler does not validate `name`, but it is required.\n\nDocs: https://chatkomodo.com/docs/api/contacts/#post-v1-contact-groups"
              }
            },
            {
              "name": "Delete a contact group",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/contact-groups/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "contact-groups",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Deletes the group. Its contacts are kept and simply lose their group.\n\nDocs: https://chatkomodo.com/docs/api/contacts/#delete-v1-contact-groups-id"
              }
            }
          ]
        },
        {
          "name": "CRM",
          "description": "Custom contact fields, tags, saved segments (dynamic audiences) and the contact card of a number.",
          "item": [
            {
              "name": "List custom contact fields",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/fields",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "fields"
                  ]
                },
                "description": "Custom contact attributes defined by the business (max 30).\n\nDocs: https://chatkomodo.com/docs/api/crm/#get-v1-crm-fields"
              }
            },
            {
              "name": "Replace the custom contact fields",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"fields\": [\n    {\n      \"key\": \"plan\",\n      \"label\": \"Plan\",\n      \"type\": \"select\",\n      \"options\": [\n        \"Free\",\n        \"Pro\"\n      ]\n    },\n    {\n      \"key\": \"renewal\",\n      \"label\": \"Renewal date\",\n      \"type\": \"date\"\n    }\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/fields",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "fields"
                  ]
                },
                "description": "Replace the whole list of custom attribute definitions.\n\nDocs: https://chatkomodo.com/docs/api/crm/#put-v1-crm-fields"
              }
            },
            {
              "name": "List contact tags",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/tags",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "tags"
                  ]
                },
                "description": "All tags in use with the number of contacts carrying each.\n\nDocs: https://chatkomodo.com/docs/api/crm/#get-v1-crm-tags"
              }
            },
            {
              "name": "Tag or untag many contacts",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"segment_id\": \"01JA5V6Q8M2H7G4K9P3T0R1S2X\",\n  \"add\": [\n    \"spring-sale\"\n  ],\n  \"remove\": [\n    \"new\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/contacts/tags",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "contacts",
                    "tags"
                  ]
                },
                "description": "Add and/or remove tags on many contacts, selected by `ids` or by a saved `segment_id`.\n\nDocs: https://chatkomodo.com/docs/api/crm/#post-v1-crm-contacts-tags"
              }
            },
            {
              "name": "List segments",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/segments",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "segments"
                  ]
                },
                "description": "Saved segments (dynamic audiences) with their current size.\n\nDocs: https://chatkomodo.com/docs/api/crm/#get-v1-crm-segments"
              }
            },
            {
              "name": "Create a segment",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Pro customers who are VIP\",\n  \"filter\": {\n    \"match\": \"all\",\n    \"rules\": [\n      {\n        \"field\": \"attr.plan\",\n        \"op\": \"is\",\n        \"value\": \"Pro\"\n      },\n      {\n        \"field\": \"tag\",\n        \"op\": \"has\",\n        \"value\": \"vip\"\n      }\n    ]\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/segments",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "segments"
                  ]
                },
                "description": "Create a segment (max 200). Use its id as `segment_id` when creating a blast or listing contacts.\n\nDocs: https://chatkomodo.com/docs/api/crm/#post-v1-crm-segments"
              }
            },
            {
              "name": "Preview a segment filter",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"filter\": {\n    \"match\": \"any\",\n    \"rules\": [\n      {\n        \"field\": \"created\",\n        \"op\": \"within_days\",\n        \"value\": 30\n      }\n    ]\n  },\n  \"limit\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/segments/preview",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "segments",
                    "preview"
                  ]
                },
                "description": "How many contacts a filter matches, plus a sample (max 50), without saving it.\n\nDocs: https://chatkomodo.com/docs/api/crm/#post-v1-crm-segments-preview"
              }
            },
            {
              "name": "Update a segment",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"VIP customers\",\n  \"filter\": {\n    \"match\": \"all\",\n    \"rules\": [\n      {\n        \"field\": \"tag\",\n        \"op\": \"has\",\n        \"value\": \"vip\"\n      }\n    ]\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/segments/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "segments",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Rename a segment and/or change its filter.\n\nDocs: https://chatkomodo.com/docs/api/crm/#put-v1-crm-segments-id"
              }
            },
            {
              "name": "Delete a segment",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/segments/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "segments",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Delete a segment (its contacts are not touched).\n\nDocs: https://chatkomodo.com/docs/api/crm/#delete-v1-crm-segments-id"
              }
            },
            {
              "name": "List the contacts of a segment",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/segments/:id/contacts",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "segments",
                    ":id",
                    "contacts"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "The contacts currently matching a segment.\n\nDocs: https://chatkomodo.com/docs/api/crm/#get-v1-crm-segments-id-contacts"
              }
            },
            {
              "name": "Get the contact card of a number",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/contacts/by-phone/:phone",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "contacts",
                    "by-phone",
                    ":phone"
                  ],
                  "variable": [
                    {
                      "key": "phone",
                      "value": "447700900123"
                    }
                  ]
                },
                "description": "The contact card of one number (used by the inbox sidebar): the saved contact, if any, and its consent state.\n\nDocs: https://chatkomodo.com/docs/api/crm/#get-v1-crm-contacts-by-phone-phone"
              }
            },
            {
              "name": "Create or update a contact by number",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Sam Carter\",\n  \"add_tags\": [\n    \"vip\"\n  ],\n  \"attrs\": {\n    \"plan\": \"Pro\"\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/crm/contacts/by-phone/:phone",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "crm",
                    "contacts",
                    "by-phone",
                    ":phone"
                  ],
                  "variable": [
                    {
                      "key": "phone",
                      "value": "447700900123"
                    }
                  ]
                },
                "description": "Create or update the contact for a number (upsert). `tags` replaces, `add_tags` / `remove_tags` modify. For `attrs`, an empty string removes a key; values are strings of up to 500 characters and typed attributes are validated against the field definitions.\n\nDocs: https://chatkomodo.com/docs/api/crm/#put-v1-crm-contacts-by-phone-phone"
              }
            }
          ]
        },
        {
          "name": "Consent",
          "description": "Who agreed to be messaged and who asked to stop. Replies such as STOP opt people out automatically; broadcasts skip them.",
          "item": [
            {
              "name": "List consent records",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/consent",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "consent"
                  ]
                },
                "description": "Who agreed to be messaged and who asked to stop, newest change first, with totals.\n\nDocs: https://chatkomodo.com/docs/api/consent/#get-v1-consent"
              }
            },
            {
              "name": "Get the consent settings",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/consent/config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "consent",
                    "config"
                  ]
                },
                "description": "Opt-out keywords, confirmation replies and enforcement settings.\n\nDocs: https://chatkomodo.com/docs/api/consent/#get-v1-consent-config"
              }
            },
            {
              "name": "Update the consent settings",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enabled\": true,\n  \"optout_keywords\": [\n    \"stop\",\n    \"unsubscribe\"\n  ],\n  \"enforce_api\": true,\n  \"require_attestation\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/consent/config",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "consent",
                    "config"
                  ]
                },
                "description": "Update the consent configuration (partial update). Account owner only.\n\nDocs: https://chatkomodo.com/docs/api/consent/#put-v1-consent-config"
              }
            },
            {
              "name": "Export consent records (CSV)",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/consent/export",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "consent",
                    "export"
                  ]
                },
                "description": "Download all consent records as CSV (`phone,status,source,note,updated_at`).\n\nDocs: https://chatkomodo.com/docs/api/consent/#get-v1-consent-export"
              }
            },
            {
              "name": "Set consent for many numbers",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"phones\": [\n    \"+447700900123\",\n    \"+12025550123\"\n  ],\n  \"status\": \"opted_out\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/consent/bulk",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "consent",
                    "bulk"
                  ]
                },
                "description": "Set the consent status of up to 10 000 numbers at once (e.g. importing a suppression list).\n\nDocs: https://chatkomodo.com/docs/api/consent/#post-v1-consent-bulk"
              }
            },
            {
              "name": "Get the consent history of a number",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/consent/history/:phone",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "consent",
                    "history",
                    ":phone"
                  ],
                  "variable": [
                    {
                      "key": "phone",
                      "value": "447700900123"
                    }
                  ]
                },
                "description": "The append-only consent history of one person (the proof of consent).\n\nDocs: https://chatkomodo.com/docs/api/consent/#get-v1-consent-history-phone"
              }
            },
            {
              "name": "Opt a number in or out",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"status\": \"opted_out\",\n  \"note\": \"Asked to stop by email\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/consent/:phone",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "consent",
                    ":phone"
                  ],
                  "variable": [
                    {
                      "key": "phone",
                      "value": "447700900123"
                    }
                  ]
                },
                "description": "Opt one person in or out.\n\nDocs: https://chatkomodo.com/docs/api/consent/#put-v1-consent-phone"
              }
            }
          ]
        },
        {
          "name": "Privacy",
          "description": "Export or erase everything held about one person, and how long message content is kept.",
          "item": [
            {
              "name": "Export the data of one person",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/privacy/contact?phone=%2B447700900123",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "privacy",
                    "contact"
                  ],
                  "query": [
                    {
                      "key": "phone",
                      "value": "+447700900123"
                    }
                  ]
                },
                "description": "Export everything held about one person (data-subject access request): consent and its history, contacts, messages (up to 5 000), inbox, assignments, blast participation, scheduled and recurring messages, satisfaction answers. Account owner or API key only.\n\nDocs: https://chatkomodo.com/docs/api/privacy/#get-v1-privacy-contact"
              }
            },
            {
              "name": "Erase the data of one person",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"phone\": \"+447700900123\",\n  \"confirm\": \"+447700900123\",\n  \"keep_suppression\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/privacy/contact",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "privacy",
                    "contact"
                  ]
                },
                "description": "Erase everything held about one person (right to erasure). Irreversible. `confirm` must repeat the phone number, otherwise the call fails with 400 `CONFIRMATION_REQUIRED`. By default an opt-out record is kept so the person is not messaged again (`keep_suppression: false` removes it too). Account owner or API key only.\n\nDocs: https://chatkomodo.com/docs/api/privacy/#delete-v1-privacy-contact"
              }
            },
            {
              "name": "Get the message retention",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/privacy/retention",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "privacy",
                    "retention"
                  ]
                },
                "description": "How long message content is kept.\n\nDocs: https://chatkomodo.com/docs/api/privacy/#get-v1-privacy-retention"
              }
            },
            {
              "name": "Set the message retention",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"message_days\": 90\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/privacy/retention",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "privacy",
                    "retention"
                  ]
                },
                "description": "Set the message retention period in days (between `min_days` and `max_days`), or `null` for the platform default. Account owner only.\n\nDocs: https://chatkomodo.com/docs/api/privacy/#put-v1-privacy-retention"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Integrations",
      "item": [
        {
          "name": "Webhooks",
          "description": "Endpoints that manage your outbound webhooks. The [webhooks guide](/docs/webhooks) explains events, signatures and retries.",
          "item": [
            {
              "name": "List webhooks",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/webhooks",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "webhooks"
                  ]
                },
                "description": "List webhooks for the calling tenant.\n\nDocs: https://chatkomodo.com/docs/api/webhooks/#get-v1-webhooks"
              }
            },
            {
              "name": "Create a webhook",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"url\": \"https://example.com/webhooks/chatkomodo\",\n  \"secret\": \"a-long-random-secret-of-32-characters-or-more\",\n  \"events\": [\n    \"message.received\",\n    \"message.failed\",\n    \"session.disconnected\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/webhooks",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "webhooks"
                  ]
                },
                "description": "Register an outbound webhook. URL must be HTTPS, secret must be ≥32 chars. HMAC-SHA256 signed.\n\nDocs: https://chatkomodo.com/docs/api/webhooks/#post-v1-webhooks"
              }
            },
            {
              "name": "List webhook deliveries",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/webhooks/deliveries?limit=50",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "webhooks",
                    "deliveries"
                  ],
                  "query": [
                    {
                      "key": "limit",
                      "value": "50"
                    }
                  ]
                },
                "description": "Delivery log, newest first: one row per event and webhook, updated on every attempt. Use it to see why an endpoint is not receiving events.\n\nDocs: https://chatkomodo.com/docs/api/webhooks/#get-v1-webhooks-deliveries"
              }
            },
            {
              "name": "Update a webhook",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"events\": [\n    \"message.received\",\n    \"message.failed\"\n  ],\n  \"disabled\": false\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/webhooks/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "webhooks",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Changes the URL, secret, event list and/or the paused state of a webhook. A new URL goes through the same HTTPS and private-address checks as on creation. Send only the fields to change.\n\nDocs: https://chatkomodo.com/docs/api/webhooks/#patch-v1-webhooks-id"
              }
            },
            {
              "name": "Delete a webhook",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/webhooks/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "webhooks",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Permanently deletes a webhook; no further events are delivered to it.\n\nDocs: https://chatkomodo.com/docs/api/webhooks/#delete-v1-webhooks-id"
              }
            },
            {
              "name": "Send a test event to a webhook",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/webhooks/:id/test",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "webhooks",
                    ":id",
                    "test"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Sends a signed `webhook.test` event to the webhook URL (10 second timeout) and reports the outcome. The attempt is recorded in the delivery log and is never retried. An unreachable or failing endpoint still returns HTTP 200 with `ok: false`.\n\nDocs: https://chatkomodo.com/docs/api/webhooks/#post-v1-webhooks-id-test"
              }
            }
          ]
        },
        {
          "name": "Live events (SSE)",
          "description": "A Server-Sent Events stream of the same events, for dashboards and live tools.",
          "item": [
            {
              "name": "Get a ticket for the event stream",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/events-ticket",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "events-ticket"
                  ]
                },
                "description": "A single-use ticket for opening the event stream without putting the bearer token in a URL. Call it with your usual `Authorization` header, then open `GET /v1/events?ticket=…` (the returned `url`) with `EventSource` within 60 seconds.\n\nDocs: https://chatkomodo.com/docs/api/events/#post-v1-events-ticket"
              }
            },
            {
              "name": "Open the event stream (SSE)",
              "request": {
                "method": "GET",
                "auth": {
                  "type": "noauth"
                },
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/events",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "events"
                  ]
                },
                "description": "Server-Sent Events (`text/event-stream`) for the calling business: each event has a name and a JSON `data` line. Names: the webhook events (`message.received`, `message.sent`, `message.failed`, `session.connected`, `session.disconnected`, `session.alert`, `qr.generated`, with the same envelope as webhooks) plus `blast.progress`, `blast.waiting`, `blast.paused`, `blast.completed`, `scheduled.sent` and `recurring.executed`. Authenticate with `?ticket=` from `POST /v1/events-ticket` (single use, valid 60 seconds; API keys are never accepted in the URL). Keys limited to some sessions cannot open the stream. Reconnect when the connection drops; events sent while disconnected are not replayed (use webhooks for guaranteed delivery).\n\nDocs: https://chatkomodo.com/docs/api/events/#get-v1-events"
              }
            }
          ]
        },
        {
          "name": "Online stores",
          "description": "Shopify and WooCommerce order notifications: connect a store, edit the messages, test, and the signed webhook the store calls.",
          "item": [
            {
              "name": "List connected stores",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/store-integrations",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "store-integrations"
                  ]
                },
                "description": "Connected online stores. Each store sends its order webhooks to `webhook_url`; the customer gets a WhatsApp message from `session_id`: new order (`order_created`), payment received (`order_paid`), shipped with tracking (`order_shipped`) and, for Shopify, a reminder for an unfinished checkout (`abandoned_checkout`, after `abandoned_delay_min`, cancelled when the order arrives). Each message goes once per order through the scheduled queue, so sending limits and opt-outs apply. Owner login only.\n\nDocs: https://chatkomodo.com/docs/api/stores/#get-v1-store-integrations"
              }
            },
            {
              "name": "Connect a store",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"platform\": \"woocommerce\",\n  \"name\": \"Kopi Kita\",\n  \"session_id\": \"{{deviceId}}\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/store-integrations",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "store-integrations"
                  ]
                },
                "description": "Connect a store (at most 5). Shopify: create the webhooks in Shopify (Settings → Notifications → Webhooks, JSON) with `webhook_url`, then save the signing secret Shopify shows there with `PUT … {secret}`. WooCommerce: a strong `secret` is generated and returned once — paste it as the webhook secret in WooCommerce (Settings → Advanced → Webhooks, topics Order created / Order updated). Audited as `store.connect`.\n\nDocs: https://chatkomodo.com/docs/api/stores/#post-v1-store-integrations"
              }
            },
            {
              "name": "Update a store connection",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"templates\": {\n    \"order_paid\": {\n      \"enabled\": true,\n      \"text\": \"Hi {name}, we received {total} for order {order}. Thank you!\"\n    }\n  },\n  \"abandoned_delay_min\": 60\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/store-integrations/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "store-integrations",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Change any of `name`, `session_id` (null = none), `secret` (blank keeps it), `enabled`, `templates` (any subset of the four messages), `abandoned_delay_min` (15–2880), `abandoned_only_marketing` (remind only buyers who accepted marketing). Audited as `store.update`.\n\nDocs: https://chatkomodo.com/docs/api/stores/#put-v1-store-integrations-id"
              }
            },
            {
              "name": "Disconnect a store",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/store-integrations/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "store-integrations",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Disconnect a store: its link stops working and waiting checkout reminders are dropped. Audited as `store.disconnect`.\n\nDocs: https://chatkomodo.com/docs/api/stores/#delete-v1-store-integrations-id"
              }
            },
            {
              "name": "List recent store events",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/store-integrations/:id/events",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "store-integrations",
                    ":id",
                    "events"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "The last 50 webhooks from the store and what was done: `sent`, `scheduled` / `rescheduled` / `cancelled` (checkout reminders), `duplicate`, `off` (message switched off), `no_phone`, `no_session`, `not_marketing`, `ignored`. Kept 30 days.\n\nDocs: https://chatkomodo.com/docs/api/stores/#get-v1-store-integrations-id-events"
              }
            },
            {
              "name": "Send a test store message",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"phone\": \"+447700900123\",\n  \"event\": \"order_shipped\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/store-integrations/:id/test",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "store-integrations",
                    ":id",
                    "test"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Send one message (`event`, default `order_created`) filled with a sample order to `phone`, through the queue. 10 per hour per store.\n\nDocs: https://chatkomodo.com/docs/api/stores/#post-v1-store-integrations-id-test"
              }
            },
            {
              "name": "Receive a store webhook",
              "request": {
                "method": "POST",
                "auth": {
                  "type": "noauth"
                },
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/hooks/store/:token",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "hooks",
                    "store",
                    ":token"
                  ],
                  "variable": [
                    {
                      "key": "token",
                      "value": "YOUR_STORE_TOKEN"
                    }
                  ]
                },
                "description": "Where Shopify / WooCommerce send order webhooks (`webhook_url`). No bearer token: the body must be signed with the store's secret (HMAC-SHA256, base64) in `X-Shopify-Hmac-Sha256` or `X-WC-Webhook-Signature`; the topic comes from `X-Shopify-Topic` / `X-WC-Webhook-Topic`. WooCommerce's address check (`webhook_id=<n>`) is answered with 200. Shopify topics: orders/create, orders/paid, orders/fulfilled, orders/partially_fulfilled, fulfillments/create, fulfillments/update, checkouts/create, checkouts/update, checkouts/delete, orders/cancelled. WooCommerce: order.created, order.updated (processing = paid, completed = shipped; tracking from Shipment Tracking / AfterShip order meta).\n\nDocs: https://chatkomodo.com/docs/api/stores/#post-hooks-store-token"
              }
            }
          ]
        },
        {
          "name": "API keys",
          "description": "Child keys for separate integrations, each with its own request limit and optional device scope. Managed from a dashboard login.",
          "item": [
            {
              "name": "List API keys",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/api-keys",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "api-keys"
                  ]
                },
                "description": "Lists the tenant's primary key and its child keys (primary first, then newest first, max 1 000), revoked ones included. Only the 8-character `prefix` is returned, never the key itself. Readable with an API key as well as from a dashboard login.\n\nDocs: https://chatkomodo.com/docs/api/api-keys/#get-v1-api-keys"
              }
            },
            {
              "name": "Create a child API key",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Shop integration\",\n  \"rate_limit_per_minute\": 50\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/api-keys",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "api-keys"
                  ]
                },
                "description": "Creates a child key that acts as the tenant (same devices, quota, plan and settings) but has its own per-minute request limit and can be revoked on its own. The full key is returned once, in this response only. Needs a dashboard login: an API key cannot mint keys. With the platform admin secret the new key is a separate standalone tenant on the Free plan instead.\n\nDocs: https://chatkomodo.com/docs/api/api-keys/#post-v1-api-keys"
              }
            },
            {
              "name": "Rename a key or change its rate limit",
              "request": {
                "method": "PATCH",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Shop integration\",\n  \"rate_limit_per_minute\": 50\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/api-keys/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "api-keys",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Updates the name and/or the per-minute rate limit of the tenant's primary key or one of its child keys. The rate limit is the number of requests per minute the key may make with its API key; it is capped to the plan ceiling (5 times the plan's send rate per minute, at least 300), the response returns the value that was applied, and a change takes effect on the next request. Needs a dashboard login.\n\nDocs: https://chatkomodo.com/docs/api/api-keys/#patch-v1-api-keys-id"
              }
            },
            {
              "name": "Revoke a child API key (alias)",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/api-keys/:id",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "api-keys",
                    ":id"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Alias of `POST /v1/api-keys/{id}/revoke`: the key is revoked, not removed, and stays in the list with `revoked_at` set. The primary key cannot be revoked. Needs a dashboard login.\n\nDocs: https://chatkomodo.com/docs/api/api-keys/#delete-v1-api-keys-id"
              }
            },
            {
              "name": "Revoke a child API key",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/api-keys/:id/revoke",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "api-keys",
                    ":id",
                    "revoke"
                  ],
                  "variable": [
                    {
                      "key": "id",
                      "value": "ID"
                    }
                  ]
                },
                "description": "Revokes one of the tenant's child keys: it stops authenticating immediately. The key stays in the list with `revoked_at` set. The primary key cannot be revoked. Same effect as `DELETE /v1/api-keys/{id}`. Needs a dashboard login.\n\nDocs: https://chatkomodo.com/docs/api/api-keys/#post-v1-api-keys-id-revoke"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "WhatsApp features",
      "item": [
        {
          "name": "Groups",
          "description": "Groups of a connected device: list, create, rename, members, admins, invite link, disappearing messages.",
          "item": [
            {
              "name": "List groups",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups"
                  ]
                },
                "description": "Groups the account participates in, sorted by name. The list is empty when the session has no live connection or WhatsApp does not answer within 8 seconds (such failures are not reported as errors).\n\nDocs: https://chatkomodo.com/docs/api/groups/#get-v1-sessions-sessionid-groups"
              }
            },
            {
              "name": "Create a group",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"subject\": \"Support team\",\n  \"participants\": [\n    \"+447700900123\",\n    \"+12025550123\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/create",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    "create"
                  ]
                },
                "description": "Creates a WhatsApp group with the given members.\n\nDocs: https://chatkomodo.com/docs/api/groups/#post-v1-sessions-sessionid-groups-create"
              }
            },
            {
              "name": "Get group details",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/metadata",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "metadata"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Returns the metadata WhatsApp holds for the group, including its participants.\n\nDocs: https://chatkomodo.com/docs/api/groups/#get-v1-sessions-sessionid-groups-gid-metadata"
              }
            },
            {
              "name": "Rename a group",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"subject\": \"Support team\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/subject",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "subject"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Changes the group name.\n\nDocs: https://chatkomodo.com/docs/api/groups/#put-v1-sessions-sessionid-groups-gid-subject"
              }
            },
            {
              "name": "Change a group description",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"description\": \"Short description\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/description",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "description"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Changes the group description.\n\nDocs: https://chatkomodo.com/docs/api/groups/#put-v1-sessions-sessionid-groups-gid-description"
              }
            },
            {
              "name": "Set group disappearing messages",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"expiration\": 604800\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/ephemeral",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "ephemeral"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Turns the disappearing-messages timer of the group on or off on WhatsApp.\n\nDocs: https://chatkomodo.com/docs/api/groups/#put-v1-sessions-sessionid-groups-gid-ephemeral"
              }
            },
            {
              "name": "Get the group invite link",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/invite",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "invite"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Returns the current invite link of the group.\n\nDocs: https://chatkomodo.com/docs/api/groups/#get-v1-sessions-sessionid-groups-gid-invite"
              }
            },
            {
              "name": "Leave a group",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/leave",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "leave"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Makes the account leave the group.\n\nDocs: https://chatkomodo.com/docs/api/groups/#post-v1-sessions-sessionid-groups-gid-leave"
              }
            },
            {
              "name": "Add group members",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"participants\": [\n    \"+447700900123\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/participants/add",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "participants",
                    "add"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Adds members to the group. The per-member outcome returned by WhatsApp is passed through in `result`.\n\nDocs: https://chatkomodo.com/docs/api/groups/#post-v1-sessions-sessionid-groups-gid-participants-add"
              }
            },
            {
              "name": "Remove group members",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"participants\": [\n    \"+447700900123\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/participants/remove",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "participants",
                    "remove"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Removes members from the group. The per-member outcome returned by WhatsApp is passed through in `result`.\n\nDocs: https://chatkomodo.com/docs/api/groups/#post-v1-sessions-sessionid-groups-gid-participants-remove"
              }
            },
            {
              "name": "Make members group admins",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"participants\": [\n    \"+447700900123\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/participants/promote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "participants",
                    "promote"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Promotes members to group admin.\n\nDocs: https://chatkomodo.com/docs/api/groups/#post-v1-sessions-sessionid-groups-gid-participants-promote"
              }
            },
            {
              "name": "Remove group admin rights",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"participants\": [\n    \"+447700900123\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/participants/demote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "participants",
                    "demote"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Demotes group admins to regular members.\n\nDocs: https://chatkomodo.com/docs/api/groups/#post-v1-sessions-sessionid-groups-gid-participants-demote"
              }
            },
            {
              "name": "Change group members",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"action\": \"add\",\n  \"participants\": [\n    \"+447700900123\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/groups/:gid/participants",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "groups",
                    ":gid",
                    "participants"
                  ],
                  "variable": [
                    {
                      "key": "gid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Adds, removes, promotes or demotes members with one endpoint. The same actions exist as separate `…/participants/add|remove|promote|demote` calls; the add and remove variants return the per-member `result`, this one only `ok`.\n\nDocs: https://chatkomodo.com/docs/api/groups/#post-v1-sessions-sessionid-groups-gid-participants"
              }
            }
          ]
        },
        {
          "name": "Communities",
          "item": [
            {
              "name": "Create a community",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"subject\": \"Support team\",\n  \"body\": \"Hi Sam, your order has shipped.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/communities/create",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "communities",
                    "create"
                  ]
                },
                "description": "Creates a WhatsApp community. WhatsApp may answer with no group data, in which case the response body is `null`.\n\nDocs: https://chatkomodo.com/docs/api/communities/#post-v1-sessions-sessionid-communities-create"
              }
            },
            {
              "name": "Link a group to a community",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"group_jid\": \"120363012345678901@g.us\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/communities/:cid/link-group",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "communities",
                    ":cid",
                    "link-group"
                  ],
                  "variable": [
                    {
                      "key": "cid",
                      "value": "120363012345678901@g.us"
                    }
                  ]
                },
                "description": "Not available yet: the WhatsApp library version in use (Baileys 6.7.23) has no `communityLinkGroup` method, so this answers 501 `NOT_SUPPORTED`. The request shape is the one the handler reads.\n\nDocs: https://chatkomodo.com/docs/api/communities/#post-v1-sessions-sessionid-communities-cid-link-group"
              }
            }
          ]
        },
        {
          "name": "Channels",
          "description": "WhatsApp channels (newsletters).",
          "item": [
            {
              "name": "Create a channel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme news\",\n  \"description\": \"Short description\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/newsletter/create",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "newsletter",
                    "create"
                  ]
                },
                "description": "Creates a WhatsApp channel (newsletter).\n\nDocs: https://chatkomodo.com/docs/api/channels/#post-v1-sessions-sessionid-newsletter-create"
              }
            },
            {
              "name": "Post to a channel",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"text\": \"This week only: 20% off all coffee beans.\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/newsletter/:nid/post",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "newsletter",
                    ":nid",
                    "post"
                  ],
                  "variable": [
                    {
                      "key": "nid",
                      "value": "120363098765432109@newsletter"
                    }
                  ]
                },
                "description": "Sends a text post to a channel straight through the WhatsApp connection (not queued, not logged in the message history).\n\nDocs: https://chatkomodo.com/docs/api/channels/#post-v1-sessions-sessionid-newsletter-nid-post"
              }
            }
          ]
        },
        {
          "name": "Status",
          "description": "Post WhatsApp Status updates (stories).",
          "item": [
            {
              "name": "Post a Status update",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"type\": \"text\",\n  \"body\": \"New menu this week 🍜\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/status",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "status"
                  ]
                },
                "description": "Posts a text or media Status update through the normal send pipeline (pacing and monthly quota apply). The response only confirms that the request was handed over, not the delivery result.\n\nDocs: https://chatkomodo.com/docs/api/status/#post-v1-sessions-sessionid-status"
              }
            },
            {
              "name": "Post a text Status",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"text\": \"New menu this week 🍜\",\n  \"background_color\": \"#0a7350\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/status/text",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "status",
                    "text"
                  ]
                },
                "description": "Posts a text Status straight through the WhatsApp connection (not queued, not logged in the message history).\n\nDocs: https://chatkomodo.com/docs/api/status/#post-v1-sessions-sessionid-status-text"
              }
            },
            {
              "name": "Post an image Status",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"image_url\": \"https://example.com/new-menu.jpg\",\n  \"caption\": \"New menu this week 🍜\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/status/image",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "status",
                    "image"
                  ]
                },
                "description": "Downloads an image from a public URL (max 5 MB, 15-second limit, private addresses refused) and posts it as a Status straight through the WhatsApp connection (not queued, not logged in the message history).\n\nDocs: https://chatkomodo.com/docs/api/status/#post-v1-sessions-sessionid-status-image"
              }
            }
          ]
        },
        {
          "name": "WhatsApp account",
          "item": [
            {
              "name": "Send a presence update",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"type\": \"available\",\n  \"jid\": \"447700900123@s.whatsapp.net\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/presence",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "presence"
                  ]
                },
                "description": "Sets the presence of the account, or shows \"typing\" or \"recording\" in a chat.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-account/#post-v1-sessions-sessionid-presence"
              }
            },
            {
              "name": "Get WhatsApp privacy settings",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/privacy",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "privacy"
                  ]
                },
                "description": "Fetches the privacy settings of the account from WhatsApp. The result is a map of setting name to value exactly as WhatsApp returns it. For data-subject export and erasure see the `privacy` tag.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-account/#get-v1-sessions-sessionid-privacy"
              }
            },
            {
              "name": "Set read receipts privacy",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"value\": \"all\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/privacy/read-receipts",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "privacy",
                    "read-receipts"
                  ]
                },
                "description": "Turns read receipts on or off for the account.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-account/#put-v1-sessions-sessionid-privacy-read-receipts"
              }
            },
            {
              "name": "Set online visibility privacy",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"value\": \"all\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/privacy/online",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "privacy",
                    "online"
                  ]
                },
                "description": "Controls who can see when the account is online.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-account/#put-v1-sessions-sessionid-privacy-online"
              }
            },
            {
              "name": "Set a profile picture",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"jid\": \"447700900123@s.whatsapp.net\",\n  \"image_url\": \"https://example.com/file.jpg\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/profile/picture",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "profile",
                    "picture"
                  ]
                },
                "description": "Downloads an image from a public URL (max 5 MB, 15-second limit, private addresses refused) and sets it as the picture of the account or of a group.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-account/#put-v1-sessions-sessionid-profile-picture"
              }
            },
            {
              "name": "Set the About text",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"status\": \"Open Mon–Sat 9:00–17:00\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/profile/status",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "profile",
                    "status"
                  ]
                },
                "description": "Changes the About (status text) of the account.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-account/#put-v1-sessions-sessionid-profile-status"
              }
            },
            {
              "name": "Turn call auto-reject on or off",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enabled\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/calls/auto-reject",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "calls",
                    "auto-reject"
                  ]
                },
                "description": "When on, incoming WhatsApp call offers on this session are rejected automatically. The setting is stored without contacting WhatsApp, so it also works while the session is offline; only the value `true` turns it on.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-account/#post-v1-sessions-sessionid-calls-auto-reject"
              }
            }
          ]
        },
        {
          "name": "WhatsApp Business",
          "item": [
            {
              "name": "Update the business profile",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"description\": \"Gentle dental care in central Jakarta\",\n  \"email\": \"hello@example.com\",\n  \"websites\": [\n    \"https://example.com\"\n  ],\n  \"hours\": {\n    \"timezone\": \"Asia/Jakarta\",\n    \"days\": [\n      {\n        \"day\": \"mon\",\n        \"mode\": \"specific_hours\",\n        \"open\": \"09:00\",\n        \"close\": \"17:00\"\n      },\n      {\n        \"day\": \"sat\",\n        \"mode\": \"appointment_only\"\n      }\n    ]\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/business/profile",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "business",
                    "profile"
                  ]
                },
                "description": "Changes the WhatsApp Business profile of the device: description, address, e-mail, websites and opening hours. Only the fields you send change; give at least one. Unknown fields are rejected. A device on the ordinary WhatsApp app (not WhatsApp Business) answers 409 `NOT_A_BUSINESS_ACCOUNT`.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-business/#put-v1-sessions-sessionid-business-profile"
              }
            },
            {
              "name": "List catalog products",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/business/catalog",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "business",
                    "catalog"
                  ]
                },
                "description": "Fetches up to 100 products of a business catalog from WhatsApp. There is no paging parameter, so `nextPageCursor` cannot be followed.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-business/#get-v1-sessions-sessionid-business-catalog"
              }
            },
            {
              "name": "Create a catalog product",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Iced coffee 250 ml\",\n  \"description\": \"Short description\",\n  \"price\": 150000,\n  \"currency\": \"IDR\",\n  \"images\": [\n    {\n      \"url\": \"https://example.com/file.jpg\"\n    }\n  ],\n  \"retailerId\": \"SKU-1042\",\n  \"url\": \"https://example.com/file.jpg\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/business/catalog/products",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "business",
                    "catalog",
                    "products"
                  ]
                },
                "description": "Creates a product in the catalog of the account. Each image is downloaded by the gateway through the outbound-URL guard (http/https only, max 5 MB, no private or local addresses) and uploaded as bytes; anything else in `images` is a 400. The remaining fields are passed unchanged to the WhatsApp library and not validated by the gateway; they follow the library's product type.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-business/#post-v1-sessions-sessionid-business-catalog-products"
              }
            },
            {
              "name": "Delete catalog products",
              "request": {
                "method": "DELETE",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"product_ids\": [\n    \"01JA5V6Q8M2H7G4K9P3T0R1S2X\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/business/catalog/products",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "business",
                    "catalog",
                    "products"
                  ]
                },
                "description": "Deletes products from the catalog; the ids travel in the JSON body of this DELETE request.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-business/#delete-v1-sessions-sessionid-business-catalog-products"
              }
            },
            {
              "name": "Update a catalog product",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Iced coffee 250 ml\",\n  \"description\": \"Short description\",\n  \"price\": 150000,\n  \"currency\": \"IDR\",\n  \"images\": [\n    {\n      \"url\": \"https://example.com/file.jpg\"\n    }\n  ],\n  \"retailerId\": \"SKU-1042\",\n  \"url\": \"https://example.com/file.jpg\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/business/catalog/products/:pid",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "business",
                    "catalog",
                    "products",
                    ":pid"
                  ],
                  "variable": [
                    {
                      "key": "pid",
                      "value": "7012345678901234"
                    }
                  ]
                },
                "description": "Updates a catalog product. Images are handled as in `POST …/business/catalog/products` (downloaded by the gateway, never fetched from a URL by the library). The remaining fields are passed unchanged to the WhatsApp library and not validated by the gateway.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-business/#put-v1-sessions-sessionid-business-catalog-products-pid"
              }
            },
            {
              "name": "List WhatsApp Business labels",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/labels",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "labels"
                  ]
                },
                "description": "Not available yet: the WhatsApp library version in use (Baileys 6.7.23) has no `getLabels` method, so this answers 501 `NOT_SUPPORTED`. The handler would return `{ \"labels\": [...] }`.\n\nDocs: https://chatkomodo.com/docs/api/whatsapp-business/#get-v1-sessions-sessionid-labels"
              }
            }
          ]
        },
        {
          "name": "Blocklist",
          "item": [
            {
              "name": "List blocked recipients",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blocklist",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blocklist"
                  ]
                },
                "description": "Recipients this session must not send to, newest first (max 10 000). This is the gateway's own list; the list kept by WhatsApp is at `GET …/wa-blocklist`.\n\nDocs: https://chatkomodo.com/docs/api/blocklist/#get-v1-sessions-sessionid-blocklist"
              }
            },
            {
              "name": "Block a recipient",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"chat_id\": \"+447700900123\",\n  \"reason\": \"opt-out\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blocklist",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blocklist"
                  ]
                },
                "description": "Adds a chat to the session blocklist (an existing entry is replaced). Sends from this session to a blocked chat are not delivered and come back with status `blocked`. This does not block the contact on WhatsApp; see `POST …/block` for that.\n\nDocs: https://chatkomodo.com/docs/api/blocklist/#post-v1-sessions-sessionid-blocklist"
              }
            },
            {
              "name": "Unblock a recipient",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/blocklist/:chatId",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "blocklist",
                    ":chatId"
                  ],
                  "variable": [
                    {
                      "key": "chatId",
                      "value": "447700900123@s.whatsapp.net"
                    }
                  ]
                },
                "description": "Removes a chat from the session blocklist. Answers 200 with `deleted: 0` when it was not listed.\n\nDocs: https://chatkomodo.com/docs/api/blocklist/#delete-v1-sessions-sessionid-blocklist-chatid"
              }
            },
            {
              "name": "Block a contact on WhatsApp",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"jid\": \"447700900123@s.whatsapp.net\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/block",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "block"
                  ]
                },
                "description": "Blocks a contact in the WhatsApp account itself. This is separate from the gateway recipient blocklist.\n\nDocs: https://chatkomodo.com/docs/api/blocklist/#post-v1-sessions-sessionid-block"
              }
            },
            {
              "name": "Unblock a contact on WhatsApp",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"jid\": \"447700900123@s.whatsapp.net\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/unblock",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "unblock"
                  ]
                },
                "description": "Removes a contact from the block list of the WhatsApp account itself.\n\nDocs: https://chatkomodo.com/docs/api/blocklist/#post-v1-sessions-sessionid-unblock"
              }
            },
            {
              "name": "List contacts blocked on WhatsApp",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/sessions/{{deviceId}}/wa-blocklist",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "sessions",
                    "{{deviceId}}",
                    "wa-blocklist"
                  ]
                },
                "description": "Fetches the block list of the WhatsApp account from WhatsApp. The gateway recipient blocklist is at `GET …/blocklist`.\n\nDocs: https://chatkomodo.com/docs/api/blocklist/#get-v1-sessions-sessionid-wa-blocklist"
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Account",
      "item": [
        {
          "name": "Business profile",
          "item": [
            {
              "name": "Get the business profile",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/profile",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "profile"
                  ]
                },
                "description": "The business profile of the calling tenant: where the business operates, its timezone, language, industry and billing currency.\n\nDocs: https://chatkomodo.com/docs/api/profile/#get-v1-profile"
              }
            },
            {
              "name": "Update the business profile",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"business_name\": \"Acme Retail\",\n  \"country\": \"GB\",\n  \"timezone\": \"Europe/London\",\n  \"locale\": \"en\",\n  \"currency\": \"USD\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/profile",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "profile"
                  ]
                },
                "description": "Update the business profile (partial update). Account owner only.\n\nDocs: https://chatkomodo.com/docs/api/profile/#put-v1-profile"
              }
            },
            {
              "name": "List countries",
              "request": {
                "method": "GET",
                "auth": {
                  "type": "noauth"
                },
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/public/countries",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "public",
                    "countries"
                  ]
                },
                "description": "Public, cacheable list of countries with their calling code and default timezone, for country pickers (login, signup, profile). No authentication.\n\nDocs: https://chatkomodo.com/docs/api/profile/#get-public-countries"
              }
            },
            {
              "name": "List industries",
              "request": {
                "method": "GET",
                "auth": {
                  "type": "noauth"
                },
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/public/industries",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "public",
                    "industries"
                  ]
                },
                "description": "Public list of industries that have an onboarding starter pack. No authentication.\n\nDocs: https://chatkomodo.com/docs/api/profile/#get-public-industries"
              }
            }
          ]
        },
        {
          "name": "Settings",
          "item": [
            {
              "name": "Read a setting",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/settings/:key",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "settings",
                    ":key"
                  ],
                  "variable": [
                    {
                      "key": "key",
                      "value": "uploads/abc123.jpg"
                    }
                  ]
                },
                "description": "Read a tenant setting. Keys: `send_window`, `business_hours`, `welcome_message`, `csat_config`, `chatbot_flows`, `canned_responses`, `typing_delay`. `value` is `null` when never set. **`send_window`**: blast (bulk) sends are only released inside this daily window (default 08:00–20:00 in the business timezone, or in each recipient's own timezone) and wait for the next opening otherwise; 1:1 replies, scheduled and recurring messages are unaffected.\n\nDocs: https://chatkomodo.com/docs/api/settings/#get-v1-settings-key"
              }
            },
            {
              "name": "Write a setting",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"enabled\": true,\n  \"start\": \"09:00\",\n  \"end\": \"18:00\",\n  \"basis\": \"recipient\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/settings/:key",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "settings",
                    ":key"
                  ],
                  "variable": [
                    {
                      "key": "key",
                      "value": "uploads/abc123.jpg"
                    }
                  ]
                },
                "description": "Write a tenant setting. For `send_window` the body is `{enabled, start, end, basis}`; any other key takes its own JSON structure.\n\nDocs: https://chatkomodo.com/docs/api/settings/#put-v1-settings-key"
              }
            },
            {
              "name": "Reset a setting",
              "request": {
                "method": "DELETE",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/settings/:key",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "settings",
                    ":key"
                  ],
                  "variable": [
                    {
                      "key": "key",
                      "value": "uploads/abc123.jpg"
                    }
                  ]
                },
                "description": "Reset a tenant setting to its default.\n\nDocs: https://chatkomodo.com/docs/api/settings/#delete-v1-settings-key"
              }
            }
          ]
        },
        {
          "name": "Analytics & usage",
          "item": [
            {
              "name": "Today's counters",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/stats",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "stats"
                  ]
                },
                "description": "Counters for the dashboard home: devices, messages since midnight (server time), running blasts and active auto-reply rules. Scoped to the tenant.\n\nDocs: https://chatkomodo.com/docs/api/analytics/#get-v1-stats"
              }
            },
            {
              "name": "Plan usage this month",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/usage",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "usage"
                  ]
                },
                "description": "Messages sent and devices used against the plan limits for the current month (UTC), plus what the month would cost in the tenant's billing currency (minor units): plan price and overage beyond the quota.\n\nDocs: https://chatkomodo.com/docs/api/analytics/#get-v1-usage"
              }
            },
            {
              "name": "Message analytics for 7, 30 or 90 days",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/analytics",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "analytics"
                  ]
                },
                "description": "Message counts for the last N days (including today), a per-day series, an inbound heatmap (weekday x hour), the 10 busiest chats and the average time to reply in 1:1 chats. Day boundaries follow the tenant's business timezone. The result is computed at most once a minute per tenant and window (later calls within the minute get the same answer).\n\nDocs: https://chatkomodo.com/docs/api/analytics/#get-v1-analytics"
              }
            },
            {
              "name": "Customer-satisfaction results",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/csat/results",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "csat",
                    "results"
                  ]
                },
                "description": "Ratings (1-5) collected by the satisfaction survey over the last N days: count, average, distribution and the 50 most recent ratings.\n\nDocs: https://chatkomodo.com/docs/api/analytics/#get-v1-csat-results"
              }
            }
          ]
        },
        {
          "name": "Billing",
          "description": "Plans, prices, checkout and invoices.",
          "item": [
            {
              "name": "List plans and prices",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/plans",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "plans"
                  ]
                },
                "description": "Plans with their price in every currency they are sold in. All amounts are **integers in minor units** (cents; IDR has no minor unit), e.g. `{\"IDR\": 99000, \"USD\": 900}`.\n\nDocs: https://chatkomodo.com/docs/api/billing/#get-v1-billing-plans"
              }
            },
            {
              "name": "List payment methods",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/options",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "options"
                  ]
                },
                "description": "How this tenant can pay: only payment methods that are set up are listed. `default_provider` is Pakasir (QRIS, bank, e-wallet; IDR) for Indonesian tenants and the cheapest international method otherwise. `currency` is what each provider would charge for the tenant's plan; it is `null` when the plan has no price in a currency that provider accepts.\n\nDocs: https://chatkomodo.com/docs/api/billing/#get-v1-billing-options"
              }
            },
            {
              "name": "Price a checkout",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"plan_id\": 2,\n  \"provider\": \"creem\",\n  \"currency\": \"USD\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/quote",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "quote"
                  ]
                },
                "description": "Price a checkout without creating anything: the same body as `POST /v1/billing/checkout`. Use it to show the annual saving, check a coupon (400 `COUPON_INVALID` with `reason`: `not_found`, `inactive`, `not_started`, `expired`, `used_up`, `already_used`, `wrong_plan`, `wrong_period`, `wrong_currency`) and show the upgrade credit before paying. `provider` is the method that would be used (null when none is set up).\n\nDocs: https://chatkomodo.com/docs/api/billing/#post-v1-billing-quote"
              }
            },
            {
              "name": "Create an invoice and payment page",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"plan_id\": 2,\n  \"provider\": \"creem\",\n  \"currency\": \"USD\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/checkout",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "checkout"
                  ]
                },
                "description": "Create an invoice and a hosted payment page. Redirect the browser to `pay_url`; the provider sends the buyer back to `/billing?invoice=<order_id>` (or `?cancelled=<order_id>`). Omit `plan_id` to pay the current plan plus any overage for the month; send `plan_id` to buy or switch plans. `billing_period: \"annual\"` buys 12 months for the price of 10 (set by the operator). A `coupon_code` takes a percent or a fixed amount off the plan price (never off overage). Switching to a pricier plan starts it now and credits the unused part of what was paid for the current plan; a cheaper plan starts when the current period ends. Price the same body first with `POST /v1/billing/quote`. `provider` and `currency` default to the best match for the tenant. The plan is activated only after the provider confirms the payment (webhook or `/invoices/{order_id}/confirm`).\n\nDocs: https://chatkomodo.com/docs/api/billing/#post-v1-billing-checkout"
              }
            },
            {
              "name": "List invoices",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/invoices",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "invoices"
                  ]
                },
                "description": "The 24 most recent invoices of the tenant.\n\nDocs: https://chatkomodo.com/docs/api/billing/#get-v1-billing-invoices"
              }
            },
            {
              "name": "Check the payment of an invoice",
              "request": {
                "method": "POST",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/invoices/:order_id/confirm",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "invoices",
                    ":order_id",
                    "confirm"
                  ],
                  "variable": [
                    {
                      "key": "order_id",
                      "value": "INV-20260101-0001"
                    }
                  ]
                },
                "description": "Ask the payment provider about one invoice (call it when the buyer returns from checkout, or when the webhook is late). Rate-limited to one real check per 4 seconds per invoice; faster calls answer `pending` with `retry_after_s`. A `paid` result activates the plan.\n\nDocs: https://chatkomodo.com/docs/api/billing/#post-v1-billing-invoices-order-id-confirm"
              }
            },
            {
              "name": "Get the billing email settings",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/notifications",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "notifications"
                  ]
                },
                "description": "Billing email of the tenant: invoices, payment receipts, \"plan ends in 3 days\" and \"plan ended\" are emailed there (as well as the WhatsApp reminder), in the language of the business profile.\n\nDocs: https://chatkomodo.com/docs/api/billing/#get-v1-billing-notifications"
              }
            },
            {
              "name": "Update the billing email settings",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"email\": \"you@example.com\",\n  \"enabled\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/billing/notifications",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "billing",
                    "notifications"
                  ]
                },
                "description": "Set the billing email (`null` or empty removes it) and/or switch billing emails on or off. Owner login only (403 for agents and API keys). Audited as `billing.notifications`.\n\nDocs: https://chatkomodo.com/docs/api/billing/#put-v1-billing-notifications"
              }
            }
          ]
        },
        {
          "name": "Onboarding",
          "item": [
            {
              "name": "List industry starter packs",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/onboarding/packs",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "onboarding",
                    "packs"
                  ]
                },
                "description": "Industry starter packs (welcome message, business hours, chatbot flows, message templates, CRM fields, segments, satisfaction survey) with what each contains.\n\nDocs: https://chatkomodo.com/docs/api/onboarding/#get-v1-onboarding-packs"
              }
            },
            {
              "name": "Preview a starter pack",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/onboarding/packs/:industry",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "onboarding",
                    "packs",
                    ":industry"
                  ],
                  "variable": [
                    {
                      "key": "industry",
                      "value": "restaurants"
                    }
                  ]
                },
                "description": "Full preview of one pack, in the requested language (default: the business language).\n\nDocs: https://chatkomodo.com/docs/api/onboarding/#get-v1-onboarding-packs-industry"
              }
            },
            {
              "name": "Apply a starter pack",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"industry\": \"retail\",\n  \"parts\": [\n    \"welcome\",\n    \"templates\",\n    \"segments\"\n  ],\n  \"mode\": \"fill\",\n  \"lang\": \"en\",\n  \"set_profile_industry\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/onboarding/apply",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "onboarding",
                    "apply"
                  ]
                },
                "description": "Write a pack into the tenant's own configuration. `fill` (default) only adds what is missing; `replace` overwrites the pack's own items (same setting, template name, field key or segment name).\n\nDocs: https://chatkomodo.com/docs/api/onboarding/#post-v1-onboarding-apply"
              }
            },
            {
              "name": "Get the setup checklist",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/onboarding/status",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "onboarding",
                    "status"
                  ]
                },
                "description": "The setup checklist with live completion.\n\nDocs: https://chatkomodo.com/docs/api/onboarding/#get-v1-onboarding-status"
              }
            },
            {
              "name": "Update the setup checklist",
              "request": {
                "method": "PUT",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"dismissed\": true,\n  \"checked\": {\n    \"consent\": true\n  }\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/v1/onboarding/state",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "onboarding",
                    "state"
                  ]
                },
                "description": "Dismiss the checklist or tick the manual \"consent\" step.\n\nDocs: https://chatkomodo.com/docs/api/onboarding/#put-v1-onboarding-state"
              }
            }
          ]
        },
        {
          "name": "Audit log",
          "item": [
            {
              "name": "Read the tenant audit log",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/audit",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "audit"
                  ]
                },
                "description": "Security-relevant and destructive events of the tenant, newest first, kept for 365 days. Recorded actions — account: `auth.login` (detail `otp`, `totp` or `access_code`), `tenant.self_register`, `profile.update`, `payment.completed`, `payment.rejected`, `payment.unverifiable`, `expiry.reminder_sent`, `billing.notifications`, `ai_reply.update`, `ai_kb.upload`, `ai_kb.delete` (knowledge documents and web pages for AI replies), `ai_kb.faq` (saved answers: detail `add`, `edit`, `delete` or `answer`); stores: `store.connect`, `store.update`, `store.disconnect`; access: `api_key.create`, `api_key.revoke`, `agent.create`, `agent.revoke_sessions`; privacy: `consent.config`, `consent.bulk`, `privacy.export`, `privacy.erase`, `privacy.retention`, `contact.bulk_delete`; devices: `session.create`, `session.delete`; messages: `message.send` (a message sent by a support agent; sends by the owner or through the API are in the message log instead), `message.delete`, `message.edit`, `message.unsend`; campaigns: `blast.create`, `blast.start`, `blast.cancel`, `blast.delete`; webhooks: `webhook.create`, `webhook.update`, `webhook.delete`; inbox: `chat.assign`, `chat.resolve`, and `chat.view` (a support agent opening a chat, recorded at most once an hour per agent and chat). `target` is usually the id of the object concerned and `detail` a short note; message text is never stored and phone numbers in chat ids are masked. Page through older events by passing `next_before` and `next_before_id` of the previous response as `before` and `before_id`; the cursor is a pair because a bulk action writes several events in the same millisecond.\n\nDocs: https://chatkomodo.com/docs/api/audit/#get-v1-audit"
              }
            }
          ]
        },
        {
          "name": "Sign-in & account",
          "description": "Sign-up and dashboard sign-in (one-time code over WhatsApp, access code, authenticator) and `GET /v1/me`. Integrations use an API key instead.",
          "item": [
            {
              "name": "Sign up a new business",
              "request": {
                "method": "POST",
                "auth": {
                  "type": "noauth"
                },
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme Dental\",\n  \"phone\": \"+447700900123\",\n  \"lang\": \"en\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/register",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "register"
                  ]
                },
                "description": "Self-service tenant signup. Creates a new tenant with the Free plan; the business profile (country, timezone, language, billing currency) is inferred from the phone number. Phone number must be unique across all tenants.\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#post-auth-register"
              }
            },
            {
              "name": "Request a sign-in code",
              "request": {
                "method": "POST",
                "auth": {
                  "type": "noauth"
                },
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"phone\": \"+447700900123\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/request-otp",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "request-otp"
                  ]
                },
                "description": "Request a one-time password (OTP) for the given phone. Max 5 requests per 15 min per phone.\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#post-auth-request-otp"
              }
            },
            {
              "name": "Sign in with a one-time code",
              "request": {
                "method": "POST",
                "auth": {
                  "type": "noauth"
                },
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"phone\": \"+447700900123\",\n  \"code\": \"482913\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/verify-otp",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "verify-otp"
                  ]
                },
                "description": "Verify the 6-digit OTP. Returns a JWT (2 hour expiry) and a rotating refresh token (30 days).\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#post-auth-verify-otp"
              }
            },
            {
              "name": "Renew a dashboard login",
              "request": {
                "method": "POST",
                "auth": {
                  "type": "noauth"
                },
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"refresh_token\": \"eyJhbGciOiJIUzI1NiIs…\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/refresh",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "refresh"
                  ]
                },
                "description": "Exchange a valid refresh token for a fresh JWT. The old refresh token is rotated (revoked). Reuse-detection blocks compromised tokens.\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#post-auth-refresh"
              }
            },
            {
              "name": "Who am I",
              "request": {
                "method": "GET",
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/v1/me",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "v1",
                    "me"
                  ]
                },
                "description": "Identity of the caller: the tenant, its plan and business profile, and whether the credential is the owner login (`admin`), a customer-service agent (`agent`) or an API key (`apikey`). With the platform admin secret it returns `is_super: true` and no plan.\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#get-v1-me"
              }
            },
            {
              "name": "Sign in with an access code",
              "request": {
                "method": "POST",
                "auth": {
                  "type": "noauth"
                },
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"code\": \"482913\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/login",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "login"
                  ]
                },
                "description": "Dashboard sign-in with the tenant owner's or a customer-service agent's access code. Returns a JWT valid for 2 hours, to be sent as `Authorization: Bearer <token>`. No refresh token is issued here (sign in with a one-time code via `/auth/verify-otp` to get one). Limited to 10 attempts per 10 minutes per IP address.\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#post-auth-login"
              }
            },
            {
              "name": "Sign out",
              "request": {
                "method": "POST",
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"refresh_token\": \"eyJhbGciOiJIUzI1NiIs…\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/logout",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "logout"
                  ]
                },
                "description": "Ends a dashboard login (owner or agent). Send the refresh token in the body, the access token as `Authorization: Bearer`, or both; at least one is required. The refresh token is deleted and the login session is revoked, so the access token stops working immediately. Idempotent. The bearer token is optional here and only a JWT counts (an API key is ignored).\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#post-auth-logout"
              }
            },
            {
              "name": "Sign in with an authenticator code",
              "request": {
                "method": "POST",
                "auth": {
                  "type": "noauth"
                },
                "header": [
                  {
                    "key": "Content-Type",
                    "value": "application/json"
                  }
                ],
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"phone\": \"+447700900123\",\n  \"code\": \"482913\"\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                },
                "url": {
                  "raw": "{{baseUrl}}/auth/verify-totp",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "auth",
                    "verify-totp"
                  ]
                },
                "description": "Fallback sign-in for a tenant owner when the WhatsApp one-time code cannot be delivered. Needs two-factor authentication to be set up on the account. Accepts the 6-digit code of the previous, current or next 30-second window. Failed codes lock the account for increasing periods (3 failures: 5 minutes, 5: 1 hour, 10: 24 hours) and each IP address is limited to 8 requests per 10 minutes (counted together with `/auth/request-otp` and `/auth/register`). Returns a 2-hour JWT and a refresh token. Customer-service agents cannot use this endpoint.\n\nDocs: https://chatkomodo.com/docs/api/sign-in/#post-auth-verify-totp"
              }
            }
          ]
        },
        {
          "name": "System",
          "item": [
            {
              "name": "Liveness probe",
              "request": {
                "method": "GET",
                "auth": {
                  "type": "noauth"
                },
                "header": [],
                "url": {
                  "raw": "{{baseUrl}}/health",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "health"
                  ]
                },
                "description": "Public, unauthenticated. Returns a fixed status and the API version, and nothing about tenants, sessions or load.\n\nDocs: https://chatkomodo.com/docs/api/system/#get-health"
              }
            }
          ]
        }
      ]
    }
  ]
}