{"_id":"@1msg/sdk","_rev":"5-f263dbe7768ec72cbda9f7a940e7c2b5","name":"@1msg/sdk","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@1msg/sdk","version":"1.0.0","keywords":["1msg","whatsapp","whatsapp-api","sdk","typescript"],"license":"MIT","_id":"@1msg/sdk@1.0.0","maintainers":[{"name":"tinman321","email":"tinman321@gmail.com"},{"name":"1msg.company","email":"1msg.company@gmail.com"},{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"}],"homepage":"https://github.com/1msg/1msg-sdk/tree/main/typescript#readme","bugs":{"url":"https://github.com/1msg/1msg-sdk/issues"},"dist":{"shasum":"576c7af56cba12fad76ad72f6a3c8d41cc97922c","tarball":"https://registry.npmjs.org/@1msg/sdk/-/sdk-1.0.0.tgz","fileCount":199,"integrity":"sha512-8Fzx05JCJ16ZH2uE233Rndh7H/TjzblfspwWNnzOX5LXxHOyvt8FePQrWRQc/a3YkXwLa4ynGHBMM8OrVCCPiw==","signatures":[{"sig":"MEUCIGCjGZTIHTVp5HryUFe4N6/GVb9BjKoznrcGMwohxBglAiEA2pIHezW/4igVORvadBlAJ4QRVck8uo2RogyuXSP34vk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":555728},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"ac8f73d88e7120f8b306c39a06243141b41dd8db","scripts":{"test":"jest","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"},"repository":{"url":"git+https://github.com/1msg/1msg-sdk.git","type":"git","directory":"typescript"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the 1msg WhatsApp API","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.1.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.0_1783501941377_0.7464655585894178","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@1msg/sdk","version":"1.0.1","keywords":["1msg","whatsapp","whatsapp-api","sdk","typescript"],"license":"MIT","_id":"@1msg/sdk@1.0.1","maintainers":[{"name":"tinman321","email":"tinman321@gmail.com"},{"name":"1msg.company","email":"1msg.company@gmail.com"},{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"}],"homepage":"https://github.com/1msg/1msg-sdk/tree/main/typescript#readme","bugs":{"url":"https://github.com/1msg/1msg-sdk/issues"},"dist":{"shasum":"d9484a8fd10c08234900cd8e557d5c9b991df4e8","tarball":"https://registry.npmjs.org/@1msg/sdk/-/sdk-1.0.1.tgz","fileCount":200,"integrity":"sha512-p6qy+Ckn6GKIqxNDUArngo56pix3YGPg/S/YTog/TpxZxCYr11XoDaOT7c2QfLTKlD3kz/3xRjTOCvr0NBbP/g==","signatures":[{"sig":"MEQCIAD+dW2jcQrJl1nBzKGQNmHtFKGInyobpH0NIg/v8mDqAiBbpJeyPhtr/IbXnOT9Uiy0TGQzuCaWpNfyOlp/fGgmiw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":647685},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"dc5397f8810734418dc07271ca29812899eb2b8a","scripts":{"test":"jest","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"},"repository":{"url":"git+https://github.com/1msg/1msg-sdk.git","type":"git","directory":"typescript"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the 1msg WhatsApp API","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.1.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.1_1783508912246_0.24232608369931197","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@1msg/sdk","version":"1.0.2","keywords":["1msg","whatsapp","whatsapp-api","sdk","typescript"],"license":"MIT","_id":"@1msg/sdk@1.0.2","maintainers":[{"name":"tinman321","email":"tinman321@gmail.com"},{"name":"1msg.company","email":"1msg.company@gmail.com"},{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"}],"homepage":"https://github.com/1msg/1msg-sdk/tree/main/typescript#readme","bugs":{"url":"https://github.com/1msg/1msg-sdk/issues"},"dist":{"shasum":"7ac55a14ad4930e5b91c5f4e256be84bc27c08df","tarball":"https://registry.npmjs.org/@1msg/sdk/-/sdk-1.0.2.tgz","fileCount":304,"integrity":"sha512-XcSctx9nEg3GeD7soXhQu6b4v0Too1ZqD1KN0Hx7qOATQctbcdC5RfQHSG7WMs/sUK1sZIcAu1jmbQkUujwwdg==","signatures":[{"sig":"MEUCIQCQ9hcur6MeqXK38iwrYFHyANMssREpX5bG33lNq5aj0wIgG4lyTvS4A5UMdg5T8I8I506VyL5TVz1krE+V9pRDZBg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1092813},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"d2fe692a771c5dbd312c843a1e4ca6c3b3761f2e","scripts":{"test":"jest","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"},"repository":{"url":"git+https://github.com/1msg/1msg-sdk.git","type":"git","directory":"typescript"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the 1msg WhatsApp API","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.1.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.2_1784895152147_0.2979421188973539","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@1msg/sdk","version":"1.0.3","keywords":["1msg","whatsapp","whatsapp-api","sdk","typescript"],"license":"MIT","_id":"@1msg/sdk@1.0.3","maintainers":[{"name":"tinman321","email":"tinman321@gmail.com"},{"name":"1msg.company","email":"1msg.company@gmail.com"},{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"}],"homepage":"https://github.com/1msg/1msg-sdk/tree/main/typescript#readme","bugs":{"url":"https://github.com/1msg/1msg-sdk/issues"},"dist":{"shasum":"919466773eca5db3d99f7a85ef01dbe971caaaaf","tarball":"https://registry.npmjs.org/@1msg/sdk/-/sdk-1.0.3.tgz","fileCount":372,"integrity":"sha512-6IT6YQkaO4Gh8S4bvP0kWHHMBRvgyyCW5FWLZip4yll6lrZPM6bRtzUxb5DU4/uCuqTCBQ7CrN86cQ0EJpoiHg==","signatures":[{"sig":"MEYCIQC17BCxmvwUMODrGovDytDWsNuY0o+1az2f8Mje2IslSQIhAN2CRZXaSmBqfAlcsG1qf25cJZWdSTbrUGk042Wo+NKx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1266858},"main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"64979160334df9ad3d1540a6c293b322eab798f6","scripts":{"test":"jest","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"},"repository":{"url":"git+https://github.com/1msg/1msg-sdk.git","type":"git","directory":"typescript"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the 1msg WhatsApp API","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.1.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"tmp":"tmp/sdk_1.0.3_1787217527539_0.9370936405525077","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"_id":"@1msg/sdk@1.0.4","bugs":{"url":"https://github.com/1msg/1msg-sdk/issues"},"dist":{"shasum":"2b6cdeaee0e42d47b441e66585616c5703ff174f","tarball":"https://registry.npmjs.org/@1msg/sdk/-/sdk-1.0.4.tgz","fileCount":464,"integrity":"sha512-JToctO7E1w9XA753cst9Ks7/PFI2x/QkgH22c+XrC702iep+jOZqiStodnx3QOoc91vj1Yzt+0DpQVFczuFuWg==","signatures":[{"sig":"MEUCIQCrfbuIwk9lLZDEYYtMJ+cG9S2EacgIWKrae25QUyUEZwIgEXJxuL5dxGlXoRx+Xp9sPdhv5QriBzGsmfytGP6H4Fw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCqRCSLps0B4ATPWZpv/6R81JmGLGyrUX6DQpqWp86UKQIhAM6A5cKZrWuPcqnKX4Qu1rkW786RKETLpA4SkdVjw0KU"}],"unpackedSize":1535392},"main":"./dist/index.js","name":"@1msg/sdk","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"515e2c218f1f869d1bdf4a5c8a2d93b81881cff7","license":"MIT","scripts":{"test":"jest","build":"tsc -p tsconfig.build.json","clean":"rm -rf dist","prepublishOnly":"npm run build"},"version":"1.0.4","_npmUser":{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"},"homepage":"https://github.com/1msg/1msg-sdk/tree/main/typescript#readme","keywords":["1msg","whatsapp","whatsapp-api","sdk","typescript"],"repository":{"url":"git+https://github.com/1msg/1msg-sdk.git","type":"git","directory":"typescript"},"_npmVersion":"10.8.2","description":"TypeScript SDK for the 1msg WhatsApp API","directories":{},"maintainers":[{"name":"tinman321","email":"tinman321@gmail.com"},{"name":"1msg.company","email":"1msg.company@gmail.com"},{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"}],"_nodeVersion":"20.20.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"^5.1.3","@types/jest":"^29.5.14"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sdk_1.0.4_1788783842267_0.6860529339948118"}}},"time":{"created":"2026-07-08T09:12:21.230Z","modified":"2026-09-07T12:24:02.626Z","1.0.0":"2026-07-08T09:12:21.550Z","1.0.1":"2026-07-08T11:08:32.378Z","1.0.2":"2026-07-24T12:12:32.328Z","1.0.3":"2026-08-20T09:18:47.717Z","1.0.4":"2026-09-07T12:24:02.390Z"},"bugs":{"url":"https://github.com/1msg/1msg-sdk/issues"},"license":"MIT","homepage":"https://github.com/1msg/1msg-sdk/tree/main/typescript#readme","keywords":["1msg","whatsapp","whatsapp-api","sdk","typescript"],"repository":{"url":"git+https://github.com/1msg/1msg-sdk.git","type":"git","directory":"typescript"},"description":"TypeScript SDK for the 1msg WhatsApp API","maintainers":[{"name":"tinman321","email":"tinman321@gmail.com"},{"name":"1msg.company","email":"1msg.company@gmail.com"},{"name":"alibek.seksenali","email":"alibek.seksenali@alumni.nu.edu.kz"}],"readme":"# @1msg/sdk\n\nOfficial TypeScript/JavaScript SDK for the **1MSG WhatsApp Business API**.\n\nThis document is auto-generated from the public OpenAPI contract plus generated\nTypeScript client signatures. It is intended to be exhaustive: every public operation,\nparameter, response code, type export, and common integration pattern is documented.\n\n| | |\n|---|---|\n| **npm** | [`@1msg/sdk`](https://www.npmjs.com/package/@1msg/sdk) |\n| **Source** | [github.com/1msg/1msg-sdk](https://github.com/1msg/1msg-sdk/tree/main/typescript) |\n| **API docs** | [docs.1msg.io](https://docs.1msg.io/) |\n| **Platform** | [platform.1msg.io](https://platform.1msg.io/) |\n| **Support** | support@1msg.io |\n| **OpenAPI version** | 1.0.0 |\n| **Operations** | 62 |\n| **Exported models** | 98 |\n| **AI agent guide** | [AGENTS.md](./AGENTS.md) |\n\n---\n\n## Table of contents\n\n1. [Install](#install)\n2. [Requirements](#requirements)\n3. [Quick start](#quick-start)\n4. [Configuration](#configuration)\n5. [Authentication](#authentication)\n6. [Environments](#environments)\n7. [Recipient addressing](#recipient-addressing)\n8. [24-hour messaging window](#24-hour-messaging-window)\n9. [Client architecture](#client-architecture)\n10. [Convenience helpers](#convenience-helpers)\n11. [API reference](#api-reference)\n12. [messaging](#messaging)\n13. [profile](#profile)\n14. [groups](#groups)\n15. [flows](#flows)\n16. [templates](#templates)\n17. [calling](#calling)\n18. [catalog](#catalog)\n19. [channel](#channel)\n20. [users](#users)\n21. [webhooks](#webhooks)\n22. [Exported types — full reference](#exported-types--full-reference)\n23. [Cookbook](#cookbook--common-integration-recipes)\n24. [FAQ](#faq)\n25. [Troubleshooting](#troubleshooting)\n26. [Error handling](#error-handling)\n27. [Low-level access](#low-level-access)\n28. [Regeneration and versioning](#regeneration-and-versioning)\n29. [License](#license)\n\n---\n\n## Install\n\n```bash\nnpm install @1msg/sdk\nyarn add @1msg/sdk\npnpm add @1msg/sdk\n```\n\n**Runtime:** Node.js >= 18 (uses native `fetch`).\n\n## Requirements\n\n| Variable | Where to get it | Example |\n|----------|-----------------|---------|\n| `baseUrl` | Platform → channel → API host | `https://api.1msg.io` |\n| `instanceId` | Platform → channel id | `ODI371267300` |\n| `token` | Platform → channel → API token | JWT or API key |\n\nUse environment variables (`MSG_API_TOKEN`, `MSG_INSTANCE_ID`). Never commit tokens.\n\n## Quick start\n\n```typescript\nimport { createClient } from '@1msg/sdk';\n\nconst client = createClient({\n  baseUrl: 'https://api.1msg.io',\n  instanceId: process.env.MSG_INSTANCE_ID!,\n  token: process.env.MSG_API_TOKEN!,\n});\n\nawait client.sendMessage({ body: 'Hello', chatId: '12020721369@c.us' });\nconst profile = await client.profile.getMe(client.config.token);\n```\n\n## Configuration\n\n```typescript\ncreateClient({ baseUrl: string; instanceId: string; token: string; });\n```\n\n### `ClientConfig` fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `baseUrl` | string | API root, no trailing slash |\n| `instanceId` | string | Channel instance id |\n| `token` | string | Channel API token |\n| `basePath` | getter | `{baseUrl}/{instanceId}` |\n| `buildRequestUrl(path)` | method | Builds URL with `?token=` |\n\n## Authentication\n\n```text\nhttps://{baseUrl}/{instanceId}/{path}?token={token}\n```\n\nEvery generated method accepts `token` as the **first argument**.\n\n## Environments\n\n| Environment | baseUrl |\n|-------------|---------|\n| Production | `https://api.1msg.io` |\n| Staging | `https://api.stage.1msg.io` |\n| Trial sandbox | See platform SDK page |\n\n## Recipient addressing\n\n| Format | Example | When |\n|--------|---------|------|\n| Individual chatId | `12020721369@c.us` | Known chat from API/webhook |\n| Group chatId | `120363046942338209@g.us` | Group conversations |\n| phone | `12020721369` | First message, no chatId yet |\n\nProvide **either** `chatId` **or** `phone`, not both.\n\n## 24-hour messaging window\n\nSession messages (`sendMessage`, `sendFile`, `sendList`, etc.) require an open\ncustomer service window (user messaged you within 24 hours).\n\nOutside the window use **`sendTemplate`** with an approved Meta template.\n\n## Client architecture\n\n```text\ncreateClient() → Client\n  ├─ config: ClientConfig\n  ├─ messaging: MessagingApi   (16 operations)\n  ├─ profile: ProfileApi       (1 operation)\n  ├─ groups: GroupsApi         (7 operations)\n  ├─ flows: FlowsApi           (8 operations)\n  └─ templates: TemplatesApi   (1 operation)\n```\n\n## Convenience helpers\n\n### `client.sendMessage(request: SendMessageRequest)`\n\nWrapper around `client.messaging.sendMessage`. Prefer this for text messages.\n\n```typescript\nawait client.sendMessage({ body: \"Hi\", chatId: \"12020721369@c.us\" });\n```\n\n## API reference\n\n**62 operations** documented below with HTTP mapping, schemas, SDK and cURL examples.\n\n## messaging\n\nNamespace: `client.messaging` → `MessagingApi` (23 operations)\n\n### `createReadMessage`\n\n#### Mark message as read\n\n| | |\n|---|---|\n| HTTP | `POST /readMessage` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `createReadMessage` |\n| Signature | `createReadMessage(token: string, messageId?: string, msgId?: string, typingIndicator?: boolean, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateReadMessage200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `messageId` | string | optional |  |\n| `msgId` | string | optional |  |\n| `typingIndicator` | boolean | optional | Show WhatsApp typing indicator (max 25s or until reply) |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Server response example | `—` |\n| `401` | Invalid token | `—` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.createReadMessage(client.config.token, {\n  chatId: '12020721369@c.us',\n  messageId: 'wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA',\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/readMessage?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `createUploadMedia`\n\n#### Upload media\n\nUpload a file to WhatsApp media storage and get a numeric `mediaId` for later use with `send_file` / `send_sticker` (`mediaId` field, not `body`). Pass the file as `body` **or** `url` — an HTTP(S) URL or a base64 data URI. The `mediaId` in the response is a numeric string (keep it as a string).\n\n| | |\n|---|---|\n| HTTP | `POST /uploadMedia` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `createUploadMedia` |\n| Signature | `createUploadMedia(token: string, createUploadMediaRequest: CreateUploadMediaRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateUploadMedia200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `body` | string | optional | File HTTP(S) URL or base64 data URI (`data:<mime>;base64,...`) |\n| `url` | string | optional | Alias for `body` — public HTTP(S) URL of the file to upload |\n\n**OpenAPI example body**\n\n```json\n{\n  \"body\": \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\"\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | OK | `—` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.createUploadMedia(client.config.token, {\n  file: 'https://example.com/image.jpg',\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/uploadMedia?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"body\": \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\"\n  }'\n```\n\n### `deleteMedia`\n\n#### Delete media from WABA storage\n\nDelete previously uploaded media by numeric `mediaId` (from `/uploadMedia`). This is the canonical deletion endpoint and uses the REST `DELETE` verb on the media resource path. The older `POST /deleteMedia` is a deprecated alias.\n\n| | |\n|---|---|\n| HTTP | `DELETE /media/{mediaId}` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `deleteMedia` |\n| Signature | `deleteMedia(token: string, mediaId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Path / query parameters\n\n- `mediaId` (path, string, required) — Numeric WABA media id\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Operation successful | `SuccessResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.deleteMedia(client.config.token, undefined);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X DELETE 'https://api.1msg.io/{instanceId}/media/{mediaId}?token={token}'\n```\n\n### `deleteMediaLegacy`\n\n#### Delete media from WABA storage (deprecated alias)\n\n**Deprecated.** Use `DELETE /media/{mediaId}` instead. This POST alias is kept for backward compatibility with earlier integrations. New integrations should call `DELETE /media/{mediaId}`: 1msg follows REST conventions for resource deletion going forward (delete a resource with the `DELETE` verb on its resource path).\n\n| | |\n|---|---|\n| HTTP | `POST /deleteMedia` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `deleteMediaLegacy` |\n| Signature | `deleteMediaLegacy(token: string, deleteMediaLegacyRequest: DeleteMediaLegacyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SuccessResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `mediaId` | string | **required** | Numeric WABA media id |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Operation successful | `SuccessResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.deleteMediaLegacy(client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/deleteMedia?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `getMmLiteStatus`\n\n#### Get MM Lite availability and status\n\n| | |\n|---|---|\n| HTTP | `GET /mmLiteStatus` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `getMmLiteStatus` |\n| Signature | `getMmLiteStatus(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetMmLiteStatus200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | MM Lite status for the channel | `—` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.getMmLiteStatus(client.config.token);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X GET 'https://api.1msg.io/{instanceId}/mmLiteStatus?token={token}'\n```\n\n### `listMessages`\n\n#### Get messages list\n\nList stored chat history for this channel (requires history storage). Filter with `chatId`, `limit`, `last`, message numbers, or time bounds.\n\n| | |\n|---|---|\n| HTTP | `GET /messages` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `listMessages` |\n| Signature | `listMessages(token: string, chatId?: string, limit?: number, last?: boolean, lastMessageNumber?: number, firstMessageNumber?: number, minTime?: number, maxTime?: number, msgId?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListMessages200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Path / query parameters\n\n- `chatId` (query, string, optional) — Filter messages for one chat (`phone@c.us`, group `@g.us`, or BSUID `@lid`)\n- `limit` (query, integer, optional) — Max rows to return (default 100)\n- `last` (query, boolean, optional) — If true, return the latest messages (DESC). Default false.\n- `lastMessageNumber` (query, integer, optional) — lastMessageNumber\n- `firstMessageNumber` (query, integer, optional) — firstMessageNumber\n- `min_time` (query, integer, optional) — Unix timestamp lower bound\n- `max_time` (query, integer, optional) — Unix timestamp upper bound\n- `msgId` (query, string, optional) — Filter by stored message id\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | OK | `—` |\n\n#### SDK example\n\n```typescript\nconst page = await client.messaging.listMessages(\n  client.config.token,\n  50,\n  undefined,\n  '12020721369@c.us',\n);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X GET 'https://api.1msg.io/{instanceId}/messages?token={token}'\n```\n\n### `retrieveMedia`\n\n#### Retrieve uploaded media metadata\n\nGet WABA media URL and metadata by mediaId (from uploadMedia). The returned `url` is temporary and typically expires within ~5 minutes.\n\n| | |\n|---|---|\n| HTTP | `GET /retrieveMedia` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `retrieveMedia` |\n| Signature | `retrieveMedia(token: string, mediaId: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<RetrieveMedia200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Path / query parameters\n\n- `mediaId` (query, string, required) — mediaId\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Media metadata | `—` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.retrieveMedia(client.config.token, undefined);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X GET 'https://api.1msg.io/{instanceId}/retrieveMedia?token={token}'\n```\n\n### `sendAddressMessage`\n\n#### Send address request message\n\nRequest shipping address from the user (WhatsApp interactive `address_message`). **India and Singapore only.** Requires: - Business WhatsApp number registered in that country - Recipient phone matching the country (`+91` ↔ `IN`, `+65` ↔ `SG`) Pass `country: \"IN\"` or `country: \"SG\"`. Eligibility is validated upstream; mismatches (e.g. Singapore phone with `country: \"IN\"`) return errors such as `Unsupported Interactive Message type` (HTTP 200 with `sent: false`). Optional action parameters: `values`, `saved_addresses`, `validation_errors`.\n\n| | |\n|---|---|\n| HTTP | `POST /sendAddressMessage` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendAddressMessage` |\n| Signature | `sendAddressMessage(token: string, sendAddressMessageRequest: SendAddressMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | integer | optional | Recipient phone (E.164 digits, no +). Must match country. |\n| `chatId` | string | optional |  |\n| `body` | string | **required** | Body text shown with the address request |\n| `country` | enum(\"IN\" | \"SG\") | optional | Address form country. Defaults to IN if omitted. (example=\"SG\") |\n| `values` | object | optional | Optional prefilled address fields |\n| `saved_addresses` | array<object> | optional | Optional previously saved addresses for the user |\n| `validation_errors` | object | optional | Optional field validation errors when re-prompting |\n| `quotedMsgId` | string | optional |  |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendAddressMessage(client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendAddressMessage?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `sendButton`\n\n#### Send Reply Buttons Message\n\n| | |\n|---|---|\n| HTTP | `POST /sendButton` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendButton` |\n| Signature | `sendButton(token: string, sendButtonRequest?: SendButtonRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | string | optional | Recipient phone with country code. Use phone or chatId. |\n| `chatId` | string | optional | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. |\n| `quotedMsgId` | string | optional | Optional Cloud API wamid to quote |\n| `body` | string | optional |  |\n| `footer` | string | optional |  |\n| `header` | object | optional | Optional interactive header (text/image/video/document) |\n| `buttons` | array<object> | optional | Legacy alias for sections (`[{id,title}]`) |\n| `sections` | array<object> | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"phone\": \"{{testPhone}}\",\n  \"body\": \"This is a buttons message\",\n  \"footer\": \"Footer\",\n  \"sections\": [\n    {\n      \"type\": \"reply\",\n      \"reply\": {\n        \"id\": \"1\",\n        \"title\": \"Button 1\"\n      }\n    }\n  ]\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendButton(client.config.token, {\n  phone: '12020721369',\n  body: 'This is a buttons message',\n  footer: 'Footer',\n  sections: [{ type: 'reply', reply: { id: '1', title: 'Button 1' } }],\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendButton?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone\": \"{{testPhone}}\",\n    \"body\": \"This is a buttons message\",\n    \"footer\": \"Footer\",\n    \"sections\": [\n      {\n        \"type\": \"reply\",\n        \"reply\": {\n          \"id\": \"1\",\n          \"title\": \"Button 1\"\n        }\n      }\n    ]\n  }'\n```\n\n### `sendCarousel`\n\n#### Send Carousel\n\nYou can send product cards via Carousel in two ways: Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate. Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel. The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template. In /sendCarousel, for a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons. Prefer the simple `cards` array (2–10 cards). Each card needs a header media/product plus a CTA URL or quick-reply buttons. Example: ```json { \"phone\": \"79001234567\", \"body\": \"Pick a product\", \"cards\": [ { \"header\": { \"type\": \"image\", \"image\": { \"link\": \"https://example.com/1.jpg\" } }, \"body\": { \"text\": \"Card one\" }, \"type\": \"cta_url\", \"action\": { \"name\": \"cta_url\", \"parameters\": { \"url\": \"https://example.com/p1\", \"display_text\": \"Open\" } } }, { \"header\": { \"type\": \"image\", \"image\": { \"link\": \"https://example.com/2.jpg\" } }, \"body\": { \"text\": \"Card two\" }, \"type\": \"cta_url\", \"action\": { \"name\": \"cta_url\", \"parameters\": { \"url\": \"https://example.com/p2\", \"display_text\": \"Open\" } } } ] } ``` `params` with a `CAROUSEL` component is the template-like alternative.\n\n| | |\n|---|---|\n| HTTP | `POST /sendCarousel` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendCarousel` |\n| Signature | `sendCarousel(token: string, body?: string, cards?: Array<{ [key: string]: any; }>, params?: Array<object>, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `body` | string | optional | Text shown above the carousel |\n| `cards` | array<object> | optional | Preferred. 2–10 carousel cards. |\n| `params` | array<object> | optional | Template-like alternative — include a CAROUSEL component with cards |\n| `quotedMsgId` | string | optional |  |\n| `chatId` | string | optional |  |\n| `phone` | integer | optional |  |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendCarousel(client.config.token, {\n  phone: '12020721369',\n  body: 'Choose a product',\n  cards: [],\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendCarousel?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `sendContact`\n\n#### Send a Contact\n\nSend a WhatsApp contact card. Preferred simple body (legacy-compatible): ```json { \"phone\": \"79001234567\", \"contact\": { \"name\": \"Lida\", \"phone\": \"+79181976551\" } } ``` Cloud API shape also works: `contacts` is an array of objects with `name.formatted_name` and `phones[].phone` (E.164 string, **not** a timestamp).\n\n| | |\n|---|---|\n| HTTP | `POST /sendContact` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendContact` |\n| Signature | `sendContact(token: string, sendContactRequest?: SendContactRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | string | optional | Recipient phone with country code. Use phone or chatId. |\n| `chatId` | string | optional | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. |\n| `quotedMsgId` | string | optional |  |\n| `contact` | object | optional | Simple contact card. Use this or `contacts`. |\n  | `name` | string | object | **required** | Display name (string) or Cloud API name object |\n  | `phone` | string | **required** | Contact phone in E.164 (`+79181976551`), not a timestamp |\n  | `email` | string | optional |  |\n  | `org` | object | optional |  |\n  | `url` | string | optional |  |\n| `contacts` | array<object> | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"phone\": \"{{testPhone}}\",\n  \"contact\": {\n    \"name\": \"John Doe\",\n    \"phone\": \"+1234567890\"\n  }\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendContact(client.config.token, {\n  phone: '12020721369',\n  contacts: [{\n    name: {\n      formatted_name: 'John Doe',\n      first_name: 'John',\n      last_name: 'Doe',\n    },\n    phones: [{ phone: '+1234567890', type: 'HOME', wa_id: '' }],\n  }],\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendContact?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone\": \"{{testPhone}}\",\n    \"contact\": {\n      \"name\": \"John Doe\",\n      \"phone\": \"+1234567890\"\n    }\n  }'\n```\n\n### `sendCtaUrl`\n\n#### Send CTA URL interactive message\n\nSend an interactive message with a single call-to-action URL button.\n\n| | |\n|---|---|\n| HTTP | `POST /sendCtaUrl` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendCtaUrl` |\n| Signature | `sendCtaUrl(token: string, sendCtaUrlRequest: SendCtaUrlRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | integer | optional |  |\n| `chatId` | string | optional |  |\n| `body` | string | **required** |  |\n| `displayText` | string | **required** | Button label |\n| `url` | string | **required** |  |\n| `header` | object | optional |  |\n| `footer` | string | optional |  |\n| `quotedMsgId` | string | optional |  |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendCtaUrl(client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendCtaUrl?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `sendFile`\n\n#### Send a File\n\nSend a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.\n\n| | |\n|---|---|\n| HTTP | `POST /sendFile` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendFile` |\n| Signature | `sendFile(token: string, body?: string, filename?: string, mediaId?: string, mediaType?: SendFileMediaTypeEnum, voice?: boolean, caption?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `body` | string | optional | File source (required unless mediaId is set): - HTTP/HTTPS URL - Base64 data URI |\n| `filename` | string | optional | File name with extension (required with body, not with mediaId) |\n| `mediaId` | string | optional | WABA media id from uploadMedia (alternative to body) |\n| `mediaType` | enum(\"image\" | \"video\" | \"audio\" | \"document\") | optional | Required when using mediaId |\n| `voice` | boolean | optional | Native WhatsApp voice note (audio/ogg only) |\n| `caption` | string | optional |  (maxLength=1024) |\n| `quotedMsgId` | string | optional |  |\n| `chatId` | string | optional |  |\n| `phone` | integer | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"phone\": 12020721369,\n  \"body\": \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\",\n  \"filename\": \"dummy.pdf\",\n  \"caption\": \"Here is the file\"\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendFile(\n  client.config.token,\n  'https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf',\n  'dummy.pdf',\n  'Here is your document',\n  undefined,\n  '12020721369@c.us',\n);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendFile?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone\": 12020721369,\n    \"body\": \"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\",\n    \"filename\": \"dummy.pdf\",\n    \"caption\": \"Here is the file\"\n  }'\n```\n\n### `sendFlow`\n\n#### Send WhatsApp Flow Message\n\nSend Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone. Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate.\n\n| | |\n|---|---|\n| HTTP | `POST /sendFlow` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendFlow` |\n| Signature | `sendFlow(token: string, body: string, flowId: string, flowToken: string, flowCta: string, header?: SendFlowRequestHeader, footer?: string, flowAction?: SendFlowFlowActionEnum, flowActionPayload?: object, flowMessageVersion?: string, mode?: SendFlowModeEnum, flowActionData?: object, flowActionScreen?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `body` | string | **required** |  |\n| `header` | string | object | optional |  |\n| `footer` | string | optional |  |\n| `flowId` | string | **required** |  |\n| `flowToken` | string | **required** |  |\n| `flowCta` | string | **required** |  |\n| `flowAction` | enum(\"navigate\" | \"data_exchange\") | optional |  |\n| `flowActionPayload` | object | optional |  |\n| `flowMessageVersion` | string | optional |  |\n| `mode` | enum(\"draft\" | \"published\") | optional |  |\n| `flowActionData` | object | optional |  |\n| `flowActionScreen` | string | optional |  |\n| `quotedMsgId` | string | optional |  |\n| `chatId` | string | optional |  |\n| `phone` | integer | optional |  |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendFlow(\n  client.config.token,\n  'Tap below to complete the form',\n  'FLOW_ID',\n  'flow-token-from-your-backend',\n  'Open form',\n  undefined,\n  'Powered by 1MSG',\n  'navigate',\n  { screen: 'WELCOME' },\n  '3',\n  undefined,\n  undefined,\n  undefined,\n  undefined,\n  '12020721369@c.us',\n);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendFlow?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `sendList`\n\n#### Send List Message\n\n| | |\n|---|---|\n| HTTP | `POST /sendList` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendList` |\n| Signature | `sendList(token: string, sendListRequest?: SendListRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | string | optional | Recipient phone with country code. Use phone or chatId. |\n| `chatId` | string | optional | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. |\n| `quotedMsgId` | string | optional |  |\n| `body` | string | optional |  |\n| `buttonText` | string | optional |  |\n| `action` | string | optional |  |\n| `sections` | array<object> | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"phone\": \"{{testPhone}}\",\n  \"body\": \"This is a list message\",\n  \"buttonText\": \"Click me\",\n  \"action\": \"Action\",\n  \"sections\": [\n    {\n      \"title\": \"Section 1\",\n      \"rows\": [\n        {\n          \"id\": \"1\",\n          \"title\": \"Row 1\",\n          \"description\": \"Description for Row 1\"\n        }\n      ]\n    }\n  ]\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendList(client.config.token, {\n  phone: '12020721369',\n  body: 'This is a list message',\n  buttonText: 'Click me',\n  action: 'Action',\n  sections: [{\n    title: 'Section 1',\n    rows: [{ id: '1', title: 'Row 1', description: 'Description for Row 1' }],\n  }],\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendList?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone\": \"{{testPhone}}\",\n    \"body\": \"This is a list message\",\n    \"buttonText\": \"Click me\",\n    \"action\": \"Action\",\n    \"sections\": [\n      {\n        \"title\": \"Section 1\",\n        \"rows\": [\n          {\n            \"id\": \"1\",\n            \"title\": \"Row 1\",\n            \"description\": \"Description for Row 1\"\n          }\n        ]\n      }\n    ]\n  }'\n```\n\n### `sendLocation`\n\n#### Send a Location\n\nSend a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.\n\n| | |\n|---|---|\n| HTTP | `POST /sendLocation` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendLocation` |\n| Signature | `sendLocation(token: string, lat: string, lng: string, address?: string, name?: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `lat` | string | **required** |  |\n| `lng` | string | **required** |  |\n| `address` | string | optional |  |\n| `name` | string | optional |  |\n| `quotedMsgId` | string | optional |  |\n| `chatId` | string | optional |  |\n| `phone` | integer | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"lat\": \"45.018337\",\n  \"lng\": \"-73.968285\",\n  \"name\": \"Facebook HQ\",\n  \"address\": \"9766 Valley View St., New York, NY 10024\",\n  \"phone\": 12020721369\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendLocation(\n  client.config.token,\n  '45.018337',\n  '-73.968285',\n  '9766 Valley View St., New York, NY 10024',\n  'Facebook HQ',\n  undefined,\n  '12020721369@c.us',\n);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendLocation?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"lat\": \"45.018337\",\n    \"lng\": \"-73.968285\",\n    \"name\": \"Facebook HQ\",\n    \"address\": \"9766 Valley View St., New York, NY 10024\",\n    \"phone\": 12020721369\n  }'\n```\n\n### `sendLocationRequest`\n\n#### Send Location Request Message\n\n| | |\n|---|---|\n| HTTP | `POST /sendLocationRequest` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendLocationRequest` |\n| Signature | `sendLocationRequest(token: string, sendLocationRequestRequest?: SendLocationRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | string | optional | Recipient phone with country code. Use phone or chatId. |\n| `chatId` | string | optional | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. |\n| `quotedMsgId` | string | optional |  |\n| `body` | string | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"phone\": \"{{testPhone}}\",\n  \"body\": \"Text\"\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendLocationRequest(client.config.token, {\n  phone: '12020721369',\n  body: 'Please share your location',\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendLocationRequest?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone\": \"{{testPhone}}\",\n    \"body\": \"Text\"\n  }'\n```\n\n### `sendMessage`\n\n#### Send a Message\n\nSend a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed. Only one of two parameters is needed to determine the destination - chatId or phone.\n\n| | |\n|---|---|\n| HTTP | `POST /sendMessage` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendMessage` |\n| Signature | `sendMessage(token: string, body: string, quotedMsgId?: string, chatId?: string, phone?: number, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `body` | string | **required** | Message text, UTF-8 or UTF-16 string with emoji (minLength=1, maxLength=4096, example=\"Hello World 🌍\") |\n| `quotedMsgId` | string | optional | Message ID to quote/reply to (Cloud API wamid) (pattern=`^wamid\\..+$`, example=\"wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA\") |\n| `chatId` | string | optional | Recipient chat ID: phone@c.us, group@g.us, or BSUID@lid (example=\"12020721369@c.us\") |\n| `phone` | integer | optional | Phone number starting with country code (alternative to chatId) (example=12020721369) |\n\n**OpenAPI example body**\n\n```json\n{\n  \"body\": \"Hello World\",\n  \"phone\": 12020721369\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.sendMessage({\n  body: 'Hello from 1MSG SDK',\n  chatId: '12020721369@c.us',\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendMessage?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"body\": \"Hello World\",\n    \"phone\": 12020721369\n  }'\n```\n\n### `sendOrderDetails`\n\n#### Send order details (India payments template)\n\nSend a WhatsApp **order details** payment / invoice message using a pre-approved **Utility** template that has an `ORDER_DETAILS` button. **India only** (WhatsApp Payments India). Requires: - India WhatsApp Business number - Commerce enabled on the channel (`GET`/`POST /commerce`) - Approved template with an `ORDER_DETAILS` button Use this method when you need structured fields (`order`, `referenceId`, `currency`, `paymentSettings`). The API appends a template button `sub_type: order_details` and sends via the same path as `POST /sendTemplate`. Works **outside the 24-hour session window** (template message). You can also send the same payload yourself with `POST /sendTemplate` by including a button component in `params`: ```json { \"type\": \"button\", \"sub_type\": \"order_details\", \"index\": 0, \"parameters\": [{ \"type\": \"action\", \"action\": { \"order_details\": { \"reference_id\": \"order-123\", \"currency\": \"INR\", \"order\": { \"status\": \"pending\", \"items\": [], \"subtotal\": { \"offset\": 100, \"value\": 50000 } } } } }] } ```\n\n| | |\n|---|---|\n| HTTP | `POST /sendOrderDetails` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendOrderDetails` |\n| Signature | `sendOrderDetails(token: string, sendOrderDetailsRequest: SendOrderDetailsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | integer | optional | Recipient phone (India E.164 digits, no +). Use phone or chatId. (example=919876543210) |\n| `chatId` | string | optional | Recipient chatId (e.g. phone@c.us). Use phone or chatId. |\n| `template` | string | **required** | Approved Utility template name that includes an ORDER_DETAILS button (example=\"order_details_utility\") |\n| `namespace` | string | **required** | Template namespace from the channel / template list (example=\"your_namespace_uuid\") |\n| `language` | object | **required** | Template language |\n  | `code` | string | **required** | Language code (example=\"en\") |\n  | `policy` | string | optional | Optional language policy (example=\"deterministic\") |\n| `params` | array<object> | optional | Extra template components (HEADER / BODY / etc.). If an order_details button is missing, the API appends one from order / referenceId / currency / paymentSettings. |\n| `referenceId` | string | optional | Unique order / payment reference id (maps to reference_id) (example=\"order-123\") |\n| `currency` | string | optional | Currency code for India payments (example=\"INR\") |\n| `paymentSettings` | object | optional | Optional payment settings (UPI / payment gateway / payment link). Forwarded as payment_settings on the order_details action. |\n| `order` | object | **required** | Order payload for the ORDER_DETAILS button. Typical fields: status, items[], subtotal, tax, shipping, discount. Amount objects use `{ \"offset\": 100, \"value\": <minor_units> }` (e.g. value 50000 with offset 100 = ₹500.00). |\n  | `status` | string | optional | Order status (example=\"pending\") |\n  | `items` | array<object> | **required** | Line items |\n  | `subtotal` | object | optional |  |\n    | `offset` | integer | optional |  (example=100) |\n    | `value` | integer | optional |  (example=50000) |\n  | `tax` | object | optional |  |\n  | `shipping` | object | optional |  |\n  | `discount` | object | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"phone\": 919876543210,\n  \"template\": \"order_details_utility\",\n  \"namespace\": \"your_namespace_uuid\",\n  \"language\": {\n    \"code\": \"en\"\n  },\n  \"referenceId\": \"order-123\",\n  \"currency\": \"INR\",\n  \"order\": {\n    \"status\": \"pending\",\n    \"items\": [\n      {\n        \"retailer_id\": \"SKU-1\",\n        \"name\": \"Item\",\n        \"amount\": {\n          \"offset\": 100,\n          \"value\": 50000\n        },\n        \"quantity\": 1\n      }\n    ],\n    \"subtotal\": {\n      \"offset\": 100,\n      \"value\": 50000\n    }\n  }\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendOrderDetails(client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendOrderDetails?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone\": 919876543210,\n    \"template\": \"order_details_utility\",\n    \"namespace\": \"your_namespace_uuid\",\n    \"language\": {\n      \"code\": \"en\"\n    },\n    \"referenceId\": \"order-123\",\n    \"currency\": \"INR\",\n    \"order\": {\n      \"status\": \"pending\",\n      \"items\": [\n        {\n          \"retailer_id\": \"SKU-1\",\n          \"name\": \"Item\",\n          \"amount\": {\n            \"offset\": 100,\n            \"value\": 50000\n          },\n          \"quantity\": 1\n        }\n      ],\n      \"subtotal\": {\n        \"offset\": 100,\n        \"value\": 50000\n      }\n    }\n  }'\n```\n\n### `sendPaymentRequest`\n\n#### Send payment request (regional)\n\nSend a regional payment request interactive message (beta scaffold). `region` must be IN, SG, or BR. Payload shape follows Meta regional payments docs; verify on stage before production use. Full regional builders are not implemented yet.\n\n| | |\n|---|---|\n| HTTP | `POST /sendPaymentRequest` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendPaymentRequest` |\n| Signature | `sendPaymentRequest(token: string, sendPaymentRequestRequest: SendPaymentRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | integer | **required** |  |\n| `region` | enum(\"IN\" | \"SG\" | \"BR\") | **required** |  |\n| `body` | string | optional |  |\n| `interactive` | object | optional |  |\n| `action` | object | optional |  |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendPaymentRequest(client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendPaymentRequest?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `sendProduct`\n\n#### Send a Product\n\nSend a single catalog product or a product list. Destination is `chatId` or `phone`. `action` is required: - single product: `{ \"catalog_id\": \"...\", \"product_retailer_id\": \"...\" }` - product list: `{ \"catalog_id\": \"...\", \"sections\": [{ \"title\": \"...\", \"product_items\": [{ \"product_retailer_id\": \"...\" }] }] }`\n\n| | |\n|---|---|\n| HTTP | `POST /sendProduct` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendProduct` |\n| Signature | `sendProduct(token: string, sendProductRequest: SendProductRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | string | optional | Recipient phone with country code. Use phone or chatId. |\n| `chatId` | string | optional | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. |\n| `quotedMsgId` | string | optional |  |\n| `body` | string | optional | Optional message text shown with the product |\n| `footer` | string | optional |  |\n| `header` | string | optional | Text header (product list only) |\n| `action` | object | **required** | Catalog action (`catalog_id` + `product_retailer_id`, or `sections` for a list) |\n\n**OpenAPI example body**\n\n```json\n{\n  \"chatId\": \"12020721369@c.us\",\n  \"body\": \"Have a look\",\n  \"action\": {\n    \"catalog_id\": \"448008021021719\",\n    \"product_retailer_id\": \"0001\"\n  }\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendProduct(client.config.token, {\n  phone: '12020721369',\n  catalogId: 'CATALOG_ID',\n  productRetailerId: 'SKU-001',\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendProduct?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"chatId\": \"12020721369@c.us\",\n    \"body\": \"Have a look\",\n    \"action\": {\n      \"catalog_id\": \"448008021021719\",\n      \"product_retailer_id\": \"0001\"\n    }\n  }'\n```\n\n### `sendReaction`\n\n#### Send Reaction\n\n| | |\n|---|---|\n| HTTP | `POST /sendReaction` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendReaction` |\n| Signature | `sendReaction(token: string, sendReactionRequest?: SendReactionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | string | optional | Recipient phone with country code. Use phone or chatId. |\n| `chatId` | string | optional | Recipient chat ID (`phone@c.us`, group `@g.us`, or BSUID `@lid`). Use phone or chatId. |\n| `body` | string | optional |  |\n| `quotedMsgId` | string | optional |  |\n\n**OpenAPI example body**\n\n```json\n{\n  \"phone\": \"{{testPhone}}\",\n  \"body\": \"😀\",\n  \"quotedMsgId\": \"{{lastMessageId}}\"\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendReaction(\n  client.config.token,\n  '👍',\n  'wamid.HBgNMTIwMjA3MjEzNjkVAgARGBI5RTBCNUY0QUE2RjZBQzhGNDkA',\n  '12020721369@c.us',\n);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendReaction?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"phone\": \"{{testPhone}}\",\n    \"body\": \"😀\",\n    \"quotedMsgId\": \"{{lastMessageId}}\"\n  }'\n```\n\n### `sendSticker`\n\n#### Send sticker message\n\nSend a WhatsApp sticker by mediaId or link URL.\n\n| | |\n|---|---|\n| HTTP | `POST /sendSticker` |\n| SDK group | `client.messaging` |\n| API class | `MessagingApi` |\n| operationId | `sendSticker` |\n| Signature | `sendSticker(token: string, sendStickerRequest: SendStickerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<MessageSentResponse>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `phone` | integer | optional |  |\n| `chatId` | string | optional |  |\n| `mediaId` | string | optional | WABA media id from uploadMedia |\n| `link` | string | optional | Public URL to webp sticker |\n| `quotedMsgId` | string | optional |  |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Message sent successfully | `MessageSentResponse` |\n| `400` | Invalid request parameters | `ErrorResponse` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `429` | Rate limit exceeded | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.messaging.sendSticker(client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/sendSticker?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n## profile\n\nNamespace: `client.profile` → `ProfileApi` (2 operations)\n\n### `getMe`\n\n#### Get Profile Info\n\nReturn the WhatsApp Business profile for this channel: About, address, description, email, phone, websites, industry (`vertical`), and profile photo URL.\n\n| | |\n|---|---|\n| HTTP | `GET /me` |\n| SDK group | `client.profile` |\n| API class | `ProfileApi` |\n| operationId | `getMe` |\n| Signature | `getMe(token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ProfileInfo>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Profile information | `ProfileInfo` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nconst profile = await client.profile.getMe(client.config.token);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X GET 'https://api.1msg.io/{instanceId}/me?token={token}'\n```\n\n### `updateMe`\n\n#### Update profile info\n\nUpdate WhatsApp Business Account profile fields. At least one of about, description, email, photo, address, vertical, websites is required. Blocked when the channel subscription limit is exceeded.\n\n| | |\n|---|---|\n| HTTP | `POST /me` |\n| SDK group | `client.profile` |\n| API class | `ProfileApi` |\n| operationId | `updateMe` |\n| Signature | `updateMe(token: string, updateMeRequest: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UpdateMe200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `about` | string | optional | Profile About section (WhatsApp status text) (example=\"Available 9–18\") |\n| `address` | string | optional | Business address shown on the profile |\n| `description` | string | optional | Business description (max 256 characters) |\n| `email` | string | optional | Business email shown on the profile (example=\"support@example.com\") |\n| `vertical` | string | optional | Industry of the business |\n| `photo` | string | optional | HTTPS URL or data:image/...;base64,... payload |\n| `websites` | array<string> | optional | Business website URLs |\n\n**OpenAPI example body**\n\n```json\n{\n  \"about\": \"Available 9–18\",\n  \"email\": \"support@example.com\"\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | Profile updated | `—` |\n| `401` | Invalid or missing authentication token | `ErrorResponse` |\n| `422` | Wrong request (no updatable fields) | `ErrorResponse` |\n| `500` | Internal server error | `ErrorResponse` |\n\n#### SDK example\n\n```typescript\nawait client.profile.updateMe(client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/me?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"about\": \"Available 9–18\",\n    \"email\": \"support@example.com\"\n  }'\n```\n\n## groups\n\nNamespace: `client.groups` → `GroupsApi` (7 operations)\n\n### `createGroups`\n\n#### Create Group\n\n| | |\n|---|---|\n| HTTP | `POST /groups` |\n| SDK group | `client.groups` |\n| API class | `GroupsApi` |\n| operationId | `createGroups` |\n| Signature | `createGroups(token: string, createGroupsRequest: CreateGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreateGroups200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `groupName` | string | **required** | Group subject / name |\n| `description` | string | optional | Optional group description |\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | OK | `—` |\n\n#### SDK example\n\n```typescript\nawait client.groups.createGroups(client.config.token, {\n  subject: 'Support Group',\n  participants: ['12020721369'],\n});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/groups?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{}'\n```\n\n### `createGroupsGroupId`\n\n#### Update Group Info\n\nUpdate group subject, description, and/or profile picture. Path `groupId` is the WABA group id (without `@g.us`).\n\n| | |\n|---|---|\n| HTTP | `POST /groups/{groupId}` |\n| SDK group | `client.groups` |\n| API class | `GroupsApi` |\n| operationId | `createGroupsGroupId` |\n| Signature | `createGroupsGroupId(groupId: string, token: string, createGroupsGroupIdRequest: CreateGroupsGroupIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Request body schema**\n\n| Field | Type | Required | Description |\n|-------|------|----------|-------------|\n| `subject` | string | optional | New group subject / name |\n| `description` | string | optional | New group description |\n| `profile_picture_file` | string | optional | Image URL or base64 data URI for the group profile picture |\n\n**OpenAPI example body**\n\n```json\n{\n  \"subject\": \"Support team\",\n  \"description\": \"Customer support\"\n}\n```\n\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | OK | `—` |\n\n#### SDK example\n\n```typescript\nawait client.groups.createGroupsGroupId('GROUPID', client.config.token, {});\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/groups/{groupId}?token={token}' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n    \"subject\": \"Support team\",\n    \"description\": \"Customer support\"\n  }'\n```\n\n### `createGroupsGroupIdInvitelink`\n\n#### Reset Invite Link\n\n| | |\n|---|---|\n| HTTP | `POST /groups/{groupId}/inviteLink` |\n| SDK group | `client.groups` |\n| API class | `GroupsApi` |\n| operationId | `createGroupsGroupIdInvitelink` |\n| Signature | `createGroupsGroupIdInvitelink(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | OK | `—` |\n\n#### SDK example\n\n```typescript\nawait client.groups.createGroupsGroupIdInvitelink('GROUPID', client.config.token);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X POST 'https://api.1msg.io/{instanceId}/groups/{groupId}/inviteLink?token={token}'\n```\n\n### `deleteGroupsGroupId`\n\n#### Delete Group\n\n| | |\n|---|---|\n| HTTP | `DELETE /groups/{groupId}` |\n| SDK group | `client.groups` |\n| API class | `GroupsApi` |\n| operationId | `deleteGroupsGroupId` |\n| Signature | `deleteGroupsGroupId(groupId: string, token: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DeleteGroupsGroupId200Response>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | OK | `—` |\n\n#### SDK example\n\n```typescript\nawait client.groups.deleteGroupsGroupId('GROUPID', client.config.token);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X DELETE 'https://api.1msg.io/{instanceId}/groups/{groupId}?token={token}'\n```\n\n### `getGroupsGroupId`\n\n#### Get Group Info\n\n| | |\n|---|---|\n| HTTP | `GET /groups/{groupId}` |\n| SDK group | `client.groups` |\n| API class | `GroupsApi` |\n| operationId | `getGroupsGroupId` |\n| Signature | `getGroupsGroupId(groupId: string, token: string, fields?: string, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<{ [key: string]: any; }>` |\n\n#### Authentication\n\n- Query parameter `token` (required on every call)\n- SDK: pass `client.config.token` as the first method argument\n\n#### Path / query parameters\n\n- `fields` (query, string, optional) — Comma-separated group fields to return\n\n#### Request\n\n- `token` (string, required) — channel API token\n\n**Responses**\n\n| Status | Description | Schema |\n|--------|-------------|--------|\n| `200` | OK | `—` |\n\n#### SDK example\n\n```typescript\nawait client.groups.getGroupsGroupId('GROUPID', client.config.token, undefined);\n```\n\n#### cURL equivalent\n\n```bash\ncurl -X GET 'https://api.1msg.io/{instanceId}/groups/{groupId}?token={token}'\n```\n\n### `getGroupsGroupIdInvitelink`\n\n#### Get Invite Lin","readmeFilename":"README.md"}