{"openapi":"3.0.3","info":{"title":"open-wa Easy API","version":"5.11.1"},"servers":[{"url":"http://127.0.0.1:8132"}],"paths":{"/api/messages/sendSticker":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Turn an image or video into a sticker, apply optional effects and author and pack labels, and send it. Resolves to the message ID once WhatsApp accepts it, not a delivery receipt. If the outcome is unknown, check the chat before you retry.","operationId":"sendSticker","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"input":{"type":"string","pattern":"^(?:data:(?:image|video)\\/[^;,]+;base64,[A-Za-z0-9+/]+={0,2}|https?:\\/\\/\\S+)$","description":"A media data URL or HTTP(S) URL. The local library additionally accepts bytes, Blob and local filenames."},"job":{"type":"object","properties":{"effects":{"maxItems":8,"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","properties":{"name":{"type":"string"},"options":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":false}]}},"backend":{"description":"Where the sticker is rendered. `auto` (the default) picks the best option for the whole job.","type":"string","enum":["auto","browser","standalone"]},"quality":{"description":"Maximum encoding quality; encoding can reduce quality to meet sticker byte limits.","type":"number","minimum":0.01,"maximum":1},"fit":{"type":"string","enum":["contain","cover"]},"circle":{"type":"boolean"},"background":{"type":"string","maxLength":64},"trim":{"type":"array","items":{"anyOf":[{"type":"number","minimum":0},{"type":"number","minimum":0,"exclusiveMinimum":true}]},"minItems":2,"maxItems":2},"fps":{"type":"integer","minimum":1,"maximum":30},"loopCount":{"type":"integer","minimum":0,"maximum":65535},"author":{"type":"string","maxLength":128},"pack":{"type":"string","maxLength":128},"quotedMsgId":{"description":"Reply with the sticker to a loaded message in the destination chat.","type":"string"}},"additionalProperties":false}},"required":["to","input"]}}}},"x-openwa-aliases":["POST /api/sendSticker"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string","pattern":"^(true|false)_[^\\s_]+@[^\\s_]+_[^\\s]+$","description":"Validated serialized message ID. This confirms the send returned an ID, not delivery or reading."}}}}}}}}},"/api/messages/sendAlbum":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends images and videos together as a native WhatsApp album with one caption on its first item. GIFs use MP4 video data with isGif: true. Documents are rejected. Phone-number IDs are resolved to LIDs; the destination chat must already be loaded and allow sending. WhatsApp controls the minimum item count and upload limits. Runtime failures include the parent and submitted child IDs when available; inspect the chat before retrying.","operationId":"sendAlbum","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"media":{"minItems":2,"type":"array","items":{"type":"object","properties":{"file":{"type":"string","pattern":"^data:(image|video)\\/[^;,]+;base64,[A-Za-z0-9+/]+={0,2}$","description":"Image or video as a base64 data URL. For a WhatsApp GIF, supply an MP4 video and set isGif to true."},"filename":{"type":"string","minLength":1,"description":"Filename including its extension"},"isGif":{"description":"Send an MP4 video as a looping WhatsApp GIF","type":"boolean"}},"required":["file","filename"]},"description":"Album items in send order"},"caption":{"default":"","description":"Media caption","type":"string"},"quotedMsgId":{"description":"Message to quote on the first album item","type":"string"}},"required":["to","media"]}}}},"x-openwa-aliases":["POST /api/sendAlbum"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"albumId":{"type":"string","description":"Message identifier returned by a send method or message event."},"messageIds":{"minItems":2,"type":"array","items":{"type":"string","description":"Message identifier returned by a send method or message event."}}},"required":["albumId","messageIds"],"additionalProperties":false,"description":"Submitted album parent and child message IDs, in input order. Submission does not confirm recipient delivery. Runtime failures include the album ID and submitted child IDs when available. A lost connection can leave the send outcome unknown; inspect the chat before retrying."}}}}}}}}},"/api/messages/sendText":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Send a text message to a chat. Starting a chat with a number that has never messaged you needs a Restricted or Premium license.","operationId":"sendText","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"content":{"type":"string","minLength":1,"description":"Message content"},"options":{"description":"Not used. Leave it out; use reply() for quoted replies and sendTextWithMentions() for mentions."}},"required":["to","content"]}}}},"x-openwa-aliases":["POST /api/sendText"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string","pattern":"^(true|false)_[^\\s_]+@[^\\s_]+_[^\\s]+$","description":"Validated serialized message ID. This confirms the send returned an ID, not delivery or reading."}}}}}}}}},"/api/messages/sendTextWithMentions":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a text message that includes @mentions","operationId":"sendTextWithMentions","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"}}},"required":["to","content"]}}}},"x-openwa-aliases":["POST /api/sendTextWithMentions"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendReplyWithMentions":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a reply to a message that includes @mentions","operationId":"sendReplyWithMentions","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"content":{"type":"string","minLength":1,"description":"Message content"},"replyMessageId":{"description":"Message ID","type":"string"},"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"}}},"required":["to","content","replyMessageId"]}}}},"x-openwa-aliases":["POST /api/sendReplyWithMentions"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendPaymentRequest":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a payment request message","operationId":"sendPaymentRequest","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"]}}}},"x-openwa-aliases":["POST /api/sendPaymentRequest"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendImage":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Send an image or video, or any other media file, as a WhatsApp attachment. Options set the caption, view once, GIF playback or a round video note. Media is sent as is, without conversion. Resolves to the send result, not a delivery receipt.","operationId":"sendImage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"file":{"description":"File (path, URL, DataURL, Base64, or Buffer)","anyOf":[{"type":"string"},{}]},"filename":{"description":"Filename with extension","type":"string"},"options":{"default":{},"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"}},"additionalProperties":false,"description":"Detect presentation from the file MIME type; view once requires an image or video"},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"},"isGif":{"description":"Loop an MP4 as a WhatsApp GIF","type":"boolean"},"videoNote":{"description":"Send a square MP4, at most 60 seconds, as a circular video note (PTV)","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"},"ptt":{"description":"Send audio as a voice note; does not transcode it","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"}},"required":["type"],"additionalProperties":false,"description":"Force document presentation, even for an image, video or audio file"}]}},"required":["to","file"]}}}},"x-openwa-aliases":["POST /api/sendImage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendFile":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends an image, video, audio file or document using MIME detection or an explicit typed presentation. Incompatible options are rejected before sending. Media is not transcoded.","operationId":"sendFile","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"file":{"description":"File (path, URL, DataURL, Base64, or Buffer)","anyOf":[{"type":"string"},{}]},"filename":{"description":"Filename with extension","type":"string"},"options":{"default":{},"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"}},"additionalProperties":false,"description":"Detect presentation from the file MIME type; view once requires an image or video"},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"},"isGif":{"description":"Loop an MP4 as a WhatsApp GIF","type":"boolean"},"videoNote":{"description":"Send a square MP4, at most 60 seconds, as a circular video note (PTV)","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"},"ptt":{"description":"Send audio as a voice note; does not transcode it","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"}},"required":["type"],"additionalProperties":false,"description":"Force document presentation, even for an image, video or audio file"}]}},"required":["to","file"]}}}},"x-openwa-aliases":["POST /api/sendFile"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendAudio":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends an audio attachment with an optional quoted message. Use sendPtt for voice notes and view-once audio.","operationId":"sendAudio","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"file":{"description":"Audio file (path, URL, DataURL, or Base64)","anyOf":[{"type":"string"},{}]},"filename":{"description":"Filename with extension","type":"string"},"options":{"default":{},"type":"object","properties":{"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"}},"additionalProperties":false}},"required":["to","file"]}}}},"x-openwa-aliases":["POST /api/sendAudio"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendPtt":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends prepared audio as a voice note, optionally view once. It does not transcode the input; use suitable voice-note audio such as Ogg Opus.","operationId":"sendPtt","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"file":{"description":"Audio file (path, URL, DataURL, or Base64)","anyOf":[{"type":"string"},{}]},"options":{"default":{},"type":"object","properties":{"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"}},"additionalProperties":false}},"required":["to","file"]}}}},"x-openwa-aliases":["POST /api/sendPtt","POST /api/sendVoiceNote","POST /api/messages/sendVoiceNote"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendVideoAsGif":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends MP4 video with WhatsApp GIF playback. GIF is a video presentation flag; this method does not convert a GIF image or transcode video.","operationId":"sendVideoAsGif","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"file":{"description":"Video file (path, URL, DataURL, or Base64)","anyOf":[{"type":"string"},{}]},"filename":{"description":"Filename with extension","type":"string"},"options":{"default":{},"type":"object","properties":{"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"}},"additionalProperties":false}},"required":["to","file"]}}}},"x-openwa-aliases":["POST /api/sendVideoAsGif"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendLocation":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a location to a chat","operationId":"sendLocation","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"]}}}},"x-openwa-aliases":["POST /api/sendLocation"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendVCard":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a contact card (vCard)","operationId":"sendVCard","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"]}}}},"x-openwa-aliases":["POST /api/sendVCard"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendContact":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a single contact","operationId":"sendContact","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"contactId":{"anyOf":[{"description":"Contact ID","type":"string"},{"type":"array","items":{"description":"Contact ID","type":"string"}}]}},"required":["to","contactId"]}}}},"x-openwa-aliases":["POST /api/sendContact"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}]}}}}}}}}},"/api/messages/sendContacts":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends multiple contacts","operationId":"sendMultipleContacts","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"contactIds":{"minItems":1,"type":"array","items":{"description":"Contact ID","type":"string"}}},"required":["to","contactIds"]}}}},"x-openwa-aliases":["POST /api/sendMultipleContacts","POST /api/sendContacts","POST /api/messages/sendMultipleContacts"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendButtons":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a button message (deprecated)","operationId":"sendButtons","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"]}}}},"x-openwa-aliases":["POST /api/sendButtons"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendAdvancedButtons":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends an advanced button message with media (deprecated)","operationId":"sendAdvancedButtons","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"]}}}},"x-openwa-aliases":["POST /api/sendAdvancedButtons"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendList":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a list/menu message (deprecated)","operationId":"sendListMessage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"]}}}},"x-openwa-aliases":["POST /api/sendListMessage","POST /api/sendList"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendPoll":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Send a poll with a selection limit, an optional quoted message, an optional closing time in Unix milliseconds and optionally hidden voter names. Closing times and hidden names only work where WhatsApp supports them for the sending account and chat.","operationId":"sendPoll","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"name":{"type":"string","minLength":1,"maxLength":500,"description":"Poll question"},"options":{"minItems":2,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":255},"description":"Poll choices; the account may have a lower native limit"},"config":{"default":{},"type":"object","properties":{"selectableCount":{"description":"Selection limit; default 1, zero allows all options","type":"integer","minimum":0,"maximum":9007199254740991},"quotedMsgId":{"type":"string","description":"Message identifier returned by a send method or message event."},"endTime":{"description":"Closing time as Unix milliseconds; must be in the future","type":"integer","minimum":0,"maximum":9007199254740991},"hideVoterNames":{"description":"Hide voter names in WhatsApp; not a cryptographic anonymity guarantee","type":"boolean"}},"additionalProperties":false}},"required":["to","name","options"]}}}},"x-openwa-aliases":["POST /api/sendPoll"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/voteOnPoll":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Votes using option IDs returned by getPollResults; an empty array removes the current vote. The poll must be open and allow this account to vote.","operationId":"voteOnPoll","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"},"optionIds":{"maxItems":20,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}}},"required":["messageId","optionIds"]}}}},"x-openwa-aliases":["POST /api/voteOnPoll"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/getPollResults":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get the current counts, choices and votes for a poll. Polls with hidden voters leave out voter identities and the votes array, and very recent votes may not appear yet.","operationId":"getPollResults","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"}},"required":["messageId"]}}}},"x-openwa-aliases":["POST /api/getPollResults"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"pollId":{"type":"string","description":"Message identifier returned by a send method or message event."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"selectableCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"endTime":{"type":"integer","minimum":0,"maximum":9007199254740991},"isClosed":{"type":"boolean"},"hideVoterNames":{"type":"boolean"},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":0,"maximum":9007199254740991},"name":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","name","count"],"additionalProperties":false}},"voterCount":{"type":"integer","minimum":0,"maximum":9007199254740991},"votes":{"description":"Omitted for hidden-voter polls","type":"array","items":{"type":"object","properties":{"pollId":{"type":"string","description":"Message identifier returned by a send method or message event."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"id":{"description":"Omitted when the poll hides voter names","type":"string"},"senderId":{"description":"Omitted when the poll hides voter names","type":"string"},"selectedOptionIds":{"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"timestamp":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Native vote timestamp in Unix milliseconds"},"fromMe":{"type":"boolean"},"hideVoterNames":{"type":"boolean"}},"required":["pollId","chatId","selectedOptionIds","timestamp","fromMe","hideVoterNames"],"additionalProperties":false}},"scope":{"type":"string","enum":["synced"],"description":"Hydrated local WhatsApp data, which may not include unsynced votes"}},"required":["pollId","chatId","name","selectableCount","isClosed","hideVoterNames","options","voterCount","scope"],"additionalProperties":false}}}}}}}}},"/api/messages/pin":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Pins a message in its chat for everyone, subject to native permissions. This differs from pinChat, which changes the current account chat list.","operationId":"pinMessage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"},"duration":{"default":"SevenDays","type":"string","enum":["OneDay","SevenDays","ThirtyDays"]}},"required":["messageId"]}}}},"x-openwa-aliases":["POST /api/pinMessage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/unpin":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Removes a message pin for everyone, subject to native chat permissions.","operationId":"unpinMessage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"}},"required":["messageId"]}}}},"x-openwa-aliases":["POST /api/unpinMessage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/sendBanner":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a banner image","operationId":"sendBanner","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"base64":{"type":"string","description":"Base64 encoded JPEG"}},"required":["to","base64"]}}}},"x-openwa-aliases":["POST /api/sendBanner"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendYouTubeLink":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a YouTube link with auto-generated preview","operationId":"sendYouTubeLink","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"},"customSize":{"description":"Custom thumbnail size","type":"object","properties":{"height":{"type":"number"},"width":{"type":"number"}},"required":["height","width"]}},"required":["to","url"]}}}},"x-openwa-aliases":["POST /api/sendYouTubeLink","POST /api/sendYoutubeLink","POST /api/messages/sendYoutubeLink"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendLinkWithAutoPreview":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a link with auto-generated preview","operationId":"sendLinkWithAutoPreview","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"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"},"customSize":{"description":"Custom thumbnail size","type":"object","properties":{"height":{"type":"number"},"width":{"type":"number"}},"required":["height","width"]}},"required":["to","url"]}}}},"x-openwa-aliases":["POST /api/sendLinkWithAutoPreview","POST /api/sendLink","POST /api/messages/sendLink"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/sendLinkWithThumbnail":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Sends a link preview message with custom thumbnail","operationId":"sendMessageWithThumb","tags":["messages"],"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"},"quotedMsgId":{"description":"Message ID","type":"string"},"customSize":{"description":"Custom thumbnail size","type":"object","properties":{"height":{"type":"number"},"width":{"type":"number"}},"required":["height","width"]}},"required":["thumb","url","title","description","content","to"]}}}},"x-openwa-aliases":["POST /api/sendMessageWithThumb","POST /api/sendLinkWithThumbnail","POST /api/messages/sendWithThumb"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"boolean"}]}}}}}}}}},"/api/messages/forward":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Forwards messages to a chat","operationId":"forwardMessages","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"messages":{"anyOf":[{"type":"array","items":{"description":"Message ID","type":"string"}},{"description":"Message ID","type":"string"}],"description":"Message ID(s) to process"},"skipMyMessages":{"default":false,"description":"Skip own messages","type":"boolean"}},"required":["to","messages"]}}}},"x-openwa-aliases":["POST /api/forwardMessages"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."}},{"type":"boolean"}]}}}}}}}}},"/api/messages/delete":{"delete":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Deletes a message","operationId":"deleteMessage","tags":["messages"],"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"}},{"name":"messageId","in":"query","required":true,"description":"Message ID(s) to process","schema":{"anyOf":[{"type":"array","items":{"description":"Message ID","type":"string"}},{"description":"Message ID","type":"string"}],"description":"Message ID(s) to process"}},{"name":"onlyLocal","in":"query","required":false,"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/get":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Retrieves a specific message by ID","operationId":"getMessageById","tags":["messages"],"parameters":[{"name":"messageId","in":"query","required":true,"description":"Message ID","schema":{"description":"Message ID","type":"string"}}],"x-openwa-aliases":["GET /api/getMessageById","GET /api/getMessage","GET /api/messages/getById"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}},{"type":"boolean","enum":[false]}]}}}}}}}}},"/api/messages/getAlbum":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Returns currently loaded image and video messages associated with an album, including GIF videos. The album can arrive before its media, so the array may be incomplete. Returns false if the album is not loaded or the ID belongs to another message type.","operationId":"getAlbumMessages","tags":["messages"],"parameters":[{"name":"messageId","in":"query","required":true,"description":"Album container message ID","schema":{"description":"Album container message ID","type":"string"}}],"x-openwa-aliases":["GET /api/getAlbumMessages"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}}},{"type":"boolean","enum":[false]}],"description":"A snapshot of currently loaded album media. An empty or partial array does not mean that the sender sent an empty or partial album. Each item retains its caption and can be passed to decryptMedia or downloadMedia."}}}}}}}}},"/api/messages/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Retrieves all messages in the session","operationId":"getAllMessages","tags":["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"}},{"name":"includeMe","in":"query","required":false,"description":"Include own messages","schema":{"default":true,"description":"Include own messages","type":"boolean"}},{"name":"includeNotifications","in":"query","required":false,"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}}}}}}}}}}},"/api/messages/getMyLast":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get last message sent by host","operationId":"getMyLastMessage","tags":["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"}}],"x-openwa-aliases":["GET /api/getMyLastMessage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}}}}}}}}}},"/api/messages/getStarred":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get starred messages","operationId":"getStarredMessages","tags":["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"}}],"x-openwa-aliases":["GET /api/getStarredMessages"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}}}}}}}}}}},"/api/messages/getUnsent":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get unsent/pending messages","operationId":"getUnsentMessages","tags":["messages"],"parameters":[],"x-openwa-aliases":["GET /api/getUnsentMessages"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}}}}}}}}}}},"/api/messages/getInfo":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get message delivery info","operationId":"getMessageInfo","tags":["messages"],"parameters":[{"name":"messageId","in":"query","required":true,"description":"Message ID","schema":{"description":"Message ID","type":"string"}}],"x-openwa-aliases":["GET /api/getMessageInfo"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"deliveryRemaining":{"type":"number"},"playedRemaining":{"type":"number"},"readRemaining":{"type":"number"},"delivery":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"t":{"type":"number"}},"required":["id","t"],"additionalProperties":false}},"read":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"t":{"type":"number"}},"required":["id","t"],"additionalProperties":false}},"played":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"t":{"type":"number"}},"required":["id","t"],"additionalProperties":false}}},"required":["id","deliveryRemaining","playedRemaining","readRemaining","delivery","read","played"],"additionalProperties":{}}}}}}}}}},"/api/messages/getVCards":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Extract vCards from message","operationId":"getVCards","tags":["messages"],"parameters":[{"name":"messageId","in":"query","required":true,"description":"Message ID","schema":{"description":"Message ID","type":"string"}}],"x-openwa-aliases":["GET /api/getVCards"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"string"}}}}}}}}}},"/api/messages/getForLLM":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get messages formatted for LLMs","operationId":"getMessagesForLLM","tags":["messages"],"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"}},{"name":"last","in":"query","required":false,"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":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}},"required":["role","content"],"additionalProperties":false}}}}}}}}}},"/api/messages/star":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Star a message","operationId":"starMessage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"}},"required":["messageId"]}}}},"x-openwa-aliases":["PUT /api/starMessage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/unstar":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Unstar a message","operationId":"unstarMessage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"}},"required":["messageId"]}}}},"x-openwa-aliases":["PUT /api/unstarMessage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/edit":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Edit the text of a message you sent","operationId":"editMessage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"},"newContent":{"type":"string","description":"Replacement message text"}},"required":["messageId","newContent"]}}}},"x-openwa-aliases":["PUT /api/editMessage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/react":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"React to message with emoji","operationId":"react","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"messageId":{"description":"Message ID","type":"string"},"emoji":{"type":"string","description":"Emoji reaction"}},"required":["messageId","emoji"]}}}},"x-openwa-aliases":["POST /api/react"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/sendSeen":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Mark message as seen","operationId":"sendSeen","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/sendSeen"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/messages/loadEarlier":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Loads earlier messages from a chat","operationId":"loadEarlierMessages","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"},"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"]}}}},"x-openwa-aliases":["POST /api/loadEarlierMessages","POST /api/loadOlderMessages","POST /api/messages/loadOlder"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}}}}}}}}}}},"/api/messages/sendFileFromUrl":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Downloads media and sends it through sendFile with the same typed presentation options.","operationId":"sendFileFromUrl","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"url":{"type":"string","format":"uri","description":"URL of the file to download"},"filename":{"description":"Filename with extension","type":"string"},"options":{"default":{},"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"}},"additionalProperties":false,"description":"Detect presentation from the file MIME type; view once requires an image or video"},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"},"isGif":{"description":"Loop an MP4 as a WhatsApp GIF","type":"boolean"},"videoNote":{"description":"Send a square MP4, at most 60 seconds, as a circular video note (PTV)","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["audio"]},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"},"viewOnce":{"description":"Use WhatsApp view-once media","type":"boolean"},"ptt":{"description":"Send audio as a voice note; does not transcode it","type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"caption":{"description":"Caption for the attachment","type":"string"},"quotedMsgId":{"description":"A message in the destination chat to quote","type":"string"}},"required":["type"],"additionalProperties":false,"description":"Force document presentation, even for an image, video or audio file"}]},"headers":{"description":"HTTP headers for the download request","type":"object","additionalProperties":{"type":"string"}}},"required":["to","url"]}}}},"x-openwa-aliases":["POST /api/sendFileFromUrl"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"object","properties":{"_serialized":{"type":"string"}},"required":["_serialized"],"additionalProperties":{}}],"description":"A message ID as a string or an object containing the serialized ID. Validate it before passing it to another method."},{"type":"string"}]},{"type":"boolean"}],"description":"Message ID or success status"}}}}}}}}},"/api/chats/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Returns serialized Chat objects from the current session, optionally limited to chats with unread messages.","operationId":"getAllChats","tags":["chats"],"parameters":[{"name":"withNewMessagesOnly","in":"query","required":false,"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."}}}}}}}}}},"/api/chatIds/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get all chat IDs","operationId":"getAllChatIds","tags":["chatIds"],"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."}}}}}}}}}},"/api/chats/get":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get specific chat by ID","operationId":"getChat","tags":["chats"],"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"}}],"x-openwa-aliases":["GET /api/getChat","GET /api/getChatById","GET /api/chats/getById"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},{"type":"boolean","enum":[false]}]}}}}}}}}},"/api/chats/getWithNonContacts":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get chats with non-contacts","operationId":"getChatWithNonContacts","tags":["chats"],"parameters":[],"x-openwa-aliases":["GET /api/getChatWithNonContacts"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{}}}}}}}}}}},"/api/chats/archive":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Archive a chat","operationId":"archiveChat","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/archiveChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/unarchive":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Unarchive a chat","operationId":"unarchiveChat","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/unarchiveChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/clear":{"delete":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Clear chat history","operationId":"clearChat","tags":["chats"],"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"}}],"x-openwa-aliases":["DELETE /api/clearChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/delete":{"delete":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Delete a chat","operationId":"deleteChat","tags":["chats"],"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"}}],"x-openwa-aliases":["DELETE /api/deleteChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/pin":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Pin a chat","operationId":"pinChat","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/pinChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/unpin":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Unpin a chat","operationId":"unpinChat","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/unpinChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/mute":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Mute a chat","operationId":"muteChat","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"},"muteDuration":{"anyOf":[{"type":"number"},{"type":"string"}],"description":"Mute duration"}},"required":["chatId","muteDuration"]}}}},"x-openwa-aliases":["PUT /api/muteChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]}}}}}}}}},"/api/chats/unmute":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Unmute a chat","operationId":"unmuteChat","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/unmuteChat"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"string"},{"type":"boolean"},{"type":"number"}]}}}}}}}}},"/api/chats/markAsRead":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Mark chat as read","operationId":"markAsRead","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/markAsRead"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/markAsUnread":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Mark chat as unread","operationId":"markAsUnread","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"}},"required":["chatId"]}}}},"x-openwa-aliases":["PUT /api/markAsUnread"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/setEphemeral":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Set ephemeral messages for chat","operationId":"setChatEphemeral","tags":["chats"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"chatId":{"description":"Chat ID (phone number or formatted ID)","type":"string"},"ephemeral":{"anyOf":[{"type":"boolean"},{"type":"number"}],"description":"Ephemeral setting"}},"required":["chatId","ephemeral"]}}}},"x-openwa-aliases":["PUT /api/setChatEphemeral"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/chats/isOnline":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Check if chat is online","operationId":"isChatOnline","tags":["chats"],"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"}}],"x-openwa-aliases":["GET /api/isChatOnline"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"boolean"},{"type":"string"}]}}}}}}}}},"/api/contacts/requestPhoneNumber":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Ask a direct LID chat to voluntarily share their phone number. A submitted request does not confirm sharing.","operationId":"requestPhoneNumber","tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"}},"required":["to"]}}}},"x-openwa-aliases":["POST /api/requestPhoneNumber"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"description":"Message ID","type":"string","pattern":"^(true|false)_.+_.+$"}}}}}}}}},"/api/contacts/sharePhoneNumber":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Share the logged-in account’s own phone number in a one-to-one chat that only shows a LID. You can’t share any other number.","operationId":"sharePhoneNumber","tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"}},"required":["to"]}}}},"x-openwa-aliases":["POST /api/sharePhoneNumber"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"description":"Message ID","type":"string","pattern":"^(true|false)_.+_.+$"}}}}}}}}},"/api/contacts/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Retrieves all contacts","operationId":"getAllContacts","tags":["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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{}}}}}}}}}}},"/api/contacts/get":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get specific contact","operationId":"getContact","tags":["contacts"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/getContact"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{}}}}}}}}}},"/api/contacts/getCommonGroups":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get common groups with contact","operationId":"getCommonGroups","tags":["contacts"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/getCommonGroups"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":{}}},{"type":"boolean","enum":[false]}]}}}}}}}}},"/api/contacts/getNumberProfile":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get profile of number","operationId":"getNumberProfile","tags":["contacts"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/getNumberProfile"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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"}},"additionalProperties":{},"description":"Provisional number profile based on the public Contact fields. Fields are optional and additional provider fields are unknown. The licensed getNumberProfile payload has not been verified against this model."}}}}}}}}},"/api/contacts/getBlockedIds":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get blocked contact IDs","operationId":"getBlockedIds","tags":["contacts"],"parameters":[],"x-openwa-aliases":["GET /api/getBlockedIds"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"array","items":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},{"type":"boolean","enum":[false]}]}}}}}}}}},"/api/contacts/block":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Block a contact","operationId":"blockContact","tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"description":"Contact ID","type":"string"}},"required":["contactId"]}}}},"x-openwa-aliases":["PUT /api/blockContact","PUT /api/contactBlock","PUT /api/contacts/contactBlock"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/contacts/unblock":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Unblock a contact","operationId":"unblockContact","tags":["contacts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contactId":{"description":"Contact ID","type":"string"}},"required":["contactId"]}}}},"x-openwa-aliases":["PUT /api/unblockContact","PUT /api/contactUnblock","PUT /api/contacts/contactUnblock"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/contacts/checkReadReceipts":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Check read receipts setting","operationId":"checkReadReceipts","tags":["contacts"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/checkReadReceipts","GET /api/getReadReceipts","GET /api/contacts/getReadReceipts"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"boolean"},{"type":"string"}]}}}}}}}}},"/api/contacts/checkNumberStatus":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Check if number is on WhatsApp","operationId":"checkNumberStatus","tags":["contacts"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/checkNumberStatus"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"anyOf":[{"type":"object","properties":{"server":{"type":"string"},"user":{"type":"string"},"_serialized":{"type":"string"}},"required":["server","user","_serialized"],"additionalProperties":false},{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}]},"status":{"description":"HTTP-like status code, or a provider error value when lookup fails."},"isBusiness":{"type":"boolean"},"canReceiveMessage":{"type":"boolean"},"numberExists":{"type":"boolean"}},"required":["id","status","canReceiveMessage"],"additionalProperties":{}}}}}}}}}},"/api/contacts/getProfilePicture":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get profile picture from server","operationId":"getProfilePicture","tags":["contacts"],"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"}}],"x-openwa-aliases":["GET /api/getProfilePicture","GET /api/getProfilePicFromServer","GET /api/contacts/getProfilePicFromServer"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/groups/getMembers":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Retrieves members of a group","operationId":"getGroupMembers","tags":["groups"],"parameters":[{"name":"groupId","in":"query","required":true,"description":"Group chat ID","schema":{"description":"Group chat ID","type":"string"}}],"x-openwa-aliases":["GET /api/getGroupMembers"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{}}}}}}}}}}},"/api/groups/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get all groups","operationId":"getAllGroups","tags":["groups"],"parameters":[{"name":"withNewMessagesOnly","in":"query","required":false,"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."}}}}}}}}}},"/api/groups/getMemberIds":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get group member IDs","operationId":"getGroupMembersId","tags":["groups"],"parameters":[{"name":"groupId","in":"query","required":true,"description":"Group chat ID","schema":{"description":"Group chat ID","type":"string"}}],"x-openwa-aliases":["GET /api/getGroupMembersId","GET /api/getGroupMemberIds","GET /api/groups/getMembersId"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}}}}}}}}}},"/api/groups/getInfo":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get a group title and description","operationId":"getGroupInfo","tags":["groups"],"parameters":[{"name":"groupId","in":"query","required":true,"description":"Group chat ID","schema":{"description":"Group chat ID","type":"string"}}],"x-openwa-aliases":["GET /api/getGroupInfo"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"nullable":true,"anyOf":[{"type":"object","properties":{"title":{"type":"string"},"description":{"nullable":true,"type":"string"}},"required":["title"],"additionalProperties":{},"description":"The group title and description."},{"type":"string"}]}}}}}}}}},"/api/groups/getAdmins":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get group admins","operationId":"getGroupAdmins","tags":["groups"],"parameters":[{"name":"groupId","in":"query","required":true,"description":"Group chat ID","schema":{"description":"Group chat ID","type":"string"}}],"x-openwa-aliases":["GET /api/getGroupAdmins"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}}}}}}}}}},"/api/groups/getKicked":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get groups where kicked","operationId":"getKickedGroups","tags":["groups"],"parameters":[],"x-openwa-aliases":["GET /api/getKickedGroups"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"string","description":"Opaque group conversation identifier returned by a group lookup or join method."}}}}}}}}}},"/api/groups/getInviteLink":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get group invite link","operationId":"getGroupInviteLink","tags":["groups"],"parameters":[{"name":"groupId","in":"query","required":true,"description":"Group chat ID","schema":{"description":"Group chat ID","type":"string"}}],"x-openwa-aliases":["GET /api/getGroupInviteLink"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/groups/create":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Create new group","operationId":"createGroup","tags":["groups"],"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"},"description":"Contact IDs to add"}},"required":["name","contacts"]}}}},"x-openwa-aliases":["POST /api/createGroup"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"nullable":true,"type":"object","properties":{"gid":{"anyOf":[{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},{"type":"object","properties":{"server":{"type":"string"},"user":{"type":"string"},"_serialized":{"type":"string"}},"required":["server","user","_serialized"],"additionalProperties":false}]},"status":{"type":"number"},"participants":{"anyOf":[{"type":"object","additionalProperties":{"type":"object","properties":{"code":{"type":"number"},"invite_code":{"type":"string"},"invite_code_exp":{"type":"string"}},"required":["code"],"additionalProperties":false}},{"type":"array","items":{"type":"object","additionalProperties":{}}}]}},"required":["gid"],"additionalProperties":{}}}}}}}}}},"/api/groups/leave":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Leave a group","operationId":"leaveGroup","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"}},"required":["groupId"]}}}},"x-openwa-aliases":["PUT /api/leaveGroup"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"not":{},"description":"No JSON value; the response data property is omitted."}}}}}}}}},"/api/groups/join":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Join group via invite link","operationId":"joinGroupViaLink","tags":["groups"],"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"]}}}},"x-openwa-aliases":["POST /api/joinGroupViaLink","POST /api/joinGroup","POST /api/groups/joinViaLink"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"string","description":"Opaque group conversation identifier returned by a group lookup or join method."},{"type":"boolean"},{"type":"number"},{"type":"object","properties":{"id":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."}]}}}}}}}}},"/api/groups/revokeInviteLink":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Revoke group invite link","operationId":"revokeGroupInviteLink","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"}},"required":["groupId"]}}}},"x-openwa-aliases":["PUT /api/revokeGroupInviteLink"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"string"},{"type":"boolean"}]}}}}}}}}},"/api/groups/setTitle":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Set group title","operationId":"setGroupTitle","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"title":{"type":"string","description":"New group title"}},"required":["groupId","title"]}}}},"x-openwa-aliases":["PUT /api/setGroupTitle"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/groups/setDescription":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Set group description","operationId":"setGroupDescription","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"description":{"type":"string","description":"New group description"}},"required":["groupId","description"]}}}},"x-openwa-aliases":["PUT /api/setGroupDescription"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/groups/setIcon":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Set group icon","operationId":"setGroupIcon","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"image":{"type":"string","description":"Image data URL"}},"required":["groupId","image"]}}}},"x-openwa-aliases":["PUT /api/setGroupIcon"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/groups/setAdminsOnly":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Restrict group to admins only","operationId":"setGroupToAdminsOnly","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"onlyAdmins":{"type":"boolean","description":"Admins only setting"}},"required":["groupId","onlyAdmins"]}}}},"x-openwa-aliases":["PUT /api/setGroupToAdminsOnly","PUT /api/groups/setToAdminsOnly"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/groups/setEditAdminsOnly":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Restrict group editing to admins only","operationId":"setGroupEditToAdminsOnly","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"onlyAdmins":{"type":"boolean","description":"Admins only setting"}},"required":["groupId","onlyAdmins"]}}}},"x-openwa-aliases":["PUT /api/setGroupEditToAdminsOnly","PUT /api/groups/setEditToAdminsOnly"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/groups/addParticipant":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Add participant to group","operationId":"addParticipant","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"contactId":{"description":"Contact ID","type":"string"}},"required":["groupId","contactId"]}}}},"x-openwa-aliases":["PUT /api/addParticipant","PUT /api/addGroupParticipant"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/groups/removeParticipant":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Remove participant from group","operationId":"removeParticipant","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"contactId":{"description":"Contact ID","type":"string"}},"required":["groupId","contactId"]}}}},"x-openwa-aliases":["PUT /api/removeParticipant","PUT /api/removeGroupParticipant"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/groups/promoteParticipant":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Promote participant to admin","operationId":"promoteParticipant","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"contactId":{"description":"Contact ID","type":"string"}},"required":["groupId","contactId"]}}}},"x-openwa-aliases":["PUT /api/promoteParticipant","PUT /api/promoteGroupParticipant"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"boolean"},{"type":"string"}]}}}}}}}}},"/api/groups/demoteParticipant":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Demote participant from admin","operationId":"demoteParticipant","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"contactId":{"description":"Contact ID","type":"string"}},"required":["groupId","contactId"]}}}},"x-openwa-aliases":["PUT /api/demoteParticipant","PUT /api/demoteGroupParticipant"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"boolean"},{"type":"string"}]}}}}}}}}},"/api/groups/approveJoinRequest":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Approve group join request","operationId":"approveGroupJoinRequest","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"contactId":{"description":"Contact ID","type":"string"}},"required":["groupId","contactId"]}}}},"x-openwa-aliases":["PUT /api/approveGroupJoinRequest"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"string"},{"type":"boolean"}]}}}}}}}}},"/api/groups/rejectJoinRequest":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Reject group join request","operationId":"rejectGroupJoinRequest","tags":["groups"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"groupId":{"description":"Group chat ID","type":"string"},"contactId":{"description":"Contact ID","type":"string"}},"required":["groupId","contactId"]}}}},"x-openwa-aliases":["PUT /api/rejectGroupJoinRequest"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"string"},{"type":"boolean"}]}}}}}}}}},"/api/communities/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get all communities","operationId":"getAllCommunities","tags":["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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"string","description":"Opaque group conversation identifier returned by a group lookup or join method."}}}}}}}}}},"/api/communities/getInfo":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get community metadata","operationId":"getCommunityInfo","tags":["communities"],"parameters":[{"name":"communityId","in":"query","required":true,"description":"Community ID","schema":{"description":"Community ID","type":"string"}}],"x-openwa-aliases":["GET /api/getCommunityInfo"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}},"subGroups":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."}}},"required":["id","subject","creation","participants","subGroups"],"additionalProperties":{}}}}}}}}}},"/api/communities/getParticipantIds":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get community participant IDs","operationId":"getCommunityParticipantIds","tags":["communities"],"parameters":[{"name":"communityId","in":"query","required":true,"description":"Community ID","schema":{"description":"Community ID","type":"string"}}],"x-openwa-aliases":["GET /api/getCommunityParticipantIds"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque group conversation identifier returned by a group lookup or join method."},"participants":{"type":"array","items":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"subgroup":{"type":"boolean"}},"required":["id","participants","subgroup"],"additionalProperties":false}}}}}}}}}},"/api/communities/getAdminIds":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get community admin IDs","operationId":"getCommunityAdminIds","tags":["communities"],"parameters":[{"name":"communityId","in":"query","required":true,"description":"Community ID","schema":{"description":"Community ID","type":"string"}}],"x-openwa-aliases":["GET /api/getCommunityAdminIds"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque group conversation identifier returned by a group lookup or join method."},"admins":{"type":"array","items":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"subgroup":{"type":"boolean"}},"required":["id","admins","subgroup"],"additionalProperties":false}}}}}}}}}},"/api/communities/getParticipants":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get community participants","operationId":"getCommunityParticipants","tags":["communities"],"parameters":[{"name":"communityId","in":"query","required":true,"description":"Community ID","schema":{"description":"Community ID","type":"string"}}],"x-openwa-aliases":["GET /api/getCommunityParticipants"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque group conversation identifier returned by a group lookup or join method."},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{}}},"subgroup":{"type":"boolean"}},"required":["id","participants","subgroup"],"additionalProperties":false}}}}}}}}}},"/api/communities/getAdmins":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get community admins","operationId":"getCommunityAdmins","tags":["communities"],"parameters":[{"name":"communityId","in":"query","required":true,"description":"Community ID","schema":{"description":"Community ID","type":"string"}}],"x-openwa-aliases":["GET /api/getCommunityAdmins"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque group conversation identifier returned by a group lookup or join method."},"admins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{}}},"subgroup":{"type":"boolean"}},"required":["id","admins","subgroup"],"additionalProperties":false}}}}}}}}}},"/api/status/postText":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Post text status","operationId":"postTextStatus","tags":["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"]}}}},"x-openwa-aliases":["POST /api/postTextStatus"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"string"}]},{"type":"boolean"}]}}}}}}}}},"/api/status/postImage":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Post image status","operationId":"postImageStatus","tags":["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"]}}}},"x-openwa-aliases":["POST /api/postImageStatus"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"string"}]},{"type":"boolean"}]}}}}}}}}},"/api/status/postVideo":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Post video status","operationId":"postVideoStatus","tags":["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"]}}}},"x-openwa-aliases":["POST /api/postVideoStatus"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"anyOf":[{"type":"string","description":"Message identifier returned by a send method or message event."},{"type":"string"}]},{"type":"boolean"}]}}}}}}}}},"/api/status/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get all stories","operationId":"getStories","tags":["status"],"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"timestamp":{"type":"number"},"content":{"type":"string"},"isGroupMsg":{"type":"boolean"},"isMMS":{"type":"boolean"},"isMedia":{"type":"boolean"},"isNotification":{"type":"boolean"},"isPSA":{"type":"boolean"},"fromMe":{"type":"boolean"},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"author":{"type":"string"},"clientUrl":{"type":"string"},"deprecatedMms3Url":{"type":"string"},"isQuotedMsgAvailable":{"type":"boolean"},"quotedMsg":{},"quotedMsgObj":{},"senderId":{"type":"string"},"chat":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"sender":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{}}},"required":["id","body","type","t","from","to","self","ack","timestamp","content","isGroupMsg","isMedia","isNotification","fromMe","chatId","isQuotedMsgAvailable"],"additionalProperties":{},"description":"Message-shaped status entry, based on the legacy story API. Chat and sender may be absent or null. The licensed getStories payload has not been verified against this model."}}}}}}}}}},"/api/mystatus/getStatus":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get specific status","operationId":"getStatus","tags":["mystatus"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/getStatus"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string"}},"required":["id","status"],"additionalProperties":false}}}}}}}}},"/api/status/delete":{"delete":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Delete status","operationId":"deleteStatus","tags":["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":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/status/deleteAll":{"delete":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Delete all statuses","operationId":"deleteAllStatus","tags":["status"],"parameters":[],"x-openwa-aliases":["DELETE /api/deleteAllStatus","DELETE /api/deleteAllStatuses"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/labels/getAll":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get all labels","operationId":"getAllLabels","tags":["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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["Chat","Contact","Message"]},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false}}},"required":["id","name","items"],"additionalProperties":{}}}}}}}}}}},"/api/labels/getChats":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get chats by label","operationId":"getChatsByLabel","tags":["labels"],"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."}}}}}}}}}},"/api/labels/add":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Add label to chat","operationId":"addLabel","tags":["labels"],"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"}},"required":["label","chatId"]}}}},"x-openwa-aliases":["PUT /api/addLabel"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/labels/remove":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Remove label from chat","operationId":"removeLabel","tags":["labels"],"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"}},"required":["label","chatId"]}}}},"x-openwa-aliases":["PUT /api/removeLabel"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/business/getProfile":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get business profile","operationId":"getBusinessProfile","tags":["business"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/getBusinessProfile"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"tag":{"type":"string"},"description":{"type":"string"},"categories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"localized_display_name":{"type":"string"}},"required":["id","localized_display_name"],"additionalProperties":false}},"profileOptions":{"type":"object","properties":{"commerceExperience":{"type":"string","enum":["catalog","none","shop"]},"cartEnabled":{"type":"boolean"}},"required":["commerceExperience","cartEnabled"],"additionalProperties":false},"email":{"type":"string"},"website":{"type":"array","items":{"type":"string"}},"businessHours":{"type":"object","properties":{"config":{"type":"object","additionalProperties":{"type":"object","properties":{"mode":{"type":"string","enum":["specific_hours","open_24h","appointment_only"]},"hours":{"type":"array","items":{"type":"array","items":{"type":"number"}}}},"required":["mode","hours"],"additionalProperties":false}},"timezone":{"type":"string"}},"required":["config","timezone"],"additionalProperties":false},"catalogStatus":{"type":"string"},"address":{"type":"string"},"fbPage":{},"igProfessional":{},"isProfileLinked":{"type":"boolean"},"coverPhoto":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"}},"required":["id","url"],"additionalProperties":false},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["id"],"additionalProperties":{}}}}}}}}}},"/api/business/getProducts":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get business products","operationId":"getBusinessProducts","tags":["business"],"parameters":[{"name":"contactId","in":"query","required":true,"description":"Contact ID","schema":{"description":"Contact ID","type":"string"}}],"x-openwa-aliases":["GET /api/getBusinessProducts","GET /api/getBusinessProfilesProducts","GET /api/business/getProfilesProducts"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"currency":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"isHidden":{"type":"boolean"},"catalogWid":{"type":"string"},"url":{"type":"string"},"availability":{"anyOf":[{"type":"number"},{"type":"string","enum":["unknown"]}]},"reviewStatus":{"type":"string","enum":["NO_REVIEW","PENDING","REJECTED","APPROVED","OUTDATED"]},"imageCdnUrl":{"type":"string"},"imageCount":{"type":"number"},"additionalImageCdnUrl":{"type":"array","items":{"type":"string"}},"priceAmount1000":{"type":"number"},"retailerId":{"type":"string"},"t":{"type":"number"}},"required":["id","currency"],"additionalProperties":{}}},{"type":"boolean","enum":[false]}]}}}}}}}}},"/api/business/getOrder":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get order details","operationId":"getOrder","tags":["business"],"parameters":[{"name":"id","in":"query","required":true,"description":"Order or message ID","schema":{"anyOf":[{"description":"Message ID","type":"string"},{"type":"string"}],"description":"Order or message ID"}}],"x-openwa-aliases":["GET /api/getOrder"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"id":{"type":"string"},"createdAt":{"type":"number"},"currency":{"type":"string"},"products":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"qty":{"type":"number"},"thumbnailId":{"type":"string"},"thumbnailUrl":{"type":"string"}},"required":["id","name","qty","thumbnailId","thumbnailUrl"],"additionalProperties":false}},"sellerJid":{"type":"string"},"subtotal":{"type":"string"},"total":{"type":"string"},"message":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"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":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"],"additionalProperties":false}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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":{}}},"required":["id","createdAt","currency","products","sellerJid","subtotal","total"],"additionalProperties":{}}}}}}}}}},"/api/session/getMe":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get host account info","operationId":"getMe","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getMe"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"me":{"anyOf":[{"type":"object","properties":{"server":{"type":"string"},"user":{"type":"string"},"_serialized":{"type":"string"}},"required":["server","user","_serialized"],"additionalProperties":false},{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}]}},"required":["me"],"additionalProperties":{},"description":"Host account attributes plus the current account ID. Additional WhatsApp Web attributes vary by version."}}}}}}}}},"/api/session/getHostNumber":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get host phone number","operationId":"getHostNumber","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getHostNumber"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/session/getConnectionState":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get connection state","operationId":"getConnectionState","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getConnectionState"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/session/getWAVersion":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get WhatsApp Web version","operationId":"getWAVersion","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getWAVersion","GET /api/getWhatsAppVersion","GET /api/session/getWhatsAppVersion"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/session/getBatteryLevel":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get phone battery level","operationId":"getBatteryLevel","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getBatteryLevel"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"number"}}}}}}}}},"/api/session/isPlugged":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Check if phone is charging","operationId":"isPlugged","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/isPlugged","GET /api/getIsPlugged","GET /api/session/getIsPlugged"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/session/getFeatures":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get enabled features","operationId":"getFeatures","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getFeatures"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":{},"description":"WhatsApp feature flags keyed by name. Values are provider-defined and must be narrowed before use."}}}}}}}}},"/api/session/getLicenseType":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get license type","operationId":"getLicenseType","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getLicenseType"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"string","enum":["CUSTOM","B2B_RESTRICTED_VOLUME_LICENSE","Insiders Program","Text Story License Key","Image Story License Key","Video Story License Key","Premium License Key","NONE"]},{"type":"boolean","enum":[false]}]}}}}}}}}},"/api/session/getLicenseFeatures":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"List which licensed features your license key turns on. Each method still checks availability when you call it.","operationId":"getLicenseFeatures","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getLicenseFeatures"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"status":{"anyOf":[{"type":"string","enum":["valid"]},{"type":"string","enum":["missing"]},{"type":"string","enum":["invalid"]},{"type":"string","enum":["expired"]},{"type":"string","enum":["metadata_only"]}]},"keyType":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"expiresAt":{"anyOf":[{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]},{"type":"string","nullable":true,"enum":[null]}]},"features":{"type":"object","additionalProperties":{"type":"boolean"}}},"required":["status","keyType","expiresAt","features"],"additionalProperties":false}}}}}}}}},"/api/session/getUserAgent":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get user agent","operationId":"getUserAgent","tags":["session"],"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/session/getProcessStats":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get process statistics","operationId":"getProcessStats","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getProcessStats"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","additionalProperties":{},"description":"Process diagnostics keyed by process ID. The provider controls each entry; no stable entry shape is guaranteed."}}}}}}}}},"/api/session/getLoadedMessageCount":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get loaded message count","operationId":"getLoadedMessageCount","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/getLoadedMessageCount","GET /api/getAmountOfLoadedMessages","GET /api/session/getAmountOfLoadedMessages"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"number"}}}}}}}}},"/api/session/getSnapshot":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Take screenshot","operationId":"getSnapshot","tags":["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"}},{"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/session/healthCheck":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Health check","operationId":"healthCheck","tags":["session"],"parameters":[],"x-openwa-aliases":["GET /api/healthCheck"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"queuedMessages":{"type":"number"},"state":{"type":"string"},"isPhoneDisconnected":{"type":"boolean"},"isHere":{"type":"boolean"},"online":{"type":"boolean"},"tryingToReachPhone":{"type":"boolean"},"retryingIn":{"type":"number"},"batteryLow":{"type":"boolean"}},"additionalProperties":{},"description":"Browser health diagnostics. This is not the Easy API /health HTTP envelope."}}}}}}}}},"/api/session/setName":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Set host name","operationId":"setMyName","tags":["session"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name"}},"required":["name"]}}}},"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/session/setStatus":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Set host status","operationId":"setMyStatus","tags":["session"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"statusText":{"type":"string","description":"Status text"}},"required":["statusText"]}}}},"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":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/session/setProfilePicture":{"put":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Set profile picture","operationId":"setProfilePicture","tags":["session"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"description":"Image file (path, URL, DataURL, or Base64)","anyOf":[{"type":"string"},{}]}},"required":["image"]}}}},"x-openwa-aliases":["PUT /api/setProfilePicture","PUT /api/setProfilePic","PUT /api/session/setProfilePic"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/media/decrypt":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Decrypts media from a message","operationId":"decryptMedia","tags":["media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}}},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"]},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"img":{"type":"string"},"imgFull":{"type":"string"},"tag":{"type":"string"}}},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"img":{"type":"string"},"imgFull":{"type":"string"},"tag":{"type":"string"}}},"statusMute":{"type":"boolean"},"type":{"type":"string"},"verifiedLevel":{"type":"number"},"verifiedName":{"type":"string"},"isOnline":{"type":"boolean"},"lastSeen":{"type":"number"}},"required":["id"],"additionalProperties":{}},"groupMetadata":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"]}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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"]}}}},"x-openwa-aliases":["POST /api/decryptMedia"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string","pattern":"^data:[\\s\\S]{0,};base64,[\\s\\S]{0,}$"}}}}}}}}},"/api/media/download":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Downloads and decrypts media from a message to a file","operationId":"downloadMedia","tags":["media"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"id":{"type":"string","description":"Message identifier returned by a send method or message event."},"body":{"type":"string"},"type":{"type":"string","enum":["chat","audio","ptt","image","video","album","event_creation","event_response","document","sticker","location","vcard","multi_vcard","revoked","order","buttons_response","list_response","unknown"]},"t":{"type":"number"},"notifyName":{"type":"string"},"from":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"to":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."}},"caption":{"type":"string"},"event":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}}},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"]},"expectedImageCount":{"description":"Number of image messages declared by an album container; not a received-media count.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"expectedVideoCount":{"description":"Number of video messages declared by an album container, including GIF videos.","nullable":true,"type":"integer","minimum":0,"maximum":9007199254740991},"parentMsgKey":{"description":"Serialized parent message ID for associated media.","nullable":true,"type":"string"},"associationType":{"description":"WhatsApp association type. Album media uses MEDIA_ALBUM.","nullable":true,"type":"string"},"isGif":{"type":"boolean"},"sender":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"img":{"type":"string"},"imgFull":{"type":"string"},"tag":{"type":"string"}}},"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":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"name":{"type":"string"},"formattedTitle":{"type":"string"},"isGroup":{"type":"boolean"},"contact":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"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":{"nullable":true,"type":"array","items":{}},"profilePicThumbObj":{"type":"object","properties":{"eurl":{"type":"string"},"id":{"description":"Serialized contact ID returned by the profile-picture serializer","type":"string"},"img":{"type":"string"},"imgFull":{"type":"string"},"tag":{"type":"string"}}},"statusMute":{"type":"boolean"},"type":{"type":"string"},"verifiedLevel":{"type":"number"},"verifiedName":{"type":"string"},"isOnline":{"type":"boolean"},"lastSeen":{"type":"number"}},"required":["id"],"additionalProperties":{}},"groupMetadata":{"nullable":true,"type":"object","properties":{"id":{"type":"string","description":"Identifier for a WhatsApp group. Use the value returned by the API."},"subject":{"type":"string"},"creation":{"type":"number"},"owner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"desc":{"type":"string"},"descTime":{"type":"number"},"descOwner":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"restrict":{"type":"boolean"},"announce":{"type":"boolean"},"participants":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Opaque WhatsApp contact identifier. Preserve the exact value returned by the API."},"isAdmin":{"type":"boolean"},"isSuperAdmin":{"type":"boolean"}},"required":["id","isAdmin"]}}},"required":["id","subject","creation","participants"],"additionalProperties":{},"description":"Serialized group metadata returned by group lookups. Additional WhatsApp Web fields may be present."},"presence":{"nullable":true,"type":"object","additionalProperties":{}},"t":{"type":"number"},"unreadCount":{"type":"number"},"lastReceivedKey":{},"msgs":{"nullable":true,"type":"array","items":{}},"isReadOnly":{"type":"boolean"},"muteExpiration":{"type":"number"},"notSpam":{"type":"boolean"},"pin":{"type":"number"},"ack":{}},"required":["id","isGroup","contact"],"additionalProperties":{},"description":"Serialized chat returned by chat lookups and listings. Its id is an opaque ChatId; additional WhatsApp Web fields may be present."},"chatId":{"type":"string","description":"Opaque conversation identifier. Use the exact value returned by a message event or chat lookup."},"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"]}}}},"x-openwa-aliases":["POST /api/downloadMedia"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string","description":"Path to the saved file"}}}}}}}}},"/api/messages/sendInteractive":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Send a portable interactive message document (Insiders and above)","operationId":"sendInteractive","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"content":{"oneOf":[{"type":"object","properties":{"version":{"description":"Document format version, defaults to 1; independent of WhatsApp protocol versions","type":"number","enum":[1]},"body":{"type":"string","minLength":1},"footer":{"type":"string"},"type":{"type":"string","enum":["buttons"]},"header":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"type":"string","minLength":1,"description":"HTTP(S) URL, local file path or base64 data URL; resolved by the client before sending"},"filename":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"source":{"type":"string","minLength":1,"description":"HTTP(S) URL, local file path or base64 data URL; resolved by the client before sending"},"filename":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"type":"string","minLength":1,"description":"HTTP(S) URL, local file path or base64 data URL; resolved by the client before sending"},"filename":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false}]},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["reply"]},"id":{"type":"string","minLength":1,"description":"Stable application-defined ID returned when the recipient chooses this item"},"label":{"type":"string","minLength":1}},"required":["type","id","label"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"label":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["type","label","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["call"]},"label":{"type":"string","minLength":1},"phoneNumber":{"type":"string","minLength":1}},"required":["type","label","phoneNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["copy"]},"label":{"type":"string","minLength":1},"code":{"type":"string","minLength":1}},"required":["type","label","code"],"additionalProperties":false}]}}},"required":["body","type","actions"],"additionalProperties":false},{"type":"object","properties":{"version":{"description":"Document format version, defaults to 1; independent of WhatsApp protocol versions","type":"number","enum":[1]},"body":{"type":"string","minLength":1},"footer":{"type":"string"},"type":{"type":"string","enum":["list"]},"title":{"type":"string"},"buttonLabel":{"default":"Choose an option","type":"string","minLength":1},"sections":{"minItems":1,"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"rows":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable application-defined ID returned when the recipient chooses this item"},"title":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["id","title"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}}},"required":["body","type","sections"],"additionalProperties":false},{"type":"object","properties":{"version":{"description":"Document format version, defaults to 1; independent of WhatsApp protocol versions","type":"number","enum":[1]},"body":{"type":"string","minLength":1},"footer":{"type":"string"},"type":{"type":"string","enum":["form"]},"title":{"type":"string"},"questions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["singleSelect","multiSelect"]},"id":{"type":"string","minLength":1,"description":"Stable application-defined ID returned when the recipient chooses this item"},"label":{"type":"string","minLength":1},"options":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"description":"Stable application-defined ID returned when the recipient chooses this item"},"label":{"type":"string","minLength":1}},"required":["id","label"],"additionalProperties":false}},"allowCustomAnswer":{"type":"boolean"}},"required":["type","id","label","options"],"additionalProperties":false}}},"required":["body","type","questions"],"additionalProperties":false},{"type":"object","properties":{"version":{"description":"Document format version, defaults to 1; independent of WhatsApp protocol versions","type":"number","enum":[1]},"body":{"type":"string","minLength":1},"footer":{"type":"string"},"type":{"type":"string","enum":["carousel"]},"cards":{"minItems":1,"type":"array","items":{"type":"object","properties":{"body":{"type":"string","minLength":1},"header":{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"type":"string","minLength":1,"description":"HTTP(S) URL, local file path or base64 data URL; resolved by the client before sending"},"filename":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false},"actions":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["reply"]},"id":{"type":"string","minLength":1,"description":"Stable application-defined ID returned when the recipient chooses this item"},"label":{"type":"string","minLength":1}},"required":["type","id","label"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"label":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["type","label","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["call"]},"label":{"type":"string","minLength":1},"phoneNumber":{"type":"string","minLength":1}},"required":["type","label","phoneNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["copy"]},"label":{"type":"string","minLength":1},"code":{"type":"string","minLength":1}},"required":["type","label","code"],"additionalProperties":false}]}}},"required":["body","header","actions"],"additionalProperties":false}}},"required":["body","type","cards"],"additionalProperties":false},{"type":"object","properties":{"version":{"description":"Document format version, defaults to 1; independent of WhatsApp protocol versions","type":"number","enum":[1]},"body":{"type":"string","minLength":1},"footer":{"type":"string"},"type":{"type":"string","enum":["booking"]},"title":{"type":"string"},"buttonLabel":{"default":"View booking","type":"string","minLength":1},"booking":{"type":"object","properties":{"startAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$","description":"ISO 8601 booking timestamp with an explicit timezone. Decoding converts offsets and fractional seconds to UTC whole seconds for WhatsApp.","examples":["2026-10-26T14:00:00Z","2026-07-26T14:00:00.000+01:00"],"format":"date-time"},"endAt":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|[+-](?:[01]\\d|2[0-3]):[0-5]\\d)$","description":"ISO 8601 booking timestamp with an explicit timezone. Decoding converts offsets and fractional seconds to UTC whole seconds for WhatsApp.","examples":["2026-10-26T14:00:00Z","2026-07-26T14:00:00.000+01:00"],"format":"date-time"},"location":{"type":"string"},"url":{"type":"string","format":"uri"},"managementUrl":{"type":"string","format":"uri"},"phoneNumber":{"type":"string"},"email":{"type":"string","format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"description":{"type":"string"},"labels":{"type":"object","properties":{"language":{"type":"string"},"meetingType":{"type":"string"},"detailsTitle":{"type":"string"},"addToCalendar":{"type":"string"},"viewOnMap":{"type":"string"},"manageBooking":{"type":"string"}},"additionalProperties":false}},"required":["startAt"],"additionalProperties":false},"actions":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"label":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"}},"required":["type","label","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["call"]},"label":{"type":"string","minLength":1},"phoneNumber":{"type":"string","minLength":1}},"required":["type","label","phoneNumber"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["copy"]},"label":{"type":"string","minLength":1},"code":{"type":"string","minLength":1}},"required":["type","label","code"],"additionalProperties":false}]}}},"required":["body","type","booking"],"additionalProperties":false},{"type":"object","properties":{"version":{"description":"Document format version, defaults to 1; independent of WhatsApp protocol versions","type":"number","enum":[1]},"body":{"type":"string","minLength":1},"footer":{"type":"string"},"type":{"type":"string","enum":["native"]},"header":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string","minLength":1}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"source":{"type":"string","minLength":1,"description":"HTTP(S) URL, local file path or base64 data URL; resolved by the client before sending"},"filename":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"source":{"type":"string","minLength":1,"description":"HTTP(S) URL, local file path or base64 data URL; resolved by the client before sending"},"filename":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["document"]},"source":{"type":"string","minLength":1,"description":"HTTP(S) URL, local file path or base64 data URL; resolved by the client before sending"},"filename":{"type":"string","minLength":1},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false}]},"actions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"description":"WhatsApp native action name; availability depends on the recipient and account"},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/__schema0"}}},"required":["name"],"additionalProperties":false}},"parameters":{"type":"object","additionalProperties":{"$ref":"#/definitions/__schema0"}}},"required":["body","type","actions"],"additionalProperties":false,"description":"Advanced extension for new native action types; parameters are passed through without claiming recipient support"}]}},"required":["to","content"],"additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string","nullable":true,"enum":[null]},{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"array","items":{"$ref":"#/definitions/__schema0"}},{"type":"object","additionalProperties":{"$ref":"#/definitions/__schema0"}}]}}}}}},"x-openwa-aliases":["POST /api/sendInteractive"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/messages/sendRaw":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Send a constructed WhatsApp protobuf Message payload (Insiders and above); media must already be uploaded","operationId":"sendRawMessage","tags":["messages"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"payload":{"type":"object","additionalProperties":{"$ref":"#/definitions/__schema0"}}},"required":["to","payload"],"additionalProperties":false,"definitions":{"__schema0":{"anyOf":[{"type":"string","nullable":true,"enum":[null]},{"type":"boolean"},{"type":"number"},{"type":"string"},{"type":"array","items":{"$ref":"#/definitions/__schema0"}},{"type":"object","additionalProperties":{"$ref":"#/definitions/__schema0"}}]}}}}}},"x-openwa-aliases":["POST /api/sendRawMessage"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"string"}}}}}}}}},"/api/calls/getCallCapabilities":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Optional calling availability for UI and diagnostics. Actions perform admission automatically.","operationId":"getCallCapabilities","tags":["calls"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"x-openwa-aliases":["POST /api/getCallCapabilities"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"control":{"type":"boolean"},"audio":{"type":"boolean"},"video":{"type":"boolean"},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":false}},"required":["control","audio","video"],"additionalProperties":false}}}}}}}}},"/api/calls/getActiveCall":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get the current call, if there is one. In the SDK the result also has methods to control the call.","operationId":"getActiveCall","tags":["calls"],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"x-openwa-aliases":["POST /api/getActiveCall"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"},"peer":{"type":"string"},"state":{"type":"string"},"direction":{"anyOf":[{"type":"string","enum":["incoming"]},{"type":"string","enum":["outgoing"]}]},"video":{"type":"boolean"},"terminal":{"type":"boolean"},"observedAt":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]},"endReason":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"source":{"anyOf":[{"type":"string","enum":["local"]},{"type":"string","enum":["media"]},{"type":"string","enum":["license"]},{"type":"string","enum":["session"]},{"type":"string","enum":["whatsapp"]}]}},"required":["code","message","source"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"media":{"anyOf":[{"type":"object","properties":{"state":{"anyOf":[{"type":"string","enum":["attached"]},{"type":"string","enum":["ended"]}]},"reason":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["state"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]}},"required":["id","sessionId","generation","peer","state","direction","video","terminal","observedAt"],"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]}}}}}}}}},"/api/calls/acceptCall":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Prepare media and accept this incoming call.","operationId":"acceptCall","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]},"media":{"type":"object","properties":{"microphone":{},"speaker":{},"camera":{},"onMediaFailure":{"anyOf":[{"type":"string","enum":["end"]},{"type":"string","enum":["keep-open"]}]},"takeover":{"type":"boolean"}}}},"required":["call"]}}}},"x-openwa-aliases":["POST /api/acceptCall"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/calls/startCall":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Prepare media and place an outgoing audio or video call.","operationId":"startCall","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"type":"string"},"microphone":{},"speaker":{},"camera":{}},"required":["to"]}}}},"x-openwa-aliases":["POST /api/startCall"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/calls/rejectCall":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Reject an incoming call and wait for WhatsApp to confirm it.","operationId":"rejectCall","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]}},"required":["call"]}}}},"x-openwa-aliases":["POST /api/rejectCall"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/calls/endCall":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Request hangup for this call.","operationId":"endCall","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]}},"required":["call"]}}}},"x-openwa-aliases":["POST /api/endCall"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/calls/muteCall":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Mute or unmute the microphone without ending reception.","operationId":"muteCall","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]},"muted":{"type":"boolean"}},"required":["call","muted"]}}}},"x-openwa-aliases":["POST /api/muteCall"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/calls/clearCallAudio":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Discard queued outgoing audio.","operationId":"clearCallAudio","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]}},"required":["call"]}}}},"x-openwa-aliases":["POST /api/clearCallAudio"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/calls/setCallMedia":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Prepare a replacement before releasing the working media.","operationId":"setCallMedia","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]},"media":{"type":"object","properties":{"microphone":{},"speaker":{},"camera":{},"onMediaFailure":{"anyOf":[{"type":"string","enum":["end"]},{"type":"string","enum":["keep-open"]}]},"takeover":{"type":"boolean"}}}},"required":["call"]}}}},"x-openwa-aliases":["POST /api/setCallMedia"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/calls/observeCallAudio":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Attach an isolated receive-only audio sink. Its failure does not interrupt the call owner.","operationId":"observeCallAudio","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]},"speaker":{}},"required":["call","speaker"]}}}},"x-openwa-aliases":["POST /api/observeCallAudio"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"observerId":{"type":"string"}},"required":["ok","status","observerId"],"additionalProperties":{}},{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}]}}}}}}}}},"/api/calls/stopCallAudioObserver":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Stop an audio observer and finalize its sink.","operationId":"stopCallAudioObserver","tags":["calls"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"call":{"type":"object","properties":{"id":{"type":"string"},"sessionId":{"type":"string"},"generation":{"type":"string"}},"required":["id","sessionId","generation"]},"observerId":{"type":"string"}},"required":["call","observerId"]}}}},"x-openwa-aliases":["POST /api/stopCallAudioObserver"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"anyOf":[{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[true]}]},"status":{"anyOf":[{"type":"string","enum":["requested"]}]},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status"],"additionalProperties":{}},{"type":"object","properties":{"ok":{"anyOf":[{"type":"boolean","enum":[false]}]},"status":{"anyOf":[{"type":"string","enum":["unavailable"]},{"type":"string","enum":["failed"]},{"type":"string","enum":["unknown"]}]},"reason":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"status":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]}},"required":["code","message","status"],"additionalProperties":{}},"callId":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]}},"required":["ok","status","reason"],"additionalProperties":{}}]}}}}}}}}},"/api/events/sendEvent":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Send a native WhatsApp event with Unix-second times. Returns its submitted message ID; delivery is observed through ACKs.","operationId":"sendEvent","tags":["events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"to":{"description":"Recipient chat ID","type":"string"},"event":{"type":"object","properties":{"name":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"string"},"extraGuestsAllowed":{"type":"boolean"},"callType":{"anyOf":[{"type":"string","enum":["voice"]},{"type":"string","enum":["video"]}]},"isScheduledCall":{"type":"boolean"},"requireApproval":{"type":"boolean"},"quotedMsgId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}}},"required":["name","startTime"],"examples":[{"name":"Community meetup","startTime":1893456000,"description":"Meet the community"}]}},"required":["to","event"]}}}},"x-openwa-aliases":["POST /api/sendEvent"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"description":"Message ID","type":"string","pattern":"^(true|false)_.+_.+$"}}}}}}}}},"/api/events/getEvent":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Retrieve an event by message ID from WhatsApp local history. Returns null when absent.","operationId":"getEvent","tags":["events"],"parameters":[{"name":"eventId","in":"query","required":true,"description":"Message ID","schema":{"description":"Message ID","type":"string"}}],"x-openwa-aliases":["GET /api/getEvent"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"nullable":true,"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"creatorId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"description":{"type":"string"},"location":{"type":"object","properties":{"name":{"type":"string"},"latitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 90","arbitraryConstraint":{"maximum":90},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":90}}},"longitude":{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}],"expected":"a value less than or equal to 180","arbitraryConstraint":{"maximum":180},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":180}}}},"additionalProperties":false},"joinLink":{"type":"string"},"isScheduledCall":{"type":"boolean"},"extraGuestsAllowed":{"type":"boolean"},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":false}}}}}}}}},"/api/events/get":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Page through a chat’s locally synced event history, newest first. Pass nextCursor as options.before to retrieve the next page.","operationId":"getEvents","tags":["events"],"parameters":[{"name":"chatId","in":"query","required":true,"description":"Recipient chat ID","schema":{"description":"Recipient chat ID","type":"string"}},{"name":"options","in":"query","required":false,"description":"Argument: options","schema":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100,"expected":"a value less than or equal to 100","arbitraryConstraint":{"maximum":100},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":100}}},"before":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}}}}}],"x-openwa-aliases":["GET /api/getEvents"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"chatId":{"type":"string","minLength":1},"creatorId":{"type":"string","minLength":1},"name":{"type":"string"},"startTime":{"type":"integer","minimum":0,"maximum":2147483647},"endTime":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"string","nullable":true,"enum":[null]}]},"description":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"location":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"latitude":{"anyOf":[{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]},{"type":"string","nullable":true,"enum":[null]}]},"longitude":{"anyOf":[{"anyOf":[{"type":"number"},{"anyOf":[{"type":"string","enum":["Infinity"]},{"type":"string","enum":["-Infinity"]},{"type":"string","enum":["NaN"]}]}]},{"type":"string","nullable":true,"enum":[null]}]}},"additionalProperties":{}},{"type":"string","nullable":true,"enum":[null]}]},"joinLink":{"anyOf":[{"type":"string"},{"type":"string","nullable":true,"enum":[null]}]},"isScheduledCall":{"anyOf":[{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},"extraGuestsAllowed":{"anyOf":[{"type":"boolean"},{"type":"string","nullable":true,"enum":[null]}]},"isCanceled":{"type":"boolean"},"fromMe":{"type":"boolean"},"timestamp":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["id","chatId","creatorId","name","startTime","isCanceled","fromMe","timestamp"],"additionalProperties":{}}},"nextCursor":{"anyOf":[{"type":"string","minLength":1},{"type":"string","nullable":true,"enum":[null]}]}},"required":["events","nextCursor"],"additionalProperties":false}}}}}}}}},"/api/events/getEventResponses":{"get":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Get the latest decrypted RSVP per participant, including responses persisted in WhatsApp local history.","operationId":"getEventResponses","tags":["events"],"parameters":[{"name":"eventId","in":"query","required":true,"description":"Message ID","schema":{"description":"Message ID","type":"string"}}],"x-openwa-aliases":["GET /api/getEventResponses"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"eventId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"chatId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"senderId":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"response":{"anyOf":[{"type":"string","enum":["going"]},{"type":"string","enum":["notGoing"]},{"type":"string","enum":["maybe"]},{"type":"string","enum":["unknown"]}]},"timestamp":{"type":"integer","minimum":0,"maximum":9007199254740991,"expected":"a value greater than or equal to 0","arbitraryConstraint":{"minimum":0},"representation":{"id":"effect/schema/isGreaterThanOrEqualTo","payload":{"minimum":0}}},"fromMe":{"type":"boolean"}},"required":["id","eventId","chatId","senderId","response","timestamp","fromMe"],"additionalProperties":false}}}}}}}}}},"/api/events/editEvent":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Edit an event created by this account. Unspecified fields retain their current values; endTime: null removes the end time.","operationId":"editEvent","tags":["events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"description":"Message ID","type":"string"},"changes":{"type":"object","properties":{"name":{"type":"string","minLength":1,"expected":"a value with a length of at least 1","representation":{"id":"effect/schema/isMinLength","payload":{"minLength":1}},"~structural":true,"arbitraryConstraint":{"minLength":1}},"startTime":{"type":"integer","minimum":0,"maximum":2147483647,"expected":"a value less than or equal to 2147483647","arbitraryConstraint":{"maximum":2147483647},"representation":{"id":"effect/schema/isLessThanOrEqualTo","payload":{"maximum":2147483647}}},"endTime":{"anyOf":[{"type":"integer","minimum":0,"maximum":2147483647},{"type":"string","nullable":true,"enum":[null]}]},"description":{"type":"string"},"location":{"type":"string"}},"examples":[{"description":"Updated meetup details"}]}},"required":["eventId","changes"]}}}},"x-openwa-aliases":["POST /api/editEvent"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/events/cancelEvent":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Cancel an event created by this account using WhatsApp’s encrypted event edit action.","operationId":"cancelEvent","tags":["events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"description":"Message ID","type":"string"}},"required":["eventId"]}}}},"x-openwa-aliases":["POST /api/cancelEvent"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}},"/api/events/respondToEvent":{"post":{"400":{"description":"Validation error","content":{"application/json":{"schema":{"type":"object","required":["error","details"],"properties":{"error":{"type":"string","enum":["Validation Error"]},"details":{"type":"array","items":{"type":"object","required":["code","path","message"],"properties":{"code":{"type":"string"},"path":{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"integer"}]}},"message":{"type":"string"}},"additionalProperties":true}}},"additionalProperties":false},"examples":{"validationError":{"summary":"Input validation failed","value":{"error":"Validation Error","details":[{"code":"invalid_type","path":["to"],"message":"Invalid input"}]}}}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}},"additionalProperties":false},"examples":{"internalError":{"summary":"Execution failed","value":{"error":"Internal Server Error"}}}}}},"summary":"Send your RSVP to a WhatsApp event.","operationId":"respondToEvent","tags":["events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"eventId":{"description":"Message ID","type":"string"},"response":{"type":"string","enum":["going","notGoing","maybe"],"examples":["going"]}},"required":["eventId","response"]}}}},"x-openwa-aliases":["POST /api/respondToEvent"],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","required":["success","data"],"properties":{"success":{"type":"boolean","enum":[true]},"data":{"type":"boolean"}}}}}}}}}}}