{ "openapi": "3.0.3", "info": { "title": "Evolution API", "version": "2.1.1" }, "servers": [ { "url": "https://{server-url}", "variables": { "server-url": { "default": "evolution-example", "description": "The URL of your EvolutionAPI server" } }, "description": "Your instance domain" } ], "paths": { "/instance/create": { "post": { "operationId": "createInstance", "summary": "Create Instance", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "required": [ "instanceName", "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": { "authorization": { "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": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "instance": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance" }, "instanceId": { "type": "string", "description": "The unique identifier for the instance" }, "webhook_wa_business": { "type": "string", "description": "The webhook URL for WhatsApp Business integration" }, "access_token_wa_business": { "type": "string", "description": "The access token for WhatsApp Business" }, "status": { "type": "string", "description": "The current status of the instance" } } }, "hash": { "type": "object", "properties": { "apikey": { "type": "string", "description": "The API key for authentication" } } }, "settings": { "type": "object", "properties": { "reject_call": { "type": "boolean", "description": "Indicates whether calls are rejected" }, "msg_call": { "type": "string", "description": "Message to be sent when a call is rejected" }, "groups_ignore": { "type": "boolean", "description": "Indicates whether groups are ignored" }, "always_online": { "type": "boolean", "description": "Indicates whether the instance is always online" }, "read_messages": { "type": "boolean", "description": "Indicates whether messages are marked as read" }, "read_status": { "type": "boolean", "description": "Indicates whether status updates are marked as read" }, "sync_full_history": { "type": "boolean", "description": "Indicates whether the full message history is synchronized" } } } }, "example": { "instance": { "instanceName": "teste-docs", "instanceId": "af6c5b7c-ee27-4f94-9ea8-192393746ddd", "webhook_wa_business": null, "access_token_wa_business": "", "status": "created" }, "hash": { "apikey": "123456" }, "settings": { "reject_call": false, "msg_call": "", "groups_ignore": true, "always_online": false, "read_messages": false, "read_status": false, "sync_full_history": false } } } } } }, "403": { "description": "Forbidden", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 403, "error": "Forbidden", "response": { "message": [ "This name \"instance-example-name\" is already in use." ] } } } } } } } } }, "/instance/fetchInstances": { "get": { "operationId": "fetchInstances", "summary": "Fetch Instances", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instanceName", "description": "Name of the instance to be fetched", "in": "query", "schema": { "type": "string" } }, { "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": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": [ { "instance": { "instanceName": "example-name", "instanceId": "421a4121-a3d9-40cc-a8db-c3a1df353126", "owner": "553198296801@s.whatsapp.net", "profileName": "Guilherme Gomes", "profilePictureUrl": null, "profileStatus": "This is the profile status.", "status": "open", "serverUrl": "https://example.evolution-api.com", "apikey": "B3844804-481D-47A4-B69C-F14B4206EB56", "integration": { "integration": "WHATSAPP-BAILEYS", "webhook_wa_business": "https://example.evolution-api.com/webhook/whatsapp/db5e11d3-ded5-4d91-b3fb-48272688f206" } } }, { "instance": { "instanceName": "teste-docs", "instanceId": "af6c5b7c-ee27-4f94-9ea8-192393746ddd", "status": "close", "serverUrl": "https://example.evolution-api.com", "apikey": "123456", "integration": { "token": "123456", "webhook_wa_business": "https://example.evolution-api.com/webhook/whatsapp/teste-docs" } } } ], "required": [ "message" ] } } } } } } }, "/instance/connect/{instance}": { "get": { "operationId": "instanceConnect", "summary": "Instances Connect", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "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": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "pairingCode": { "type": "string", "description": "The unique code used for pairing a device or account." }, "code": { "type": "string", "description": "A specific code associated with the pairing process. This may include tokens or other identifiers." }, "count": { "type": "integer", "description": "The count or number of attempts or instances related to the pairing process." } }, "example": { "pairingCode": "WZYEH1YY", "code": "2@y8eK+bjtEjUWy9/FOM...", "count": 1 } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/restart/{instance}": { "put": { "operationId": "restartInstance", "summary": "Restart Instance", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance to restart", "schema": { "type": "string" } } ], "description": "Restarts the instance", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "instance": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "state": { "type": "string", "description": "The state of the instance." } } } }, "example": { "instance": { "instanceName": "teste-docs", "state": "open" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/connectionState/{instance}": { "get": { "operationId": "connectionState", "summary": "Connection State", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance to get status connect", "schema": { "type": "string" } } ], "description": "Gets the state of the connection", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "instance": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "state": { "type": "string", "description": "The state of the instance." } } } }, "example": { "instance": { "instanceName": "teste-docs", "state": "open" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/logout/{instance}": { "delete": { "operationId": "logoutInstance", "summary": "Logout Instance", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance to logout", "schema": { "type": "string" } } ], "description": "Makes logout on instance", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "The status of the response." }, "error": { "type": "boolean", "description": "Indicates whether an error occurred." }, "response": { "type": "object", "properties": { "message": { "type": "string", "description": "A message related to the response." } } } }, "example": { "status": "SUCCESS", "error": false, "response": { "message": "Instance logged out" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/delete/{instance}": { "delete": { "operationId": "deleteInstance", "summary": "Delete Instance", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance to delete", "schema": { "type": "string" } } ], "description": "Delete instance", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "description": "The status of the response." }, "error": { "type": "boolean", "description": "Indicates whether an error occurred." }, "response": { "type": "object", "properties": { "message": { "type": "string", "description": "A message related to the response." } } } }, "example": { "status": "SUCCESS", "error": false, "response": { "message": "Instance deleted" } } } } } }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/instance/setPresence/{instance}": { "post": { "operationId": "setPresence", "summary": "Set Presence", "tags": [ "Instance Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance to connect", "schema": { "type": "string" } } ], "description": "Deletes instance", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "presence" ], "properties": { "presence": { "type": "string", "enum": [ "available", "unavailable" ] } } } } } }, "responses": { "200": { "description": "Ok", "content": {} }, "404": { "description": "Instance not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "error": { "type": "string", "description": "The error message indicating the type of error" }, "response": { "type": "object", "properties": { "message": { "type": "array", "items": { "type": "string" }, "description": "List of detailed error messages" } } } }, "example": { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } } } } } } } }, "/webhook/set/{instance}": { "post": { "operationId": "setWebhook", "summary": "Set Webhook", "tags": [ "Webhook Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set Webhook for instance", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "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" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "webhook": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "webhook": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the webhook." }, "events": { "type": "array", "items": { "type": "string" }, "description": "List of events the webhook is subscribed to." }, "enabled": { "type": "boolean", "description": "Indicates whether the webhook is enabled." } } } } } }, "example": { "webhook": { "instanceName": "teste-docs", "webhook": { "url": "https://example.com", "events": [ "APPLICATION_STARTUP" ], "enabled": true } } } } } } } } } }, "/webhook/find/{instance}": { "get": { "operationId": "findWebhook", "summary": "Find Webhook", "tags": [ "Webhook Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Fetch Webhook configuration", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Indicates whether the webhook is enabled." }, "url": { "type": "string", "description": "The URL of the webhook." }, "events": { "type": "array", "items": { "type": "string" }, "description": "List of events the webhook is subscribed to." } }, "example": { "enabled": true, "url": "https://example.com", "events": [ "APPLICATION_STARTUP" ] } } } } } } } }, "/settings/set/{instance}": { "post": { "operationId": "setSettings", "summary": "Set Settings", "tags": [ "Settings Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "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" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "settings": { "type": "object", "properties": { "instanceName": { "type": "string", "description": "The name of the instance." }, "settings": { "type": "object", "properties": { "reject_call": { "type": "boolean", "description": "Indicates whether to reject incoming calls." }, "groups_ignore": { "type": "boolean", "description": "Indicates whether to ignore group messages." }, "always_online": { "type": "boolean", "description": "Indicates whether to always keep the instance online." }, "read_messages": { "type": "boolean", "description": "Indicates whether to mark messages as read." }, "read_status": { "type": "boolean", "description": "Indicates whether to read status updates." }, "sync_full_history": { "type": "boolean", "description": "Indicates whether to synchronize full message history." } } } } } }, "example": { "settings": { "instanceName": "teste-docs", "settings": { "reject_call": true, "groups_ignore": true, "always_online": true, "read_messages": true, "read_status": true, "sync_full_history": false } } } } } } } } } }, "/settings/find/{instance}": { "get": { "operationId": "findWebhook", "summary": "Find Webhook", "tags": [ "Webhook Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance to get settings", "schema": { "type": "string" } } ], "description": "Fetch Webhook configuration", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "reject_call": { "type": "boolean", "description": "Indicates whether to reject incoming calls." }, "groups_ignore": { "type": "boolean", "description": "Indicates whether to ignore group messages." }, "always_online": { "type": "boolean", "description": "Indicates whether to always keep the instance online." }, "read_messages": { "type": "boolean", "description": "Indicates whether to mark messages as read." }, "read_status": { "type": "boolean", "description": "Indicates whether to read status updates." }, "sync_full_history": { "type": "boolean", "description": "Indicates whether to synchronize full message history." } }, "example": { "reject_call": true, "groups_ignore": true, "always_online": true, "read_messages": true, "read_status": true, "sync_full_history": false } } } } } } } }, "/message/sendText/{instance}": { "post": { "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", "required": [ "number", "text" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "text": { "type": "string", "description": "Test message to send" }, "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" } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } } }, "message": { "type": "object", "properties": { "extendedTextMessage": { "type": "object", "properties": { "text": { "type": "string", "description": "The text message." } } } } }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message." }, "status": { "type": "string", "description": "The status of the message." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE594145F4C59B4" }, "message": { "extendedTextMessage": { "text": "Olá!" } }, "messageTimestamp": "1717689097", "status": "PENDING" } } } } } } } }, "/message/sendMedia/{instance}": { "post": { "operationId": "sendMedia", "summary": "Send Media", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Send media message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "mediatype", "mimetype", "caption", "media", "fileName" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "mediatype": { "type": "string", "description": "Image, video or document" }, "mimetype": { "type": "string", "description": "image/png" }, "caption": { "type": "string", "description": "Teste de caption" }, "media": { "type": "string", "description": "Url or base64" }, "fileName": { "type": "string", "description": "Image.png" }, "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" } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "imageMessage": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the image." }, "mimetype": { "type": "string", "description": "The MIME type of the image." }, "caption": { "type": "string", "description": "The caption text of the image." }, "fileSha256": { "type": "string", "description": "The SHA-256 hash of the image file." }, "fileLength": { "type": "string", "description": "The length of the image file." }, "height": { "type": "integer", "description": "The height of the image." }, "width": { "type": "integer", "description": "The width of the image." }, "mediaKey": { "type": "string", "description": "The media key of the image." }, "fileEncSha256": { "type": "string", "description": "The SHA-256 hash of the encrypted image file." }, "directPath": { "type": "string", "description": "The direct path to the image." }, "mediaKeyTimestamp": { "type": "string", "description": "The timestamp of the media key." }, "jpegThumbnail": { "type": "string", "description": "The JPEG thumbnail of the image." }, "contextInfo": { "type": "object", "description": "Additional context information." } }, "description": "Details of the image message." } }, "description": "The message content, which may include various types of messages like text, images, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE5F5A632EAE722" }, "message": { "imageMessage": { "url": "https://mmg.whatsapp.net/o1/v/t62.7118-2...", "mimetype": "image/png", "caption": "Caption text", "fileSha256": "VbCGkGBv5SZStLD5PHdkBWpQav/lNsXcY...", "fileLength": "1305757", "height": 1080, "width": 1920, "mediaKey": "aFQK9Ocw5tE7Nf0iBA42Xcb4Dee6G1k/pLL...", "fileEncSha256": "bGVtYeR3458RwC0p1tsGDNuj+vOu/...", "directPath": "/o1/v/t62.7118-24/f1/m232/up-oil...", "mediaKeyTimestamp": "1717775573", "jpegThumbnail": "/9j/2wBDABALDA4MChAODQ4SERATG...", "contextInfo": {} } }, "messageTimestamp": "1717775575", "status": "PENDING" } } } } } } } }, "/message/sendWhatsAppAudio/{instance}": { "post": { "operationId": "sendWhatsAppAudio", "summary": "Send WhatsApp Audio", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Send WhatsApp Audio", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "audio" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "audio": { "type": "string", "description": "url or base64 " }, "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" } } } } } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "audioMessage": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL of the audio message." }, "mimetype": { "type": "string", "description": "The MIME type of the audio message." }, "fileSha256": { "type": "string", "description": "The SHA-256 hash of the audio file." }, "fileLength": { "type": "string", "description": "The length of the audio file." }, "seconds": { "type": "integer", "description": "The duration of the audio message in seconds." }, "ptt": { "type": "boolean", "description": "Indicates whether the audio message is a push-to-talk (PTT) message." }, "mediaKey": { "type": "string", "description": "The media key of the audio message." }, "fileEncSha256": { "type": "string", "description": "The SHA-256 hash of the encrypted audio file." }, "directPath": { "type": "string", "description": "The direct path to the audio file." }, "mediaKeyTimestamp": { "type": "string", "description": "The timestamp of the media key." } }, "description": "Details of the audio message." } }, "description": "The message content, which may include various types of messages like text, images, audio, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE5EFED2AB0BB9F" }, "message": { "audioMessage": { "url": "https://mmg.whatsapp.net/v/t62.7114-24/21428511_985284763127087_5662928...", "mimetype": "audio/mp4", "fileSha256": "DJPBnRns6QADzZNH2j0R88mUtFQ4aiOm9aZf6dio2G0=", "fileLength": "670662", "seconds": 42, "ptt": true, "mediaKey": "+A3X1Tuyzeh87cCVZpfuKpL3Y4RYdYr3sCDurjSlBTY=", "fileEncSha256": "s4tKvHOXIZAw5668/Xcy4zoFba4vW8klmNYC78yOPZs=", "directPath": "/v/t62.7114-24/21428511_985284763127087_5662928477636351284_n.enc...", "mediaKeyTimestamp": "1717776942" } }, "messageTimestamp": "1717776942", "status": "PENDING" } } } } } } } }, "/message/sendSticker/{instance}": { "post": { "operationId": "sendSticker", "summary": "Send Sticker", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send Sticker", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "sticker" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "sticker": { "type": "string", "description": "Url or base64 " }, "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" } } } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/message/sendStatus/{instance}": { "post": { "operationId": "sendStatus", "summary": "Send Status", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } } ], "description": "Post WhatsApp status (stories)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "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}}" ] } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "extendedTextMessage": { "type": "object", "properties": { "text": { "type": "string", "description": "The text content of the message." }, "backgroundArgb": { "type": "integer", "description": "The background color of the text message, represented as ARGB integer value." }, "font": { "type": "string", "description": "The font used in the text message." } }, "description": "Details of the extended text message." } }, "description": "The message content, which may include various types of messages like text, images, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." }, "participant": { "type": "string", "description": "The participant in the chat to whom the message was sent." } }, "example": { "key": { "remoteJid": "status@broadcast", "fromMe": true, "id": "BAE5FAB9E65A3DA8" }, "message": { "extendedTextMessage": { "text": "example", "backgroundArgb": 4294910617, "font": "FB_SCRIPT" } }, "messageTimestamp": "1717691767", "status": "PENDING", "participant": "553198296801:17@s.whatsapp.net" } } } } } } } }, "/message/sendLocation/{instance}": { "post": { "operationId": "sendLocation", "summary": "Send Location", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send Location", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "name", "address", "latitude", "longitude" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "name": { "type": "string", "description": "Name the city" }, "address": { "type": "string", "description": "Location address" }, "latitude": { "type": "number", "description": "Latitude location" }, "longitude": { "type": "number", "description": "Longitude location" }, "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" } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "locationMessage": { "type": "object", "properties": { "degreesLatitude": { "type": "number", "format": "float", "description": "The latitude of the location." }, "degreesLongitude": { "type": "number", "format": "float", "description": "The longitude of the location." }, "name": { "type": "string", "description": "The name of the location." }, "address": { "type": "string", "description": "The address of the location." }, "contextInfo": { "type": "object", "description": "Additional context information." } }, "description": "Details of the location message." } }, "description": "The message content, which may include various types of messages like text, images, location, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE51B6FF4470AF9" }, "message": { "locationMessage": { "degreesLatitude": -19.93359, "degreesLongitude": -43.93851, "name": "Palácio da Liberdade", "address": "Praça da Liberdade, Belo Horizonte, MG 30140-050", "contextInfo": {} } }, "messageTimestamp": "1717779606", "status": "PENDING" } } } } } } } }, "/message/sendContact/{instance}": { "post": { "operationId": "sendContact", "summary": "Send Contact", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send Contact", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "contact" ], "properties": { "number": { "type": "string", "description": "Number to receive the message (with country code)" }, "contact": { "type": "array", "minItems": 1, "items": { "type": "object", "required": [ "fullname", "wuid", "phoneNumber", "organization", "email", "url" ], "properties": { "fullName": { "type": "string", "description": "Contact full name" }, "wuid": { "type": "string", "description": "Phone number non-stylized with country code (553198296801)" }, "phoneNumber": { "type": "string", "description": "Phone number stylized (+55 31 9 9999-9999)" }, "organization": { "type": "string", "description": "Organization name for the contact" }, "email": { "type": "string", "description": "Contact email address" }, "url": { "type": "string", "description": "Page URL" } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "contactMessage": { "type": "object", "properties": { "displayName": { "type": "string", "description": "The display name of the contact." }, "vcard": { "type": "string", "description": "The vCard format contact information." }, "contextInfo": { "type": "object", "description": "Additional context information." } }, "description": "Details of the contact message." } }, "description": "The message content, which may include various types of messages like text, images, contact, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE58DA6CBC941BC" }, "message": { "contactMessage": { "displayName": "Guilherme Gomes", "vcard": "BEGIN:VCARD\nVERSION:3.0\nN:Guilherme Gomes\nFN:Guilherme Gomes\nORG:AtendAI;\nEMAIL:...", "contextInfo": {} } }, "messageTimestamp": "1717780437", "status": "PENDING" } } } } } } } }, "/message/sendReaction/{instance}": { "post": { "operationId": "sendReaction", "summary": "Send Reaction", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send Reaction", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or not" }, "id": { "type": "string", "description": "Message ID" } } }, "reaction": { "type": "string", "description": "Reaction emoji", "example": "🚀" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "reactionMessage": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid of the original message." }, "fromMe": { "type": "boolean", "description": "Indicates whether the original message was sent by the user." }, "id": { "type": "string", "description": "The ID of the original message." } }, "description": "The key of the original message to which the reaction is linked." }, "text": { "type": "string", "description": "The reaction text or emoji." }, "senderTimestampMs": { "type": "string", "description": "The timestamp when the reaction was sent, in milliseconds." } }, "description": "Details of the reaction message." } }, "description": "The message content, which may include various types of messages like text, images, reaction, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE569F0E38F858D" }, "message": { "reactionMessage": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE58DA6CBC941BC" }, "text": "🚀", "senderTimestampMs": "1717781105034" } }, "messageTimestamp": "1717781105", "status": "PENDING" } } } } } } } }, "/message/sendPoll/{instance}": { "post": { "operationId": "sendPoll", "summary": "Send Poll", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send Poll", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "name", "selectableCount", "values" ], "properties": { "number": { "type": "string", "description": "{{remoteJid}}" }, "name": { "type": "string", "description": "Main text of the poll" }, "selectableCount": { "type": "number", "description": "Ex: 1" }, "values": { "type": "array", "items": { "type": "string", "enum": [ "Question 1", "Question 2", "Question 3" ] }, "description": "Values for question" }, "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" } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "messageContextInfo": { "type": "object", "properties": { "messageSecret": { "type": "string", "description": "The secret of the message context." } }, "description": "Information about the context of the message." }, "pollCreationMessage": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the poll." }, "options": { "type": "array", "items": { "type": "object", "properties": { "optionName": { "type": "string", "description": "The name of the poll option." } } }, "description": "The options available in the poll." }, "selectableOptionsCount": { "type": "integer", "description": "The number of options that can be selected in the poll." } }, "description": "Details of the poll creation message." } }, "description": "The message content, which may include various types of messages like text, images, poll creation, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE53EC8D8E1FD8A" }, "message": { "messageContextInfo": { "messageSecret": "lX/+cLHHNfnTTKZi+88mrhoyi6KNuUzWjgfaB0bTfOY=" }, "pollCreationMessage": { "name": "Poll Name", "options": [ { "optionName": "Option 1" }, { "optionName": "Option 2" }, { "optionName": "Option 3" } ], "selectableOptionsCount": 1 } }, "messageTimestamp": "1717781848", "status": "PENDING" } } } } } } } }, "/message/sendList/{instance}": { "post": { "operationId": "sendList", "summary": "Send List", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send List", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "title", "description", "buttonText", "footerText", "values" ], "properties": { "number": { "type": "string", "description": "{{remoteJid}}" }, "title": { "type": "string", "description": "Title of list" }, "description": { "type": "string", "description": "Description for lists" }, "buttonText": { "type": "string", "description": "Text Button" }, "footerText": { "type": "string", "description": "footer list\nhttps://examplelink.com.br" }, "values": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "title item of list" }, "rows": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Title of row" }, "description": { "type": "string", "description": "Description of row" }, "rowId": { "type": "string", "description": "Id of row" } } } } } } }, "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" } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "messageContextInfo": { "type": "object", "properties": { "messageSecret": { "type": "string", "description": "The secret of the message context." } }, "description": "Information about the context of the message." }, "pollCreationMessage": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the poll." }, "options": { "type": "array", "items": { "type": "object", "properties": { "optionName": { "type": "string", "description": "The name of the poll option." } } }, "description": "The options available in the poll." }, "selectableOptionsCount": { "type": "integer", "description": "The number of options that can be selected in the poll." } }, "description": "Details of the poll creation message." } }, "description": "The message content, which may include various types of messages like text, images, poll creation, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE53EC8D8E1FD8A" }, "message": { "messageContextInfo": { "messageSecret": "lX/+cLHHNfnTTKZi+88mrhoyi6KNuUzWjgfaB0bTfOY=" }, "pollCreationMessage": { "name": "Poll Name", "options": [ { "optionName": "Option 1" }, { "optionName": "Option 2" }, { "optionName": "Option 3" } ], "selectableOptionsCount": 1 } }, "messageTimestamp": "1717781848", "status": "PENDING" } } } } } } } }, "/message/sendButtons/{instance}": { "post": { "operationId": "sendList", "summary": "Send Buttons", "tags": [ "Message Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send Buttons", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "title", "description", "footer", "buttons" ], "properties": { "number": { "type": "string", "description": "{{remoteJid}}" }, "title": { "type": "string", "description": "Title Button" }, "description": { "type": "string", "description": "Description for buttons" }, "footer": { "type": "string", "description": "Text Button" }, "buttons": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string", "description": "Types: reply,url,call" }, "displayText": { "type": "string", "description": "Text of button" }, "id": { "type": "string", "description": "Id button" } } } }, "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" } } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote Jid." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key of the message, which identifies the message in the chat." }, "message": { "type": "object", "properties": { "messageContextInfo": { "type": "object", "properties": { "messageSecret": { "type": "string", "description": "The secret of the message context." } }, "description": "Information about the context of the message." }, "pollCreationMessage": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the poll." }, "options": { "type": "array", "items": { "type": "object", "properties": { "optionName": { "type": "string", "description": "The name of the poll option." } } }, "description": "The options available in the poll." }, "selectableOptionsCount": { "type": "integer", "description": "The number of options that can be selected in the poll." } }, "description": "Details of the poll creation message." } }, "description": "The message content, which may include various types of messages like text, images, poll creation, etc." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "example": { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE53EC8D8E1FD8A" }, "message": { "messageContextInfo": { "messageSecret": "lX/+cLHHNfnTTKZi+88mrhoyi6KNuUzWjgfaB0bTfOY=" }, "pollCreationMessage": { "name": "Poll Name", "options": [ { "optionName": "Option 1" }, { "optionName": "Option 2" }, { "optionName": "Option 3" } ], "selectableOptionsCount": 1 } }, "messageTimestamp": "1717781848", "status": "PENDING" } } } } } } } }, "/chat/whatsappNumbers/{instance}": { "post": { "operationId": "whatsappNumbers", "summary": "WhatsApp Numbers", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Check if numbers are on WhatsApp", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "numbers": { "type": "array", "description": "Phone numbers (with country code) to be checked", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "exists": { "type": "boolean", "description": "Indicates whether the WhatsApp account exists." }, "jid": { "type": "string", "description": "The JID of the WhatsApp account." }, "number": { "type": "string", "description": "The phone number associated with the WhatsApp account." } } }, "description": "Array of objects representing WhatsApp account existence information.", "example": [ { "exists": true, "jid": "553198296801@s.whatsapp.net", "number": "553198296801" } ] } } } } } } }, "/chat/markMessageAsRead/{instance}": { "post": { "operationId": "markMessageAsRead", "summary": "Mark Message As Read", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Mark message as read", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "readMessages" ], "properties": { "readMessages": { "type": "array", "description": "Messages to be mark as read", "items": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or the contact" }, "id": { "type": "string", "description": "Message ID" } } } } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "A brief message describing the action performed." }, "read": { "type": "string", "description": "The status of the read action." } }, "example": { "message": "Read messages", "read": "success" } } } } } } } }, "/chat/markChatUnread/{instance}": { "post": { "operationId": "markMessageAsRead", "summary": "Mark Message As Unread", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Mark message as read", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "lastMessage", "chat" ], "properties": { "lastMessage": { "type": "array", "description": "Messages to be mark as unread", "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" } } } }, "chat": { "type": "string", "description": "remoteJid here" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "A brief message describing the action performed." }, "read": { "type": "string", "description": "The status of the read action." } }, "example": { "message": "Read messages", "read": "success" } } } } } } } }, "/chat/archiveChat/{instance}": { "post": { "operationId": "archiveChat", "summary": "Archive Chat", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Archive Chat", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "lastMessage", "archive", "chat" ], "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" }, "chat": { "type": "string", "description": "remoteJid here" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "chatId": { "type": "string", "description": "The ID of the chat." }, "archived": { "type": "boolean", "description": "Indicates whether the chat is archived." } }, "example": { "chatId": "553198296801@s.whatsapp.net", "archived": true } } } } } } } }, "/chat/deleteMessageForEveryone/{instance}": { "delete": { "operationId": "deleteMessageForEveryone", "summary": "Delete Message For Everyone", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Delete Message For Everyone", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "id", "remoteJid", "fromMe", "paticipant" ], "properties": { "id": { "type": "string", "description": "Message ID" }, "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or the contact" }, "participant": { "type": "string", "description": "Participant for group messages only TODO" } } } } } }, "responses": { "201": { "description": "Created", "content": { "application/json": { "schema": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote JID (Jabber ID) of the WhatsApp account." }, "fromMe": { "type": "boolean", "description": "Indicates whether the message was sent by the user." }, "id": { "type": "string", "description": "The ID of the message." } }, "description": "The key that identifies the message in the chat." }, "message": { "type": "object", "properties": { "protocolMessage": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The remote JID (Jabber ID) of the WhatsApp account in the referenced message." }, "fromMe": { "type": "boolean", "description": "Indicates whether the referenced message was sent by the user." }, "id": { "type": "string", "description": "The ID of the referenced message." } }, "description": "The key that identifies the referenced message." }, "type": { "type": "string", "description": "The type of protocol message, e.g., 'REVOKE'." } }, "description": "Details of the protocol message." } }, "description": "The content of the message." }, "messageTimestamp": { "type": "string", "description": "The timestamp of the message, represented as a string." }, "status": { "type": "string", "description": "The status of the message, such as sent, received, or pending." } }, "description": "Schema representing a WhatsApp protocol message, including the key, message content, timestamp, and status.", "example": { "key": { "remoteJid": "553198296801@s.whatsapp.com", "fromMe": true, "id": "BAE5EABBD912C4E2" }, "message": { "protocolMessage": { "key": { "remoteJid": "553198296801@s.whatsapp.com", "fromMe": true, "id": "BAE52B567D0E3DD8" }, "type": "REVOKE" } }, "messageTimestamp": "1718108455", "status": "PENDING" } } } } } } } }, "/chat/sendPresence/{instance}": { "post": { "operationId": "sendPresence", "summary": "Send Presence", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Send Presence (typing...)", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "options" ], "properties": { "number": { "type": "string", "description": "Receiver phone number with country code" }, "options": { "type": "object", "required": [ "delay", "presence", "number" ], "properties": { "delay": { "type": "integer", "description": "Presence display time in milliseconds" }, "presence": { "type": "string", "description": "Presence type", "enum": [ "composing", "recording" ] }, "number": { "type": "string", "description": "Number contact" } } } } } } } }, "responses": { "201": { "description": "Created", "content": {} } } } }, "/message/updateBlockStatus/{instance}": { "post": { "operationId": "updateBlockStatus", "summary": "Update block status", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Block status to contacts", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "status" ], "properties": { "number": { "type": "string", "description": " Phone number with country code" }, "status": { "type": "string", "description": "Values: block, unblock " } } } } } }, "responses": { "201": { "description": "Created", "content": {} } } } }, "/chat/fetchProfilePictureUrl/{instance}": { "post": { "operationId": "fetchProfilePictureUrl", "summary": "Fetch Profile Picture URL", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Fetch Profile Picture URL", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number" ], "properties": { "number": { "type": "string", "description": "Number to fetch profile picture URL: {{remoteJid}}" } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "wuid": { "type": "string", "description": "The WhatsApp User ID (WUID)." }, "profilePictureUrl": { "type": "string", "description": "URL of the user's profile picture." } }, "example": { "wuid": "553198296801@s.whatsapp.net", "profilePictureUrl": "https://pps.whatsapp.net/v/t61.2..." } } } } } } } }, "/chat/findContacts/{instance}": { "post": { "operationId": "findContacts", "summary": "Find Contacts", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Here it is possible to list all contacts or just one,using the 'where' option.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "where" ], "properties": { "where": { "type": "object", "properties": { "id": { "type": "string", "description": "Contact number: optional" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/getBase64FromMediaMessage/{instance}": { "post": { "operationId": "getBase64FromMediaMessage", "summary": "Get Base64 From Media Message", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Get base64 from media message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "message", "convertToMp4" ], "properties": { "message": { "type": "object", "properties": { "key": { "type": "object", "properties": { "id": { "type": "string", "description": "Message ID" } } } } }, "convertToMp4": { "type": "boolean", "description": "Convert video to MP4, for video only" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/findMessages/{instance}": { "post": { "operationId": "findMessages", "summary": "Find Messages", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Find all messages", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "where": { "type": "object", "properties": { "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Contact or group remote JID" } } } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/findStatusMessage/{instance}": { "post": { "operationId": "findStatusMessage", "summary": "Find Status Message", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Find status message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "where" ], "properties": { "where": { "type": "object", "properties": { "_id": { "type": "string", "description": "MongoDB message ID" }, "id": { "type": "string", "description": "Message ID (from WhatsApp)" }, "remoteJid": { "type": "string", "description": "Contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "Whether the message is from the instance owner or not" } } }, "limit": { "type": "integer", "description": "Limit for the return" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateMessage/{instance}": { "post": { "operationId": "updateMessage", "summary": "Update Message", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Update message", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number", "text", "key" ], "properties": { "number": { "type": "integer", "description": "Receiver phone number with country code" }, "text": { "type": "string", "description": "New message content" }, "key": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Chat contact or group remote JID" }, "fromMe": { "type": "boolean", "description": "If the message was sent by the instance owner or not" }, "id": { "type": "string", "description": "Message ID" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/findChats/{instance}": { "post": { "operationId": "findChats", "summary": "Find Chats", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Find all chats", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/fetchBusinessProfile/{instance}": { "post": { "operationId": "fetchBusinessProfile", "summary": "Fetch Business Profile", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Fetch business profile from phone number", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number" ], "properties": { "number": { "type": "string", "description": "Phone number with country code" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/fetchProfile/{instance}": { "post": { "operationId": "fetchBusinessProfile", "summary": "Fetch Business Profile", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Fetch profile from phone number", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "number" ], "properties": { "number": { "type": "string", "description": "Phone number with country code" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateProfileName/{instance}": { "post": { "operationId": "updateProfileName", "summary": "Update Profile Name", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Update profile name", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "New name for profile" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateProfileStatus/{instance}": { "post": { "operationId": "updateProfileStatus", "summary": "Update Profile Status", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Update profile status", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "status" ], "properties": { "status": { "type": "string", "description": "New status for profile" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updateProfilePicture/{instance}": { "post": { "operationId": "updateProfilePicture", "summary": "Update Profile Picture", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Update profile picture", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "picture" ], "properties": { "picture": { "type": "string", "description": "New spicture URL" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/removeProfilePicture/{instance}": { "delete": { "operationId": "removeProfilePicture", "summary": "Remove Profile Picture", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name instance", "schema": { "type": "string" } } ], "description": "Update profile picture", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/fetchPrivacySettings/{instance}": { "get": { "operationId": "fetchPrivacySettings", "summary": "Fetch Privacy Settings", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } } ], "description": "Fetch privacy settings", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chat/updatePrivacySettings/{instance}": { "post": { "operationId": "updatePrivacySettings", "summary": "Update Privacy Settings", "tags": [ "Chat Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } } ], "description": "Update privacy settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "readreceipts", "profile", "status", "online", "last", "groupadd" ], "properties": { "readreceipts": { "type": "string", "enum": [ "all", "none" ] }, "profile": { "type": "string", "enum": [ "all", "contacts", "contact_blacklist", "none" ] }, "status": { "type": "string", "enum": [ "all", "contacts", "contact_blacklist", "none" ] }, "online": { "type": "string", "enum": [ "all", "match_last_seen" ] }, "last": { "type": "string", "enum": [ "all", "contacts", "contact_blacklist", "none" ] }, "groupadd": { "type": "string", "enum": [ "all", "contacts", "contact_blacklist" ] } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/create/{instance}": { "post": { "operationId": "createGroup", "summary": "Create Group", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } } ], "description": "Create group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "subject", "description", "participants" ], "properties": { "subject": { "type": "object", "description": "Group subject" }, "description": { "type": "string", "description": "Group description" }, "participants": { "type": "array", "description": "Group members phone numbers with country code", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateGroupPicture/{instance}": { "post": { "summary": "Update group picture", "tags": [ "Update group picture" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Update group picture", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "image" ], "properties": { "image": { "type": "string", "description": "New profile picture image URL" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateGroupSubject/{instance}": { "post": { "operationId": "updateGroupSubject", "summary": "Update Group Subject", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Update group subject", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "subject" ], "properties": { "subject": { "type": "string", "description": "New group subject" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateGroupDescription/{instance}": { "post": { "operationId": "updateGroupDescription", "summary": "Update Group Description", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Update group description", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "description" ], "properties": { "description": { "type": "string", "description": "New group description" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/inviteCode/{instance}": { "get": { "operationId": "fetchInviteCode", "summary": "Fetch Group Invite Code", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Fetch group invite code", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "inviteUrl": { "type": "string", "description": "The URL for the WhatsApp group invite." }, "inviteCode": { "type": "string", "description": "The code for the WhatsApp group invite." } }, "example": { "inviteUrl": "https://chat.whatsapp.com/DgQvyfXzY01B6rGrpZpYze", "inviteCode": "DgQvyfXzY01B6rGrpZpYze" } } } } } } } }, "/group/acceptInviteCode/{instance}": { "get": { "operationId": "fetchInviteCode", "summary": "Fetch Group Invite Code", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } }, { "name": "inviteCode", "description": "Group invite code", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Fetch group invite code", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/revokeInviteCode/{instance}": { "post": { "operationId": "fetchInviteCode", "summary": "Fetch Group Invite Code", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "description": "Group remote JID", "required": true, "in": "query", "schema": { "type": "string" } } ], "description": "Revoke group invite", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/sendInvite/{instance}": { "post": { "operationId": "sendGroupInvite", "summary": "Send Group Invite", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } } ], "description": "Send group invite", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "groupJid", "description", "numbers" ], "properties": { "groupJid": { "type": "string", "description": "Group remote JID" }, "description": { "type": "string", "description": "Description to send with the invitation" }, "numbers": { "type": "array", "description": "Numbers to receive the invitation", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "send": { "type": "boolean", "description": "Indicates if the invite was sent successfully." }, "inviteUrl": { "type": "string", "description": "The URL for the WhatsApp group invite." } }, "example": { "send": true, "inviteUrl": "https://chat.whatsapp.com/DgQvyfXzY01B6rGrpZpYze" } } } } } } } }, "/group/inviteInfo/{instance}": { "get": { "operationId": "findGroupByInviteCode", "summary": "Find Group By Invite Code", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "inviteCode", "in": "query", "description": "Group invite code", "schema": { "type": "string" } } ], "description": "Find group by invite code", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/findGroupInfos/{instance}": { "get": { "operationId": "findGroupByJid", "summary": "Find Group By Remote JID", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Find group by remote JID", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the group." }, "subject": { "type": "string", "description": "The subject (name) of the group." }, "subjectOwner": { "type": "string", "description": "The ID of the user who set the subject." }, "subjectTime": { "type": "integer", "description": "The timestamp when the subject was set." }, "pictureUrl": { "type": "string", "description": "URL of the group's profile picture." }, "size": { "type": "integer", "description": "The number of participants in the group." }, "creation": { "type": "integer", "description": "The timestamp when the group was created." }, "owner": { "type": "string", "description": "The ID of the group owner." }, "desc": { "type": "string", "description": "The description of the group." }, "descId": { "type": "string", "description": "The ID of the description message." }, "restrict": { "type": "boolean", "description": "Indicates if the group is restricted (only admins can send messages)." }, "announce": { "type": "boolean", "description": "Indicates if the group is an announcement group (only admins can send messages)." }, "participants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the participant." }, "admin": { "type": "string", "description": "The role of the participant (e.g., 'admin', 'superadmin')." } } }, "description": "List of participants in the group." } }, "example": { "id": "120363295648424210@g.us", "subject": "Example Group", "subjectOwner": "553198296801@s.whatsapp.net", "subjectTime": 1714769954, "pictureUrl": null, "size": 1, "creation": 1714769954, "owner": "553198296801@s.whatsapp.net", "desc": "optional", "descId": "BAE57E16498982ED", "restrict": false, "announce": false, "participants": [ { "id": "553198296801@s.whatsapp.net", "admin": "superadmin" } ] } } } } } } } }, "/group/fetchAllGroups/{instance}": { "get": { "operationId": "fetchAllGroups", "summary": "Fetch All Groups", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "getParticipants", "in": "query", "required": true, "description": "Whether to get the group members or not", "schema": { "type": "boolean" } } ], "description": "Fetch all groups", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the group." }, "subject": { "type": "string", "description": "The subject (name) of the group." }, "subjectOwner": { "type": "string", "description": "The ID of the user who set the subject." }, "subjectTime": { "type": "integer", "description": "The timestamp when the subject was set." }, "pictureUrl": { "type": "string", "description": "URL of the group's profile picture." }, "size": { "type": "integer", "description": "The number of participants in the group." }, "creation": { "type": "integer", "description": "The timestamp when the group was created." }, "owner": { "type": "string", "description": "The ID of the group owner." }, "desc": { "type": "string", "description": "The description of the group." }, "descId": { "type": "string", "description": "The ID of the description message." }, "restrict": { "type": "boolean", "description": "Indicates if the group is restricted (only admins can send messages)." }, "announce": { "type": "boolean", "description": "Indicates if the group is an announcement group (only admins can send messages)." } }, "required": [ "id", "subject", "subjectOwner", "subjectTime", "size", "creation", "owner", "restrict", "announce" ] }, "description": "Array of objects representing WhatsApp group details.", "example": [ { "id": "120363295648424210@g.us", "subject": "Example Group", "subjectOwner": "553198296801@s.whatsapp.net", "subjectTime": 1714769954, "pictureUrl": null, "size": 1, "creation": 1714769954, "owner": "553198296801@s.whatsapp.net", "desc": "optional", "descId": "BAE57E16498982ED", "restrict": false, "announce": false } ] } } } } } } }, "/group/participants/{instance}": { "get": { "operationId": "fetchAllGroupMembers", "summary": "Fetch All Group Members", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Fetch all group members", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "participants": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the participant." }, "admin": { "type": "string", "description": "The role of the participant (e.g., 'admin', 'superadmin')." } }, "required": [ "id" ] }, "description": "List of participants in the group." } }, "example": { "participants": [ { "id": "553198296801@s.whatsapp.net", "admin": "superadmin" } ] } } } } } } } }, "/group/updateParticipant/{instance}": { "post": { "operationId": "updateParticipant", "summary": "Update Group Members", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Update group members", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "enum": [ "add", "remove", "promote", "demote" ] }, "participants": { "type": "array", "description": "Group members phone numbers with country code", "items": { "type": "string" } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/updateSetting/{instance}": { "post": { "operationId": "updateSetting", "summary": "Update Group Settings", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Update group settings", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "action": { "type": "string", "description": "Group setting (`announcement` = only admins can send messages; `not_announcement` = everyone can send messages; `locked` = only admins can edit group settings; `unlocked` = everyone can edit group settings", "enum": [ "announcement", "not_announcement", "locked", "unlocked" ] } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/toggleEphemeral/{instance}": { "post": { "operationId": "toggleEphemeral", "summary": "Toggle Ephemeral Group Messages", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Toggle temporary messages on group", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "expiration" ], "properties": { "expiration": { "type": "integer", "description": "Time to expire message (in seconds)" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/group/leaveGroup/{instance}": { "delete": { "operationId": "leaveGroup", "summary": "Leave Group", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "groupJid", "in": "query", "required": true, "description": "Group remote JID", "schema": { "type": "string" } } ], "description": "Leave group", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/create/{instance}": { "post": { "operationId": "setTypebot", "summary": "Create Typebot", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "enabled", "url", "typebot", "triggerType", "triggerOperator", "triggerValue", "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime" ], "properties": { "enabled": { "type": "boolean" }, "url": { "type": "string", "description": "Typebot URL" }, "typebot": { "type": "string", "description": "Typebot name" }, "triggerType": { "type": "string", "description": "All or keyword" }, "triggerOperator": { "type": "string", "description": "Operator logic, ex: contains, equals, startsWith, endsWith, regex" }, "triggerValue": { "type": "string", "description": "All or keyword" }, "expire": { "type": "number", "description": "Time to expire session" }, "keywordFinish": { "type": "string", "description": "Keyword to finish session" }, "delayMessage": { "type": "number", "description": "Delay when the bot send message" }, "unknownMessage": { "type": "string", "description": "Unrecognized message" }, "listeningFromMe": { "type": "boolean", "description": "Marked as viewed" }, "stopBotFromMe": { "type": "boolean", "description": "Stop bot when I send message" }, "keepOpen": { "type": "boolean", "description": "Keep session open" }, "debounceTime": { "type": "number", "description": "Start typebot for your own messages" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/start/{instance}": { "post": { "operationId": "startTypebot", "summary": "Start Typebot", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Start typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "Typebot URL" }, "typebot": { "type": "string", "description": "Typebot name" }, "remoteJid": { "type": "string", "description": "Receiver remote JID" }, "startSession": { "type": "boolean", "description": "Start a new session" }, "variables": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "description": "Variable name" }, "value": { "type": "string", "description": "Variable value" } } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/changeStatus/{instance}": { "post": { "operationId": "startTypebot", "summary": "Change Session Status", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Change status session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "{{remoteJid}}" }, "status": { "type": "string", "description": "Typebot status, types: opened, paused, closed" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/settings/{instance}": { "post": { "operationId": "startTypebot", "summary": "Change Session Status", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set settings typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "ignoreJids", "typebotIdFallback" ], "properties": { "expire": { "type": "string", "description": "Time to expire session bot" }, "keywordFinish": { "type": "string", "description": "Keyword to finished session" }, "delayMessage": { "type": "string", "description": "Delay when the bot send message" }, "unknownMessage": { "type": "string", "description": "Unrecognized message" }, "listeningFromMe": { "type": "string", "description": "" }, "stopBotFromMe": { "type": "string", "description": "Stop bot when I send message" }, "keepOpen": { "type": "string", "description": "Keep session open" }, "debounceTime": { "type": "string", "description": "Time " }, "ignoreJids": { "type": "string", "description": "Jids ignore from bot" }, "typebotIdFallback": { "type": "string", "description": "Id fallback" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/fetchSettings/{instance}": { "get": { "operationId": "findTypebot", "summary": "Find Typebot", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find typebot settings", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/find/{instance}": { "get": { "operationId": "findTypebot", "summary": "Find Typebot", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find typebot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/fetch/:typebotId/{instance}": { "get": { "operationId": "findTypebot", "summary": "Find Typebot", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "typebotId", "in": "path", "required": true, "description": "ID of the typebot", "schema": { "type": "string" } } ], "description": "Find typebot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/fetchSessions/:typebotId/{instance}": { "get": { "operationId": "findTypebot", "summary": "Find session typebot", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "typebotId", "in": "path", "required": true, "description": "ID of the typebot", "schema": { "type": "string" } } ], "description": "Find session typebot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/update/:typebotId/{instance}": { "post": { "operationId": "changeTypebotStatus", "summary": "Change Typebot Status", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "typebotId", "in": "path", "required": true, "description": "ID of the typebot", "schema": { "type": "string" } } ], "description": "Start typebot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "enabled", "url", "typebot", "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "triggerType", "triggerOperator", "triggerValue" ], "properties": { "enabled": { "type": "boolean", "description": "Enable typebot" }, "url": { "type": "string", "description": "Url of typebot" }, "typebot": { "type": "string", "description": "Nmae typebot" }, "expire": { "type": "number", "description": "Time to expire session" }, "keywordFinish": { "type": "string", "description": "Keyword to finished session" }, "delayMessage": { "type": "number", "description": "Delay when the bot send message" }, "unknownMessage": { "type": "string", "description": "Unrecognized message" }, "listeningFromMe": { "type": "boolean", "description": "Listening message for me" }, "stopBotFromMe": { "type": "boolean", "description": "Stop bot when I send message" }, "keepOpen": { "type": "boolean", "description": "Keep session open" }, "debounceTime": { "type": "number", "description": "The timestamp of the message." }, "triggerType": { "type": "string", "description": "All or keyword" }, "triggerOperator": { "type": "string", "description": "Operator logic, ex: contains, equals, startsWith, endsWith, regex" }, "triggerValue": { "type": "string", "description": "Ex: evolution" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/typebot/delete/:typebotId/{instance}": { "delete": { "operationId": "changeTypebotStatus", "summary": "Delete Status", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "typebotId", "in": "path", "required": true, "description": "ID of the typebot", "schema": { "type": "string" } } ], "description": "Delete typebot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chatwoot/set/{instance}": { "post": { "operationId": "setChatwoot", "summary": "Set Chatwoot", "tags": [ "Chatwoot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set Chatwoot", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "enabled", "accountId", "token", "url", "signMsg", "reopenConversation", "conversationPending", "nameInbox", "mergeBrazilContacts", "importContacts", "importMessages", "daysLimitImportMessages", "signDelimiter", "autoCreate", "organization", "logo", "ignoreJids" ], "properties": { "enabled": { "type": "boolean", "description": "Enable chatwoot" }, "accountId": { "type": "string", "description": "Chatwoot account ID" }, "token": { "type": "string", "description": "Chatwoot token" }, "url": { "type": "string", "description": "Chatwoot server URL" }, "signMsg": { "type": "boolean", "description": "Sign message with user name" }, "reopenConversation": { "type": "boolean", "description": "" }, "conversationPending": { "type": "boolean" }, "nameInbox": { "type": "string", "description": "Name inbox chatwoot" }, "mergeBrazilContacts": { "type": "boolean" }, "importContacts": { "type": "boolean", "description": "Import Chatwoot contacts" }, "importMessages": { "type": "boolean", "description": "Import chatwoot messages" }, "daysLimitImportMessages": { "type": "integer" }, "signDelimiter": { "type": "string", "description": "Break line" }, "autoCreate": { "type": "boolean" }, "organization": { "type": "string", "description": "Name organization" }, "logo": { "type": "string", "description": "Url logo" }, "ignoreJids": { "type": "array", "items": { "type": "string", "description": "Jids ignore" } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/chatwoot/find/{instance}": { "get": { "operationId": "findChatwoot", "summary": "Find Chatwoot", "tags": [ "Chatwoot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find Chatwoot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/sqs/set/{instance}": { "post": { "operationId": "setSQS", "summary": "Set SQS", "tags": [ "SQS Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set SQS", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "sqs" ], "properties": { "sqs": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "LABELS_EDIT", "LABELS_ASSOCIATION", "CALL", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the Webhook" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/sqs/find/{instance}": { "get": { "operationId": "findSQS", "summary": "Find SQS", "tags": [ "SQS Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find SQS", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/rabbitmq/set/{instance}": { "post": { "operationId": "setRabbitMQ", "summary": "Set RabbitMQ", "tags": [ "RabbitMQ Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set RabbitMQ", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "rabbitmq" ], "properties": { "rabbitmq": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "LABELS_EDIT", "LABELS_ASSOCIATION", "CALL", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the Webhook" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/rabbitmq/find/{instance}": { "get": { "operationId": "findRabbitMQ", "summary": "Find RabbitMQ", "tags": [ "RabbitMQ Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find RabbitMQ", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/websocket/set/{instance}": { "post": { "operationId": "setWebsocket", "summary": "Set Websocket", "tags": [ "Websocket Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Set Websocket", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "websocket" ], "properties": { "websocket": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "events": { "type": "array", "items": { "type": "string", "enum": [ "APPLICATION_STARTUP", "QRCODE_UPDATED", "MESSAGES_SET", "MESSAGES_UPSERT", "MESSAGES_UPDATE", "MESSAGES_DELETE", "SEND_MESSAGE", "CONTACTS_SET", "CONTACTS_UPSERT", "CONTACTS_UPDATE", "PRESENCE_UPDATE", "CHATS_SET", "CHATS_UPSERT", "CHATS_UPDATE", "CHATS_DELETE", "GROUPS_UPSERT", "GROUP_UPDATE", "GROUP_PARTICIPANTS_UPDATE", "CONNECTION_UPDATE", "LABELS_EDIT", "LABELS_ASSOCIATION", "CALL", "TYPEBOT_START", "TYPEBOT_CHANGE_STATUS" ] }, "description": "Events to be sent to the websocket" } } } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/websocket/find/{instance}": { "get": { "operationId": "findWebsocket", "summary": "Find Websocket", "tags": [ "Websocket Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find Websocket", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/create/{instance}": { "post": { "operationId": "createBotOpenAI", "summary": "Create OpenAI", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Create an OpenAI bot with detailed configuration", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "enabled", "openaiCredsId", "botType", "assistantId", "functionUrl", "model", "systemMessages", "assistantMessages", "userMessages", "maxTokens", "triggerType", "triggerOperator", "triggerValue", "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "ignoreJids" ], "properties": { "enabled": { "type": "boolean", "description": "Indicates whether the bot is enabled" }, "openaiCredsId": { "type": "string", "description": "ID of the OpenAI credentials" }, "botType": { "type": "string", "description": "Type of the bot (e.g., 'assistant')" }, "assistantId": { "type": "string", "description": "Unique identifier for the assistant" }, "functionUrl": { "type": "string", "description": "URL for additional bot functionality" }, "model": { "type": "string", "description": "Model to be used (e.g., 'gpt-4o')" }, "systemMessages": { "type": "array", "items": { "type": "string" }, "description": "Messages to define system behavior" }, "assistantMessages": { "type": "array", "items": { "type": "string" }, "description": "Predefined assistant messages" }, "userMessages": { "type": "array", "items": { "type": "string" }, "description": "Predefined user messages" }, "maxTokens": { "type": "integer", "description": "Maximum number of tokens per interaction" }, "triggerType": { "type": "string", "description": "Type of trigger for the bot" }, "triggerOperator": { "type": "string", "description": "Operator for trigger evaluation" }, "triggerValue": { "type": "string", "description": "Value to trigger the bot" }, "expire": { "type": "integer", "description": "Expiration time in seconds" }, "keywordFinish": { "type": "string", "description": "Keyword to terminate the bot interaction" }, "delayMessage": { "type": "integer", "description": "Delay before the bot responds, in milliseconds" }, "unknownMessage": { "type": "string", "description": "Message to display for unrecognized input" }, "listeningFromMe": { "type": "boolean", "description": "Indicates if the bot listens to messages from the user" }, "stopBotFromMe": { "type": "boolean", "description": "Indicates if the bot can be stopped by the user" }, "keepOpen": { "type": "boolean", "description": "Indicates if the bot session remains open" }, "debounceTime": { "type": "integer", "description": "Debounce time for message processing" }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "List of JIDs to ignore" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/find/{instance}": { "get": { "operationId": "findBotOpenAI", "summary": "Find OpenAI Bots", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Get OpenAI bot with detailed configuration", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/find/:openaiBotId/{instance}": { "get": { "operationId": "findBotOpenAI", "summary": "Find OpenAI Bot", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "openaiBotId", "in": "path", "required": true, "description": "ID of the bot", "schema": { "type": "string" } } ], "description": "Get OpenAI bot with detailed configuration", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/delete/:openaiBotId/{instance}": { "delete": { "operationId": "deleteBotOpenAI", "summary": "Delete OpenAI Bot", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "openaiBotId", "in": "path", "required": true, "description": "ID of the bot", "schema": { "type": "string" } } ], "description": "Delete bot OpenAi", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/update/:openaiBotId/{instance}": { "put": { "operationId": "updateBotOpenAI", "summary": "Update OpenAI Bot", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "openaiBotId", "in": "path", "required": true, "description": "ID of the bot", "schema": { "type": "string" } } ], "description": "Update OpenAI bot with detailed configuration", "requestBody": { "description": "Configuration for the OpenAI bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Indicates if the bot is enabled" }, "openaiCredsId": { "type": "string", "description": "The OpenAI credentials ID" }, "botType": { "type": "string", "enum": [ "assistant", "chatCompletion" ], "description": "The type of bot (either 'assistant' or 'chatCompletion')" }, "assistantId": { "type": "string", "description": "The ID of the assistant (only if 'botType' is 'assistant')" }, "functionUrl": { "type": "string", "description": "The function URL that the bot will call" }, "model": { "type": "string", "description": "The OpenAI model to use for chat completion (e.g., 'gpt-4o')" }, "systemMessages": { "type": "array", "items": { "type": "string" }, "description": "The system messages to define the assistant behavior" }, "assistantMessages": { "type": "array", "items": { "type": "string" }, "description": "Messages to be sent by the assistant" }, "userMessages": { "type": "array", "items": { "type": "string" }, "description": "Messages sent by the user" }, "maxTokens": { "type": "integer", "description": "Maximum number of tokens for the bot's responses" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ], "description": "The trigger type for the bot (e.g., 'keyword' or 'all')" }, "triggerOperator": { "type": "string", "enum": [ "equals", "contains", "startsWith", "endsWith", "regex", "none" ], "description": "The operator to match the trigger type" }, "triggerValue": { "type": "string", "description": "The value that triggers the bot (e.g., 'teste')" }, "expire": { "type": "integer", "description": "The expiration time of the bot instance in minutes" }, "keywordFinish": { "type": "string", "description": "Keyword to end the bot interaction" }, "delayMessage": { "type": "integer", "description": "Time in milliseconds to delay the message" }, "unknownMessage": { "type": "string", "description": "Message to send if the bot doesn't recognize the input" }, "listeningFromMe": { "type": "boolean", "description": "Indicates if the bot should listen for messages from the user" }, "stopBotFromMe": { "type": "boolean", "description": "Indicates if the bot can be stopped by the user" }, "keepOpen": { "type": "boolean", "description": "Indicates if the bot session should remain open" }, "debounceTime": { "type": "integer", "description": "Time in milliseconds for the debounce delay" }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "List of JIDs to ignore" } }, "required": [ "enabled", "openaiCredsId", "botType", "model" ] } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/creds/{instance}": { "post": { "operationId": "credsBotOpenAI", "summary": "Creds OpenAI Bot", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Creds openia bot configuration", "requestBody": { "description": "Configuration for the OpenAI bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "apiKey": { "type": "string", "description": "" }, "name": { "type": "string", "description": "" } }, "required": [ "apiKey", "name" ] } } } }, "responses": { "200": { "description": "Ok", "content": {} } } }, "get": { "operationId": "getBotOpenAICreds", "summary": "Find OpenAI Creds", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Get OpenAI Creds", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/creds/:openaiCredsId/{instance}": { "delete": { "operationId": "deleteCredsOpenAI", "summary": "Delete OpenAI Creds", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "openaiCredsId", "in": "path", "required": true, "description": "ID of the creds", "schema": { "type": "string" } } ], "description": "Delete bot OpenAi", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/settings/{instance}": { "post": { "operationId": "setOpenAISettings", "summary": "Set OpenAI Bot Settings", "tags": [ "OpenAI Controller" ], "description": "Set settings for an OpenAI bot instance.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuration for updating the OpenAI bot settings", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "openaiCredsId": { "type": "string", "description": "The OpenAI credentials ID" }, "expire": { "type": "integer", "description": "Expiration time in seconds" }, "keywordFinish": { "type": "string", "description": "Keyword to finish the interaction" }, "delayMessage": { "type": "integer", "description": "Delay time for the message in milliseconds" }, "unknownMessage": { "type": "string", "description": "Message when the input is not recognized" }, "listeningFromMe": { "type": "boolean", "description": "Indicates if the bot is listening for commands from the user" }, "stopBotFromMe": { "type": "boolean", "description": "Indicates if the bot should stop upon user command" }, "keepOpen": { "type": "boolean", "description": "Indicates if the bot session should remain open" }, "debounceTime": { "type": "integer", "description": "Time in milliseconds to wait before processing the next input" }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "List of JIDs (Jabber IDs) to ignore" }, "openaiIdFallback": { "type": "string", "description": "Fallback OpenAI credentials ID if the main one fails" } }, "required": [ "openaiCredsId", "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "ignoreJids", "openaiIdFallback" ] } } } }, "responses": { "200": { "description": "Successfully updated OpenAI bot settings", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates if the update was successful" }, "message": { "type": "string", "description": "Details about the operation" } } } } } }, "400": { "description": "Bad Request - Invalid input parameters" }, "500": { "description": "Internal Server Error" } } } }, "/openai/fetchSettings/{instance}": { "get": { "operationId": "findSettingsOpenAI", "summary": "Find OpenAI Settings", "tags": [ "OpenIA Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find settings OpenAi", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/openai/changeStatus/{instance}": { "post": { "operationId": "changeOpenAIStatus", "summary": "Change OpenAI Bot Status", "tags": [ "OpenAI Controller" ], "description": "Changes the status of the OpenAI bot instance.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "requestBody": { "description": "Body for changing the status of the OpenAI bot", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "The JID (Jabber ID) of the remote contact" }, "status": { "type": "string", "enum": [ "opened", "paused", "closed" ], "description": "Status of the bot instance. Possible values: 'opened', 'paused', 'closed'" } }, "required": [ "remoteJid", "status" ] } } } }, "responses": { "200": { "description": "Successfully changed the bot status", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates if the status change was successful" }, "message": { "type": "string", "description": "Details about the status change operation" } } } } } }, "400": { "description": "Bad Request - Invalid input parameters" }, "500": { "description": "Internal Server Error" } } } }, "/openai/fetchSessions/:openaiBotId/{instance}": { "get": { "operationId": "fetchSessions", "summary": "Fetch sessions of the OpenAI bot instance", "tags": [ "OpenAI Controller" ], "description": "Fetches the sessions of the specified OpenAI bot instance.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "openaiBotId", "in": "path", "required": true, "description": "ID of the OpenAI bot", "schema": { "type": "string" } }, { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } }, "400": { "description": "Bad Request - Invalid parameters" }, "404": { "description": "Not Found - No sessions found for the given bot and instance" }, "500": { "description": "Internal Server Error" } } } }, "/dify/create/{instance}": { "post": { "operationId": "createDifyBot", "summary": "Create a new Dify bot instance", "tags": [ "Dify Controller" ], "description": "Creates a new Dify bot with the provided configuration", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuration for the Dify bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "botType": { "type": "string", "enum": [ "chatBot", "textGenerator", "agent", "workflow" ] }, "apiUrl": { "type": "string" }, "apiKey": { "type": "string" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ] }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ] }, "triggerValue": { "type": "string" }, "expire": { "type": "integer" }, "keywordFinish": { "type": "string" }, "delayMessage": { "type": "integer" }, "unknownMessage": { "type": "string" }, "listeningFromMe": { "type": "boolean" }, "stopBotFromMe": { "type": "boolean" }, "keepOpen": { "type": "boolean" }, "debounceTime": { "type": "integer" }, "ignoreJids": { "type": "array", "items": { "type": "string" } } }, "required": [ "enabled", "botType", "apiUrl", "apiKey" ] } } } }, "responses": { "200": { "description": "Bot instance created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Bot instance created successfully" } } } } } }, "400": { "description": "Bad Request - Invalid or missing parameters" }, "404": { "description": "Not Found - Instance could not be created" }, "500": { "description": "Internal Server Error" } } } }, "/dify/find/{instance}": { "get": { "operationId": "fetchDify", "summary": "Fetch Bot Dify", "tags": [ "OpenAI Controller" ], "description": "Fetches dify bots.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/dify/find/:difyId/{instance}": { "get": { "operationId": "findDify", "summary": "Find Bot Dify", "tags": [ "OpenAI Controller" ], "description": "Update dify bot.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "difyId", "in": "path", "required": true, "description": "ID of the dify bot", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/dify/update/:difyId/{instance}": { "put": { "operationId": "updateDifyBot", "summary": "Create a new Dify bot instance", "tags": [ "Dify Controller" ], "description": "Update bot Dify", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "difyId", "in": "path", "required": true, "description": "Id bot dify", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuration for the Dify bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "botType": { "type": "string", "enum": [ "chatBot", "textGenerator", "agent", "workflow" ] }, "apiUrl": { "type": "string" }, "apiKey": { "type": "string" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ] }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ] }, "triggerValue": { "type": "string" }, "expire": { "type": "integer" }, "keywordFinish": { "type": "string" }, "delayMessage": { "type": "integer" }, "unknownMessage": { "type": "string" }, "listeningFromMe": { "type": "boolean" }, "stopBotFromMe": { "type": "boolean" }, "keepOpen": { "type": "boolean" }, "debounceTime": { "type": "integer" }, "ignoreJids": { "type": "array", "items": { "type": "string" } } }, "required": [ "enabled", "botType", "apiUrl", "apiKey" ] } } } }, "responses": { "200": { "description": "Bot instance created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Bot instance created successfully" } } } } } } } } }, "/dify/settings/{instance}": { "post": { "operationId": "updateDifySettings", "summary": "Atualiza as configurações do bot Dify", "tags": [ "Dify Controller" ], "description": "Atualiza as configurações do bot Dify.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Configurações do bot Dify", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expire": { "type": "integer", "description": "Tempo de expiração em minutos.", "example": 20 }, "keywordFinish": { "type": "string", "description": "Palavra-chave que finalizará o bot.", "example": "#SAIR" }, "delayMessage": { "type": "integer", "description": "Tempo de delay antes do envio de uma nova mensagem (em milissegundos).", "example": 1000 }, "unknownMessage": { "type": "string", "description": "Mensagem que será enviada quando o bot não reconhecer o comando.", "example": "Mensagem não reconhecida" }, "listeningFromMe": { "type": "boolean", "description": "Define se o bot deve ouvir mensagens enviadas pelo próprio usuário.", "example": false }, "stopBotFromMe": { "type": "boolean", "description": "Define se o bot deve parar ao receber mensagens enviadas pelo próprio usuário.", "example": false }, "keepOpen": { "type": "boolean", "description": "Define se o bot deve manter a conversa aberta após uma resposta.", "example": false }, "debounceTime": { "type": "integer", "description": "Tempo de debounce (em milissegundos).", "example": 0 }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "Lista de JIDs a serem ignorados.", "example": [] }, "difyIdFallback": { "type": "string", "description": "ID de fallback do bot Dify.", "example": "clyja4oys0a3uqpy7k3bd7swe" } }, "required": [ "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "difyIdFallback", "ignoreJids" ] } } } }, "responses": { "200": { "description": "Configurações do bot Dify atualizadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Configurações do bot Dify atualizadas com sucesso" } } } } } } } } }, "/dify/fetchSettings/{instance}": { "get": { "operationId": "findDifySettings", "summary": "Find settings dify bot", "tags": [ "Dify Controller" ], "description": "Find settigns dify bot", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Configurações do bot Dify atualizadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Configurações do bot Dify atualizadas com sucesso" } } } } } } } } }, "/dify/changeStatus/{instance}": { "post": { "operationId": "changeDifyBotStatus", "summary": "Altera o status do bot Dify", "tags": [ "Dify Controller" ], "description": "Altera o status de um bot Dify. O status pode ser `opened`, `paused`, ou `closed`. O status `closed` encerra a interação do bot.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Dados para alterar o status do bot Dify", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Número de telefone remoto no formato E.164 (ex: 5511912345678@s.whatsapp.net)", "example": "5511912345678@s.whatsapp.net" }, "status": { "type": "string", "enum": [ "opened", "paused", "closed" ], "description": "Status a ser atribuído ao bot Dify. Os valores válidos são `opened`, `paused` e `closed`.", "example": "closed" } }, "required": [ "remoteJid", "status" ] } } } }, "responses": { "200": { "description": "Status do bot Dify alterado com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Status do bot Dify alterado para closed com sucesso" } } } } } } } } }, "/dify/fetchSessions/:difyId/{instance}": { "get": { "operationId": "fetchDifyBotSessions", "summary": "Recupera as sessões ativas do bot Dify", "tags": [ "Dify Controller" ], "description": "Recupera as sessões ativas de um bot Dify específico, com base no ID do bot (`difyId`) e na instância do bot (`instance`).", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "difyId", "in": "path", "required": true, "description": "ID único do bot Dify.", "schema": { "type": "string" } }, { "name": "instance", "in": "path", "required": true, "description": "Nome da instância.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Sessões recuperadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "string" } } } } } } } } }, "/n8n/create/{instance}": { "post": { "operationId": "createN8nBot", "summary": "Create a new n8n bot instance", "tags": [ "n8n Controller" ], "description": "Creates a new n8n bot with the provided configuration", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuration for the n8n bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "webhookUrl": { "type": "string" }, "basicAuthUser": { "type": "string" }, "basicAuthPassword": { "type": "string" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ] }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ] }, "triggerValue": { "type": "string" }, "expire": { "type": "integer" }, "keywordFinish": { "type": "string" }, "delayMessage": { "type": "integer" }, "unknownMessage": { "type": "string" }, "listeningFromMe": { "type": "boolean" }, "stopBotFromMe": { "type": "boolean" }, "keepOpen": { "type": "boolean" }, "debounceTime": { "type": "integer" }, "ignoreJids": { "type": "array", "items": { "type": "string" } } }, "required": [ "enabled", "webhookUrl" ] } } } }, "responses": { "200": { "description": "n8n bot instance created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "n8n bot instance created successfully" } } } } } }, "400": { "description": "Bad Request - Invalid or missing parameters" }, "404": { "description": "Not Found - Instance could not be created" }, "500": { "description": "Internal Server Error" } } } }, "/n8n/find/{instance}": { "get": { "operationId": "fetchN8n", "summary": "Fetch n8n Bot", "tags": [ "n8n Controller" ], "description": "Fetches n8n bots.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/n8n/find/:n8nId/{instance}": { "get": { "operationId": "findN8n", "summary": "Find n8n Bot", "tags": [ "n8n Controller" ], "description": "Update n8n bot.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "n8nId", "in": "path", "required": true, "description": "ID of the n8n bot", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/n8n/update/:n8nId/{instance}": { "put": { "operationId": "updateN8nBot", "summary": "Create a new n8n bot instance", "tags": [ "n8n Controller" ], "description": "Update bot n8n", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "n8nId", "in": "path", "required": true, "description": "Id bot n8n", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuration for the n8n bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "webhookUrl": { "type": "string" }, "basicAuthUser": { "type": "string" }, "basicAuthPassword": { "type": "string" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ] }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ] }, "triggerValue": { "type": "string" }, "expire": { "type": "integer" }, "keywordFinish": { "type": "string" }, "delayMessage": { "type": "integer" }, "unknownMessage": { "type": "string" }, "listeningFromMe": { "type": "boolean" }, "stopBotFromMe": { "type": "boolean" }, "keepOpen": { "type": "boolean" }, "debounceTime": { "type": "integer" }, "ignoreJids": { "type": "array", "items": { "type": "string" } } }, "required": [ "enabled", "webhookUrl" ] } } } }, "responses": { "200": { "description": "n8n bot instance created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "n8n bot instance created successfully" } } } } } } } } }, "/n8n/settings/{instance}": { "post": { "operationId": "updateN8nSettings", "summary": "Atualiza as configurações do bot n8n", "tags": [ "n8n Controller" ], "description": "Atualiza as configurações do bot n8n.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Configurações do bot n8n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expire": { "type": "integer", "description": "Tempo de expiração em minutos.", "example": 20 }, "keywordFinish": { "type": "string", "description": "Palavra-chave que finalizará o bot.", "example": "#SAIR" }, "delayMessage": { "type": "integer", "description": "Tempo de delay antes do envio de uma nova mensagem (em milissegundos).", "example": 1000 }, "unknownMessage": { "type": "string", "description": "Mensagem que será enviada quando o bot não reconhecer o comando.", "example": "Mensagem não reconhecida" }, "listeningFromMe": { "type": "boolean", "description": "Define se o bot deve ouvir mensagens enviadas pelo próprio usuário.", "example": false }, "stopBotFromMe": { "type": "boolean", "description": "Define se o bot deve parar ao receber mensagens enviadas pelo próprio usuário.", "example": false }, "keepOpen": { "type": "boolean", "description": "Define se o bot deve manter a conversa aberta após uma resposta.", "example": false }, "debounceTime": { "type": "integer", "description": "Tempo de debounce (em milissegundos).", "example": 0 }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "Lista de JIDs a serem ignorados.", "example": [] }, "n8nIdFallback": { "type": "string", "description": "ID de fallback do bot n8n.", "example": "clyja4oys0a3uqpy7k3bd7swe" } }, "required": [ "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "n8nIdFallback", "ignoreJids" ] } } } }, "responses": { "200": { "description": "Configurações do bot n8n atualizadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Configurações do bot n8n atualizadas com sucesso" } } } } } } } } }, "/n8n/fetchSettings/{instance}": { "get": { "operationId": "findN8nSettings", "summary": "Find settings n8n bot", "tags": [ "n8n Controller" ], "description": "Find settigns n8n bot", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Configurações do bot n8n atualizadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Configurações do bot n8n atualizadas com sucesso" } } } } } } } } }, "/n8n/changeStatus/{instance}": { "post": { "operationId": "changeN8nBotStatus", "summary": "Altera o status do bot n8n", "tags": [ "n8n Controller" ], "description": "Altera o status de um bot n8n. O status pode ser `opened`, `paused`, ou `closed`. O status `closed` encerra a interação do bot.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Dados para alterar o status do bot n8n", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Número de telefone remoto no formato E.164 (ex: 5511912345678@s.whatsapp.net)", "example": "5511912345678@s.whatsapp.net" }, "status": { "type": "string", "enum": [ "opened", "paused", "closed" ], "description": "Status a ser atribuído ao bot n8n. Os valores válidos são `opened`, `paused` e `closed`.", "example": "closed" } }, "required": [ "remoteJid", "status" ] } } } }, "responses": { "200": { "description": "Status do bot n8n alterado com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Status do bot n8n alterado para closed com sucesso" } } } } } } } } }, "/n8n/fetchSessions/:n8nId/{instance}": { "get": { "operationId": "fetchN8nBotSessions", "summary": "Recupera as sessões ativas do bot n8n", "tags": [ "n8n Controller" ], "description": "Recupera as sessões ativas de um bot n8n específico, com base no ID do bot (`n8nId`) e na instância do bot (`instance`).", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "n8nId", "in": "path", "required": true, "description": "ID único do bot n8n.", "schema": { "type": "string" } }, { "name": "instance", "in": "path", "required": true, "description": "Nome da instância.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Sessões recuperadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "string" } } } } } } } } }, "/evoai/create/{instance}": { "post": { "operationId": "createEvoAIBot", "summary": "Create a new evoai bot instance", "tags": [ "EvoAI Controller" ], "description": "Creates a new EvoAI bot with the provided configuration", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuration for the EvoAI bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "agentUrl": { "type": "string" }, "apiKey": { "type": "string" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ] }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ] }, "triggerValue": { "type": "string" }, "expire": { "type": "integer" }, "keywordFinish": { "type": "string" }, "delayMessage": { "type": "integer" }, "unknownMessage": { "type": "string" }, "listeningFromMe": { "type": "boolean" }, "stopBotFromMe": { "type": "boolean" }, "keepOpen": { "type": "boolean" }, "debounceTime": { "type": "integer" }, "ignoreJids": { "type": "array", "items": { "type": "string" } } }, "required": [ "enabled", "agentUrl" ] } } } }, "responses": { "200": { "description": "EvoAI bot instance created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "EvoAI bot instance created successfully" } } } } } }, "400": { "description": "Bad Request - Invalid or missing parameters" }, "404": { "description": "Not Found - Instance could not be created" }, "500": { "description": "Internal Server Error" } } } }, "/evoai/find/{instance}": { "get": { "operationId": "fetchEvoAIBot", "summary": "Fetch EvoAI Bot", "tags": [ "EvoAI Controller" ], "description": "Fetches EvoAI bots.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/evoai/find/:evoaiId/{instance}": { "get": { "operationId": "findEvoAIBot", "summary": "Find EvoAI Bot", "tags": [ "EvoAI Controller" ], "description": "Update EvoAI bot.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "evoaiId", "in": "path", "required": true, "description": "ID of the EvoAI bot", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/evoai/update/:evoaiId/{instance}": { "put": { "operationId": "updateEvoAIBot", "summary": "Create a new EvoAI bot instance", "tags": [ "EvoAI Controller" ], "description": "Update bot EvoAI", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "evoaiId", "in": "path", "required": true, "description": "Id bot EvoAI", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuration for the EvoAI bot instance", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "agentUrl": { "type": "string" }, "apiKey": { "type": "string" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ] }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ] }, "triggerValue": { "type": "string" }, "expire": { "type": "integer" }, "keywordFinish": { "type": "string" }, "delayMessage": { "type": "integer" }, "unknownMessage": { "type": "string" }, "listeningFromMe": { "type": "boolean" }, "stopBotFromMe": { "type": "boolean" }, "keepOpen": { "type": "boolean" }, "debounceTime": { "type": "integer" }, "ignoreJids": { "type": "array", "items": { "type": "string" } } }, "required": [ "enabled", "agentUrl" ] } } } }, "responses": { "200": { "description": "EvoAI bot instance created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "EvoAI bot instance created successfully" } } } } } } } } }, "/evoai/settings/{instance}": { "post": { "operationId": "updateEvoAISettings", "summary": "Atualiza as configurações do bot EvoAI", "tags": [ "EvoAI Controller" ], "description": "Atualiza as configurações do bot EvoAI.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Configurações do bot EvoAI", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expire": { "type": "integer", "description": "Tempo de expiração em minutos.", "example": 20 }, "keywordFinish": { "type": "string", "description": "Palavra-chave que finalizará o bot.", "example": "#SAIR" }, "delayMessage": { "type": "integer", "description": "Tempo de delay antes do envio de uma nova mensagem (em milissegundos).", "example": 1000 }, "unknownMessage": { "type": "string", "description": "Mensagem que será enviada quando o bot não reconhecer o comando.", "example": "Mensagem não reconhecida" }, "listeningFromMe": { "type": "boolean", "description": "Define se o bot deve ouvir mensagens enviadas pelo próprio usuário.", "example": false }, "stopBotFromMe": { "type": "boolean", "description": "Define se o bot deve parar ao receber mensagens enviadas pelo próprio usuário.", "example": false }, "keepOpen": { "type": "boolean", "description": "Define se o bot deve manter a conversa aberta após uma resposta.", "example": false }, "debounceTime": { "type": "integer", "description": "Tempo de debounce (em milissegundos).", "example": 0 }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "Lista de JIDs a serem ignorados.", "example": [] }, "evoaiIdFallback": { "type": "string", "description": "ID de fallback do bot EvoAI.", "example": "clyja4oys0a3uqpy7k3bd7swe" } }, "required": [ "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "evoaiIdFallback", "ignoreJids" ] } } } }, "responses": { "200": { "description": "Configurações do bot EvoAI atualizadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Configurações do bot EvoAI atualizadas com sucesso" } } } } } } } } }, "/evoai/fetchSettings/{instance}": { "get": { "operationId": "findEvoAISettings", "summary": "Find settings EvoAI bot", "tags": [ "EvoAI Controller" ], "description": "Find settigns EvoAI bot", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Configurações do bot EvoAI atualizadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Configurações do bot EvoAI atualizadas com sucesso" } } } } } } } } }, "/evoai/changeStatus/{instance}": { "post": { "operationId": "changeEvoAIBotStatus", "summary": "Altera o status do bot EvoAI", "tags": [ "EvoAI Controller" ], "description": "Altera o status de um bot EvoAI. O status pode ser `opened`, `paused`, ou `closed`. O status `closed` encerra a interação do bot.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Dados para alterar o status do bot EvoAI", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Número de telefone remoto no formato E.164 (ex: 5511912345678@s.whatsapp.net)", "example": "5511912345678@s.whatsapp.net" }, "status": { "type": "string", "enum": [ "opened", "paused", "closed" ], "description": "Status a ser atribuído ao bot EvoAI. Os valores válidos são `opened`, `paused` e `closed`.", "example": "closed" } }, "required": [ "remoteJid", "status" ] } } } }, "responses": { "200": { "description": "Status do bot EvoAI alterado com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Status do bot EvoAI alterado para closed com sucesso" } } } } } } } } }, "/evoai/fetchSessions/:evoaiId/{instance}": { "get": { "operationId": "fetchEvoAIBotSessions", "summary": "Recupera as sessões ativas do bot EvoAI", "tags": [ "EvoAI Controller" ], "description": "Recupera as sessões ativas de um bot EvoAI específico, com base no ID do bot (`evoaiId`) e na instância do bot (`instance`).", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "evoaiId", "in": "path", "required": true, "description": "ID único do bot EvoAI.", "schema": { "type": "string" } }, { "name": "instance", "in": "path", "required": true, "description": "Nome da instância.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Sessões recuperadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "string" } } } } } } } } }, "/flowise/create/{instance}": { "post": { "operationId": "createFlowiseInstance", "summary": "Cria uma nova instância do Flowise", "tags": [ "Flowise Controller" ], "description": "Create Bot Flowise", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuração para a instância do Flowise", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Indica se a instância está habilitada ou não.", "example": true }, "apiUrl": { "type": "string", "description": "URL da API do Flowise.", "example": "http://dify.site.com/v1" }, "apiKey": { "type": "string", "description": "Chave de API (opcional).", "example": "app-123456" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ], "description": "Tipo de gatilho para o bot.", "example": "keyword" }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ], "description": "Operador para o gatilho.", "example": "equals" }, "triggerValue": { "type": "string", "description": "Valor do gatilho.", "example": "teste" }, "expire": { "type": "integer", "description": "Tempo de expiração do bot em minutos.", "example": 0 }, "keywordFinish": { "type": "string", "description": "Palavra-chave para encerrar a interação.", "example": "#SAIR" }, "delayMessage": { "type": "integer", "description": "Tempo de atraso para a mensagem, em milissegundos.", "example": 1000 }, "unknownMessage": { "type": "string", "description": "Mensagem padrão quando a entrada não for reconhecida.", "example": "Mensagem não reconhecida" }, "listeningFromMe": { "type": "boolean", "description": "Indica se o bot deve ouvir apenas mensagens enviadas por você.", "example": false }, "stopBotFromMe": { "type": "boolean", "description": "Indica se o bot deve ser parado quando você enviar uma mensagem.", "example": false }, "keepOpen": { "type": "boolean", "description": "Indica se a instância do bot deve permanecer aberta.", "example": false }, "debounceTime": { "type": "integer", "description": "Tempo de debounce para a entrada, em milissegundos.", "example": 0 }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "Lista de JIDs (identificadores de usuário) que o bot deve ignorar.", "example": [ "1234567890@s.whatsapp.net" ] } }, "required": [ "enabled", "apiUrl", "triggerType", "triggerOperator", "triggerValue" ] } } } }, "responses": { "200": { "description": "Instância do Flowise criada com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Instância do Flowise criada com sucesso" } } } } } }, "400": { "description": "Erro na requisição, parâmetros inválidos", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Parâmetros inválidos fornecidos" } } } } } }, "404": { "description": "Instância não encontrada", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Instância não encontrada" } } } } } } } } }, "/flowise/find/{instance}": { "get": { "operationId": "fetchFlowiseBotSessions", "summary": "Recupera as sessões ativas do bot Flowise", "tags": [ "Dify Controller" ], "description": "Fetch bots flowise", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Sessões recuperadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "string" } } } } } } } } }, "/flowise/find/:flowiseId/{instance}": { "get": { "operationId": "fetchFlowiseBotSessions", "summary": "Recupera as sessões ativas do bot Flowise", "tags": [ "Dify Controller" ], "description": "Fetch bots flowise", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância.", "schema": { "type": "string" } }, { "name": "flowiseId", "in": "path", "required": true, "description": "Id Bot Flowise", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Sessões recuperadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "string" } } } } } } } } }, "/flowise/update/:flowiseId/{instance}": { "post": { "operationId": "updateFlowiseInstance", "summary": "Atualiza uma instância do Flowise", "tags": [ "Flowise Controller" ], "description": "Update flowise bot", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "flowiseId", "in": "path", "required": true, "description": "ID da instância do Flowise", "schema": { "type": "string" } }, { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuração para atualizar a instância do Flowise", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Indica se a instância está habilitada ou não.", "example": true }, "apiUrl": { "type": "string", "description": "URL da API do Flowise.", "example": "http://dify.site.com/v1" }, "apiKey": { "type": "string", "description": "Chave de API (opcional).", "example": "app-123456" }, "triggerType": { "type": "string", "enum": [ "all", "keyword" ], "description": "Tipo de gatilho para o bot.", "example": "keyword" }, "triggerOperator": { "type": "string", "enum": [ "contains", "equals", "startsWith", "endsWith", "regex", "none" ], "description": "Operador para o gatilho.", "example": "equals" }, "triggerValue": { "type": "string", "description": "Valor do gatilho.", "example": "teste" }, "expire": { "type": "integer", "description": "Tempo de expiração do bot em minutos.", "example": 0 }, "keywordFinish": { "type": "string", "description": "Palavra-chave para encerrar a interação.", "example": "#SAIR" }, "delayMessage": { "type": "integer", "description": "Tempo de atraso para a mensagem, em milissegundos.", "example": 1000 }, "unknownMessage": { "type": "string", "description": "Mensagem padrão quando a entrada não for reconhecida.", "example": "Mensagem não reconhecida" }, "listeningFromMe": { "type": "boolean", "description": "Indica se o bot deve ouvir apenas mensagens enviadas por você.", "example": false }, "stopBotFromMe": { "type": "boolean", "description": "Indica se o bot deve ser parado quando você enviar uma mensagem.", "example": false }, "keepOpen": { "type": "boolean", "description": "Indica se a instância do bot deve permanecer aberta.", "example": false }, "debounceTime": { "type": "integer", "description": "Tempo de debounce para a entrada, em milissegundos.", "example": 0 }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "Lista de JIDs (identificadores de usuário) que o bot deve ignorar.", "example": [ "1234567890@s.whatsapp.net" ] } }, "required": [ "enabled", "apiUrl", "triggerType", "triggerOperator", "triggerValue" ] } } } }, "responses": { "200": { "description": "Instância do Flowise atualizada com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Instância do Flowise atualizada com sucesso" } } } } } }, "400": { "description": "Erro na requisição, parâmetros inválidos", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Parâmetros inválidos fornecidos" } } } } } }, "404": { "description": "Instância não encontrada", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Instância não encontrada" } } } } } } } } }, "/flowise/delete/:flowiseId/{instance}": { "delete": { "operationId": "deleteBot", "summary": "Delete Bot Flowise", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "flowiseId", "in": "query", "required": true, "description": "Id Bot Flowise", "schema": { "type": "string" } } ], "description": "Delete Bot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/flowise/settings/{instance}": { "post": { "operationId": "setlowiseSettings", "summary": "Set as configurações do Flowise", "tags": [ "Flowise Controller" ], "description": "Set Settings Flowise bot", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Configuração para atualizar as preferências da instância do Flowise", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "expire": { "type": "integer", "description": "Tempo de expiração do bot, em minutos.", "example": 20 }, "keywordFinish": { "type": "string", "description": "Palavra-chave que encerra a interação com o bot.", "example": "#SAIR" }, "delayMessage": { "type": "integer", "description": "Tempo de atraso para a mensagem, em milissegundos.", "example": 1000 }, "unknownMessage": { "type": "string", "description": "Mensagem enviada quando o bot não reconhece a entrada.", "example": "Mensagem não reconhecida" }, "listeningFromMe": { "type": "boolean", "description": "Indica se o bot deve ouvir apenas as mensagens enviadas pelo usuário.", "example": false }, "stopBotFromMe": { "type": "boolean", "description": "Indica se o bot deve ser interrompido quando o usuário envia uma mensagem.", "example": false }, "keepOpen": { "type": "boolean", "description": "Indica se o bot deve permanecer aberto após a interação.", "example": false }, "debounceTime": { "type": "integer", "description": "Tempo de debounce em milissegundos para a entrada do usuário.", "example": 0 }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "Lista de JIDs que devem ser ignorados pelo bot.", "example": [] }, "flowiseIdFallback": { "type": "string", "description": "ID do Flowise a ser utilizado como fallback caso a instância atual não esteja disponível.", "example": "clyja4oys0a3uqpy7k3bd7swe" } }, "required": [ "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "ignoreJids", "flowiseIdFallback" ] } } } }, "responses": { "200": { "description": "Configurações da instância do Flowise atualizadas com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Configurações da instância do Flowise atualizadas com sucesso" } } } } } } } } }, "/flowise/fetchSessions/:flowiseId/{instance}": { "get": { "operationId": "fetchFlowiseSessions", "summary": "Recupera as sessões ativas do bot Flowise", "tags": [ "Dify Controller" ], "description": "Fetch session flowise", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância.", "schema": { "type": "string" } }, { "name": "flowiseId", "in": "path", "required": true, "description": "Id Bot Flowise", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Sessões recuperadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "string" } } } } } } } } }, "/flowise/fetchSettings/{instance}": { "get": { "operationId": "fetchFlowiseSettings", "summary": "Recupera os configurações do bot flowise", "tags": [ "Dify Controller" ], "description": "Fetch settings flowise", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Sessões recuperadas com sucesso.", "content": { "application/json": { "schema": { "type": "object", "properties": { "sessions": { "type": "string" } } } } } } } } }, "/flowise/changeStatus/{instance}": { "post": { "operationId": "changeFlowiseStatus", "summary": "Atualiza o status de uma instância Flowise", "tags": [ "Flowise Controller" ], "description": "Atualiza os settings do bot flowise", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Nome da instância", "schema": { "type": "string" } } ], "requestBody": { "description": "Corpo da requisição contendo o identificador remoto e o status a ser atualizado", "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "Identificador remoto do WhatsApp no formato JID", "example": "5511912345678@s.whatsapp.net" }, "status": { "type": "string", "description": "Novo status para a instância", "enum": [ "opened", "paused", "closed" ], "example": "closed" } }, "required": [ "remoteJid", "status" ] } } } }, "responses": { "200": { "description": "Status da instância Flowise atualizado com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Status alterado com sucesso" } } } } } }, "400": { "description": "Erro na requisição, parâmetros inválidos ou ausentes", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Parâmetros inválidos fornecidos" } } } } } }, "404": { "description": "Instância do Flowise não encontrada", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string", "example": "Instância não encontrada" } } } } } } } } }, "/evolutionBot/create/{instance}": { "post": { "operationId": "createEvolutionBot", "summary": "Create Evolution Bot", "tags": [ "Evolution Bot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Create a new Evolution Bot configuration.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "enabled", "apiUrl", "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "triggerType", "triggerOperator", "triggerValue" ], "properties": { "enabled": { "type": "boolean", "description": "Enable Evolution Bot" }, "apiUrl": { "type": "string", "description": "API URL for the bot" }, "apiKey": { "type": "string", "description": "API Key for authentication (optional)" }, "triggerType": { "type": "string", "description": "Trigger type, e.g., 'all' or 'keyword'" }, "triggerOperator": { "type": "string", "description": "Operator logic, e.g., 'contains', 'equals', 'startsWith', 'endsWith', 'regex'" }, "triggerValue": { "type": "string", "description": "Trigger value, e.g., 'test'" }, "expire": { "type": "number", "description": "Expiration time for the session (in seconds)" }, "keywordFinish": { "type": "string", "description": "Keyword to terminate the session" }, "delayMessage": { "type": "number", "description": "Delay time (in ms) for sending messages" }, "unknownMessage": { "type": "string", "description": "Message displayed when an unknown input is received" }, "listeningFromMe": { "type": "boolean", "description": "Listen to messages sent by the bot owner" }, "stopBotFromMe": { "type": "boolean", "description": "Stop bot when the owner sends a message" }, "keepOpen": { "type": "boolean", "description": "Keep the session open after processing messages" }, "debounceTime": { "type": "number", "description": "Time delay to debounce messages" }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "List of JIDs to ignore" } } } } } }, "responses": { "200": { "description": "Evo bot criado com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Sucess" } } } } } } } } }, "/evolutionBot/fetch/:evolutionBotId/{instance}": { "get": { "operationId": "findEvo", "summary": "Find Bot Evo", "tags": [ "OpenAI Controller" ], "description": "Update evo bot.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "evolutionBotId", "in": "path", "required": true, "description": "ID of the evo bot", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/evolutionBot/update/:evolutionBotId/{instance}": { "put": { "operationId": "updateEvolutionBot", "summary": "Update Evolution Bot", "tags": [ "Evolution Bot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "evolutionBotId", "in": "path", "required": true, "description": "ID of the Evolution Bot to update", "schema": { "type": "string" } }, { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Update an existing Evolution Bot configuration.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "enabled", "apiUrl", "triggerType", "triggerOperator", "triggerValue", "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime" ], "properties": { "enabled": { "type": "boolean", "description": "Enable or disable the Evolution Bot" }, "apiUrl": { "type": "string", "description": "API URL for the bot" }, "apiKey": { "type": "string", "description": "API Key for authentication (optional)" }, "triggerType": { "type": "string", "description": "Trigger type, e.g., 'all' or 'keyword'" }, "triggerOperator": { "type": "string", "description": "Operator logic, e.g., 'contains', 'equals', 'startsWith', 'endsWith', 'regex'" }, "triggerValue": { "type": "string", "description": "Trigger value, e.g., 'test'" }, "expire": { "type": "number", "description": "Expiration time for the session (in seconds)" }, "keywordFinish": { "type": "string", "description": "Keyword to terminate the session" }, "delayMessage": { "type": "number", "description": "Delay time (in ms) for sending messages" }, "unknownMessage": { "type": "string", "description": "Message displayed when an unknown input is received" }, "listeningFromMe": { "type": "boolean", "description": "Listen to messages sent by the bot owner" }, "stopBotFromMe": { "type": "boolean", "description": "Stop bot when the owner sends a message" }, "keepOpen": { "type": "boolean", "description": "Keep the session open after processing messages" }, "debounceTime": { "type": "number", "description": "Time delay to debounce messages" }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "List of JIDs to ignore" } } } } } }, "responses": { "200": { "description": "Evo bot atualizado com sucesso", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "Sucess" } } } } } } } } }, "/evolutionBot/find/{instance}": { "get": { "operationId": "findEvo", "summary": "Find Bots Evo", "tags": [ "OpenAI Controller" ], "description": "Update evo bots.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully fetched sessions", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "example": "OK" } } } } } } } } }, "/evolutionBot/delete/:evolutionBotId/{instance}": { "delete": { "operationId": "deleteBot", "summary": "Delete Bot Evolution", "tags": [ "Group Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance ", "schema": { "type": "string" } }, { "name": "evolutionBotId", "in": "query", "required": true, "description": "Id Bot Evolution", "schema": { "type": "string" } } ], "description": "Delete Bot", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/evolutionBot/settings/{instance}": { "post": { "operationId": "createEvolutionBotSettings", "summary": "Create Evolution Bot Settings", "tags": [ "Evolution Bot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Configure settings for an Evolution Bot.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "required": [ "expire", "keywordFinish", "delayMessage", "unknownMessage", "listeningFromMe", "stopBotFromMe", "keepOpen", "debounceTime", "botIdFallback" ], "properties": { "expire": { "type": "number", "description": "Expiration time for the session (in seconds)" }, "keywordFinish": { "type": "string", "description": "Keyword to terminate the session" }, "delayMessage": { "type": "number", "description": "Delay time (in ms) for sending messages" }, "unknownMessage": { "type": "string", "description": "Message displayed when an unknown input is received" }, "listeningFromMe": { "type": "boolean", "description": "Listen to messages sent by the bot owner" }, "stopBotFromMe": { "type": "boolean", "description": "Stop bot when the owner sends a message" }, "keepOpen": { "type": "boolean", "description": "Keep the session open after processing messages" }, "debounceTime": { "type": "number", "description": "Time delay to debounce messages" }, "ignoreJids": { "type": "array", "items": { "type": "string" }, "description": "List of JIDs to ignore" }, "botIdFallback": { "type": "string", "description": "Fallback bot ID to use" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/evolutionBot/fetchSettings/{instance}": { "get": { "operationId": "findEvolutionBot", "summary": "Find EvoBot", "tags": [ "Evolution Bot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Find evolution bot settings", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/evolutionBot/fetchSessions/:evolutionBotId/{instance}": { "get": { "operationId": "findEvolutionBot", "summary": "Find EvoBot session", "tags": [ "Evolution Bot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } }, { "name": "evolutionBotId", "in": "path", "required": true, "description": "ID of the evo bot", "schema": { "type": "string" } } ], "description": "Find evolution bot settings", "responses": { "200": { "description": "Ok", "content": {} } } } }, "/evolutionBot/changeStatus/{instance}": { "post": { "operationId": "changeEvobotStatus", "summary": "Change Session Status", "tags": [ "Typebot Controller" ], "deprecated": false, "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "Name of the instance", "schema": { "type": "string" } } ], "description": "Change status session", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "remoteJid": { "type": "string", "description": "{{remoteJid}}" }, "status": { "type": "string", "description": "Typebot status, types: opened, paused, closed" } } } } } }, "responses": { "200": { "description": "Ok", "content": {} } } } }, "/": { "get": { "operationId": "getEvoInfo", "summary": "Get information about your EvolutionAPI", "deprecated": false, "parameters": [ { "name": "instance", "in": "path", "required": true, "description": "ID of the instance to connect", "schema": { "type": "string" } } ], "description": "Get information about your EvolutionAPI", "responses": { "200": { "description": "Ok", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "integer", "description": "The HTTP status of the response" }, "message": { "type": "string", "description": "Descriptive message about the current state of the API" }, "version": { "type": "string", "description": "The current version of the API" }, "swagger": { "type": "string", "description": "URL to the API's Swagger documentation" }, "manager": { "type": "string", "description": "URL to the API manager" }, "documentation": { "type": "string", "description": "URL to the detailed API documentation" } }, "example": { "status": 200, "message": "Welcome to the Evolution API, it is working!", "version": "1.7.4", "swagger": "http://example.evolution-api.com/docs", "manager": "http://example.evolution-api.com/manager", "documentation": "https://doc.evolution-api.com" } } } } } } } } }, "components": { "securitySchemes": { "ApiKeyAuth": { "type": "apiKey", "in": "header", "name": "apikey", "description": "Your authorization key header" } } } }