{ "openapi": "3.0.3", "info": { "title": "Open WA API", "version": "5.0.0", "description": "API definition for Open WA v5" }, "servers": [ { "url": "http://localhost:8080" } ], "paths": { "/api/messages/sendText": { "post": { "tags": [ "messages" ], "operationId": "sendText", "summary": "Sends a text message to a chat", "description": "Sends a text message to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "content": { "type": "string", "minLength": 1, "description": "Message content" }, "options": { "description": "Additional message options" } }, "required": [ "to", "content" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendText" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] }, { "type": "string" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendTextWithMentions": { "post": { "tags": [ "messages" ], "operationId": "sendTextWithMentions", "summary": "Sends a text message that includes @mentions", "description": "Sends a text message that includes @mentions", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "content": { "type": "string", "minLength": 1, "description": "Message content" }, "hideTags": { "description": "Removes all tags within the message", "type": "boolean" }, "mentions": { "description": "List of mentioned contact IDs", "type": "array", "items": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } }, "required": [ "to", "content" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendTextWithMentions" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendReplyWithMentions": { "post": { "tags": [ "messages" ], "operationId": "sendReplyWithMentions", "summary": "Sends a reply to a message that includes @mentions", "description": "Sends a reply to a message that includes @mentions", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "content": { "type": "string", "minLength": 1, "description": "Message content" }, "replyMessageId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" }, "hideTags": { "description": "Removes all tags within the message", "type": "boolean" }, "mentions": { "description": "List of mentioned contact IDs", "type": "array", "items": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } }, "required": [ "to", "content", "replyMessageId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendReplyWithMentions" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendPaymentRequest": { "post": { "tags": [ "messages" ], "operationId": "sendPaymentRequest", "summary": "Sends a payment request message", "description": "Sends a payment request message", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "amount": { "type": "number", "description": "Amount in 1000 format (e.g £10 => 10000)" }, "currency": { "type": "string", "minLength": 3, "maxLength": 3, "description": "3 letter currency code" }, "message": { "description": "Optional message", "type": "string" } }, "required": [ "to", "amount", "currency" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendPaymentRequest" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendImage": { "post": { "tags": [ "messages" ], "operationId": "sendImage", "summary": "Sends an image to a chat", "description": "Sends an image to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "imgData": { "description": "Image file (path, URL, DataURL, or Base64)", "type": "string", "pattern": "^data:.+;base64,.+$" }, "filename": { "description": "Filename with extension", "type": "string" }, "caption": { "description": "Media caption", "type": "string" }, "id": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" }, "waitForId": { "default": false, "description": "Wait for message ID", "type": "boolean" } }, "required": [ "to", "imgData", "waitForId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendImage" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] }, { "type": "string" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendFile": { "post": { "tags": [ "messages" ], "operationId": "sendFile", "summary": "Sends a file or document to a chat", "description": "Sends a file or document to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "file": { "description": "File (path, URL, DataURL, Base64, or Buffer)", "type": "string", "pattern": "^data:.+;base64,.+$" }, "filename": { "description": "Filename with extension", "type": "string" }, "caption": { "description": "Media caption", "type": "string" } }, "required": [ "to", "file" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendFile" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "string" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendAudio": { "post": { "tags": [ "messages" ], "operationId": "sendAudio", "summary": "Sends an audio file to a chat", "description": "Sends an audio file to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "file": { "description": "Audio file (path, URL, DataURL, or Base64)", "type": "string", "pattern": "^data:.+;base64,.+$" }, "filename": { "description": "Filename with extension", "type": "string" }, "quotedMsgId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } }, "required": [ "to", "file" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendAudio" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendPtt": { "post": { "tags": [ "messages" ], "operationId": "sendPtt", "summary": "Sends a voice note (push-to-talk) to a chat", "description": "Sends a voice note (push-to-talk) to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "file": { "description": "Audio file (path, URL, DataURL, or Base64)", "type": "string", "pattern": "^data:.+;base64,.+$" }, "quotedMsgId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } }, "required": [ "to", "file" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendPtt", "POST /api/sendVoiceNote", "POST /api/messages/sendVoiceNote" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendVideoAsGif": { "post": { "tags": [ "messages" ], "operationId": "sendVideoAsGif", "summary": "Sends a video as an animated GIF", "description": "Sends a video as an animated GIF", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "file": { "description": "Video file (path, URL, DataURL, or Base64)", "type": "string", "pattern": "^data:.+;base64,.+$" }, "filename": { "description": "Filename with extension", "type": "string" }, "caption": { "description": "Media caption", "type": "string" }, "quotedMsgId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } }, "required": [ "to", "file" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendVideoAsGif" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendLocation": { "post": { "tags": [ "messages" ], "operationId": "sendLocation", "summary": "Sends a location to a chat", "description": "Sends a location to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "lat": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "description": "Latitude coordinate" }, "lng": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "description": "Longitude coordinate" }, "loc": { "description": "Location name or description", "type": "string" }, "address": { "description": "Address text", "type": "string" }, "url": { "description": "Address link", "type": "string", "format": "uri" } }, "required": [ "to", "lat", "lng" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendLocation" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendVCard": { "post": { "tags": [ "messages" ], "operationId": "sendVCard", "summary": "Sends a contact card (vCard)", "description": "Sends a contact card (vCard)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "vcard": { "type": "string", "description": "vCard string" }, "contactName": { "description": "Contact display name", "type": "string" }, "contactNumber": { "description": "Contact number with country code", "type": "string" } }, "required": [ "to", "vcard" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendVCard" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendContact": { "post": { "tags": [ "messages" ], "operationId": "sendContact", "summary": "Sends a single contact", "description": "Sends a single contact", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "contactId": { "anyOf": [ { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" }, { "type": "array", "items": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ] } }, "required": [ "to", "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendContact" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendContacts": { "post": { "tags": [ "messages" ], "operationId": "sendMultipleContacts", "summary": "Sends multiple contacts", "description": "Sends multiple contacts", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "contactIds": { "type": "array", "items": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } }, "required": [ "to", "contactIds" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendMultipleContacts", "POST /api/sendContacts", "POST /api/messages/sendMultipleContacts" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendButtons": { "post": { "tags": [ "messages" ], "operationId": "sendButtons", "summary": "Sends a button message (deprecated)", "description": "Sends a button message (deprecated)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "body": { "anyOf": [ { "type": "string" }, {} ], "description": "Message body or location" }, "buttons": { "maxItems": 3, "type": "array", "items": {}, "description": "Array of buttons (max 3)" }, "title": { "description": "Message title", "type": "string" }, "footer": { "description": "Message footer", "type": "string" } }, "required": [ "to", "body", "buttons" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendButtons" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendAdvancedButtons": { "post": { "tags": [ "messages" ], "operationId": "sendAdvancedButtons", "summary": "Sends an advanced button message with media (deprecated)", "description": "Sends an advanced button message with media (deprecated)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "body": { "anyOf": [ { "type": "string" }, {} ], "description": "Message body, location, or media" }, "buttons": { "maxItems": 3, "type": "array", "items": {}, "description": "Array of advanced buttons (max 3)" }, "text": { "type": "string", "description": "Message text" }, "footer": { "type": "string", "description": "Message footer" }, "filename": { "type": "string", "description": "Filename if body is a file" } }, "required": [ "to", "body", "buttons", "text", "footer", "filename" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendAdvancedButtons" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendList": { "post": { "tags": [ "messages" ], "operationId": "sendListMessage", "summary": "Sends a list/menu message (deprecated)", "description": "Sends a list/menu message (deprecated)", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "sections": { "type": "array", "items": {}, "description": "List sections" }, "title": { "type": "string", "description": "List title" }, "description": { "type": "string", "description": "List description" }, "actionText": { "type": "string", "description": "Action button text" } }, "required": [ "to", "sections", "title", "description", "actionText" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendListMessage", "POST /api/sendList" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendPoll": { "post": { "tags": [ "messages" ], "operationId": "sendPoll", "summary": "Sends a poll message", "description": "Sends a poll message", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "name": { "type": "string", "description": "Poll question" }, "options": { "minItems": 2, "maxItems": 12, "type": "array", "items": { "type": "string" }, "description": "Poll options (2-12)" }, "selectableCount": { "default": 1, "description": "Number of selectable options", "type": "number" } }, "required": [ "to", "name", "options", "selectableCount" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendPoll" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendBanner": { "post": { "tags": [ "messages" ], "operationId": "sendBanner", "summary": "Sends a banner image", "description": "Sends a banner image", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "base64": { "type": "string", "description": "Base64 encoded JPEG" } }, "required": [ "to", "base64" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendBanner" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendYouTubeLink": { "post": { "tags": [ "messages" ], "operationId": "sendYouTubeLink", "summary": "Sends a YouTube link with auto-generated preview", "description": "Sends a YouTube link with auto-generated preview", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "url": { "type": "string", "format": "uri", "description": "YouTube URL" }, "text": { "default": "", "type": "string", "minLength": 1, "description": "Message content" }, "thumbnail": { "description": "Base64 thumbnail override", "type": "string" }, "quotedMsgId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" }, "customSize": { "description": "Custom thumbnail size", "type": "object", "properties": { "height": { "type": "number" }, "width": { "type": "number" } }, "required": [ "height", "width" ], "additionalProperties": false } }, "required": [ "to", "url", "text" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendYouTubeLink", "POST /api/sendYoutubeLink", "POST /api/messages/sendYoutubeLink" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendLinkWithAutoPreview": { "post": { "tags": [ "messages" ], "operationId": "sendLinkWithAutoPreview", "summary": "Sends a link with auto-generated preview", "description": "Sends a link with auto-generated preview", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "url": { "type": "string", "format": "uri", "description": "Link URL" }, "text": { "type": "string", "minLength": 1, "description": "Message content" }, "thumbnail": { "description": "Base64 thumbnail override", "type": "string" }, "quotedMsgId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" }, "customSize": { "description": "Custom thumbnail size", "type": "object", "properties": { "height": { "type": "number" }, "width": { "type": "number" } }, "required": [ "height", "width" ], "additionalProperties": false } }, "required": [ "to", "url" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendLinkWithAutoPreview", "POST /api/sendLink", "POST /api/messages/sendLink" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendLinkWithThumbnail": { "post": { "tags": [ "messages" ], "operationId": "sendMessageWithThumb", "summary": "Sends a link preview message with custom thumbnail", "description": "Sends a link preview message with custom thumbnail", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "thumb": { "type": "string", "description": "Base64 thumbnail (max 200x200px)" }, "url": { "type": "string", "format": "uri", "description": "Link URL" }, "title": { "type": "string", "description": "Link title" }, "description": { "type": "string", "description": "Link description" }, "content": { "type": "string", "minLength": 1, "description": "Message content" }, "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "quotedMsgId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" }, "customSize": { "description": "Custom thumbnail size", "type": "object", "properties": { "height": { "type": "number" }, "width": { "type": "number" } }, "required": [ "height", "width" ], "additionalProperties": false } }, "required": [ "thumb", "url", "title", "description", "content", "to" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendMessageWithThumb", "POST /api/sendLinkWithThumbnail", "POST /api/messages/sendWithThumb" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/forward": { "post": { "tags": [ "messages" ], "operationId": "forwardMessages", "summary": "Forwards messages to a chat", "description": "Forwards messages to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "messages": { "anyOf": [ { "type": "array", "items": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } }, { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } ], "description": "Message ID(s) to process" }, "skipMyMessages": { "default": false, "description": "Skip own messages", "type": "boolean" } }, "required": [ "to", "messages", "skipMyMessages" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/forwardMessages" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "array", "items": { "type": "object", "properties": { "_serialized": { "type": "string" } }, "required": [ "_serialized" ], "additionalProperties": {} } }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/delete": { "delete": { "tags": [ "messages" ], "operationId": "deleteMessage", "summary": "Deletes a message", "description": "Deletes a message", "parameters": [ { "name": "chatId", "in": "query", "required": true, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, { "name": "messageId", "in": "query", "required": true, "description": "Message ID(s) to process", "schema": { "anyOf": [ { "type": "array", "items": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } }, { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } ], "description": "Message ID(s) to process" } }, { "name": "onlyLocal", "in": "query", "required": true, "description": "Delete only locally", "schema": { "default": false, "description": "Delete only locally", "type": "boolean" } } ], "x-openwa-aliases": [ "DELETE /api/deleteMessage" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/get": { "get": { "tags": [ "messages" ], "operationId": "getMessageById", "summary": "Retrieves a specific message by ID", "description": "Retrieves a specific message by ID", "parameters": [ { "name": "messageId", "in": "query", "required": true, "description": "Message ID", "schema": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } } ], "x-openwa-aliases": [ "GET /api/getMessageById", "GET /api/getMessage", "GET /api/messages/getById" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/getAll": { "get": { "tags": [ "messages" ], "operationId": "getAllMessages", "summary": "Retrieves all messages in the session", "description": "Retrieves all messages in the session", "parameters": [ { "name": "chatId", "in": "query", "required": false, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, { "name": "includeMe", "in": "query", "required": true, "description": "Include own messages", "schema": { "default": true, "description": "Include own messages", "type": "boolean" } }, { "name": "includeNotifications", "in": "query", "required": true, "description": "Include notification messages", "schema": { "default": false, "description": "Include notification messages", "type": "boolean" } } ], "x-openwa-aliases": [ "GET /api/getAllMessages", "GET /api/listMessages", "GET /api/messages/all", "GET /api/messages/list" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/getMyLast": { "get": { "tags": [ "messages" ], "operationId": "getMyLastMessage", "summary": "Get last message sent by host", "description": "Get last message sent by host", "parameters": [ { "name": "chatId", "in": "query", "required": false, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } } ], "x-openwa-aliases": [ "GET /api/getMyLastMessage" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/getStarred": { "get": { "tags": [ "messages" ], "operationId": "getStarredMessages", "summary": "Get starred messages", "description": "Get starred messages", "parameters": [ { "name": "chatId", "in": "query", "required": false, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } } ], "x-openwa-aliases": [ "GET /api/getStarredMessages" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/getUnsent": { "get": { "tags": [ "messages" ], "operationId": "getUnsentMessages", "summary": "Get unsent/pending messages", "description": "Get unsent/pending messages", "parameters": [], "x-openwa-aliases": [ "GET /api/getUnsentMessages" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/getInfo": { "get": { "tags": [ "messages" ], "operationId": "getMessageInfo", "summary": "Get message delivery info", "description": "Get message delivery info", "parameters": [ { "name": "messageId", "in": "query", "required": true, "description": "Message ID", "schema": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } } ], "x-openwa-aliases": [ "GET /api/getMessageInfo" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/getVCards": { "get": { "tags": [ "messages" ], "operationId": "getVCards", "summary": "Extract vCards from message", "description": "Extract vCards from message", "parameters": [ { "name": "messageId", "in": "query", "required": true, "description": "Message ID", "schema": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } } ], "x-openwa-aliases": [ "GET /api/getVCards" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/getForLLM": { "get": { "tags": [ "messages" ], "operationId": "getMessagesForLLM", "summary": "Get messages formatted for LLMs", "description": "Get messages formatted for LLMs", "parameters": [ { "name": "chatId", "in": "query", "required": true, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, { "name": "last", "in": "query", "required": true, "description": "Argument: last", "schema": { "default": 10, "type": "number" } } ], "x-openwa-aliases": [ "GET /api/getMessagesForLLM", "GET /api/getGptArray", "GET /api/messages/getGptArray" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/star": { "put": { "tags": [ "messages" ], "operationId": "starMessage", "summary": "Star a message", "description": "Star a message", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "messageId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } }, "required": [ "messageId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/starMessage" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/unstar": { "put": { "tags": [ "messages" ], "operationId": "unstarMessage", "summary": "Unstar a message", "description": "Unstar a message", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "messageId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" } }, "required": [ "messageId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/unstarMessage" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/react": { "post": { "tags": [ "messages" ], "operationId": "react", "summary": "React to message with emoji", "description": "React to message with emoji", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "messageId": { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" }, "emoji": { "type": "string", "description": "Emoji reaction" } }, "required": [ "messageId", "emoji" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/react" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendSeen": { "put": { "tags": [ "messages" ], "operationId": "sendSeen", "summary": "Mark message as seen", "description": "Mark message as seen", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/sendSeen" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/loadEarlier": { "post": { "tags": [ "messages" ], "operationId": "loadEarlierMessages", "summary": "Loads earlier messages from a chat", "description": "Loads earlier messages from a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "count": { "description": "Number of messages to load (default: 20)", "type": "number", "minimum": 0, "exclusiveMinimum": true }, "includeMe": { "description": "Whether to include messages from the host account (default: false)", "type": "boolean" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/loadEarlierMessages", "POST /api/loadOlderMessages", "POST /api/messages/loadOlder" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/messages/sendFileFromUrl": { "post": { "tags": [ "messages" ], "operationId": "sendFileFromUrl", "summary": "Downloads a file from a URL and sends it to a chat", "description": "Downloads a file from a URL and sends it to a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "to": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "url": { "type": "string", "format": "uri", "description": "URL of the file to download" }, "filename": { "type": "string", "description": "Filename for the sent file" }, "caption": { "description": "Caption for the file", "type": "string" }, "headers": { "description": "HTTP headers for the download request", "type": "object", "additionalProperties": { "type": "string" } } }, "required": [ "to", "url", "filename" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/sendFileFromUrl" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "boolean" } ], "description": "Message ID or success status" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/getAll": { "get": { "tags": [ "chats" ], "operationId": "getAllChats", "summary": "Retrieves all chats", "description": "Retrieves all chats", "parameters": [ { "name": "withNewMessagesOnly", "in": "query", "required": true, "description": "Only chats with unread messages", "schema": { "default": false, "description": "Only chats with unread messages", "type": "boolean" } } ], "x-openwa-aliases": [ "GET /api/getAllChats", "GET /api/listChats", "GET /api/chats/all", "GET /api/chats/list" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chatIds/getAll": { "get": { "tags": [ "chatIds" ], "operationId": "getAllChatIds", "summary": "Get all chat IDs", "description": "Get all chat IDs", "parameters": [], "x-openwa-aliases": [ "GET /api/getAllChatIds", "GET /api/chats/ids", "GET /api/listChatIds", "GET /api/chatIds/all", "GET /api/chatIds/list" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/get": { "get": { "tags": [ "chats" ], "operationId": "getChat", "summary": "Get specific chat by ID", "description": "Get specific chat by ID", "parameters": [ { "name": "chatId", "in": "query", "required": true, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } } ], "x-openwa-aliases": [ "GET /api/getChat", "GET /api/getChatById", "GET /api/chats/getById" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/getWithNonContacts": { "get": { "tags": [ "chats" ], "operationId": "getChatWithNonContacts", "summary": "Get chats with non-contacts", "description": "Get chats with non-contacts", "parameters": [], "x-openwa-aliases": [ "GET /api/getChatWithNonContacts" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/archive": { "put": { "tags": [ "chats" ], "operationId": "archiveChat", "summary": "Archive a chat", "description": "Archive a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/archiveChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/unarchive": { "put": { "tags": [ "chats" ], "operationId": "unarchiveChat", "summary": "Unarchive a chat", "description": "Unarchive a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/unarchiveChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/clear": { "delete": { "tags": [ "chats" ], "operationId": "clearChat", "summary": "Clear chat history", "description": "Clear chat history", "parameters": [ { "name": "chatId", "in": "query", "required": true, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } } ], "x-openwa-aliases": [ "DELETE /api/clearChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/delete": { "delete": { "tags": [ "chats" ], "operationId": "deleteChat", "summary": "Delete a chat", "description": "Delete a chat", "parameters": [ { "name": "chatId", "in": "query", "required": true, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } } ], "x-openwa-aliases": [ "DELETE /api/deleteChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/pin": { "put": { "tags": [ "chats" ], "operationId": "pinChat", "summary": "Pin a chat", "description": "Pin a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/pinChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/unpin": { "put": { "tags": [ "chats" ], "operationId": "unpinChat", "summary": "Unpin a chat", "description": "Unpin a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/unpinChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/mute": { "put": { "tags": [ "chats" ], "operationId": "muteChat", "summary": "Mute a chat", "description": "Mute a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "muteDuration": { "anyOf": [ { "type": "number" }, { "type": "string" } ], "description": "Mute duration" } }, "required": [ "chatId", "muteDuration" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/muteChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/unmute": { "put": { "tags": [ "chats" ], "operationId": "unmuteChat", "summary": "Unmute a chat", "description": "Unmute a chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/unmuteChat" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/markAsRead": { "put": { "tags": [ "chats" ], "operationId": "markAsRead", "summary": "Mark chat as read", "description": "Mark chat as read", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/markAsRead" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/markAsUnread": { "put": { "tags": [ "chats" ], "operationId": "markAsUnread", "summary": "Mark chat as unread", "description": "Mark chat as unread", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/markAsUnread" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/setEphemeral": { "put": { "tags": [ "chats" ], "operationId": "setChatEphemeral", "summary": "Set ephemeral messages for chat", "description": "Set ephemeral messages for chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" }, "ephemeral": { "anyOf": [ { "type": "boolean" }, { "type": "number" } ], "description": "Ephemeral setting" } }, "required": [ "chatId", "ephemeral" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setChatEphemeral" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/chats/isOnline": { "get": { "tags": [ "chats" ], "operationId": "isChatOnline", "summary": "Check if chat is online", "description": "Check if chat is online", "parameters": [ { "name": "chatId", "in": "query", "required": true, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } } ], "x-openwa-aliases": [ "GET /api/isChatOnline" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "boolean" }, { "type": "string" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/getAll": { "get": { "tags": [ "contacts" ], "operationId": "getAllContacts", "summary": "Retrieves all contacts", "description": "Retrieves all contacts", "parameters": [], "x-openwa-aliases": [ "GET /api/getAllContacts", "GET /api/listContacts", "GET /api/contacts/all", "GET /api/contacts/list" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/get": { "get": { "tags": [ "contacts" ], "operationId": "getContact", "summary": "Get specific contact", "description": "Get specific contact", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getContact" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/getCommonGroups": { "get": { "tags": [ "contacts" ], "operationId": "getCommonGroups", "summary": "Get common groups with contact", "description": "Get common groups with contact", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getCommonGroups" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/getNumberProfile": { "get": { "tags": [ "contacts" ], "operationId": "getNumberProfile", "summary": "Get profile of number", "description": "Get profile of number", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getNumberProfile" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/getBlockedIds": { "get": { "tags": [ "contacts" ], "operationId": "getBlockedIds", "summary": "Get blocked contact IDs", "description": "Get blocked contact IDs", "parameters": [], "x-openwa-aliases": [ "GET /api/getBlockedIds" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/block": { "put": { "tags": [ "contacts" ], "operationId": "blockContact", "summary": "Block a contact", "description": "Block a contact", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/blockContact", "PUT /api/contactBlock", "PUT /api/contacts/contactBlock" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/unblock": { "put": { "tags": [ "contacts" ], "operationId": "unblockContact", "summary": "Unblock a contact", "description": "Unblock a contact", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/unblockContact", "PUT /api/contactUnblock", "PUT /api/contacts/contactUnblock" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/checkReadReceipts": { "get": { "tags": [ "contacts" ], "operationId": "checkReadReceipts", "summary": "Check read receipts setting", "description": "Check read receipts setting", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/checkReadReceipts", "GET /api/getReadReceipts", "GET /api/contacts/getReadReceipts" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "boolean" }, { "type": "string" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/checkNumberStatus": { "get": { "tags": [ "contacts" ], "operationId": "checkNumberStatus", "summary": "Check if number is on WhatsApp", "description": "Check if number is on WhatsApp", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/checkNumberStatus" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/contacts/getProfilePicture": { "get": { "tags": [ "contacts" ], "operationId": "getProfilePicture", "summary": "Get profile picture from server", "description": "Get profile picture from server", "parameters": [ { "name": "chatId", "in": "query", "required": true, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } } ], "x-openwa-aliases": [ "GET /api/getProfilePicture", "GET /api/getProfilePicFromServer", "GET /api/contacts/getProfilePicFromServer" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/getMembers": { "get": { "tags": [ "groups" ], "operationId": "getGroupMembers", "summary": "Retrieves members of a group", "description": "Retrieves members of a group", "parameters": [ { "name": "groupId", "in": "query", "required": true, "description": "Group chat ID", "schema": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getGroupMembers" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/getAll": { "get": { "tags": [ "groups" ], "operationId": "getAllGroups", "summary": "Get all groups", "description": "Get all groups", "parameters": [ { "name": "withNewMessagesOnly", "in": "query", "required": true, "description": "Only chats with unread messages", "schema": { "default": false, "description": "Only chats with unread messages", "type": "boolean" } } ], "x-openwa-aliases": [ "GET /api/getAllGroups", "GET /api/listGroups", "GET /api/groups/all", "GET /api/groups/list" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/getMemberIds": { "get": { "tags": [ "groups" ], "operationId": "getGroupMembersId", "summary": "Get group member IDs", "description": "Get group member IDs", "parameters": [ { "name": "groupId", "in": "query", "required": true, "description": "Group chat ID", "schema": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getGroupMembersId", "GET /api/getGroupMemberIds", "GET /api/groups/getMembersId" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/getInfo": { "get": { "tags": [ "groups" ], "operationId": "getGroupInfo", "summary": "Get group metadata", "description": "Get group metadata", "parameters": [ { "name": "groupId", "in": "query", "required": true, "description": "Group chat ID", "schema": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getGroupInfo" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/getAdmins": { "get": { "tags": [ "groups" ], "operationId": "getGroupAdmins", "summary": "Get group admins", "description": "Get group admins", "parameters": [ { "name": "groupId", "in": "query", "required": true, "description": "Group chat ID", "schema": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getGroupAdmins" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/getKicked": { "get": { "tags": [ "groups" ], "operationId": "getKickedGroups", "summary": "Get groups where kicked", "description": "Get groups where kicked", "parameters": [], "x-openwa-aliases": [ "GET /api/getKickedGroups" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/getInviteLink": { "get": { "tags": [ "groups" ], "operationId": "getGroupInviteLink", "summary": "Get group invite link", "description": "Get group invite link", "parameters": [ { "name": "groupId", "in": "query", "required": true, "description": "Group chat ID", "schema": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getGroupInviteLink" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/create": { "post": { "tags": [ "groups" ], "operationId": "createGroup", "summary": "Create new group", "description": "Create new group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Group name" }, "contacts": { "type": "array", "items": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" }, "description": "Contact IDs to add" } }, "required": [ "name", "contacts" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/createGroup" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/leave": { "put": { "tags": [ "groups" ], "operationId": "leaveGroup", "summary": "Leave a group", "description": "Leave a group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } }, "required": [ "groupId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/leaveGroup" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/join": { "post": { "tags": [ "groups" ], "operationId": "joinGroupViaLink", "summary": "Join group via invite link", "description": "Join group via invite link", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "link": { "type": "string", "format": "uri", "description": "Group invite link" }, "returnChatObj": { "description": "Return chat object", "type": "boolean" } }, "required": [ "link" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/joinGroupViaLink", "POST /api/joinGroup", "POST /api/groups/joinViaLink" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "boolean" }, { "type": "number" }, {} ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/revokeInviteLink": { "put": { "tags": [ "groups" ], "operationId": "revokeGroupInviteLink", "summary": "Revoke group invite link", "description": "Revoke group invite link", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } }, "required": [ "groupId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/revokeGroupInviteLink" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/setTitle": { "put": { "tags": [ "groups" ], "operationId": "setGroupTitle", "summary": "Set group title", "description": "Set group title", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "title": { "type": "string", "description": "New group title" } }, "required": [ "groupId", "title" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setGroupTitle" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/setDescription": { "put": { "tags": [ "groups" ], "operationId": "setGroupDescription", "summary": "Set group description", "description": "Set group description", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "description": { "type": "string", "description": "New group description" } }, "required": [ "groupId", "description" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setGroupDescription" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/setIcon": { "put": { "tags": [ "groups" ], "operationId": "setGroupIcon", "summary": "Set group icon", "description": "Set group icon", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "image": { "type": "string", "description": "Image data URL" } }, "required": [ "groupId", "image" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setGroupIcon" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/setAdminsOnly": { "put": { "tags": [ "groups" ], "operationId": "setGroupToAdminsOnly", "summary": "Restrict group to admins only", "description": "Restrict group to admins only", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "onlyAdmins": { "type": "boolean", "description": "Admins only setting" } }, "required": [ "groupId", "onlyAdmins" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setGroupToAdminsOnly", "PUT /api/groups/setToAdminsOnly" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/setEditAdminsOnly": { "put": { "tags": [ "groups" ], "operationId": "setGroupEditToAdminsOnly", "summary": "Restrict group editing to admins only", "description": "Restrict group editing to admins only", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "onlyAdmins": { "type": "boolean", "description": "Admins only setting" } }, "required": [ "groupId", "onlyAdmins" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setGroupEditToAdminsOnly", "PUT /api/groups/setEditToAdminsOnly" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/addParticipant": { "put": { "tags": [ "groups" ], "operationId": "addParticipant", "summary": "Add participant to group", "description": "Add participant to group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "groupId", "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/addParticipant", "PUT /api/addGroupParticipant" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/removeParticipant": { "put": { "tags": [ "groups" ], "operationId": "removeParticipant", "summary": "Remove participant from group", "description": "Remove participant from group", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "groupId", "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/removeParticipant", "PUT /api/removeGroupParticipant" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/promoteParticipant": { "put": { "tags": [ "groups" ], "operationId": "promoteParticipant", "summary": "Promote participant to admin", "description": "Promote participant to admin", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "groupId", "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/promoteParticipant", "PUT /api/promoteGroupParticipant" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "boolean" }, { "type": "string" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/demoteParticipant": { "put": { "tags": [ "groups" ], "operationId": "demoteParticipant", "summary": "Demote participant from admin", "description": "Demote participant from admin", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "groupId", "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/demoteParticipant", "PUT /api/demoteGroupParticipant" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "boolean" }, { "type": "string" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/approveJoinRequest": { "put": { "tags": [ "groups" ], "operationId": "approveGroupJoinRequest", "summary": "Approve group join request", "description": "Approve group join request", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "groupId", "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/approveGroupJoinRequest" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/groups/rejectJoinRequest": { "put": { "tags": [ "groups" ], "operationId": "rejectGroupJoinRequest", "summary": "Reject group join request", "description": "Reject group join request", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "groupId": { "description": "Group chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" }, "contactId": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } }, "required": [ "groupId", "contactId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/rejectGroupJoinRequest" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ { "type": "string" }, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/communities/getAll": { "get": { "tags": [ "communities" ], "operationId": "getAllCommunities", "summary": "Get all communities", "description": "Get all communities", "parameters": [], "x-openwa-aliases": [ "GET /api/getAllCommunities", "GET /api/listCommunities", "GET /api/communities/all", "GET /api/communities/list" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" } } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/communities/getInfo": { "get": { "tags": [ "communities" ], "operationId": "getCommunityInfo", "summary": "Get community metadata", "description": "Get community metadata", "parameters": [ { "name": "communityId", "in": "query", "required": true, "description": "Community ID", "schema": { "description": "Community ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getCommunityInfo" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/communities/getParticipantIds": { "get": { "tags": [ "communities" ], "operationId": "getCommunityParticipantIds", "summary": "Get community participant IDs", "description": "Get community participant IDs", "parameters": [ { "name": "communityId", "in": "query", "required": true, "description": "Community ID", "schema": { "description": "Community ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getCommunityParticipantIds" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/communities/getAdminIds": { "get": { "tags": [ "communities" ], "operationId": "getCommunityAdminIds", "summary": "Get community admin IDs", "description": "Get community admin IDs", "parameters": [ { "name": "communityId", "in": "query", "required": true, "description": "Community ID", "schema": { "description": "Community ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getCommunityAdminIds" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/communities/getParticipants": { "get": { "tags": [ "communities" ], "operationId": "getCommunityParticipants", "summary": "Get community participants", "description": "Get community participants", "parameters": [ { "name": "communityId", "in": "query", "required": true, "description": "Community ID", "schema": { "description": "Community ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getCommunityParticipants" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/communities/getAdmins": { "get": { "tags": [ "communities" ], "operationId": "getCommunityAdmins", "summary": "Get community admins", "description": "Get community admins", "parameters": [ { "name": "communityId", "in": "query", "required": true, "description": "Community ID", "schema": { "description": "Community ID", "type": "string", "pattern": "^\\d+(-\\d+)?@g\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getCommunityAdmins" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/status/postText": { "post": { "tags": [ "status" ], "operationId": "postTextStatus", "summary": "Post text status", "description": "Post text status", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "text": { "type": "string", "description": "Status text" }, "backgroundColor": { "description": "Background color", "type": "string" }, "font": { "description": "Font style", "type": "number" } }, "required": [ "text" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/postTextStatus" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/status/postImage": { "post": { "tags": [ "status" ], "operationId": "postImageStatus", "summary": "Post image status", "description": "Post image status", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "image": { "type": "string", "description": "Image data URL" }, "caption": { "description": "Status caption", "type": "string" } }, "required": [ "image" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/postImageStatus" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/status/postVideo": { "post": { "tags": [ "status" ], "operationId": "postVideoStatus", "summary": "Post video status", "description": "Post video status", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "video": { "type": "string", "description": "Video data URL" }, "caption": { "description": "Status caption", "type": "string" } }, "required": [ "video" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/postVideoStatus" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/status/getAll": { "get": { "tags": [ "status" ], "operationId": "getStories", "summary": "Get all stories", "description": "Get all stories", "parameters": [], "x-openwa-aliases": [ "GET /api/getStories", "GET /api/getStatuses", "GET /api/status/getStories", "GET /api/status/get" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/mystatus/getStatus": { "get": { "tags": [ "mystatus" ], "operationId": "getStatus", "summary": "Get specific status", "description": "Get specific status", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getStatus" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/status/delete": { "delete": { "tags": [ "status" ], "operationId": "deleteStatus", "summary": "Delete status", "description": "Delete status", "parameters": [ { "name": "statusesToDelete", "in": "query", "required": true, "description": "Status ID(s)", "schema": { "anyOf": [ { "type": "string" }, { "type": "array", "items": { "type": "string" } } ], "description": "Status ID(s)" } } ], "x-openwa-aliases": [ "DELETE /api/deleteStatus" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/status/deleteAll": { "delete": { "tags": [ "status" ], "operationId": "deleteAllStatus", "summary": "Delete all statuses", "description": "Delete all statuses", "parameters": [], "x-openwa-aliases": [ "DELETE /api/deleteAllStatus", "DELETE /api/deleteAllStatuses" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/labels/getAll": { "get": { "tags": [ "labels" ], "operationId": "getAllLabels", "summary": "Get all labels", "description": "Get all labels", "parameters": [], "x-openwa-aliases": [ "GET /api/getAllLabels", "GET /api/listLabels", "GET /api/labels/all", "GET /api/labels/list" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/labels/getChats": { "get": { "tags": [ "labels" ], "operationId": "getChatsByLabel", "summary": "Get chats by label", "description": "Get chats by label", "parameters": [ { "name": "label", "in": "query", "required": true, "description": "Label name", "schema": { "type": "string", "description": "Label name" } } ], "x-openwa-aliases": [ "GET /api/getChatsByLabel", "GET /api/labels/getChatsBy" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "array", "items": {} } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/labels/add": { "put": { "tags": [ "labels" ], "operationId": "addLabel", "summary": "Add label to chat", "description": "Add label to chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "label": { "type": "string", "description": "Label ID or name" }, "chatId": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "label", "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/addLabel" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/labels/remove": { "put": { "tags": [ "labels" ], "operationId": "removeLabel", "summary": "Remove label from chat", "description": "Remove label from chat", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "label": { "type": "string", "description": "Label ID or name" }, "chatId": { "description": "Recipient chat ID", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, "required": [ "label", "chatId" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/removeLabel" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/business/getProfile": { "get": { "tags": [ "business" ], "operationId": "getBusinessProfile", "summary": "Get business profile", "description": "Get business profile", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getBusinessProfile" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/business/getProducts": { "get": { "tags": [ "business" ], "operationId": "getBusinessProducts", "summary": "Get business products", "description": "Get business products", "parameters": [ { "name": "contactId", "in": "query", "required": true, "description": "Contact ID", "schema": { "description": "Contact ID", "type": "string", "pattern": "^\\d+@c\\.us$" } } ], "x-openwa-aliases": [ "GET /api/getBusinessProducts", "GET /api/getBusinessProfilesProducts", "GET /api/business/getProfilesProducts" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/business/getOrder": { "get": { "tags": [ "business" ], "operationId": "getOrder", "summary": "Get order details", "description": "Get order details", "parameters": [ { "name": "id", "in": "query", "required": true, "description": "Order or message ID", "schema": { "anyOf": [ { "description": "Message ID", "type": "string", "pattern": "^(true|false)_.+_.+$" }, { "type": "string" } ], "description": "Order or message ID" } } ], "x-openwa-aliases": [ "GET /api/getOrder" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getMe": { "get": { "tags": [ "session" ], "operationId": "getMe", "summary": "Get host account info", "description": "Get host account info", "parameters": [], "x-openwa-aliases": [ "GET /api/getMe" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getHostNumber": { "get": { "tags": [ "session" ], "operationId": "getHostNumber", "summary": "Get host phone number", "description": "Get host phone number", "parameters": [], "x-openwa-aliases": [ "GET /api/getHostNumber" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getConnectionState": { "get": { "tags": [ "session" ], "operationId": "getConnectionState", "summary": "Get connection state", "description": "Get connection state", "parameters": [], "x-openwa-aliases": [ "GET /api/getConnectionState" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getWAVersion": { "get": { "tags": [ "session" ], "operationId": "getWAVersion", "summary": "Get WhatsApp Web version", "description": "Get WhatsApp Web version", "parameters": [], "x-openwa-aliases": [ "GET /api/getWAVersion", "GET /api/getWhatsAppVersion", "GET /api/session/getWhatsAppVersion" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getBatteryLevel": { "get": { "tags": [ "session" ], "operationId": "getBatteryLevel", "summary": "Get phone battery level", "description": "Get phone battery level", "parameters": [], "x-openwa-aliases": [ "GET /api/getBatteryLevel" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "number" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/isPlugged": { "get": { "tags": [ "session" ], "operationId": "isPlugged", "summary": "Check if phone is charging", "description": "Check if phone is charging", "parameters": [], "x-openwa-aliases": [ "GET /api/isPlugged", "GET /api/getIsPlugged", "GET /api/session/getIsPlugged" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getFeatures": { "get": { "tags": [ "session" ], "operationId": "getFeatures", "summary": "Get enabled features", "description": "Get enabled features", "parameters": [], "x-openwa-aliases": [ "GET /api/getFeatures" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getLicenseType": { "get": { "tags": [ "session" ], "operationId": "getLicenseType", "summary": "Get license type", "description": "Get license type", "parameters": [], "x-openwa-aliases": [ "GET /api/getLicenseType" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "anyOf": [ {}, { "type": "boolean" } ] } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getUserAgent": { "get": { "tags": [ "session" ], "operationId": "getUserAgent", "summary": "Get user agent", "description": "Get user agent", "parameters": [ { "name": "userAgent", "in": "query", "required": false, "description": "User agent string", "schema": { "description": "User agent string", "type": "string" } } ], "x-openwa-aliases": [ "GET /api/getUserAgent", "GET /api/getGeneratedUserAgent", "GET /api/session/getGeneratedUserAgent" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getProcessStats": { "get": { "tags": [ "session" ], "operationId": "getProcessStats", "summary": "Get process statistics", "description": "Get process statistics", "parameters": [], "x-openwa-aliases": [ "GET /api/getProcessStats" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getLoadedMessageCount": { "get": { "tags": [ "session" ], "operationId": "getLoadedMessageCount", "summary": "Get loaded message count", "description": "Get loaded message count", "parameters": [], "x-openwa-aliases": [ "GET /api/getLoadedMessageCount", "GET /api/getAmountOfLoadedMessages", "GET /api/session/getAmountOfLoadedMessages" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "number" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/getSnapshot": { "get": { "tags": [ "session" ], "operationId": "getSnapshot", "summary": "Take screenshot", "description": "Take screenshot", "parameters": [ { "name": "chatId", "in": "query", "required": false, "description": "Chat ID (phone number or formatted ID)", "schema": { "description": "Chat ID (phone number or formatted ID)", "type": "string", "pattern": "^\\d+(-\\d+)?@(c|g)\\.us$|^\\d+@lid$" } }, { "name": "width", "in": "query", "required": false, "description": "Argument: width", "schema": { "type": "number" } }, { "name": "height", "in": "query", "required": false, "description": "Argument: height", "schema": { "type": "number" } } ], "x-openwa-aliases": [ "GET /api/getSnapshot", "GET /api/takeScreenshot", "GET /api/session/takeScreenshot" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/healthCheck": { "get": { "tags": [ "session" ], "operationId": "healthCheck", "summary": "Health check", "description": "Health check", "parameters": [], "x-openwa-aliases": [ "GET /api/healthCheck" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": {} } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/setName": { "put": { "tags": [ "session" ], "operationId": "setMyName", "summary": "Set host name", "description": "Set host name", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "Display name" } }, "required": [ "name" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setMyName", "PUT /api/setDisplayName", "PUT /api/session/setMyName", "PUT /api/session/setDisplayName" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/setStatus": { "put": { "tags": [ "session" ], "operationId": "setMyStatus", "summary": "Set host status", "description": "Set host status", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "statusText": { "type": "string", "description": "Status text" } }, "required": [ "statusText" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setMyStatus", "PUT /api/setStatusText", "PUT /api/session/setMyStatus", "PUT /api/session/setStatusText" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/session/setProfilePicture": { "put": { "tags": [ "session" ], "operationId": "setProfilePicture", "summary": "Set profile picture", "description": "Set profile picture", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "image": { "description": "Image file (path, URL, DataURL, or Base64)", "type": "string", "pattern": "^data:.+;base64,.+$" } }, "required": [ "image" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "PUT /api/setProfilePicture", "PUT /api/setProfilePic", "PUT /api/session/setProfilePic" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "boolean" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/media/decrypt": { "post": { "tags": [ "media" ], "operationId": "decryptMedia", "summary": "Decrypts media from a message", "description": "Decrypts media from a message", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "object", "properties": { "id": { "type": "string" }, "body": { "type": "string" }, "type": { "type": "string", "enum": [ "chat", "audio", "ptt", "image", "video", "document", "sticker", "location", "vcard", "multi_vcard", "revoked", "order", "buttons_response", "list_response", "unknown" ] }, "t": { "type": "number" }, "notifyName": { "type": "string" }, "from": { "type": "string" }, "to": { "type": "string" }, "self": { "type": "string", "enum": [ "in", "out" ] }, "ack": { "type": "number", "enum": [ -1, 0, 1, 2, 3, 4 ] }, "invis": { "type": "boolean" }, "isNewMsg": { "type": "boolean" }, "star": { "type": "boolean" }, "recvFresh": { "type": "boolean" }, "broadcast": { "type": "boolean" }, "isForwarded": { "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } }, "mentionedJidList": { "type": "array", "items": { "type": "string" } }, "caption": { "type": "string" }, "sender": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "shortName": { "type": "string" }, "pushname": { "type": "string" }, "formattedName": { "type": "string" }, "isBusiness": { "type": "boolean" }, "isEnterprise": { "type": "boolean" }, "isMe": { "type": "boolean" }, "isMyContact": { "type": "boolean" }, "isPSA": { "type": "boolean" }, "isUser": { "type": "boolean" }, "isWAContact": { "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } }, "msgs": { "type": "array", "items": {} }, "profilePicThumbObj": { "type": "object", "properties": { "eurl": { "type": "string" }, "id": { "type": "object", "properties": { "server": { "type": "string" }, "user": { "type": "string" }, "_serialized": { "type": "string" } }, "required": [ "server", "user", "_serialized" ], "additionalProperties": false }, "img": { "type": "string" }, "imgFull": { "type": "string" }, "tag": { "type": "string" } }, "additionalProperties": false }, "statusMute": { "type": "boolean" }, "type": { "type": "string" }, "verifiedLevel": { "type": "number" }, "verifiedName": { "type": "string" }, "isOnline": { "type": "boolean" }, "lastSeen": { "type": "number" } }, "required": [ "id" ], "additionalProperties": {} }, "timestamp": { "type": "number" }, "content": { "type": "string" }, "isGroupMsg": { "type": "boolean" }, "isMMS": { "type": "boolean" }, "isMedia": { "type": "boolean" }, "isNotification": { "type": "boolean" }, "isPSA": { "type": "boolean" }, "fromMe": { "type": "boolean" }, "chat": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "string" } ] }, "name": { "type": "string" }, "formattedTitle": { "type": "string" }, "isGroup": { "type": "boolean" }, "contact": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "shortName": { "type": "string" }, "pushname": { "type": "string" }, "formattedName": { "type": "string" }, "isBusiness": { "type": "boolean" }, "isEnterprise": { "type": "boolean" }, "isMe": { "type": "boolean" }, "isMyContact": { "type": "boolean" }, "isPSA": { "type": "boolean" }, "isUser": { "type": "boolean" }, "isWAContact": { "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } }, "msgs": { "type": "array", "items": {} }, "profilePicThumbObj": { "type": "object", "properties": { "eurl": { "type": "string" }, "id": { "type": "object", "properties": { "server": { "type": "string" }, "user": { "type": "string" }, "_serialized": { "type": "string" } }, "required": [ "server", "user", "_serialized" ], "additionalProperties": false }, "img": { "type": "string" }, "imgFull": { "type": "string" }, "tag": { "type": "string" } }, "additionalProperties": false }, "statusMute": { "type": "boolean" }, "type": { "type": "string" }, "verifiedLevel": { "type": "number" }, "verifiedName": { "type": "string" }, "isOnline": { "type": "boolean" }, "lastSeen": { "type": "number" } }, "required": [ "id" ], "additionalProperties": {} }, "groupMetadata": {}, "presence": {}, "t": { "type": "number" }, "unreadCount": { "type": "number" }, "lastReceivedKey": {}, "msgs": { "type": "array", "items": {} }, "isReadOnly": { "type": "boolean" }, "muteExpiration": { "type": "number" }, "notSpam": { "type": "boolean" }, "pin": { "type": "number" }, "ack": {} }, "required": [ "id", "isGroup", "contact" ], "additionalProperties": {} }, "chatId": { "type": "string" }, "author": { "type": "string" }, "clientUrl": { "type": "string" }, "deprecatedMms3Url": { "type": "string" }, "isQuotedMsgAvailable": { "type": "boolean" }, "quotedMsg": {}, "quotedMsgObj": {}, "senderId": { "type": "string" } }, "required": [ "id", "body", "type", "t", "from", "to", "self", "ack", "sender", "timestamp", "content", "isGroupMsg", "isMedia", "isNotification", "fromMe", "chat", "chatId", "isQuotedMsgAvailable" ], "additionalProperties": {}, "description": "Message object containing media" } }, "required": [ "message" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/decryptMedia" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string", "description": "Base64 encoded decrypted media" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } }, "/api/media/download": { "post": { "tags": [ "media" ], "operationId": "downloadMedia", "summary": "Downloads and decrypts media from a message to a file", "description": "Downloads and decrypts media from a message to a file", "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "object", "properties": { "id": { "type": "string" }, "body": { "type": "string" }, "type": { "type": "string", "enum": [ "chat", "audio", "ptt", "image", "video", "document", "sticker", "location", "vcard", "multi_vcard", "revoked", "order", "buttons_response", "list_response", "unknown" ] }, "t": { "type": "number" }, "notifyName": { "type": "string" }, "from": { "type": "string" }, "to": { "type": "string" }, "self": { "type": "string", "enum": [ "in", "out" ] }, "ack": { "type": "number", "enum": [ -1, 0, 1, 2, 3, 4 ] }, "invis": { "type": "boolean" }, "isNewMsg": { "type": "boolean" }, "star": { "type": "boolean" }, "recvFresh": { "type": "boolean" }, "broadcast": { "type": "boolean" }, "isForwarded": { "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } }, "mentionedJidList": { "type": "array", "items": { "type": "string" } }, "caption": { "type": "string" }, "sender": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "shortName": { "type": "string" }, "pushname": { "type": "string" }, "formattedName": { "type": "string" }, "isBusiness": { "type": "boolean" }, "isEnterprise": { "type": "boolean" }, "isMe": { "type": "boolean" }, "isMyContact": { "type": "boolean" }, "isPSA": { "type": "boolean" }, "isUser": { "type": "boolean" }, "isWAContact": { "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } }, "msgs": { "type": "array", "items": {} }, "profilePicThumbObj": { "type": "object", "properties": { "eurl": { "type": "string" }, "id": { "type": "object", "properties": { "server": { "type": "string" }, "user": { "type": "string" }, "_serialized": { "type": "string" } }, "required": [ "server", "user", "_serialized" ], "additionalProperties": false }, "img": { "type": "string" }, "imgFull": { "type": "string" }, "tag": { "type": "string" } }, "additionalProperties": false }, "statusMute": { "type": "boolean" }, "type": { "type": "string" }, "verifiedLevel": { "type": "number" }, "verifiedName": { "type": "string" }, "isOnline": { "type": "boolean" }, "lastSeen": { "type": "number" } }, "required": [ "id" ], "additionalProperties": {} }, "timestamp": { "type": "number" }, "content": { "type": "string" }, "isGroupMsg": { "type": "boolean" }, "isMMS": { "type": "boolean" }, "isMedia": { "type": "boolean" }, "isNotification": { "type": "boolean" }, "isPSA": { "type": "boolean" }, "fromMe": { "type": "boolean" }, "chat": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "string" } ] }, "name": { "type": "string" }, "formattedTitle": { "type": "string" }, "isGroup": { "type": "boolean" }, "contact": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "shortName": { "type": "string" }, "pushname": { "type": "string" }, "formattedName": { "type": "string" }, "isBusiness": { "type": "boolean" }, "isEnterprise": { "type": "boolean" }, "isMe": { "type": "boolean" }, "isMyContact": { "type": "boolean" }, "isPSA": { "type": "boolean" }, "isUser": { "type": "boolean" }, "isWAContact": { "type": "boolean" }, "labels": { "type": "array", "items": { "type": "string" } }, "msgs": { "type": "array", "items": {} }, "profilePicThumbObj": { "type": "object", "properties": { "eurl": { "type": "string" }, "id": { "type": "object", "properties": { "server": { "type": "string" }, "user": { "type": "string" }, "_serialized": { "type": "string" } }, "required": [ "server", "user", "_serialized" ], "additionalProperties": false }, "img": { "type": "string" }, "imgFull": { "type": "string" }, "tag": { "type": "string" } }, "additionalProperties": false }, "statusMute": { "type": "boolean" }, "type": { "type": "string" }, "verifiedLevel": { "type": "number" }, "verifiedName": { "type": "string" }, "isOnline": { "type": "boolean" }, "lastSeen": { "type": "number" } }, "required": [ "id" ], "additionalProperties": {} }, "groupMetadata": {}, "presence": {}, "t": { "type": "number" }, "unreadCount": { "type": "number" }, "lastReceivedKey": {}, "msgs": { "type": "array", "items": {} }, "isReadOnly": { "type": "boolean" }, "muteExpiration": { "type": "number" }, "notSpam": { "type": "boolean" }, "pin": { "type": "number" }, "ack": {} }, "required": [ "id", "isGroup", "contact" ], "additionalProperties": {} }, "chatId": { "type": "string" }, "author": { "type": "string" }, "clientUrl": { "type": "string" }, "deprecatedMms3Url": { "type": "string" }, "isQuotedMsgAvailable": { "type": "boolean" }, "quotedMsg": {}, "quotedMsgObj": {}, "senderId": { "type": "string" } }, "required": [ "id", "body", "type", "t", "from", "to", "self", "ack", "sender", "timestamp", "content", "isGroupMsg", "isMedia", "isNotification", "fromMe", "chat", "chatId", "isQuotedMsgAvailable" ], "additionalProperties": {}, "description": "Message object containing media" }, "path": { "type": "string", "description": "File path to save the media" } }, "required": [ "message", "path" ], "additionalProperties": false } } } }, "x-openwa-aliases": [ "POST /api/downloadMedia" ], "responses": { "200": { "description": "Successful response", "content": { "application/json": { "schema": { "type": "string", "description": "Path to the saved file" } } } }, "400": { "description": "Validation error" }, "500": { "description": "Internal server error" } } } } } }