{
  "item": [
    {
      "id": "69205e82-946b-4cff-b9d1-6b7a0dfd33a2",
      "name": "Send Messages",
      "description": {
        "content": "Send RCS messages",
        "type": "text/plain"
      },
      "item": [
        {
          "id": "baf3ca6f-ca19-4cba-bb4c-6800e670c75f",
          "name": "Send RCS message",
          "request": {
            "name": "Send RCS message",
            "description": {
              "content": "Sends an RCS message. The content can be:\n- An **inline body** (`body`) with type TEXT, CARD, or CAROUSEL\n- A **template** (`templateId`)\n\nThe `body` and `templateId` fields are **mutually exclusive**: one of the two is required.\n\n**Fallback:** If the message cannot be delivered via RCS, the system can activate SMS fallback (if `maxSmsParts` is configured).\n",
              "type": "text/plain"
            },
            "url": {
              "path": [
                "message-server",
                "rcs",
                "send"
              ],
              "host": [
                "{{baseUrl}}"
              ],
              "query": [],
              "variable": []
            },
            "header": [
              {
                "key": "Content-Type",
                "value": "application/json"
              },
              {
                "key": "Accept",
                "value": "application/json"
              }
            ],
            "method": "POST",
            "auth": null,
            "body": {
              "mode": "raw",
              "raw": "{\n  \"destination\": \"+393401234567\",\n  \"agentId\": 10,\n  \"body\": {\n    \"type\": \"TEXT\",\n    \"body\": {\n      \"text\": \"Ciao! Il tuo ordine è stato confermato.\"\n    }\n  },\n  \"enableNotification\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          },
          "response": [
            {
              "id": "f8c3ef0b-01c2-4d42-af67-5b818c6f2a6b",
              "name": "Request processed. Check `results.rcs.accepted` to verify whether the message was accepted.\n\n**Note:** `accepted: true` means the message was accepted for sending, not that it was delivered. Delivery confirmation arrives via webhook.\n",
              "originalRequest": {
                "url": {
                  "path": [
                    "message-server",
                    "rcs",
                    "send"
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"destination\": \"+393401234567\",\n  \"agentId\": 10,\n  \"body\": {\n    \"type\": \"TEXT\",\n    \"body\": {\n      \"text\": \"Ciao! Il tuo ordine è stato confermato.\"\n    }\n  },\n  \"enableNotification\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "OK",
              "code": 200,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"messageId\": \"e76614d1-4ac1-4d94-89f0-d07f1b5a190c\",\n  \"simulation\": false,\n  \"results\": {\n    \"rcs\": {\n      \"accepted\": true,\n      \"reasons\": []\n    },\n    \"sms\": null\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "ab29d9e7-5a9c-4022-8e96-2526ebd81d71",
              "name": "Invalid request",
              "originalRequest": {
                "url": {
                  "path": [
                    "message-server",
                    "rcs",
                    "send"
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"destination\": \"+393401234567\",\n  \"agentId\": 10,\n  \"body\": {\n    \"type\": \"TEXT\",\n    \"body\": {\n      \"text\": \"Ciao! Il tuo ordine è stato confermato.\"\n    }\n  },\n  \"enableNotification\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Bad Request",
              "code": 400,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"status\": \"fail\",\n  \"data\": {\n    \"destination\": \"'destination' can't be blank\"\n  }\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "3166128d-8ca3-463f-bc70-a8264c9a14fe",
              "name": "Invalid or missing credentials",
              "originalRequest": {
                "url": {
                  "path": [
                    "message-server",
                    "rcs",
                    "send"
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"destination\": \"+393401234567\",\n  \"agentId\": 10,\n  \"body\": {\n    \"type\": \"TEXT\",\n    \"body\": {\n      \"text\": \"Ciao! Il tuo ordine è stato confermato.\"\n    }\n  },\n  \"enableNotification\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Unauthorized",
              "code": 401,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"status\": \"fail\",\n  \"data\": {}\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            },
            {
              "id": "159dbb7b-b6f9-4ef4-a071-f4345b8b140c",
              "name": "IP not whitelisted or unauthorized resource",
              "originalRequest": {
                "url": {
                  "path": [
                    "message-server",
                    "rcs",
                    "send"
                  ],
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "query": [],
                  "variable": []
                },
                "header": [
                  {
                    "key": "Accept",
                    "value": "application/json"
                  }
                ],
                "method": "POST",
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"destination\": \"+393401234567\",\n  \"agentId\": 10,\n  \"body\": {\n    \"type\": \"TEXT\",\n    \"body\": {\n      \"text\": \"Ciao! Il tuo ordine è stato confermato.\"\n    }\n  },\n  \"enableNotification\": true\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              },
              "status": "Forbidden",
              "code": 403,
              "header": [
                {
                  "key": "Content-Type",
                  "value": "application/json"
                }
              ],
              "body": "{\n  \"status\": \"fail\",\n  \"data\": {}\n}",
              "cookie": [],
              "_postman_previewlanguage": "json"
            }
          ],
          "event": [],
          "protocolProfileBehavior": {
            "disableBodyPruning": true
          }
        }
      ],
      "event": []
    }
  ],
  "event": [],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://lora-api.agiletelecom.com",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "YOUR_API_KEY",
      "type": "string"
    }
  ],
  "auth": {
    "type": "apikey",
    "apikey": [
      {
        "key": "key",
        "value": "X-Api-Key",
        "type": "string"
      },
      {
        "key": "value",
        "value": "{{apiKey}}",
        "type": "string"
      },
      {
        "key": "in",
        "value": "header",
        "type": "string"
      }
    ]
  },
  "info": {
    "_postman_id": "ad4026ba-8aa3-49e7-b0ae-c5a7f285d334",
    "name": "AgileTelecom RCS API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": {
      "content": "REST API for sending RCS (Rich Communication Services) messages. Supports text messages, rich cards, carousels, and interactive suggestions with fallback to WhatsApp and SMS.\n\n## Authentication\n\nAll requests require **one** of the following methods:\n\n- **API Key** — Header `X-Api-Key: <api-key>`\n- **Basic Auth** — Header `Authorization: Basic <base64(username:password)>`\n\n## Key Features\n\n- RCS message sending: text, rich cards, carousels\n- Interactive suggestions (buttons, links, quick replies)\n- Automatic fallback to WhatsApp and SMS\n- Delivery, read, and inbound message notifications (webhook)\n\n## Webhooks\n\nThe following callbacks are sent via HTTP POST to your URL configured in the platform.\n\n### DELIVERY\n```json\n{\n  \"channel\": \"RCS\",\n  \"eventType\": \"DELIVERY\",\n  \"messageId\": \"uuid\",\n  \"destination\": \"+393401234567\",\n  \"statusCode\": 3,\n  \"description\": \"delivered\",\n  \"eventDate\": \"2025-10-16T10:42:18Z\"\n}\n```\n`statusCode`: 3 = delivered, 6 = undeliverable\n\n### READ\n```json\n{\n  \"channel\": \"RCS\",\n  \"eventType\": \"READ\",\n  \"messageId\": \"uuid\",\n  \"destination\": \"+393401234567\",\n  \"eventDate\": \"2025-10-16T10:43:00Z\"\n}\n```\n\n### INBOUND\n```json\n{\n  \"channel\": \"RCS\",\n  \"eventType\": \"INBOUND\",\n  \"messageId\": \"msg-id\",\n  \"source\": \"+393471488489\",\n  \"destination\": \"+393209998877\",\n  \"receivedDate\": \"2025-10-31T10:59:05.099Z\",\n  \"messageType\": \"TEXT\",\n  \"text\": \"User reply message\"\n}\n```\n`messageType`: TEXT, IMAGE, AUDIO, VIDEO. For media, the `mediaKey` field contains the key for downloading via `/api/files/{mediaKey}`.\n\n\nContact Support:\n Name: AgileTelecom",
      "type": "text/plain"
    }
  }
}
