{ "openapi": "3.0.3", "info": { "title": "Evolution API", "version": "1.7.1" }, "servers": [ { "url": "https://{server-url}", "variables": { "server-url": { "default": "evolution-example", "description": "The URL of your EvolutionAPI server" } }, "description": "Your instance domain" } ], "paths": { "/instance/create": { "post": { "operationId": "createInstance", "summary": "Create Instance", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": ["instanceName"], "properties": { "instanceName": { "type": "string", "description": "instance (Instance name)" }, "token": { "type": "string", "description": "apikey (Enter or leave empty to create dynamically)" }, "qrcode": { "type": "boolean", "description": "Create QR Code automatically after creation" }, "number": { "type": "string", "description": "559999999999 (Instance owner number with Country Code)" }, "integration": { "type": "string", "description": "WhatsApp engine", "enum": ["WHATSAPP-BAILEYS", "WHATSAPP-BUSINESS"] }, "webhook": { "type": "string", "description": "Webhook URL" }, "webhook_by_events": { "type": "boolean", "description": "Enable Webhook by events" }, "events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the Webhook" }, "reject_call": { "type": "boolean", "description": "Reject WhatsApp calls automatically" }, "msg_call": { "type": "string", "description": "Message to be sent when a call is rejected automatically" }, "groups_ignore": { "type": "boolean", "description": "Ignore group messages" }, "always_online": { "type": "boolean", "description": "Keep WhatsApp always online" }, "read_messages": { "type": "boolean", "description": "Send read receipts to received messages" }, "read_status": { "type": "boolean", "description": "Show sent messages read status" }, "websocket_enabled": { "type": "boolean", "description": "Enable websocket" }, "websocket_events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the websocket" }, "rabbitmq_enabled": { "type": "boolean", "description": "Enable RabbitMQ" }, "rabbitmq_events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the RabbitMQ" }, "sqs_enabled": { "type": "boolean", "description": "Enable SQS" }, "sqs_events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the SQS" }, "typebot_url": { "type": "string", "description": "URL for the typebot instance" }, "typebot": { "type": "string", "description": "Typebot flow name" }, "typebot_expire": { "type": "integer", "description": "Seconds to expire TODO" }, "typebot_keyword_finish": { "type": "string", "description": "Keyword to finish the typebot flow" }, "typebot_delay_message": { "type": "integer", "description": "Default delay for the typebot messages" }, "typebot_unknown_message": { "type": "string", "description": "TODO" }, "typebot_listening_from_me": { "type": "boolean", "description": "Typebot listen messages sent by the connected number" }, "proxy": { "type": "object", "properties": { "host": { "type": "string", "description": "Proxy host" }, "port": { "type": "string", "description": "Proxy port" }, "protocol": { "type": "string", "description": "Proxy protocol", "enum": ["http", "https"] }, "username": { "type": "string", "description": "Proxy username" }, "password": { "type": "string", "description": "Proxy password" } } }, "chatwoot_account_id": { "type": "integer", "description": "Chatwoot account ID" }, "chatwoot_token": { "type": "string", "description": "Chatwoot authentication token" }, "chatwoot_url": { "type": "string", "description": "Chatwoot server URL" }, "chatwoot_sign_msg": { "type": "boolean", "description": "Send message signature on Chatwoot" }, "chatwoot_reopen_conversation": { "type": "boolean", "description": "Reopen conversation on Chatwoot" }, "chatwoot_conversation_pending": { "type": "boolean", "description": "TODO" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "instance": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance" }, "instanceId": { "type": "string", "description": "The unique identifier for the instance" }, "webhook_wa_business": { "type": "string", "description": "The webhook URL for WhatsApp Business integration" }, "access_token_wa_business": { "type": "string", "description": "The access token for WhatsApp Business" }, "status": { "type": "string", "description": "The current status of the instance" } } }, "hash": { "type": "object", "properties": { "apikey": { "type": "string", "description": "The API key for authentication" } } }, "settings": { "type": "object", "properties": { "reject_call": { "type": "boolean", "description": "Indicates whether calls are rejected" }, "msg_call": { "type": "string", "description": "Message to be sent when a call is rejected" }, "groups_ignore": { "type": "boolean", "description": "Indicates whether groups are ignored" }, "always_online": { "type": "boolean", "description": "Indicates whether the instance is always online" }, "read_messages": { "type": "boolean", "description": "Indicates whether messages are marked as read" }, "read_status": { "type": "boolean", "description": "Indicates whether status updates are marked as read" }, "sync_full_history": { "type": "boolean", "description": "Indicates whether the full message history is synchronized" } } } }, "example": { "instance": { "instanceName": "teste-docs", "instanceId": "af6c5b7c-ee27-4f94-9ea8-192393746ddd", "webhook_wa_business": null, "access_token_wa_business": "", "status": "created" }, "hash": { "apikey": "123456" }, "settings": { "reject_call": false, "msg_call": "", "groups_ignore": true, "always_online": false, "read_messages": false, "read_status": false, "sync_full_history": false } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 403, "error": "Forbidden", "response": { "message": [ "This name \"instance-example-name\" is already in use." ] } } } } } } } } }, "/instance/fetchInstances": { "get": { "operationId": "fetchInstances", "summary": "Fetch Instances", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instanceName", "description": "Name of the instance to be fetched", "in": "query", "schema": { "type": "string" } } ], "description": "Returns the instance with the name informed in the parameter, or all the instances if empty.", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": [ { "instance": { "instanceName": "example-name", "instanceId": "421a4121-a3d9-40cc-a8db-c3a1df353126", "owner": "553198296801@s.whatsapp.net", "profileName": "Guilherme Gomes", "profilePictureUrl": null, "profileStatus": "This is the profile status.", "status": "open", "serverUrl": "https://example.evolution-api.com", "apikey": "B3844804-481D-47A4-B69C-F14B4206EB56", "integration": { "integration": "WHATSAPP-BAILEYS", "webhook_wa_business": "https://example.evolution-api.com/webhook/whatsapp/db5e11d3-ded5-4d91-b3fb-48272688f206" } } }, { "instance": { "instanceName": "teste-docs", "instanceId": "af6c5b7c-ee27-4f94-9ea8-192393746ddd", "status": "close", "serverUrl": "https://example.evolution-api.com", "apikey": "123456", "integration": { "token": "123456", "webhook_wa_business": "https://example.evolution-api.com/webhook/whatsapp/teste-docs" } } } ], "required": ["message"] } } } } } } }, "/instance/connect/{instance}": { "get": { "operationId": "instanceConnect", "summary": "Instances Connect", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "number", "description": "Phone number (with country code) to be connected", "in": "query", "schema": { "type": "string" } } ], "description": "Generates and returns the QR code for WhatsApp connection", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "pairingCode": { "type": "string", "description": "The unique code used for pairing a device or account." }, "code": { "type": "string", "description": "A specific code associated with the pairing process. This may include tokens or other identifiers." }, "count": { "type": "integer", "description": "The count or number of attempts or instances related to the pairing process." } }, "example": { "pairingCode": "WZYEH1YY", "code": "2@y8eK+bjtEjUWy9/FOM...", "count": 1 } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/restart/{instance}": { "put": { "operationId": "restartInstance", "summary": "Restart Instance", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Restarts the instance", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "instance": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "state": { "type": "string", "description": "The state of the instance." } } } }, "example": { "instance": { "instanceName": "teste-docs", "state": "open" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/connectionState/{instance}": { "get": { "operationId": "connectionState", "summary": "Connection State", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Gets the state of the connection", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "instance": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "state": { "type": "string", "description": "The state of the instance." } } } }, "example": { "instance": { "instanceName": "teste-docs", "state": "open" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/logout/{instance}": { "delete": { "operationId": "logoutInstance", "summary": "Logout Instance", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Makes logout on instance", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "The status of the response." }, "error": { "type": "boolean", "description": "Indicates whether an error occurred." }, "response": { "type": "object", "properties": { "message": { "type": "string", "description": "A message related to the response." } } } }, "example": { "status": "SUCCESS", "error": false, "response": { "message": "Instance logged out" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/delete/{instance}": { "delete": { "operationId": "deleteInstance", "summary": "Delete Instance", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Deletes instance", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "The status of the response." }, "error": { "type": "boolean", "description": "Indicates whether an error occurred." }, "response": { "type": "object", "properties": { "message": { "type": "string", "description": "A message related to the response." } } } }, "example": { "status": "SUCCESS", "error": false, "response": { "message": "Instance deleted" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/setPresence/{instance}": { "post": { "operationId": "setPresence", "summary": "Set Presence", "tags": ["Instance Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Deletes instance", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["presence"], "properties": { "presence": { "type": "string", "enum": ["available", "unavailable"] } } } } } }, "responses": { "200": { "description": "Ok", "content": {} }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/webhook/set/{instance}": { "post": { "operationId": "setWebhook", "summary": "Set Webhook", "tags": ["Webhook Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Set Webhook for instance", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "url", "events" ], "properties": { "url": { "type": "string", "description": "Webhook URL" }, "webhook_by_events": { "type": "boolean", "description": "Enables Webhook by events" }, "webhook_base64": { "type": "boolean", "description": "Sends files in base64 when available" }, "events": { "type": "array", "minItems": 1, "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the Webhook" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "webhook": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the webhook." }, "events": { "type": "array", "items": { "type": "string" }, "description": "List of events the webhook is subscribed to." }, "enabled": { "type": "boolean", "description": "Indicates whether the webhook is enabled." } } } } } }, "example": { "webhook": { "instanceName": "teste-docs", "webhook": { "url": "https://example.com", "events": [ "APPLICATION_STARTUP" ], "enabled": true } } } } } } } } } }, "/webhook/find/{instance}": { "get": { "operationId": "findWebhook", "summary": "Find Webhook", "tags": ["Webhook Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Fetch Webhook configuration", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Indicates whether the webhook is enabled." }, "url": { "type": "string", "description": "The URL of the webhook." }, "events": { "type": "array", "items": { "type": "string" }, "description": "List of events the webhook is subscribed to." } }, "example": { "enabled": true, "url": "https://example.com", "events": [ "APPLICATION_STARTUP" ] } } } } } } } }, "/settings/set/{instance}": { "post": { "operationId": "setSettings", "summary": "Set Settings", "tags": ["Settings Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Set settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "reject_call", "groups_ignore", "always_online", "read_messages", "read_status", "sync_full_history" ], "properties": { "reject_call": { "type": "boolean", "description": "Reject calls automatically" }, "msg_call": { "type": "string", "description": "Message to be sent when a call is rejected automatically" }, "groups_ignore": { "type": "boolean", "description": "Ignore group messages" }, "always_online": { "type": "boolean", "description": "Always show WhatsApp online" }, "read_messages": { "type": "boolean", "description": "Send read receipts" }, "read_status": { "type": "boolean", "description": "See message status" }, "sync_full_history": { "type": "boolean", "description": "Syncronize full WhatsApp history with EvolutionAPI" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "settings": { "type": "object", "properties": { "reject_call": { "type": "boolean", "description": "Indicates whether to reject incoming calls." }, "groups_ignore": { "type": "boolean", "description": "Indicates whether to ignore group messages." }, "always_online": { "type": "boolean", "description": "Indicates whether to always keep the instance online." }, "read_messages": { "type": "boolean", "description": "Indicates whether to mark messages as read." }, "read_status": { "type": "boolean", "description": "Indicates whether to read status updates." }, "sync_full_history": { "type": "boolean", "description": "Indicates whether to synchronize full message history." } } } } } }, "example": { "settings": { "instanceName": "teste-docs", "settings": { "reject_call": true, "groups_ignore": true, "always_online": true, "read_messages": true, "read_status": true, "sync_full_history": false } } } } } } } } } }, "/settings/find/{instance}": { "get": { "operationId": "findWebhook", "summary": "Find Webhook", "tags": ["Webhook Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Fetch Webhook configuration", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "reject_call": { "type": "boolean", "description": "Indicates whether to reject incoming calls." }, "groups_ignore": { "type": "boolean", "description": "Indicates whether to ignore group messages." }, "always_online": { "type": "boolean", "description": "Indicates whether to always keep the instance online." }, "read_messages": { "type": "boolean", "description": "Indicates whether to mark messages as read." }, "read_status": { "type": "boolean", "description": "Indicates whether to read status updates." }, "sync_full_history": { "type": "boolean", "description": "Indicates whether to synchronize full message history." } }, "example": { "reject_call": true, "groups_ignore": true, "always_online": true, "read_messages": true, "read_status": true, "sync_full_history": false } } } } } } } }, "/message/sendTemplate/{instance}": { "post": { "operationId": "sendTemplate", "summary": "Send Template", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send a template message with the Official WhatsApp API", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "string", "description": "Message receiver number with country code" }, "templateMessage": { "type": "object", "properties": { "name": { "type": "string", "description": "Template name" }, "language": { "type": "string", "description": "Template language", "example": "pt_BR" }, "components": { "type": "array", "description": "Template components", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["header", "body", "button"] }, "sub_type": { "type": "string", "enum": [ "quick_reply", "url", "copy_code", "catalog" ] }, "index": { "type": "string", "description": "Button index from 0-9" }, "parameters": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "Parameter type", "enum": [ "payload", "text", "coupon_code", "currency", "date_time", "image", "document", "video" ] }, "text": { "type": "string", "description": "Parameter text" } } } } } } } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/message/sendText/{instance}": { "post": { "operationId": "sendText", "summary": "Send Text", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send plain text message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "textMessage" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["composing", "recording"] }, "linkPreview": { "type": "boolean", "description": "Shows a preview of the target website if there's a link within the message" }, "quoted": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Receiver phone number with country code" }, "fromMe": { "type": "boolean", "description": "If the message is from the owner number" }, "id": { "type": "string", "description": "Message ID" }, "participant": { "type": "string", "description": "TODO" } } }, "message": { "type": "object", "properties": { "conversation": { "type": "string", "description": "Quoted message content" } } } } }, "mentions": { "type": "object", "properties": { "everyOne": { "type": "boolean", "description": "Mentions everyone" }, "mentioned": { "type": "array", "items": { "type": "string", "description": "Receiver phone number with country code" } } } } } }, "textMessage": { "type": "object", "properties": { "text": { "type": "string", "description": "Text message content" } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } } }, "message": { "type": "object", "properties": { "extendedTextMessage": { "type": "object", "properties": { "text": { "type": "string", "description": "The text message." } } } } }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message." }, "status": { "type": "string", "description": "The status of the message." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE594145F4C59B4" }, "message": { "extendedTextMessage": { "text": "Olá!" } }, "messageTimestamp": "1717689097", "status": "PENDING" } } } } } } } }, "/message/sendMedia/{instance}": { "post": { "operationId": "sendMedia", "summary": "Send Media", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send media message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "mediaMessage" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["composing", "recording"] } } }, "mediaMessage": { "type": "object", "properties": { "mediaType": { "type": "string", "description": "Media type", "enum": ["image", "video", "document", "audio"] }, "fileName": { "type": "string", "description": "Name of the file (for media type `document` only)", "example": "evolution-api.pdf" }, "caption": { "type": "string", "description": "Caption to send with media (except with media type `audio`)" }, "media": { "type": "string", "description": "Media URL or file in base64" } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "imageMessage": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the image." }, "mimetype": { "type": "string", "description": "The MIME type of the image." }, "caption": { "type": "string", "description": "The caption text of the image." }, "fileSha256": { "type": "string", "description": "The SHA-256 hash of the image file." }, "fileLength": { "type": "string", "description": "The length of the image file." }, "height": { "type": "integer", "description": "The height of the image." }, "width": { "type": "integer", "description": "The width of the image." }, "mediaKey": { "type": "string", "description": "The media key of the image." }, "fileEncSha256": { "type": "string", "description": "The SHA-256 hash of the encrypted image file." }, "directPath": { "type": "string", "description": "The direct path to the image." }, "mediaKeyTimestamp": { "type": "string", "description": "The timestamp of the media key." }, "jpegThumbnail": { "type": "string", "description": "The JPEG thumbnail of the image." }, "contextInfo": { "type": "object", "description": "Additional context information." } }, "description": "Details of the image message." } }, "description": "The message content, which may include various types of messages like text, images, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE5F5A632EAE722" }, "message": { "imageMessage": { "url": "https://mmg.whatsapp.net/o1/v/t62.7118-2...", "mimetype": "image/png", "caption": "Caption text", "fileSha256": "VbCGkGBv5SZStLD5PHdkBWpQav/lNsXcY...", "fileLength": "1305757", "height": 1080, "width": 1920, "mediaKey": "aFQK9Ocw5tE7Nf0iBA42Xcb4Dee6G1k/pLL...", "fileEncSha256": "bGVtYeR3458RwC0p1tsGDNuj+vOu/...", "directPath": "/o1/v/t62.7118-24/f1/m232/up-oil...", "mediaKeyTimestamp": "1717775573", "jpegThumbnail": "/9j/2wBDABALDA4MChAODQ4SERATG...", "contextInfo": {} } }, "messageTimestamp": "1717775575", "status": "PENDING" } } } } } } } }, "/message/sendWhatsAppAudio/{instance}": { "post": { "operationId": "sendWhatsAppAudio", "summary": "Send WhatsApp Audio", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send WhatsApp Audio", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "audioMessage" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["recording"], "default": "recording" }, "encoding": { "type": "boolean", "description": "If the audio must be encoded or not" } } }, "audioMessage": { "type": "object", "properties": { "audio": { "type": "string", "description": "Audio URL or file in base64" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "audioMessage": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the audio message." }, "mimetype": { "type": "string", "description": "The MIME type of the audio message." }, "fileSha256": { "type": "string", "description": "The SHA-256 hash of the audio file." }, "fileLength": { "type": "string", "description": "The length of the audio file." }, "seconds": { "type": "integer", "description": "The duration of the audio message in seconds." }, "ptt": { "type": "boolean", "description": "Indicates whether the audio message is a push-to-talk (PTT) message." }, "mediaKey": { "type": "string", "description": "The media key of the audio message." }, "fileEncSha256": { "type": "string", "description": "The SHA-256 hash of the encrypted audio file." }, "directPath": { "type": "string", "description": "The direct path to the audio file." }, "mediaKeyTimestamp": { "type": "string", "description": "The timestamp of the media key." } }, "description": "Details of the audio message." } }, "description": "The message content, which may include various types of messages like text, images, audio, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE5EFED2AB0BB9F" }, "message": { "audioMessage": { "url": "https://mmg.whatsapp.net/v/t62.7114-24/21428511_985284763127087_5662928...", "mimetype": "audio/mp4", "fileSha256": "DJPBnRns6QADzZNH2j0R88mUtFQ4aiOm9aZf6dio2G0=", "fileLength": "670662", "seconds": 42, "ptt": true, "mediaKey": "+A3X1Tuyzeh87cCVZpfuKpL3Y4RYdYr3sCDurjSlBTY=", "fileEncSha256": "s4tKvHOXIZAw5668/Xcy4zoFba4vW8klmNYC78yOPZs=", "directPath": "/v/t62.7114-24/21428511_985284763127087_5662928477636351284_n.enc...", "mediaKeyTimestamp": "1717776942" } }, "messageTimestamp": "1717776942", "status": "PENDING" } } } } } } } }, "/message/sendSticker/{instance}": { "post": { "operationId": "sendSticker", "summary": "Send Sticker", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send Sticker", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "stickerMessage" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["composing"], "default": "composing" } } }, "stickerMessage": { "type": "object", "properties": { "image": { "type": "string", "description": "Image URL or file in base64" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/message/sendStatus/{instance}": { "post": { "operationId": "sendStatus", "summary": "Send Status", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Post WhatsApp status (stories)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["statusMessage"], "properties": { "statusMessage": { "type": "object", "required": [ "type" ], "properties": { "type": { "type": "string", "description": "status type", "enum": ["text", "image", "audio"] }, "content": { "type": "string", "description": "Text content for type `text` or file URL for type `image` and `audio`" }, "caption": { "type": "string", "description": "Text caption for type `image` status" }, "backgroundColor": { "type": "string", "description": "Background hex color" }, "font": { "type": "integer", "description": "1 - Serif, 2 - Norican Regular, 3 - Bryndan Write, 4 - BebasNeue Regular, 5 - Oswald Heavy" }, "allContacts": { "type": "boolean", "description": "true to send to all contacts or false to send to statusJidList" }, "statusJidList": { "type": "array", "items": { "type": "string", "description": "Receivers numbers with country code" } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "extendedTextMessage": { "type": "object", "properties": { "text": { "type": "string", "description": "The text content of the message." }, "backgroundArgb": { "type": "integer", "description": "The background color of the text message, represented as ARGB integer value." }, "font": { "type": "string", "description": "The font used in the text message." } }, "description": "Details of the extended text message." } }, "description": "The message content, which may include various types of messages like text, images, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." }, "participant": { "type": "string", "description": "The participant in the chat to whom the message was sent." } }, "example": { "key": { "remoteJid": "status@broadcast", "fromMe": true, "id": "BAE5FAB9E65A3DA8" }, "message": { "extendedTextMessage": { "text": "example", "backgroundArgb": 4294910617, "font": "FB_SCRIPT" } }, "messageTimestamp": "1717691767", "status": "PENDING", "participant": "553198296801:17@s.whatsapp.net" } } } } } } } }, "/message/sendLocation/{instance}": { "post": { "operationId": "sendLocation", "summary": "Send Location", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send Location", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "locationMessage" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["composing"], "default": "composing" } } }, "locationMessage": { "type": "object", "required": [ "latitude", "longitude" ], "properties": { "name": { "type": "string", "description": "Location name" }, "address": { "type": "string", "description": "Location address" }, "latitude": { "type": "number", "description": "Location latitude" }, "longitude": { "type": "number", "description": "Location longitude" } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "locationMessage": { "type": "object", "properties": { "degreesLatitude": { "type": "number", "format": "float", "description": "The latitude of the location." }, "degreesLongitude": { "type": "number", "format": "float", "description": "The longitude of the location." }, "name": { "type": "string", "description": "The name of the location." }, "address": { "type": "string", "description": "The address of the location." }, "contextInfo": { "type": "object", "description": "Additional context information." } }, "description": "Details of the location message." } }, "description": "The message content, which may include various types of messages like text, images, location, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE51B6FF4470AF9" }, "message": { "locationMessage": { "degreesLatitude": -19.93359, "degreesLongitude": -43.93851, "name": "Palácio da Liberdade", "address": "Praça da Liberdade, Belo Horizonte, MG 30140-050", "contextInfo": {} } }, "messageTimestamp": "1717779606", "status": "PENDING" } } } } } } } }, "/message/sendContact/{instance}": { "post": { "operationId": "sendContact", "summary": "Send Contact", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send Contact", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "contactMessage" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["composing"], "default": "composing" } } }, "contactMessage": { "type": "array", "minItems": 1, "items": { "type": "object", "required": ["fullname", "wuid", "phoneNumber"], "properties": { "fullName": { "type": "string", "description": "Contact full name" }, "wuid": { "type": "string", "description": "Phone number non-stylized with country code (553198296801)" }, "phoneNumber": { "type": "string", "description": "Phone number stylized (+55 31 9 9999-9999)" }, "organization": { "type": "string", "description": "Organization name for the contact" }, "email": { "type": "string", "description": "Contact email address" }, "url": { "type": "string", "description": "Page URL" } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "contactMessage": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of the contact." }, "vcard": { "type": "string", "description": "The vCard format contact information." }, "contextInfo": { "type": "object", "description": "Additional context information." } }, "description": "Details of the contact message." } }, "description": "The message content, which may include various types of messages like text, images, contact, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE58DA6CBC941BC" }, "message": { "contactMessage": { "displayName": "Guilherme Gomes", "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Guilherme Gomes\nFN:Guilherme Gomes\nORG:AtendAI;\nEMAIL:...", "contextInfo": {} } }, "messageTimestamp": "1717780437", "status": "PENDING" } } } } } } } }, "/message/sendReaction/{instance}": { "post": { "operationId": "sendReaction", "summary": "Send Reaction", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send Reaction", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "reactionMessage": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or not" }, "id": { "type": "string", "description": "Message ID" } } }, "reaction": { "type": "string", "description": "Reaction emoji", "example": "🚀" } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "reactionMessage": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid of the original message." }, "fromMe": { "type": "boolean", "description": "Indicates whether the original message was sent by the user." }, "id": { "type": "string", "description": "The ID of the original message." } }, "description": "The key of the original message to which the reaction is linked." }, "text": { "type": "string", "description": "The reaction text or emoji." }, "senderTimestampMs": { "type": "string", "description": "The timestamp when the reaction was sent, in milliseconds." } }, "description": "Details of the reaction message." } }, "description": "The message content, which may include various types of messages like text, images, reaction, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE569F0E38F858D" }, "message": { "reactionMessage": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE58DA6CBC941BC" }, "text": "🚀", "senderTimestampMs": "1717781105034" } }, "messageTimestamp": "1717781105", "status": "PENDING" } } } } } } } }, "/message/sendPoll/{instance}": { "post": { "operationId": "sendPoll", "summary": "Send Poll", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send Poll", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "pollMessage" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["composing", "recording"] } } }, "pollMessage": { "type": "object", "required": [ "name", "selectableCount", "values" ], "properties": { "name": { "type": "string", "description": "Name of the poll" }, "selectableCount": { "type": "integer", "minimum": 1, "description": "How many options each person can select" }, "values": { "type": "array", "minItems": 1, "items": { "type": "string" } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "messageContextInfo": { "type": "object", "properties": { "messageSecret": { "type": "string", "description": "The secret of the message context." } }, "description": "Information about the context of the message." }, "pollCreationMessage": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the poll." }, "options": { "type": "array", "items": { "type": "object", "properties": { "optionName": { "type": "string", "description": "The name of the poll option." } } }, "description": "The options available in the poll." }, "selectableOptionsCount": { "type": "integer", "description": "The number of options that can be selected in the poll." } }, "description": "Details of the poll creation message." } }, "description": "The message content, which may include various types of messages like text, images, poll creation, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE53EC8D8E1FD8A" }, "message": { "messageContextInfo": { "messageSecret": "lX/+cLHHNfnTTKZi+88mrhoyi6KNuUzWjgfaB0bTfOY=" }, "pollCreationMessage": { "name": "Poll Name", "options": [ { "optionName": "Option 1" }, { "optionName": "Option 2" }, { "optionName": "Option 3" } ], "selectableOptionsCount": 1 } }, "messageTimestamp": "1717781848", "status": "PENDING" } } } } } } } }, "/message/sendList/{instance}": { "post": { "operationId": "sendList", "summary": "Send List", "tags": ["Message Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send List", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "options": { "type": "object", "properties": { "delay": { "type": "integer", "description": "Presence time in milliseconds before sending message" }, "presence": { "type": "string", "description": "Presence type to show ", "enum": ["composing", "recording"] } } }, "listMessage": { "type": "object", "properties": { "title": { "type": "string", "description": "List title" }, "description": { "type": "string", "description": "List description" }, "buttonText": { "type": "string", "description": "Button text" }, "footerText": { "type": "string", "description": "Footer text" }, "sections": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Section title" }, "rows": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Row title" }, "description": { "type": "string", "description": "Row description" }, "rowId": { "type": "string", "description": "Row ID" } } } } } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "listMessage": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the list message." }, "description": { "type": "string", "description": "The description of the list message." }, "buttonText": { "type": "string", "description": "The text of the button in the list message." }, "listType": { "type": "string", "description": "The type of the list." }, "sections": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the section." }, "rows": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the row." }, "description": { "type": "string", "description": "The description of the row." }, "rowId": { "type": "string", "description": "The ID of the row." } } } } } }, "description": "The sections in the list message." }, "contextInfo": { "type": "object", "description": "Additional context information." } }, "description": "Details of the list message." } }, "description": "The message content, which may include various types of messages like text, images, list, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE5096096C5E261" }, "message": { "listMessage": { "title": "List Title", "description": "List description", "buttonText": "Click Me", "listType": "PRODUCT_LIST", "sections": [ { "title": "Section title", "rows": [ { "title": "Row 1", "description": "Row 1 description", "rowId": "1" }, { "title": "Row 2", "description": "Row 2 description", "rowId": "2" } ] }, { "title": "Section 2", "rows": [ { "title": "Row 1", "description": "Row 1 description", "rowId": "1" }, { "title": "Row 2", "description": "Row 2 description", "rowId": "2" } ] } ], "contextInfo": {} } }, "messageTimestamp": "1717782429", "status": "PENDING" }, "required": ["message"] } } } } } } }, "/chat/whatsappNumbers/{instance}": { "post": { "operationId": "whatsappNumbers", "summary": "WhatsApp Numbers", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Check if numbers are on WhatsApp", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "numbers": { "type": "array", "description": "Phone numbers (with country code) to be checked", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "exists": { "type": "boolean", "description": "Indicates whether the WhatsApp account exists." }, "jid": { "type": "string", "description": "The JID of the WhatsApp account." }, "number": { "type": "string", "description": "The phone number associated with the WhatsApp account." } } }, "description": "Array of objects representing WhatsApp account existence information.", "example": [ { "exists": true, "jid": "553198296801@s.whatsapp.net", "number": "553198296801" } ] } } } } } } }, "/chat/markMessageAsRead/{instance}": { "put": { "operationId": "markMessageAsRead", "summary": "Mark Message As Read", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Mark message as read", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "read_messages": { "type": "array", "description": "Messages to be mark as read", "items": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or the contact" }, "id": { "type": "string", "description": "Message ID" } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "A brief message describing the action performed." }, "read": { "type": "string", "description": "The status of the read action." } }, "example": { "message": "Read messages", "read": "success" } } } } } } } }, "/chat/archiveChat/{instance}": { "put": { "operationId": "archiveChat", "summary": "Archive Chat", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Archive Chat", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["lastMessage", "archive"], "properties": { "lastMessage": { "type": "object", "description": "Messages to be mark as read", "required": ["key"], "properties": { "key": { "type": "object", "required": ["remoteJid", "fromMe", "id"], "properties": { "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or the contact" }, "id": { "type": "string", "description": "Message ID" } } } } }, "archive": { "type": "boolean", "description": "Whether to archive the chat or not" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "type": "string", "description": "The ID of the chat." }, "archived": { "type": "boolean", "description": "Indicates whether the chat is archived." } }, "example": { "chatId": "553198296801@s.whatsapp.net", "archived": true } } } } } } } }, "/chat/deleteMessageForEveryone/{instance}": { "delete": { "operationId": "deleteMessageForEveryone", "summary": "Delete Message For Everyone", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Delete Message For Everyone", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["id", "remoteJid", "fromMe"], "properties": { "id": { "type": "string", "description": "Message ID" }, "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or the contact" }, "participant": { "type": "string", "description": "Participant for group messages only TODO" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote JID (Jabber ID) of the WhatsApp account." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key that identifies the message in the chat." }, "message": { "type": "object", "properties": { "protocolMessage": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote JID (Jabber ID) of the WhatsApp account in the referenced message." }, "fromMe": { "type": "boolean", "description": "Indicates whether the referenced message was sent by the user." }, "id": { "type": "string", "description": "The ID of the referenced message." } }, "description": "The key that identifies the referenced message." }, "type": { "type": "string", "description": "The type of protocol message, e.g., 'REVOKE'." } }, "description": "Details of the protocol message." } }, "description": "The content of the message." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "description": "Schema representing a WhatsApp protocol message, including the key, message content, timestamp, and status.", "example": { "key": { "remoteJid": "553198296801@s.whatsapp.com", "fromMe": true, "id": "BAE5EABBD912C4E2" }, "message": { "protocolMessage": { "key": { "remoteJid": "553198296801@s.whatsapp.com", "fromMe": true, "id": "BAE52B567D0E3DD8" }, "type": "REVOKE" } }, "messageTimestamp": "1718108455", "status": "PENDING" } } } } } } } }, "/chat/sendPresence/{instance}": { "post": { "operationId": "sendPresence", "summary": "Send Presence", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send Presence (typing...)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["number", "options"], "properties": { "number": { "type": "string", "description": "Receiver phone number with country code" }, "options": { "type": "object", "required": ["delay", "presence"], "properties": { "delay": { "type": "integer", "description": "Presence display time in milliseconds" }, "presence": { "type": "string", "description": "Presence type", "enum": ["composing", "recording"] } } } } } } } }, "responses": { "201": { "description": "Created", "content": {} } } } }, "/chat/fetchProfilePictureUrl/{instance}": { "post": { "operationId": "fetchProfilePictureUrl", "summary": "Fetch Profile Picture URL", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Fetch Profile Picture URL", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "string", "description": "Number to fetch profile picture URL" } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "wuid": { "type": "string", "description": "The WhatsApp User ID (WUID)." }, "profilePictureUrl": { "type": "string", "description": "URL of the user's profile picture." } }, "example": { "wuid": "553198296801@s.whatsapp.net", "profilePictureUrl": "https://pps.whatsapp.net/v/t61.2..." } } } } } } } }, "/chat/findContacts/{instance}": { "post": { "operationId": "findContacts", "summary": "Find Contacts", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find all contacts or just one from ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "where": { "type": "object", "properties": { "id": { "type": "string", "description": "Contact number" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/getBase64FromMediaMessage/{instance}": { "post": { "operationId": "getBase64FromMediaMessage", "summary": "Get Base64 From Media Message", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Get base64 from media message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["message"], "properties": { "message": { "type": "object", "properties": { "key": { "type": "object", "properties": { "id": { "type": "string", "description": "Message ID" } } } } }, "convertToMp4": { "type": "boolean", "description": "Convert video to MP4, for video only" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/findMessages/{instance}": { "post": { "operationId": "findMessages", "summary": "Find Messages", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find all messages", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "where": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Contact or group remote JID" } } } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/findStatusMessage/{instance}": { "post": { "operationId": "findStatusMessage", "summary": "Find Status Message", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find status message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "where": { "type": "object", "properties": { "_id": { "type": "string", "description": "MongoDB message ID" }, "id": { "type": "string", "description": "Message ID (from WhatsApp)" }, "remoteJid": { "type": "string", "description": "Contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "Whether the message is from the instance owner or not" } } }, "limit": { "type": "integer", "description": "Limit for the return" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateMessage/{instance}": { "put": { "operationId": "updateMessage", "summary": "Update Message", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Update message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "integer", "description": "Receiver phone number with country code" }, "text": { "type": "string", "description": "New message content" }, "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or not" }, "id": { "type": "string", "description": "Message ID" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/findChats/{instance}": { "get": { "operationId": "findChats", "summary": "Find Chats", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find all chats", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/fetchBusinessProfile/{instance}": { "post": { "operationId": "fetchBusinessProfile", "summary": "Fetch Business Profile", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Fetch business profile from phone number", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "string", "description": "Phone number with country code" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/fetchProfile/{instance}": { "post": { "operationId": "fetchBusinessProfile", "summary": "Fetch Business Profile", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Fetch business profile from phone number", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "number": { "type": "string", "description": "Phone number with country code" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateProfileName/{instance}": { "post": { "operationId": "updateProfileName", "summary": "Update Profile Name", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Update profile name", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "New name for profile" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateProfileStatus/{instance}": { "post": { "operationId": "updateProfileStatus", "summary": "Update Profile Status", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Update profile status", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "New status for profile" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateProfilePicture/{instance}": { "put": { "operationId": "updateProfilePicture", "summary": "Update Profile Picture", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Update profile picture", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "picture": { "type": "string", "description": "New spicture URL" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/removeProfilePicture/{instance}": { "delete": { "operationId": "removeProfilePicture", "summary": "Remove Profile Picture", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Update profile picture", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/fetchPrivacySettings/{instance}": { "get": { "operationId": "fetchPrivacySettings", "summary": "Fetch Privacy Settings", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Fetch privacy settings", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updatePrivacySettings/{instance}": { "put": { "operationId": "updatePrivacySettings", "summary": "Update Privacy Settings", "tags": ["Chat Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Update privacy settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "privacySettings": { "type": "object", "properties": { "readreceipts": { "type": "string", "enum": ["all", "none"] }, "profile": { "type": "string", "enum": ["all", "contacts", "contact_blacklist", "none"] }, "status": { "type": "string", "enum": ["all", "contacts", "contact_blacklist", "none"] }, "online": { "type": "string", "enum": ["all", "match_last_seen"] }, "last": { "type": "string", "enum": ["all", "contacts", "contact_blacklist", "none"] }, "groupadd": { "type": "string", "enum": ["all", "contacts", "contact_blacklist"] } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/create/{instance}": { "post": { "operationId": "createGroup", "summary": "Create Group", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Create group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subject": { "type": "object", "description": "Group subject" }, "description": { "type": "string", "description": "Group description" }, "participants": { "type": "array", "description": "Group members phone numbers with country code", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateGroupPicture/{instance}": { "put": { "operationId": "createGroup", "summary": "Create Group", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Create group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "image": { "type": "object", "description": "New profile picture image URL" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateGroupSubject/{instance}": { "put": { "operationId": "updateGroupSubject", "summary": "Update Group Subject", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Update group subject", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "subject": { "type": "object", "description": "New group subject" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateGroupDescription/{instance}": { "put": { "operationId": "updateGroupDescription", "summary": "Update Group Description", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Update group description", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "description": { "type": "object", "description": "New group description" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/inviteCode/{instance}": { "get": { "operationId": "fetchInviteCode", "summary": "Fetch Group Invite Code", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Fetch group invite code", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "inviteUrl": { "type": "string", "description": "The URL for the WhatsApp group invite." }, "inviteCode": { "type": "string", "description": "The code for the WhatsApp group invite." } }, "example": { "inviteUrl": "https://chat.whatsapp.com/DgQvyfXzY01B6rGrpZpYze", "inviteCode": "DgQvyfXzY01B6rGrpZpYze" } } } } } } } }, "/group/acceptInviteCode/{instance}": { "get": { "operationId": "fetchInviteCode", "summary": "Fetch Group Invite Code", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "inviteCode", "description": "Group invite code", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Fetch group invite code", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/revokeInviteCode/{instance}": { "put": { "operationId": "fetchInviteCode", "summary": "Fetch Group Invite Code", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Fetch group invite code", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/sendInvite/{instance}": { "post": { "operationId": "sendGroupInvite", "summary": "Send Group Invite", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send group invite", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["groupJid", "numbers"], "properties": { "groupJid": { "type": "string", "description": "Group remote JID" }, "description": { "type": "string", "description": "Description to send with the invitation" }, "numbers": { "type": "array", "description": "Numbers to receive the invitation", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "send": { "type": "boolean", "description": "Indicates if the invite was sent successfully." }, "inviteUrl": { "type": "string", "description": "The URL for the WhatsApp group invite." } }, "example": { "send": true, "inviteUrl": "https://chat.whatsapp.com/DgQvyfXzY01B6rGrpZpYze" } } } } } } } }, "/group/inviteInfo/{instance}": { "get": { "operationId": "findGroupByInviteCode", "summary": "Find Group By Invite Code", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "inviteCode", "in": "query", "description": "Group invite code", "schema": { "type": "string" } } ], "description": "Find group by invite code", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/findGroupInfos/{instance}": { "get": { "operationId": "findGroupByJid", "summary": "Find Group By Remote JID", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Find group by remote JID", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the group." }, "subject": { "type": "string", "description": "The subject (name) of the group." }, "subjectOwner": { "type": "string", "description": "The ID of the user who set the subject." }, "subjectTime": { "type": "integer", "description": "The timestamp when the subject was set." }, "pictureUrl": { "type": "string", "description": "URL of the group's profile picture." }, "size": { "type": "integer", "description": "The number of participants in the group." }, "creation": { "type": "integer", "description": "The timestamp when the group was created." }, "owner": { "type": "string", "description": "The ID of the group owner." }, "desc": { "type": "string", "description": "The description of the group." }, "descId": { "type": "string", "description": "The ID of the description message." }, "restrict": { "type": "boolean", "description": "Indicates if the group is restricted (only admins can send messages)." }, "announce": { "type": "boolean", "description": "Indicates if the group is an announcement group (only admins can send messages)." }, "participants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the participant." }, "admin": { "type": "string", "description": "The role of the participant (e.g., 'admin', 'superadmin')." } } }, "description": "List of participants in the group." } }, "example": { "id": "120363295648424210@g.us", "subject": "Example Group", "subjectOwner": "553198296801@s.whatsapp.net", "subjectTime": 1714769954, "pictureUrl": null, "size": 1, "creation": 1714769954, "owner": "553198296801@s.whatsapp.net", "desc": "optional", "descId": "BAE57E16498982ED", "restrict": false, "announce": false, "participants": [ { "id": "553198296801@s.whatsapp.net", "admin": "superadmin" } ] } } } } } } } }, "/group/fetchAllGroups/{instance}": { "get": { "operationId": "fetchAllGroups", "summary": "Fetch All Groups", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "getParticipants", "in": "query", "required": true, "description": "Whether to get the group members or not", "schema": { "type": "boolean" } } ], "description": "Fetch all groups", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the group." }, "subject": { "type": "string", "description": "The subject (name) of the group." }, "subjectOwner": { "type": "string", "description": "The ID of the user who set the subject." }, "subjectTime": { "type": "integer", "description": "The timestamp when the subject was set." }, "pictureUrl": { "type": "string", "description": "URL of the group's profile picture." }, "size": { "type": "integer", "description": "The number of participants in the group." }, "creation": { "type": "integer", "description": "The timestamp when the group was created." }, "owner": { "type": "string", "description": "The ID of the group owner." }, "desc": { "type": "string", "description": "The description of the group." }, "descId": { "type": "string", "description": "The ID of the description message." }, "restrict": { "type": "boolean", "description": "Indicates if the group is restricted (only admins can send messages)." }, "announce": { "type": "boolean", "description": "Indicates if the group is an announcement group (only admins can send messages)." } }, "required": ["id", "subject", "subjectOwner", "subjectTime", "size", "creation", "owner", "restrict", "announce"] }, "description": "Array of objects representing WhatsApp group details.", "example": [ { "id": "120363295648424210@g.us", "subject": "Example Group", "subjectOwner": "553198296801@s.whatsapp.net", "subjectTime": 1714769954, "pictureUrl": null, "size": 1, "creation": 1714769954, "owner": "553198296801@s.whatsapp.net", "desc": "optional", "descId": "BAE57E16498982ED", "restrict": false, "announce": false } ] } } } } } } }, "/group/participants/{instance}": { "get": { "operationId": "fetchAllGroupMembers", "summary": "Fetch All Group Members", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Fetch all group members", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "participants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the participant." }, "admin": { "type": "string", "description": "The role of the participant (e.g., 'admin', 'superadmin')." } }, "required": ["id"] }, "description": "List of participants in the group." } }, "example": { "participants": [ { "id": "553198296801@s.whatsapp.net", "admin": "superadmin" } ] } } } } } } } }, "/group/updateParticipant/{instance}": { "put": { "operationId": "updateParticipant", "summary": "Update Group Members", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "boolean" } } ], "description": "Update group members", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "enum": ["add", "remove", "promote", "demote"] }, "participants": { "type": "array", "description": "Group members phone numbers with country code", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateSetting/{instance}": { "put": { "operationId": "updateSetting", "summary": "Update Group Settings", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "boolean" } } ], "description": "Update group settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "description": "Group setting (`announcement` = only admins can send messages; `not_announcement` = everyone can send messages; `locked` = only admins can edit group settings; `unlocked` = everyone can edit group settings", "enum": [ "announcement", "not_announcement", "locked", "unlocked" ] } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/toggleEphemeral/{instance}": { "put": { "operationId": "toggleEphemeral", "summary": "Toggle Ephemeral Group Messages", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "boolean" } } ], "description": "Toggle temporary messages on group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": ["expiration"], "properties": { "expiration": { "type": "integer", "description": "Time to expire message (in seconds)" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/leaveGroup/{instance}": { "delete": { "operationId": "leaveGroup", "summary": "Leave Group", "tags": ["Group Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "boolean" } } ], "description": "Leave group", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/set/{instance}": { "post": { "operationId": "setTypebot", "summary": "Set Typebot", "tags": ["Typebot Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Set typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "url": { "type": "string", "description": "Typebot URL" }, "typebot": { "type": "string", "description": "Typebot name" }, "expire": { "type": "integer", "description": "Time to expire the sessions" }, "keyword_finish": { "type": "string", "description": "Key word to finish typebot flow" }, "delay_message": { "type": "integer", "description": "Default delay for text messages" }, "unknown_message": { "type": "string", "description": "'Unknown message' error message" }, "listening_from_me": { "type": "boolean", "description": "Start typebot for your own messages" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/start/{instance}": { "post": { "operationId": "startTypebot", "summary": "Start Typebot", "tags": ["Typebot Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Start typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "Typebot URL" }, "typebot": { "type": "string", "description": "Typebot name" }, "remoteJid": { "type": "string", "description": "Receiver remote JID" }, "startSession": { "type": "boolean", "description": "Start a new session" }, "variables": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Variable name" }, "value": { "type": "string", "description": "Variable value" } } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/find/{instance}": { "get": { "operationId": "findTypebot", "summary": "Find Typebot", "tags": ["Typebot Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find typebot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/changeStatus/{instance}": { "post": { "operationId": "changeTypebotStatus", "summary": "Change Typebot Status", "tags": ["Typebot Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Start typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Receiver remote JID" }, "status": { "type": "string", "description": "New typebot status", "enum": ["opened", "closed", "paused"] } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chatwoot/set/{instance}": { "post": { "operationId": "setChatwoot", "summary": "Set Chatwoot", "tags": ["Chatwoot Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Set Chatwoot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "account_id": { "type": "string", "description": "Chatwoot account ID" }, "token": { "type": "string", "description": "Chatwoot token" }, "url": { "type": "string", "description": "Chatwoot server URL" }, "sign_msg": { "type": "boolean", "description": "Sign message with user name" }, "sign_delimiter": { "type": "string", "description": "Delimiter for sign before the message. Use `\n` for line break" }, "reopen_conversation": { "type": "boolean" }, "conversation_pending": { "type": "boolean" }, "import_contacts": { "type": "boolean" }, "import_messages": { "type": "boolean" }, "days_limit_import_messages": { "type": "integer", "description": "TODO" }, "auto_create": { "type": "boolean" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chatwoot/find/{instance}": { "get": { "operationId": "findChatwoot", "summary": "Find Chatwoot", "tags": ["Chatwoot Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find Chatwoot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/sqs/set/{instance}": { "post": { "operationId": "setSQS", "summary": "Set SQS", "tags": ["SQS Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Set SQS", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN" ] }, "description": "Events to be sent to the Webhook" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/sqs/find/{instance}": { "get": { "operationId": "findSQS", "summary": "Find SQS", "tags": ["SQS Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find SQS", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/rabbitmq/set/{instance}": { "post": { "operationId": "setRabbitMQ", "summary": "Set RabbitMQ", "tags": ["RabbitMQ Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Set RabbitMQ", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN" ] }, "description": "Events to be sent to the Webhook" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/rabbitmq/find/{instance}": { "get": { "operationId": "findRabbitMQ", "summary": "Find RabbitMQ", "tags": ["RabbitMQ Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find RabbitMQ", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/websocket/set/{instance}": { "post": { "operationId": "setWebsocket", "summary": "Set Websocket", "tags": ["Websocket Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Set Websocket", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "CALL", "NEW_JWT_TOKEN" ] }, "description": "Events to be sent to the Webhook" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/websocket/find/{instance}": { "get": { "operationId": "findWebsocket", "summary": "Find Websocket", "tags": ["Websocket Controller"], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Find Websocket", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/": { "get": { "operationId": "getEvoInfo", "summary": "Get information about your EvolutionAPI", "deprecated": false, "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Get information about your EvolutionAPI", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "message": { "type": "string", "description": "Descriptive message about the current state of the API" }, "version": { "type": "string", "description": "The current version of the API" }, "swagger": { "type": "string", "description": "URL to the API's Swagger documentation" }, "manager": { "type": "string", "description": "URL to the API manager" }, "documentation": { "type": "string", "description": "URL to the detailed API documentation" } }, "example": { "status": 200, "message": "Welcome to the Evolution API, it is working!", "version": "1.7.4", "swagger": "http://example.evolution-api.com/docs", "manager": "http://example.evolution-api.com/manager", "documentation": "https://doc.evolution-api.com" } } } } } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "apikey", "description": "Your authorization key header" } } } }