diff --git a/mint.json b/mint.json index 944e2fe..b709acf 100644 --- a/mint.json +++ b/mint.json @@ -227,148 +227,12 @@ }, { "group": "Webhook", - "pages": ["v2/api-reference/webhook/set", "v2/api-reference/webhook/get"], - "version": "v2" - }, - { - "group": "Settings", - "pages": [ - "v2/api-reference/settings/set", - "v2/api-reference/settings/get" - ], - "version": "v2" - }, - { - "group": "Send Message", "pages": [ - "v2/api-reference/message-controller/send-template", - "v2/api-reference/message-controller/send-text", - "v2/api-reference/message-controller/send-status", - "v2/api-reference/message-controller/send-media", - "v2/api-reference/message-controller/send-audio", - "v2/api-reference/message-controller/send-sticker", - "v2/api-reference/message-controller/send-location", - "v2/api-reference/message-controller/send-contact", - "v2/api-reference/message-controller/send-reaction", - "v2/api-reference/message-controller/send-poll", - "v2/api-reference/message-controller/send-list" + "v2/api-reference/webhook/set", + "v2/api-reference/webhook/get" ], "version": "v2" }, - { - "group": "Chat Controller", - "pages": [ - "v2/api-reference/chat-controller/check-is-whatsapp", - "v2/api-reference/chat-controller/mark-as-read", - "v2/api-reference/chat-controller/archive-chat", - "v2/api-reference/chat-controller/delete-message-for-everyone", - "v2/api-reference/chat-controller/send-presence", - "v2/api-reference/chat-controller/fetch-profilepic-url", - "v2/api-reference/chat-controller/find-contacts", - "v2/api-reference/chat-controller/find-messages", - "v2/api-reference/chat-controller/find-status-message", - "v2/api-reference/chat-controller/update-message", - "v2/api-reference/chat-controller/find-chats" - ], - "version": "v2" - }, - { - "group": "Profile Settings", - "pages": [ - "v2/api-reference/profile-settings/fetch-business-profile", - "v2/api-reference/profile-settings/fetch-profile", - "v2/api-reference/profile-settings/update-profile-name", - "v2/api-reference/profile-settings/update-profile-status", - "v2/api-reference/profile-settings/update-profile-picture", - "v2/api-reference/profile-settings/remove-profile-picture", - "v2/api-reference/profile-settings/fetch-privacy-settings", - "v2/api-reference/profile-settings/update-privacy-settings" - ], - "version": "v2" - }, - { - "group": "Profile Settings", - "pages": [ - "v2/api-reference/group-controller/group-create", - "v2/api-reference/group-controller/update-group-picture", - "v2/api-reference/group-controller/update-group-subject", - "v2/api-reference/group-controller/update-group-description", - "v2/api-reference/group-controller/fetch-invite-code", - "v2/api-reference/group-controller/accept-invite-code", - "v2/api-reference/group-controller/revoke-invite-code", - "v2/api-reference/group-controller/send-invite-url", - "v2/api-reference/group-controller/find-group-by-invite-code", - "v2/api-reference/group-controller/find-group-by-jid", - "v2/api-reference/group-controller/fetch-all-groups", - "v2/api-reference/group-controller/find-participants", - "v2/api-reference/group-controller/update-participant", - "v2/api-reference/group-controller/update-setting", - "v2/api-reference/group-controller/toggle-ephemeral", - "v2/api-reference/group-controller/leave-group" - ], - "version": "v2" - }, - { - "group": "Typebot", - "pages": [ - "v2/api-reference/integrations/typebot/set-typebot", - "v2/api-reference/integrations/typebot/start-typebot", - "v2/api-reference/integrations/typebot/find-typebot", - "v2/api-reference/integrations/typebot/change-session-status" - ], - "version": "v2" - }, - { - "group": "Chatwoot", - "pages": [ - "v2/api-reference/integrations/chatwoot/set-chatwoot", - "v2/api-reference/integrations/chatwoot/find-chatwoot" - ], - "version": "v2" - }, - { - "group": "SQS", - "pages": [ - "v2/api-reference/integrations/sqs/set-sqs", - "v2/api-reference/integrations/sqs/find-sqs" - ], - "version": "v2" - }, - { - "group": "RabbitMQ", - "pages": [ - "v2/api-reference/integrations/rabbitmq/set-rabbitmq", - "v2/api-reference/integrations/rabbitmq/find-rabbitmq" - ], - "version": "v2" - }, - { - "group": "WebSocket", - "pages": [ - "v2/api-reference/integrations/websocket/set-websocket", - "v2/api-reference/integrations/websocket/find-websocket" - ], - "version": "v2" - }, - { - "group": "Instances", - "pages": [ - "v2/api-reference/instance-controller/create-instance-basic", - "v2/api-reference/instance-controller/fetch-instances", - "v2/api-reference/instance-controller/instance-connect", - "v2/api-reference/instance-controller/restart-instance", - "v2/api-reference/instance-controller/connection-state", - "v2/api-reference/instance-controller/logout-instance", - "v2/api-reference/instance-controller/delete-instance", - "v2/api-reference/instance-controller/set-presence" - ], - "version": "v2" - }, - { - "group": "Webhook", - "pages": ["v2/api-reference/webhook/set", "v2/api-reference/webhook/get"], - "version": "v2" - }, { "group": "Settings", "pages": [ @@ -426,7 +290,7 @@ "version": "v2" }, { - "group": "Profile Settings", + "group": "Group Controller", "pages": [ "v2/api-reference/group-controller/group-create", "v2/api-reference/group-controller/update-group-picture", @@ -481,14 +345,6 @@ ], "version": "v2" }, - { - "group": "WebSocket", - "pages": [ - "v2/api-reference/integrations/websocket/set-websocket", - "v2/api-reference/integrations/websocket/find-websocket" - ], - "version": "v2" - }, { "group": "Iniciar", "pages": [ @@ -634,146 +490,7 @@ "version": "v1" }, { - "group": "Profile Settings", - "pages": [ - "v1/api-reference/group-controller/group-create", - "v1/api-reference/group-controller/update-group-picture", - "v1/api-reference/group-controller/update-group-subject", - "v1/api-reference/group-controller/update-group-description", - "v1/api-reference/group-controller/fetch-invite-code", - "v1/api-reference/group-controller/accept-invite-code", - "v1/api-reference/group-controller/revoke-invite-code", - "v1/api-reference/group-controller/send-invite-url", - "v1/api-reference/group-controller/find-group-by-invite-code", - "v1/api-reference/group-controller/find-group-by-jid", - "v1/api-reference/group-controller/fetch-all-groups", - "v1/api-reference/group-controller/find-participants", - "v1/api-reference/group-controller/update-participant", - "v1/api-reference/group-controller/update-setting", - "v1/api-reference/group-controller/toggle-ephemeral", - "v1/api-reference/group-controller/leave-group" - ], - "version": "v1" - }, - { - "group": "Typebot", - "pages": [ - "v1/api-reference/integrations/typebot/set-typebot", - "v1/api-reference/integrations/typebot/start-typebot", - "v1/api-reference/integrations/typebot/find-typebot", - "v1/api-reference/integrations/typebot/change-session-status" - ], - "version": "v1" - }, - { - "group": "Chatwoot", - "pages": [ - "v1/api-reference/integrations/chatwoot/set-chatwoot", - "v1/api-reference/integrations/chatwoot/find-chatwoot" - ], - "version": "v1" - }, - { - "group": "SQS", - "pages": [ - "v1/api-reference/integrations/sqs/set-sqs", - "v1/api-reference/integrations/sqs/find-sqs" - ], - "version": "v1" - }, - { - "group": "RabbitMQ", - "pages": [ - "v1/api-reference/integrations/rabbitmq/set-rabbitmq", - "v1/api-reference/integrations/rabbitmq/find-rabbitmq" - ], - "version": "v1" - }, - { - "group": "WebSocket", - "pages": [ - "v1/api-reference/integrations/websocket/set-websocket", - "v1/api-reference/integrations/websocket/find-websocket" - ], - "version": "v1" - }, - { - "group": "Instances", - "pages": [ - "v1/api-reference/instance-controller/create-instance-basic", - "v1/api-reference/instance-controller/fetch-instances", - "v1/api-reference/instance-controller/instance-connect", - "v1/api-reference/instance-controller/restart-instance", - "v1/api-reference/instance-controller/connection-state", - "v1/api-reference/instance-controller/logout-instance", - "v1/api-reference/instance-controller/delete-instance", - "v1/api-reference/instance-controller/set-presence" - ], - "version": "v1" - }, - { - "group": "Webhook", - "pages": ["v1/api-reference/webhook/set", "v1/api-reference/webhook/get"], - "version": "v1" - }, - { - "group": "Settings", - "pages": [ - "v1/api-reference/settings/set", - "v1/api-reference/settings/get" - ], - "version": "v1" - }, - { - "group": "Send Message", - "pages": [ - "v1/api-reference/message-controller/send-template", - "v1/api-reference/message-controller/send-text", - "v1/api-reference/message-controller/send-status", - "v1/api-reference/message-controller/send-media", - "v1/api-reference/message-controller/send-audio", - "v1/api-reference/message-controller/send-sticker", - "v1/api-reference/message-controller/send-location", - "v1/api-reference/message-controller/send-contact", - "v1/api-reference/message-controller/send-reaction", - "v1/api-reference/message-controller/send-poll", - "v1/api-reference/message-controller/send-list" - ], - "version": "v1" - }, - { - "group": "Chat Controller", - "pages": [ - "v1/api-reference/chat-controller/check-is-whatsapp", - "v1/api-reference/chat-controller/mark-as-read", - "v1/api-reference/chat-controller/archive-chat", - "v1/api-reference/chat-controller/delete-message-for-everyone", - "v1/api-reference/chat-controller/send-presence", - "v1/api-reference/chat-controller/fetch-profilepic-url", - "v1/api-reference/chat-controller/find-contacts", - "v1/api-reference/chat-controller/find-messages", - "v1/api-reference/chat-controller/find-status-message", - "v1/api-reference/chat-controller/update-message", - "v1/api-reference/chat-controller/find-chats" - ], - "version": "v1" - }, - { - "group": "Profile Settings", - "pages": [ - "v1/api-reference/profile-settings/fetch-business-profile", - "v1/api-reference/profile-settings/fetch-profile", - "v1/api-reference/profile-settings/update-profile-name", - "v1/api-reference/profile-settings/update-profile-status", - "v1/api-reference/profile-settings/update-profile-picture", - "v1/api-reference/profile-settings/remove-profile-picture", - "v1/api-reference/profile-settings/fetch-privacy-settings", - "v1/api-reference/profile-settings/update-privacy-settings" - ], - "version": "v1" - }, - { - "group": "Profile Settings", + "group": "Group Controller", "pages": [ "v1/api-reference/group-controller/group-create", "v1/api-reference/group-controller/update-group-picture", diff --git a/openapi/openapi-v2.json b/openapi/openapi-v2.json index 64f62db..e653070 100644 --- a/openapi/openapi-v2.json +++ b/openapi/openapi-v2.json @@ -29,24 +29,427 @@ } ], "requestBody": { + "required": true, "content": { "application/json": { "schema": { "type": "object", - "example": { - "instanceName": "{{instance}}", - "qrcode": true, - "integration": "WHATSAPP-BAILEYS" + "required": ["instanceName","integration"], + "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"] + }, + "rejectCall": { + "type": "boolean", + "description": "Reject WhatsApp calls automatically" + }, + "msgCall": { + "type": "string", + "description": "Message to be sent when a call is rejected automatically" + }, + "groupsIgnore": { + "type": "boolean", + "description": "Ignore group messages" + }, + "alwaysOnline": { + "type": "boolean", + "description": "Keep WhatsApp always online" + }, + "readMessages": { + "type": "boolean", + "description": "Send read receipts to received messages" + }, + "readStatus": { + "type": "boolean", + "description": "Show sent messages read status" + }, + "syncFullHistory":{ + "type": "boolean", + "description": "Syncronize full WhatsApp history with EvolutionAPI" + }, + "proxyHost": { + "type": "string", + "description": "proxy host" + }, + "proxyPort": { + "type": "string", + "description": "proxy port" + }, + "proxyProtocol": { + "type": "string", + "description": "proxy protocol" + }, + "proxyUsername": { + "type": "string", + "description": "proxy Username" + }, + "proxyPassword": { + "type": "string", + "description": "proxy password" + }, + "webhook": { + "type": "object", + "properties":{ + "url":{ + "type":"string", + "description": "The URL of the webhook." + }, + "byEvents":{ + "type":"boolean", + "description": "Enable Webhook by events" + }, + "base64":{ + "type":"boolean", + "description": "Sends files in base64 when available" + }, + "headers":{ + "type":"object", + "description": "Headers for send the API from webhook", + "properties":{ + "autorization":{ + "type":"string", + "description": "Your authorization key header" + }, + "Content-Type":{ + "type":"string", + "description": "content-type" + } + } + }, + "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" + } + }, + "description": "Webhook URL" + }, + "rabbitmq":{ + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Enable 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", + "LABELS_EDIT", + "LABELS_ASSOCIATION", + "CALL", + "TYPEBOT_START", + "TYPEBOT_CHANGE_STATUS" + ] + }, + "description": "Events to be sent to the RabbitMQ" + } + } + }, + "sqs": { + "type": "object", + "properties":{ + "enabled":{ + "type":"boolean", + "description": "Enable 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" + } + }, + "description": "Enable SQS" + }, + "chatwootAccountId": { + "type": "integer", + "description": "Chatwoot account ID" + }, + "chatwootToken": { + "type": "string", + "description": "Chatwoot authentication token" + }, + "chatwootUrl": { + "type": "string", + "description": "Chatwoot server URL" + }, + "chatwootSignMsg": { + "type": "boolean", + "description": "Send message signature on Chatwoot" + }, + "chatwootReopenConversation": { + "type": "boolean", + "description": "Reopen conversation on Chatwoot" + }, + "chatwootConversationPending": { + "type": "boolean", + "description": "TODO" + }, + "chatwootImportContacts": { + "type": "boolean", + "description": "Import Chatwoot contacts" + }, + "chatwootNameInbox": { + "type": "string", + "description": "Name inbox chatwoot" + }, + "chatwootMergeBrazilContacts": { + "type": "boolean", + "description": "TODO" + }, + "chatwootImportMessages": { + "type": "boolean", + "description": "Import chatwoot messages" + }, + "chatwootDaysLimitImportMessages": { + "type": "integer", + "description": "Limit message import chatwoot" + }, + "chatwootOrganization": { + "type": "string", + "description": "Evolution Bot" + }, + "chatwootLogo": { + "type": "string", + "description": "https://evolution-api.com/files/evolution-api-favicon.png" + } } } } } }, "responses": { - "200": { - "description": "Successful response", + "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": {} + "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." + ] + } + } + } + } } } } @@ -54,14 +457,98 @@ }, "/instance/fetchInstances": { "get": { - "tags": ["Instance"], + "operationId": "fetchInstances", "summary": "Fetch Instances", - "security": [{ "apikeyAuth": [] }], + "tags": ["Instance Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "instanceName", + "description": "Name of the instance to be fetched", + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "instanceId", + "description": "ID 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": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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"] + } + } } } } @@ -69,76 +556,203 @@ }, "/instance/connect/{instance}": { "get": { - "tags": ["Instance"], - "summary": "Instance Connect", + "operationId": "instanceConnect", + "summary": "Instances Connect", + "tags": ["Instance Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "Name 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": "Successful response", + "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": {} + "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}": { - "post": { - "tags": ["Instance"], + "put": { + "operationId": "restartInstance", "summary": "Restart Instance", - "requestBody": { "content": {} }, - "parameters": [ + "tags": ["Instance Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/instance/setPresence/{instance}": { - "post": { - "tags": ["Instance"], - "summary": "Set Presence", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { "presence": "available" } - } - } - } - }, "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "Name of the instance to restart", + "schema": { + "type": "string" + } } ], + "description": "Restarts the instance", "responses": { "200": { - "description": "Successful response", + "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": {} + "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" + ] + } + } + } + } } } } @@ -146,21 +760,98 @@ }, "/instance/connectionState/{instance}": { "get": { - "tags": ["Instance"], - "summary": "Connection Status", + "operationId": "connectionState", + "summary": "Connection State", + "tags": ["Instance Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "Name of the instance to get status connect", + "schema": { + "type": "string" + } } ], + "description": "Gets the state of the connection", "responses": { "200": { - "description": "Successful response", + "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": {} + "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" + ] + } + } + } + } } } } @@ -168,4209 +859,5552 @@ }, "/instance/logout/{instance}": { "delete": { - "tags": ["Instance"], + "operationId": "logoutInstance", "summary": "Logout Instance", + "tags": ["Instance Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "Name of the instance to logout", + "schema": { + "type": "string" + } } ], + "description": "Makes logout on instance", "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} - } - } - } - } - }, - "/instance/delete/{instance}": { - "delete": { - "tags": ["Instance"], - "summary": "Delete Instance", - "security": [{ "apikeyAuth": [] }], - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/proxy/set/{instance}": { - "post": { - "tags": ["Proxy"], - "summary": "Set Proxy", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "enabled": true, - "host": "0.0.0.0", - "port": "8000", - "protocol": "http", - "username": "user", - "password": "pass" - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/proxy/find/{instance}": { - "get": { - "tags": ["Proxy"], - "summary": "Find Proxy", - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/settings/set/{instance}": { - "post": { - "tags": ["Settings"], - "summary": "Set Settings", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "rejectCall": true, - "msgCall": "I do not accept calls", - "groupsIgnore": false, - "alwaysOnline": true, - "readMessages": false, - "syncFullHistory": false, - "readStatus": false - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/settings/find/{instance}": { - "get": { - "tags": ["Settings"], - "summary": "Find Settings", - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendText/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Text", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "text": "teste de envio" - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendMedia/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Media", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "mediatype": "image", - "mimetype": "image/png", - "caption": "Teste de caption", - "media": "https://s3.amazonaws.com/atendai/company-3708fcdf-954b-48f8-91ff-25babaccac67/1712605171932.jpeg", - "fileName": "Imagem.png" - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendWhatsAppAudio/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Narrated Audio", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "audio": "https://evolution-api.com/files/narratedaudio.mp3" - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendStatus/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Status/Stories", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "type": "text", - "content": "Hi, how are you today?", - "caption": "This is my status/storie image", - "backgroundColor": "#008000", - "font": 1, - "allContacts": false, - "statusJidList": ["{{remoteJid}}@s.whatsapp.net"] - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendSticker/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Sticker", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "sticker": "https://evolution-api.com/files/sticker.png" - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendLocation/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Location", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "name": "Bora Bora", - "address": "French Polynesian", - "latitude": -16.505538233564373, - "longitude": -151.7422770494996 - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendContact/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Contact", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "contact": [ - { - "fullName": "Contact Name", - "wuid": "559999999999", - "phoneNumber": "+55 99 9 9999-9999", - "organization": "Company Name", - "email": "email", - "url": "url page" + "application/json": { + "schema": { + "type": "object", + "properties": { + "status": { + "type": "string", + "description": "The status of the response." }, - { - "fullName": "Contact Name", - "wuid": "559911111111", - "phoneNumber": "+55 99 9 1111-1111", - "organization": "Company Name", - "email": "email", - "url": "url page" + "error": { + "type": "boolean", + "description": "Indicates whether an error occurred." + }, + "response": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A message related to the response." + } + } } - ] - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendReaction/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Reaction", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "key": { - "remoteJid": "{{remoteJid}}@s.whatsapp.net", - "fromMe": true, - "id": "BAE5A75CB0F39712" }, - "reaction": "🚀" - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/message/sendPoll/{instance}": { - "post": { - "tags": ["Send Message"], - "summary": "Send Poll", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "name": "Main text of the poll", - "selectableCount": 1, - "values": ["Question 1", "Question 2", "Question 3"] - } - } - } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/chat/whatsappNumbers/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Check is WhatsApp Number", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "numbers": [ - "55911111111", - "55922222222", - "55933333333", - "55944444444", - "55955555555" - ] + "example": { + "status": "SUCCESS", + "error": false, + "response": { + "message": "Instance logged out" + } + } } - } + } } - } - }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", + }, + "404": { + "description": "Instance not found", "content": { - "application/json": {} + "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" + ] + } + } + } + } } } } } }, - "/chat/markMessageAsRead/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Read Messages", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "readMessages": [ - { - "remoteJid": "123@s.whatsapp.net", - "fromMe": false, - "id": "80C4CE9B72F797DBC6ECD8D19B247FC9" - } - ] - } - } - } + "/instance/delete/{instance}": { + "delete": { + "operationId": "deleteInstance", + "summary": "Delete Instance", + "tags": ["Instance Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "Name of the instance to delete", + "schema": { + "type": "string" + } } ], + "description": "Delete instance", "responses": { "200": { - "description": "Successful response", + "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": {} + "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" + ] + } + } + } + } } } } } }, - "/chat/archiveChat/{instance}": { + "/instance/setPresence/{instance}": { "post": { - "tags": ["Chat"], - "summary": "Archive Chat", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "lastMessage": { - "key": { - "remoteJid": "123@s.whatsapp.net", - "fromMe": false, - "id": "80C4CE9B72F797DBC6ECD8D19B247FC9" - }, - "chat": "123@s.whatsapp.net", - "archive": false - } - } - } - } + "operationId": "setPresence", + "summary": "Set Presence", + "tags": ["Instance Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "Name of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/chat/markChatUnread/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Mark Chat Unread", + ], + "description": "Deletes instance", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "lastMessage": { - "key": { - "remoteJid": "123@s.whatsapp.net", - "fromMe": false, - "id": "80C4CE9B72F797DBC6ECD8D19B247FC9" - }, - "chat": "123@s.whatsapp.net" + "required": ["presence"], + "properties": { + "presence": { + "type": "string", + "enum": ["available", "unavailable"] } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Ok", + "content": {} + }, + "404": { + "description": "Instance not found", "content": { - "application/json": {} + "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" + ] + } + } + } + } } } } } }, - "/chat/deleteMessageForEveryone/{instance}": { - "delete": { - "tags": ["Chat"], - "summary": "Delete Message", + "/webhook/set/{instance}": { + "post": { + "operationId": "setWebhook", + "summary": "Set Webhook", + "tags": ["Webhook Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "Name of the instance", + "schema": { + "type": "string" } } - } - } - }, - "/chat/fetchProfilePictureUrl/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Fetch Profile Picture", + ], + "description": "Set Webhook for instance", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { "number": "{{remoteJid}}" } + "required": [ + "url", + "events", + "enabled", + "webhookByEvents", + "webhookBase64" + ], + "properties": { + "enabled": { + "type": "boolean", + "description": "enable webhook to instance" + }, + "url": { + "type": "string", + "description": "Webhook URL" + }, + "webhookByEvents": { + "type": "boolean", + "description": "Enables Webhook by events" + }, + "webhookBase64": { + "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" + } + } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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 + } + } + } + } + } } } } } }, - "/chat/getBase64FromMediaMessage/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Get Base64 From Media Message", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "message": { "key": { "id": "3EB0F4A1F841F02958FB74" } }, - "convertToMp4": false - } - } - } + "/webhook/find/{instance}": { + "get": { + "operationId": "findWebhook", + "summary": "Find Webhook", + "tags": ["Webhook Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "Name of the instance", + "schema": { + "type": "string" + } } ], + "description": "Fetch Webhook configuration", "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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" + ] + } + } + } } } } } }, - "/chat/updateMessage/{instance}": { + "/settings/set/{instance}": { "post": { - "tags": ["Chat"], - "summary": "Update Message", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "key": { - "remoteJid": "123@s.whatsapp.net", - "fromMe": true, - "id": "3EB04DC69D97835D7CC6F12776D25766FBC224E2" - }, - "text": "new message" - } - } - } + "operationId": "setSettings", + "summary": "Set Settings", + "tags": ["Settings Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "Name of the instance", + "schema": { + "type": "string" } } - } - } - }, - "/chat/sendPresence/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Send Precense", + ], + "description": "Set settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "number": "{{remoteJid}}", - "delay": 1200, - "presence": "composing" + "required": [ + "rejectCall", + "groupsIgnore", + "alwaysOnline", + "readMessages", + "readStatus", + "syncFullHistory", + "msgCall" + ], + "properties": { + "rejectCall": { + "type": "boolean", + "description": "Reject calls automatically" + }, + "msgCall": { + "type": "string", + "description": "Message to be sent when a call is rejected automatically" + }, + "groupsIgnore": { + "type": "boolean", + "description": "Ignore group messages" + }, + "alwaysOnline": { + "type": "boolean", + "description": "Always show WhatsApp online" + }, + "readMessages": { + "type": "boolean", + "description": "Send read receipts" + }, + "readStatus": { + "type": "boolean", + "description": "See message status" + }, + "syncFullHistory": { + "type": "boolean", + "description": "Syncronize full WhatsApp history with EvolutionAPI" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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 + } + } + } + } + } } } } } }, - "/message/updateBlockStatus/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Update Block Status", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "status": "block" - } - } - } + "/settings/find/{instance}": { + "get": { + "operationId": "findWebhook", + "summary": "Find Webhook", + "tags": ["Webhook Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "Name of the instance to get settings", + "schema": { + "type": "string" + } } ], + "description": "Fetch Webhook configuration", "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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 + } + } + } } } } } }, - "/chat/findContacts/{instance}": { + "/message/sendTemplate/{instance}": { "post": { - "tags": ["Chat"], - "summary": "Find Contacts", - "requestBody": { - "content": { - "application/json": { - "schema": { "type": "object", "example": { "where": {} } } - } + "operationId": "sendTemplate", + "summary": "Send Template", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "Name of the instance ", + "schema": { + "type": "string" } } - } - } - }, - "/chat/findMessages/{instance}": { - "post": { - "tags": ["Chat"], - "summary": "Find Messages", + ], + "description": "Send a template message with the Official WhatsApp API", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "where": { - "key": { "remoteJid": "{{remoteJid}}" } + "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" + } + } + } + } + } + } + } + } } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/chat/findStatusMessage/{instance}": { + "/message/sendText/{instance}": { "post": { - "tags": ["Chat"], - "summary": "Find Status Message", + "operationId": "sendText", + "summary": "Send Text", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], + "parameters": [ + { + "name": "instance", + "in": "path", + "required": true, + "description": "Name of the instance", + "schema": { + "type": "string" + } + } + ], + "description": "Send plain text message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "where": { - "_id": "6390fe2eba512dacefa8ce3a", - "remoteJid": "123@s.whatsapp.net", - "id": "BAE5959535174C7E", - "fromMe": true + "required": [ + "number", + "text" + ], + "properties": { + "number": { + "type": "string", + "description": "Number to receive the message (with country code)" + }, + "text": { + "type": "string", + "description": "Test message to send" }, - "limit": 10 + "options": { + "type": "object", + "properties": { + "delay": { + "type": "integer", + "description": "Presence time in milliseconds before sending message" + }, + "linkPreview": { + "type": "boolean", + "description": "Shows a preview of the target website if there's a link within the message" + }, + "mentionsEveryOne": { + "type": "boolean", + "description": "Mentioned everyone when the message send" + }, + "mentioned": { + "type": "array", + "items":{ + "type": "string", + "enum": ["{{remoteJID}}"] + }, + "description": "Numbers to mention" + }, + "quoted": { + "type": "object", + "properties": { + "key": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Quoted message ID" + } + } + }, + "message": { + "type": "object", + "properties": { + "conversation": { + "type": "string", + "description": "Quoted message content" + } + } + } + } + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/chat/findChats/{instance}": { + "/message/sendMedia/{instance}": { "post": { - "tags": ["Chat"], - "summary": "Find Chats", - "requestBody": { "content": {} }, + "operationId": "sendMedia", + "summary": "Send Media", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "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": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/label/findLabels/{instance}": { - "get": { - "tags": ["Label"], - "summary": "Find Labels", + "/message/sendWhatsAppAudio/{instance}": { + "post": { + "operationId": "sendWhatsAppAudio", + "summary": "Send WhatsApp Audio", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/label/handleLabel/{instance}": { - "post": { - "tags": ["Label"], - "summary": "Handle Labels", + ], + "description": "Send WhatsApp Audio", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "number": "{{remoteJid}}", - "labelId": "labelId", - "action": "add" + "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" + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/chat/fetchBusinessProfile/{instance}": { + "/message/sendSticker/{instance}": { "post": { - "tags": ["Profile Settings"], - "summary": "Fetch Business Profile", + "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", - "example": { "number": "{{remoteJid}}" } + "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" + } + } + } + } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/chat/fetchProfile/{instance}": { + "/message/sendStatus/{instance}": { "post": { - "tags": ["Profile Settings"], - "summary": "Fetch Profile", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { "number": "{{remoteJid}}" } - } - } + "operationId": "sendStatus", + "summary": "Send Status", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "Name of the instance ", + "schema": { + "type": "string" } } - } - } - }, - "/chat/updateProfileName/{instance}": { - "post": { - "tags": ["Profile Settings"], - "summary": "Update Profile Name", + ], + "description": "Post WhatsApp status (stories)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { "name": "Evolution-API" } + "required": ["type","caption","content","backgroundColor","font","allContacts","statusJidList"], + "properties": { + "type": { + "type": "string", + "description": "status type", + "enum": ["text", "image", "audio"] + }, + "content": { + "type": "string", + "description": "status type" + }, + "caption": { + "type": "string", + "description": "Optional for image or video" + }, + "backgroundColor": { + "type": "string", + "description": "Exemple #008000" + }, + "font": { + "type": "number", + "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 below " + }, + "statusJidList": { + "type": "array", + "description": "Numbers to send status", + "items":{ + "type": "string", + "enum": ["{{remoteJID}}"] + } + } + } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/chat/updateProfileStatus/{instance}": { + "/message/sendLocation/{instance}": { "post": { - "tags": ["Profile Settings"], - "summary": "Update Profile Status", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { "status": "Unavailable for calls" } - } - } + "operationId": "sendLocation", + "summary": "Send Location", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/chat/updateProfilePicture/{instance}": { - "post": { - "tags": ["Profile Settings"], - "summary": "Update Profile Picture", + ], + "description": "Send Location", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "picture": "https://avatars.githubusercontent.com/u/136080052?s=200&v=4" + "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" + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/chat/removeProfilePicture/{instance}": { - "delete": { - "tags": ["Profile Settings"], - "summary": "Remove Profile Picture", - "parameters": [ + "/message/sendContact/{instance}": { + "post": { + "operationId": "sendContact", + "summary": "Send Contact", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/chat/fetchPrivacySettings/{instance}": { - "get": { - "tags": ["Profile Settings"], - "summary": "Fetch Privacy Settings", "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/chat/updatePrivacySettings/{instance}": { - "post": { - "tags": ["Profile Settings"], - "summary": "Update Privacy Settings", + ], + "description": "Send Contact", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "readreceipts": "all", - "profile": "all", - "status": "contacts", - "online": "all", - "last": "contacts", - "groupadd": "none" + "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" + } + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/group/create/{instance}": { + "/message/sendReaction/{instance}": { "post": { - "tags": ["Group"], - "summary": "Create Group", + "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", - "example": { - "subject": "Test 02", - "description": "optional", - "participants": ["5531900000000", "5531900000000"] + "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": "🚀" + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/group/updateGroupPicture/{instance}": { + "/message/sendPoll/{instance}": { "post": { - "tags": ["Group"], - "summary": "Update Group Picture", + "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", - "example": { - "image": "https://evolution-api.com/files/sticker.png" + "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" + } + } + } + } } } } } }, - "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/group/updateGroupSubject/{instance}": { + "/message/sendList/{instance}": { "post": { - "tags": ["Group"], - "summary": "Update Group Subject", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { "subject": "Group Name or Subject" } - } - } + "operationId": "sendList", + "summary": "Send List", + "tags": ["Message Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/group/updateGroupDescription/{instance}": { - "post": { - "tags": ["Group"], - "summary": "Update Group Description", + ], + "description": "Send List", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { "description": "Group Description or Rules" } + "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" + } + } + } + } + } + } + } + } + } + } } } } }, - "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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"] + } + } } } } } }, - "/group/inviteCode/{instance}": { - "get": { - "tags": ["Group"], - "summary": "Fetch Invite Code", - "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, + "/chat/whatsappNumbers/{instance}": { + "post": { + "operationId": "whatsappNumbers", + "summary": "WhatsApp Numbers", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/group/revokeInviteCode/{instance}": { - "post": { - "tags": ["Group"], - "summary": "Revoke Invite Code", - "requestBody": { "content": {} }, "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/group/sendInvite/{instance}": { - "post": { - "tags": ["Group"], - "summary": "Send Invite Url", + ], + "description": "Check if numbers are on WhatsApp", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "groupJid": "{{groupJid}}", - "description": "Access this link to join my WhatsApp group:", - "numbers": ["{{remoteJid}}"] + "properties": { + "numbers": { + "type": "array", + "description": "Phone numbers (with country code) to be checked", + "items": { + "type": "string" + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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" + } + ] + } + } } } } } }, - "/group/inviteInfo/{instance}": { - "get": { - "tags": ["Group"], - "summary": "Find Group by Invite Code", - "parameters": [ - { - "name": "inviteCode", - "in": "query", - "schema": { "type": "string", "example": "{{inviteCode}}" } - }, + "/chat/markMessageAsRead/{instance}": { + "put": { + "operationId": "markMessageAsRead", + "summary": "Mark Message As Read", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/group/findGroupInfos/{instance}": { - "get": { - "tags": ["Group"], - "summary": "Find Group by Jid", "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "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": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/group/fetchAllGroups/{instance}": { - "get": { - "tags": ["Group"], - "summary": "Fetch All Groups", - "parameters": [ - { - "name": "getParticipants", - "in": "query", - "schema": { "type": "boolean", "example": "false" } - }, - + "/chat/archiveChat/{instance}": { + "put": { + "operationId": "archiveChat", + "summary": "Archive Chat", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/group/participants/{instance}": { - "get": { - "tags": ["Group"], - "summary": "Find Participants", "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/group/updateParticipant/{instance}": { - "post": { - "tags": ["Group"], - "summary": "Update Participant", + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } + } + ], + "description": "Archive Chat", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "action": "add", - "participants": [ - "5531900000000", - "5531911111111", - "5531922222222" - ] + "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" + } } } } } }, - "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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 + } + } + } } } } } }, - "/group/updateSetting/{instance}": { - "post": { - "tags": ["Group"], - "summary": "Update Setting", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { "action": "not_announcement" } - } - } + "/chat/deleteMessageForEveryone/{instance}": { + "delete": { + "operationId": "deleteMessageForEveryone", + "summary": "Delete Message For Everyone", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/group/toggleEphemeral/{instance}": { - "post": { - "tags": ["Group"], - "summary": "Toggle Ephemeral", + ], + "description": "Delete Message For Everyone", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { "expiration": 0 } + "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" + } + } } } } }, - "parameters": [ - { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", + "201": { + "description": "Created", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/group/leaveGroup/{instance}": { - "delete": { - "tags": ["Group"], - "summary": "Leave Group", - "parameters": [ + "/chat/sendPresence/{instance}": { + "post": { + "operationId": "sendPresence", + "summary": "Send Presence", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ { - "name": "groupJid", - "in": "query", - "schema": { "type": "string", "example": "{{groupJid}}" } - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/websocket/set/{instance}": { - "post": { - "tags": ["Integrations > Events > Websocket"], - "summary": "Set Websocket", + ], + "description": "Send Presence (typing...)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "websocket": { - "enabled": true, - "events": [ - "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", - "LABELS_EDIT", - "LABELS_ASSOCIATION", - "CALL", - "TYPEBOT_START", - "TYPEBOT_CHANGE_STATUS" - ] + "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"] + } + } } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "201": { + "description": "Created", + "content": {} } } } }, - "/websocket/find/{instance}": { - "get": { - "tags": ["Integrations > Events > Websocket"], - "summary": "Find Websocket", + "/chat/fetchProfilePictureUrl/{instance}": { + "post": { + "operationId": "fetchProfilePictureUrl", + "summary": "Fetch Profile Picture URL", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/rabbitmq/set/{instance}": { - "post": { - "tags": ["Integrations > Events > Rabbitmq"], - "summary": "Set Rabbitmq", + ], + "description": "Fetch Profile Picture URL", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "rabbitmq": { - "enabled": true, - "events": [ - "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", - "LABELS_EDIT", - "LABELS_ASSOCIATION", - "CALL", - "TYPEBOT_START", - "TYPEBOT_CHANGE_STATUS" - ] + "properties": { + "number": { + "type": "string", + "description": "Number to fetch profile picture URL" } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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..." + } + } + } } } } } }, - "/rabbitmq/find/{instance}": { - "get": { - "tags": ["Integrations > Events > Rabbitmq"], - "summary": "Find Rabbitmq", + "/chat/findContacts/{instance}": { + "post": { + "operationId": "findContacts", + "summary": "Find Contacts", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/sqs/set/{instance}": { - "post": { - "tags": ["Integrations > Events > Sqs"], - "summary": "Set Sqs", + ], + "description": "Find all contacts or just one from ID", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "sqs": { - "enabled": true, - "events": [ - "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", - "LABELS_EDIT", - "LABELS_ASSOCIATION", - "CALL", - "TYPEBOT_START", - "TYPEBOT_CHANGE_STATUS" - ] + "properties": { + "where": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Contact number" + } + } } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/sqs/find/{instance}": { - "get": { - "tags": ["Integrations > Events > Sqs"], - "summary": "Find Sqs", + "/chat/getBase64FromMediaMessage/{instance}": { + "post": { + "operationId": "getBase64FromMediaMessage", + "summary": "Get Base64 From Media Message", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/webhook/set/{instance}": { - "post": { - "tags": ["Integrations > Events > Webhook"], - "summary": "Set Webhook", + ], + "description": "Get base64 from media message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "webhook": { - "enabled": true, - "url": "https://webhook.site", - "byEvents": false, - "base64": false, - "events": [ - "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", - "LABELS_EDIT", - "LABELS_ASSOCIATION", - "CALL", - "TYPEBOT_START", - "TYPEBOT_CHANGE_STATUS" - ] + "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" } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "200": { + "description": "Ok", + "content": {} } } } }, - "/webhook/find/{instance}": { - "get": { - "tags": ["Integrations > Events > Webhook"], - "summary": "Find Webhook", + "/chat/findMessages/{instance}": { + "post": { + "operationId": "findMessages", + "summary": "Find Messages", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/chatwoot/set/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Chatwoot"], - "summary": "Set Chatwoot", + ], + "description": "Find all messages", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "enabled": true, - "accountId": "1", - "token": "TOKEN", - "url": "https://chatwoot.com", - "signMsg": true, - "reopenConversation": true, - "conversationPending": false, - "nameInbox": "evolution", - "mergeBrazilContacts": true, - "importContacts": true, - "importMessages": true, - "daysLimitImportMessages": 2, - "signDelimiter": "|+", - "autoCreate": true, - "organization": "BOT", - "logo": "link da sua", - "ignoreJids": ["@g.us"] + "properties": { + "where": { + "type": "object", + "properties": { + "key": { + "type": "object", + "properties": { + "remoteJid": { + "type": "string", + "description": "Contact or group remote JID" + } + } + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/chatwoot/find/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Chatwoot"], - "summary": "Find Chatwoot", + "/chat/findStatusMessage/{instance}": { + "post": { + "operationId": "findStatusMessage", + "summary": "Find Status Message", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/typebot/changeStatus/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Typebot > Typebot Session"], - "summary": "Change Session Status", + ], + "description": "Find status message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "remoteJid": "5511912345678@s.whatsapp.net", - "status": "closed" + "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" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/typebot/fetchSessions/{typebotId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Typebot > Typebot Session"], - "summary": "Fetch Sessions", - "parameters": [ + "/chat/updateMessage/{instance}": { + "put": { + "operationId": "updateMessage", + "summary": "Update Message", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ { - "name": "typebotId", - "in": "path", - "schema": { "type": "string" }, - "required": true - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/typebot/settings/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Typebot > Default Settings"], - "summary": "Set Default Settings", + ], + "description": "Update message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 10, - "ignoreJids": [], - "typebotIdFallback": "clyja4oys0a3uqpy7k3bd7swe" + "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" + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/typebot/fetchSettings/{instance}": { + "/chat/findChats/{instance}": { "get": { - "tags": ["Integrations > Chatbot > Typebot > Default Settings"], - "summary": "Fetch Default Settings", + "operationId": "findChats", + "summary": "Find Chats", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Find all chats", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/typebot/create/{instance}": { + "/chat/fetchBusinessProfile/{instance}": { "post": { - "tags": ["Integrations > Chatbot > Typebot"], - "summary": "Create Typebot", + "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", - "example": { - "enabled": true, - "url": "https://bot.dgcode.com.br", - "typebot": "my-typebot-uoz1rg9", - "triggerType": "keyword", - "triggerOperator": "regex", - "triggerValue": "^atend.*", - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 10 + "properties": { + "number": { + "type": "string", + "description": "Phone number with country code" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/typebot/find/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Typebot"], - "summary": "Find Typebots", - "parameters": [ + "/chat/fetchProfile/{instance}": { + "post": { + "operationId": "fetchBusinessProfile", + "summary": "Fetch Business Profile", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/typebot/fetch/{typebotId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Typebot"], - "summary": "Fetch Typebot", "parameters": [ - { - "name": "typebotId", - "in": "path", - "schema": { "type": "string" }, - "required": true, - "example": "clx6niurm0001lzrhhqqe72yq" - }, { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/typebot/update/{typebotId}/{instance}": { - "put": { - "tags": ["Integrations > Chatbot > Typebot"], - "summary": "Update Typebot", + ], + "description": "Fetch business profile from phone number", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "enabled": true, - "url": "https://bot.dgcode.com.br", - "typebot": "my-typebot-uoz1rg9", - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 10, - "triggerType": "keyword", - "triggerOperator": "contains", - "triggerValue": "evolution" + "properties": { + "number": { + "type": "string", + "description": "Phone number with country code" + } } } } } }, - "parameters": [ - { - "name": "typebotId", - "in": "path", - "schema": { - "type": "string", - "required": true, - "example": "clx6niurm0001lzrhhqqe72yq" - } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/typebot/delete/{typebotId}/{instance}": { - "delete": { - "tags": ["Integrations > Chatbot > Typebot"], - "summary": "Delete Typebot", + "/chat/updateProfileName/{instance}": { + "post": { + "operationId": "updateProfileName", + "summary": "Update Profile Name", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { - "name": "typebotId", + "name": "instance", "in": "path", + "required": true, + "description": "ID of the instance to connect", "schema": { - "type": "string", - "required": true, - "example": "clx6niurm0001lzrhhqqe72yq" + "type": "string" } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/typebot/start/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Typebot"], - "summary": "Start Typebot", + "description": "Update profile name", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "url": "https://bot.dgcode.com.br", - "typebot": "fluxo-unico-3uuso28", - "remoteJid": "557499879409@s.whatsapp.net", - "startSession": false, - "variables": [ - { "name": "pushName", "value": "Davidson Gomes" } - ] + "properties": { + "name": { + "type": "string", + "description": "New name for profile" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/evolutionBot/changeStatus/{instance}": { + "/chat/updateProfileStatus/{instance}": { "post": { - "tags": ["Integrations > Chatbot > Evolution Bot > Session"], - "summary": "Change Session Status", + "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", - "example": { - "remoteJid": "5511912345678@s.whatsapp.net", - "status": "closed" + "properties": { + "status": { + "type": "string", + "description": "New status for profile" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/evolutionBot/fetchSessions/{evolutionBotId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Evolution Bot > Session"], - "summary": "Fetch Sessions", - "parameters": [ + "/chat/updateProfilePicture/{instance}": { + "put": { + "operationId": "updateProfilePicture", + "summary": "Update Profile Picture", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ { - "name": "evolutionBotId", - "in": "path", - "schema": { "type": "string" }, - "required": true - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/evolutionBot/settings/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Evolution Bot > Default Settings"], - "summary": "Set Default Settings", + ], + "description": "Update profile picture", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [], - "botIdFallback": "clyja4oys0a3uqpy7k3bd7swe" + "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", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Update profile picture", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/evolutionBot/fetchSettings/{instance}": { + "/chat/fetchPrivacySettings/{instance}": { "get": { - "tags": ["Integrations > Chatbot > Evolution Bot > Default Settings"], - "summary": "Fetch Default Settings", + "operationId": "fetchPrivacySettings", + "summary": "Fetch Privacy Settings", + "tags": ["Chat Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Fetch privacy settings", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/evolutionBot/create/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Evolution Bot"], - "summary": "Create Bots", + "/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", - "example": { - "enabled": true, - "apiUrl": "http://api.site.com/v1", - "apiKey": "app-123456", - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 0, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [] + "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"] + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/evolutionBot/find/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Evolution Bot"], - "summary": "Find Bots", - "parameters": [ + "/group/create/{instance}": { + "post": { + "operationId": "createGroup", + "summary": "Create Group", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/evolutionBot/fetch/{evolutionBotId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Evolution Bot"], - "summary": "Fetch Bot", "parameters": [ - { - "name": "evolutionBotId", - "in": "path", - "schema": { "type": "string" }, - "required": true - }, { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/evolutionBot/update/{evolutionBotId}/{instance}": { - "put": { - "tags": ["Integrations > Chatbot > Evolution Bot"], - "summary": "Update Bot", + ], + "description": "Create group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "enabled": true, - "apiUrl": "http://api.site.com/v1", - "apiKey": "app-123456", - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 0, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [] + "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" + } + } } } } } }, - "parameters": [ - { - "name": "evolutionBotId", - "in": "path", - "schema": { "type": "string", "required": true } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/evolutionBot/delete/{evolutionBotId}/{instance}": { - "delete": { - "tags": ["Integrations > Chatbot > Evolution Bot"], - "summary": "Delete Bot", + "/group/updateGroupPicture/{instance}": { + "put": { + "operationId": "createGroup", + "summary": "Create Group", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { - "name": "evolutionBotId", + "name": "instance", "in": "path", - "schema": { "type": "string", "required": true } + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } }, { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "name": "groupJid", + "description": "Group remote JID", + "required": true, + "in": "query", + "schema": { + "type": "string" } } - } - } - }, - "/openai/changeStatus/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Openai > Openai Session"], - "summary": "Change Session Status", + ], + "description": "Create group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "remoteJid": "5511912345678@s.whatsapp.net", - "status": "closed" + "properties": { + "image": { + "type": "object", + "description": "New profile picture image URL" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/openai/fetchSessions/{openaiBotId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Openai > Openai Session"], - "summary": "Fetch Sessions", + "/group/updateGroupSubject/{instance}": { + "put": { + "operationId": "updateGroupSubject", + "summary": "Update Group Subject", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { - "name": "openaiBotId", + "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } }, { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "name": "groupJid", + "description": "Group remote JID", + "required": true, + "in": "query", + "schema": { + "type": "string" } } - } - } - }, - "/openai/settings/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Openai > Default Settings"], - "summary": "Set Default Settings", + ], + "description": "Update group subject", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "openaiCredsId": "clyja4oys0a3uqpy7k3bd7swe", - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [], - "openaiIdFallback": "clyja4oys0a3uqpy7k3bd7swe" + "properties": { + "subject": { + "type": "object", + "description": "New group subject" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/openai/fetchSettings/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Openai > Default Settings"], - "summary": "Fetch Default Settings", + "/group/updateGroupDescription/{instance}": { + "put": { + "operationId": "updateGroupDescription", + "summary": "Update Group Description", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } - } - } - } - }, - "/openai/creds/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Openai > Openai Creds"], - "summary": "Set Openai Creds", + }, + { + "name": "groupJid", + "description": "Group remote JID", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "description": "Update group description", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "name": "apikey", - "apiKey": "sk-proj-..." + "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", - "schema": { "type": "string" }, - "required": true + "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": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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": { - "tags": ["Integrations > Chatbot > Openai > Openai Creds"], - "summary": "Get Openai Creds", + "operationId": "fetchInviteCode", + "summary": "Fetch Group Invite Code", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "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": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/openai/creds/{openaiCredsId}/{instance}": { - "delete": { - "tags": ["Integrations > Chatbot > Openai > Openai Creds"], - "summary": "Delete Openai Creds", + "/group/revokeInviteCode/{instance}": { + "put": { + "operationId": "fetchInviteCode", + "summary": "Fetch Group Invite Code", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { - "name": "openaiCredsId", + "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } }, { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "name": "groupJid", + "description": "Group remote JID", + "required": true, + "in": "query", + "schema": { + "type": "string" + } } ], + "description": "Fetch group invite code", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/openai/create/{instance}": { + "/group/sendInvite/{instance}": { "post": { - "tags": ["Integrations > Chatbot > Openai"], - "summary": "Create Openai Bots", + "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", - "example": { - "enabled": true, - "openaiCredsId": "clyrx36wj0001119ucjjzxik1", - "botType": "assistant", - "assistantId": "asst_LRNyh6qC4qq8NTyPjHbcJjSp", - "functionUrl": "https://n8n.site.com", - "model": "gpt-4o", - "systemMessages": ["You are a helpful assistant."], - "assistantMessages": [ - "Hello there, how may I assist you today?" - ], - "userMessages": ["Hello!"], - "maxTokens": 300, - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 10, - "ignoreJids": [] + "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" + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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" + } + } + } } } } } }, - "/openai/find/{instance}": { + "/group/inviteInfo/{instance}": { "get": { - "tags": ["Integrations > Chatbot > Openai"], - "summary": "Find Openai Bots", + "operationId": "findGroupByInviteCode", + "summary": "Find Group By Invite Code", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "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": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/openai/fetch/{openaiBotId}/{instance}": { + "/group/findGroupInfos/{instance}": { "get": { - "tags": ["Integrations > Chatbot > Openai"], - "summary": "Fetch Openai Bot", + "operationId": "findGroupByJid", + "summary": "Find Group By Remote JID", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { - "name": "openaiBotId", + "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } }, { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "name": "groupJid", + "in": "query", + "required": true, + "description": "Group remote JID", + "schema": { + "type": "string" + } } ], + "description": "Find group by remote JID", "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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" + } + ] + } + } + } } } } } }, - "/openai/update/{openaiBotId}/{instance}": { - "put": { - "tags": ["Integrations > Chatbot > Openai"], - "summary": "Update Openai Bot", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "enabled": true, - "openaiCredsId": "clyrx36wj0001119ucjjzxik1", - "botType": "assistant", - "assistantId": "asst_LRNyh6qC4qq8NTyPjHbcJjSp", - "functionUrl": "https://webhook.com", - "model": "gpt-4o", - "systemMessages": ["You are a helpful assistant."], - "assistantMessages": [ - "Hello there, how may I assist you today?" - ], - "userMessages": ["Hello!"], - "maxTokens": 300, - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 10, - "ignoreJids": [] - } - } - } + "/group/fetchAllGroups/{instance}": { + "get": { + "operationId": "fetchAllGroups", + "summary": "Fetch All Groups", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { - "name": "openaiBotId", + "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } }, { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "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": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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 + } + ] + } + } } } } } }, - "/openai/delete/{openaiBotId}/{instance}": { - "delete": { - "tags": ["Integrations > Chatbot > Openai"], - "summary": "Delete Openai Bot", + "/group/participants/{instance}": { + "get": { + "operationId": "fetchAllGroupMembers", + "summary": "Fetch All Group Members", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { - "name": "openaiBotId", + "name": "instance", "in": "path", - "schema": { "type": "string", "required": true } + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } }, { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "name": "groupJid", + "in": "query", + "required": true, + "description": "Group remote JID", + "schema": { + "type": "string" + } } ], + "description": "Fetch all group members", "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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" + } + ] + } + } + } } } } } }, - "/dify/changeStatus/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Dify > Dify Session"], - "summary": "Change Session Status", + "/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", - "example": { - "remoteJid": "5511912345678@s.whatsapp.net", - "status": "closed" + "properties": { + "action": { + "type": "string", + "enum": ["add", "remove", "promote", "demote"] + }, + "participants": { + "type": "array", + "description": "Group members phone numbers with country code", + "items": { + "type": "string" + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/dify/fetchSessions/{difyId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Dify > Dify Session"], - "summary": "Fetch Sessions", + "/group/updateSetting/{instance}": { + "put": { + "operationId": "updateSetting", + "summary": "Update Group Settings", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { - "name": "difyId", + "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } }, { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "name": "groupJid", + "in": "query", + "required": true, + "description": "Group remote JID", + "schema": { + "type": "boolean" } } - } - } - }, - "/dify/settings/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Dify > Default Settings"], - "summary": "Set Default Settings", + ], + "description": "Update group settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [], - "difyIdFallback": "clyja4oys0a3uqpy7k3bd7swe" + "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" + ] + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/dify/fetchSettings/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Dify > Default Settings"], - "summary": "Fetch Default Settings", + "/group/toggleEphemeral/{instance}": { + "put": { + "operationId": "toggleEphemeral", + "summary": "Toggle Ephemeral Group Messages", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "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" } } - } - } - }, - "/dify/create/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Dify"], - "summary": "Create Dify Bots", + ], + "description": "Toggle temporary messages on group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "enabled": true, - "botType": "chatBot", - "apiUrl": "http://dify.site.com/v1", - "apiKey": "app-123456", - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 0, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [] + "required": ["expiration"], + "properties": { + "expiration": { + "type": "integer", + "description": "Time to expire message (in seconds)" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/dify/find/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Dify"], - "summary": "Find Dify Bots", + "/group/leaveGroup/{instance}": { + "delete": { + "operationId": "leaveGroup", + "summary": "Leave Group", + "tags": ["Group Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "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": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/dify/fetch/{difyId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Dify"], - "summary": "Fetch Dify Bot", - "parameters": [ + "/typebot/set/{instance}": { + "post": { + "operationId": "setTypebot", + "summary": "Set Typebot", + "tags": ["Typebot Controller"], + "deprecated": false, + "security": [ { - "name": "difyId", - "in": "path", - "schema": { "type": "string" }, - "required": true - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/dify/update/{difyId}/{instance}": { - "put": { - "tags": ["Integrations > Chatbot > Dify"], - "summary": "Update Dify Bot", + ], + "description": "Set typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "enabled": true, - "botType": "chatBot", - "apiUrl": "http://dify.site.com/v1", - "apiKey": "app-123456", - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 0, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [] + "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" + } } } } } }, - "parameters": [ - { - "name": "difyId", - "in": "path", - "schema": { "type": "string", "required": true } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/dify/delete/{difyId}/{instance}": { - "delete": { - "tags": ["Integrations > Chatbot > Dify"], - "summary": "Delete Dify Bot", - "parameters": [ + "/typebot/start/{instance}": { + "post": { + "operationId": "startTypebot", + "summary": "Start Typebot", + "tags": ["Typebot Controller"], + "deprecated": false, + "security": [ { - "name": "difyId", - "in": "path", - "schema": { "type": "string", "required": true } - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/flowise/changeStatus/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Flowise > Flowise Session"], - "summary": "Change Session Status", + ], + "description": "Start typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "remoteJid": "5511912345678@s.whatsapp.net", - "status": "closed" + "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" + } + } + } + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/flowise/fetchSessions/{difyId}/{instance}": { + "/typebot/find/{instance}": { "get": { - "tags": ["Integrations > Chatbot > Flowise > Flowise Session"], - "summary": "Fetch Sessions", - "parameters": [ + "operationId": "findTypebot", + "summary": "Find Typebot", + "tags": ["Typebot Controller"], + "deprecated": false, + "security": [ { - "name": "difyId", - "in": "path", - "schema": { "type": "string" }, - "required": true - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Find typebot", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/flowise/settings/{instance}": { + "/typebot/changeStatus/{instance}": { "post": { - "tags": ["Integrations > Chatbot > Flowise > Default Settings"], - "summary": "Set Default Settings", + "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", - "example": { - "expire": 20, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [], - "flowiseIdFallback": "clyja4oys0a3uqpy7k3bd7swe" + "properties": { + "remoteJid": { + "type": "string", + "description": "Receiver remote JID" + }, + "status": { + "type": "string", + "description": "New typebot status", + "enum": ["opened", "closed", "paused"] + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/flowise/fetchSettings/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Flowise > Default Settings"], - "summary": "Fetch Default Settings", + "/chatwoot/set/{instance}": { + "post": { + "operationId": "setChatwoot", + "summary": "Set Chatwoot", + "tags": ["Chatwoot Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/flowise/create/{instance}": { - "post": { - "tags": ["Integrations > Chatbot > Flowise"], - "summary": "Create Flowise Bots", + ], + "description": "Set Chatwoot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "enabled": true, - "apiUrl": "http://flowise.site.com/v1", - "apiKey": "app-123456", - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 0, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [] + "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" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/flowise/find/{instance}": { + "/chatwoot/find/{instance}": { "get": { - "tags": ["Integrations > Chatbot > Flowise"], - "summary": "Find Flowise Bots", + "operationId": "findChatwoot", + "summary": "Find Chatwoot", + "tags": ["Chatwoot Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] + } + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Find Chatwoot", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/flowise/fetch/{flowiseId}/{instance}": { - "get": { - "tags": ["Integrations > Chatbot > Flowise"], - "summary": "Fetch Flowise Bot", - "parameters": [ + "/sqs/set/{instance}": { + "post": { + "operationId": "setSQS", + "summary": "Set SQS", + "tags": ["SQS Controller"], + "deprecated": false, + "security": [ { - "name": "flowiseId", - "in": "path", - "schema": { "type": "string" }, - "required": true - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/flowise/update/{flowiseId}/{instance}": { - "put": { - "tags": ["Integrations > Chatbot > Flowise"], - "summary": "Update Flowise Bot", + ], + "description": "Set SQS", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "enabled": true, - "botType": "chatBot", - "apiUrl": "http://dify.site.com/v1", - "apiKey": "app-123456", - "triggerType": "keyword", - "triggerOperator": "equals", - "triggerValue": "teste", - "expire": 0, - "keywordFinish": "#SAIR", - "delayMessage": 1000, - "unknownMessage": "Mensagem não reconhecida", - "listeningFromMe": false, - "stopBotFromMe": false, - "keepOpen": false, - "debounceTime": 0, - "ignoreJids": [] + "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" + } } } } } }, - "parameters": [ - { - "name": "flowiseId", - "in": "path", - "schema": { "type": "string", "required": true } - }, - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/flowise/delete/{flowiseId}/{instance}": { - "delete": { - "tags": ["Integrations > Chatbot > Flowise"], - "summary": "Delete Flowise Bot", - "parameters": [ + "/sqs/find/{instance}": { + "get": { + "operationId": "findSQS", + "summary": "Find SQS", + "tags": ["SQS Controller"], + "deprecated": false, + "security": [ { - "name": "flowiseId", - "in": "path", - "schema": { "type": "string", "required": true } - }, + "ApiKeyAuth": [] + } + ], + "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Find SQS", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/message/sendTemplate/{instance}": { + "/rabbitmq/set/{instance}": { "post": { - "tags": ["Integrations > Channel > Cloud API Oficial > Send Message"], - "summary": "Send Template", + "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", - "example": { - "number": "{{remoteJid}}", - "name": "hello_world", - "language": "en_US", - "components": [ - { - "type": "body", - "parameters": [ - { "type": "text", "text": "Name" }, - { "type": "text", "text": "email@email.com" } + "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" ] }, - { - "type": "button", - "sub_type": "URL", - "index": "1", - "parameters": [ - { "type": "text", "text": "/reset-password/1234" } - ] - } - ] + "description": "Events to be sent to the Webhook" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/message/sendButtons/{instance}": { - "post": { - "tags": ["Integrations > Channel > Cloud API Oficial > Send Message"], - "summary": "Send Button", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "title": "Title Button", - "description": "Description Button", - "footerText": "Footer Button", - "buttons": [ - { "text": "Resposta 1", "id": "1" }, - { "text": "Resposta 2", "id": "2" } - ] - } - } - } + "/rabbitmq/find/{instance}": { + "get": { + "operationId": "findRabbitMQ", + "summary": "Find RabbitMQ", + "tags": ["RabbitMQ Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Find RabbitMQ", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/message/sendList/{instance}": { + "/websocket/set/{instance}": { "post": { - "tags": ["Integrations > Channel > Cloud API Oficial > Send Message"], - "summary": "Send List", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "number": "{{remoteJid}}", - "title": "List Title", - "description": "List description", - "buttonText": "Click Here", - "footerText": "footer list\nhttps://examplelink.com.br", - "sections": [ - { - "title": "Row tilte 01", - "rows": [ - { - "title": "Title row 01", - "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,", - "rowId": "rowId 001" - }, - { - "title": "Title row 02", - "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,", - "rowId": "rowId 002" - } - ] - }, - { - "title": "Row tilte 02", - "rows": [ - { - "title": "Title row 01", - "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,", - "rowId": "rowId 001" - }, - { - "title": "Title row 02", - "description": "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,", - "rowId": "rowId 002" - } - ] - } - ] - } - } - } + "operationId": "setWebsocket", + "summary": "Set Websocket", + "tags": ["Websocket Controller"], + "deprecated": false, + "security": [ + { + "ApiKeyAuth": [] } - }, + ], "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" } } - } - } - }, - "/template/create/{instance}": { - "post": { - "tags": ["Integrations > Channel > Cloud API Oficial > Template"], - "summary": "Create Template", + ], + "description": "Set Websocket", "requestBody": { "content": { "application/json": { "schema": { "type": "object", - "example": { - "name": "teste_evolution", - "category": "MARKETING", - "allowCategoryChange": false, - "language": "en_US", - "components": [ - { - "type": "BODY", - "text": "Thank you for your order, {{1}}! Your confirmation number is {{2}}. If you have any questions, please use the buttons below to contact support. Thank you for being a customer!", - "example": { - "body_text": [["Pablo", "860198-230332"]] - } - }, - { - "type": "BUTTONS", - "buttons": [ - { - "type": "QUICK_REPLY", - "text": "Unsubscribe from Promos" - }, - { - "type": "URL", - "text": "Contact Support", - "url": "https://atendai.com" - } + "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" + } } } } } }, - "parameters": [ - { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true - } - ], "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/template/find/{instance}": { + "/websocket/find/{instance}": { "get": { - "tags": ["Integrations > Channel > Cloud API Oficial > Template"], - "summary": "Find Templates", - "parameters": [ + "operationId": "findWebsocket", + "summary": "Find Websocket", + "tags": ["Websocket Controller"], + "deprecated": false, + "security": [ { - "name": "instance", - "in": "path", - "schema": { "type": "string" }, - "required": true + "ApiKeyAuth": [] } ], - "responses": { - "200": { - "description": "Successful response", - "content": { - "application/json": {} - } - } - } - } - }, - "/s3/getMedia/{instance}": { - "post": { - "tags": ["Integrations > Storage > S3"], - "summary": "Get Media", - "requestBody": { - "content": { - "application/json": { - "schema": { "type": "object", "example": {} } - } - } - }, "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Find Websocket", "responses": { "200": { - "description": "Successful response", - "content": { - "application/json": {} - } + "description": "Ok", + "content": {} } } } }, - "/s3/getMediaUrl/{instance}": { - "post": { - "tags": ["Integrations > Storage > S3"], - "summary": "Get Media Url", - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "example": { - "id": "clykhoqq70003pmm88bb6eejd" - } - } - } - } - }, + "/": { + "get": { + "operationId": "getEvoInfo", + "summary": "Get information about your EvolutionAPI", + "deprecated": false, "parameters": [ { "name": "instance", "in": "path", - "schema": { "type": "string" }, - "required": true + "required": true, + "description": "ID of the instance to connect", + "schema": { + "type": "string" + } } ], + "description": "Get information about your EvolutionAPI", "responses": { "200": { - "description": "Successful response", + "description": "Ok", "content": { - "application/json": {} + "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" + } + } + } } } }