├── .gitignore ├── README.md ├── favicon.png ├── images └── brand │ ├── cover-white.png │ └── cover.png ├── mint.json ├── openapi ├── openapi-v1.json └── openapi-v2.json ├── package-lock.json ├── package.json ├── v1 ├── api-reference │ ├── authentication.mdx │ ├── chat-controller │ │ ├── archive-chat.mdx │ │ ├── check-is-whatsapp.mdx │ │ ├── delete-message-for-everyone.mdx │ │ ├── fetch-profilepic-url.mdx │ │ ├── find-chats.mdx │ │ ├── find-contacts.mdx │ │ ├── find-messages.mdx │ │ ├── find-status-message.mdx │ │ ├── mark-as-read.mdx │ │ ├── send-presence.mdx │ │ └── update-message.mdx │ ├── get-information.mdx │ ├── group-controller │ │ ├── accept-invite-code.mdx │ │ ├── fetch-all-groups.mdx │ │ ├── fetch-invite-code.mdx │ │ ├── find-group-by-invite-code.mdx │ │ ├── find-group-by-jid.mdx │ │ ├── find-participants.mdx │ │ ├── group-create.mdx │ │ ├── leave-group.mdx │ │ ├── revoke-invite-code.mdx │ │ ├── send-invite-url.mdx │ │ ├── toggle-ephemeral.mdx │ │ ├── update-group-description.mdx │ │ ├── update-group-picture.mdx │ │ ├── update-group-subject.mdx │ │ ├── update-participant.mdx │ │ └── update-setting.mdx │ ├── instance-controller │ │ ├── connection-state.mdx │ │ ├── create-instance-basic.mdx │ │ ├── delete-instance.mdx │ │ ├── fetch-instances.mdx │ │ ├── instance-connect.mdx │ │ ├── logout-instance.mdx │ │ ├── restart-instance.mdx │ │ └── set-presence.mdx │ ├── integrations │ │ ├── chatwoot │ │ │ ├── find-chatwoot.mdx │ │ │ └── set-chatwoot.mdx │ │ ├── rabbitmq │ │ │ ├── find-rabbitmq.mdx │ │ │ └── set-rabbitmq.mdx │ │ ├── sqs │ │ │ ├── find-sqs.mdx │ │ │ └── set-sqs.mdx │ │ ├── typebot │ │ │ ├── change-session-status.mdx │ │ │ ├── find-typebot.mdx │ │ │ ├── set-typebot.mdx │ │ │ └── start-typebot.mdx │ │ └── websocket │ │ │ ├── find-websocket.mdx │ │ │ └── set-websocket.mdx │ ├── message-controller │ │ ├── send-audio.mdx │ │ ├── send-contact.mdx │ │ ├── send-list.mdx │ │ ├── send-location.mdx │ │ ├── send-media.mdx │ │ ├── send-poll.mdx │ │ ├── send-reaction.mdx │ │ ├── send-status.mdx │ │ ├── send-sticker.mdx │ │ ├── send-template.mdx │ │ └── send-text.mdx │ ├── profile-settings │ │ ├── fetch-business-profile.mdx │ │ ├── fetch-privacy-settings.mdx │ │ ├── fetch-profile.mdx │ │ ├── remove-profile-picture.mdx │ │ ├── update-privacy-settings.mdx │ │ ├── update-profile-name.mdx │ │ ├── update-profile-picture.mdx │ │ └── update-profile-status.mdx │ ├── settings │ │ ├── get.mdx │ │ └── set.mdx │ └── webhook │ │ ├── get.mdx │ │ └── set.mdx ├── en │ ├── configuration │ │ ├── available-resources.mdx │ │ └── webhooks.mdx │ ├── env.mdx │ ├── get-started │ │ └── introduction.mdx │ ├── install │ │ ├── docker.mdx │ │ └── nvm.mdx │ ├── optional-resources │ │ ├── mongo-db.mdx │ │ ├── rabbitmq.mdx │ │ ├── redis.mdx │ │ └── websocket.mdx │ └── updates.mdx └── pt │ ├── configuration │ ├── available-resources.mdx │ └── webhooks.mdx │ ├── env.mdx │ ├── get-started │ └── introduction.mdx │ ├── install │ ├── docker.mdx │ └── nvm.mdx │ ├── optional-resources │ ├── mongo-db.mdx │ ├── rabbitmq.mdx │ ├── redis.mdx │ └── websocket.mdx │ └── updates.mdx └── v2 ├── api-reference ├── authentication.mdx ├── chat-controller │ ├── archive-chat.mdx │ ├── check-is-whatsapp.mdx │ ├── delete-message-for-everyone.mdx │ ├── fetch-profilepic-url.mdx │ ├── find-chats.mdx │ ├── find-contacts.mdx │ ├── find-messages.mdx │ ├── find-status-message.mdx │ ├── get-base64.mdx │ ├── mark-as-read.mdx │ ├── mark-as-unread.mdx │ ├── send-presence.mdx │ ├── update-message.mdx │ └── updateBlockStatus.mdx ├── get-information.mdx ├── group-controller │ ├── accept-invite-code.mdx │ ├── fetch-all-groups.mdx │ ├── fetch-invite-code.mdx │ ├── find-group-by-invite-code.mdx │ ├── find-group-by-jid.mdx │ ├── find-participants.mdx │ ├── group-create.mdx │ ├── leave-group.mdx │ ├── revoke-invite-code.mdx │ ├── send-invite-url.mdx │ ├── toggle-ephemeral.mdx │ ├── update-group-description.mdx │ ├── update-group-picture.mdx │ ├── update-group-subject.mdx │ ├── update-participant.mdx │ └── update-setting.mdx ├── instance-controller │ ├── connection-state.mdx │ ├── create-instance-basic.mdx │ ├── delete-instance.mdx │ ├── fetch-instances.mdx │ ├── instance-connect.mdx │ ├── logout-instance.mdx │ ├── restart-instance.mdx │ └── set-presence.mdx ├── integrations │ ├── chatwoot │ │ ├── find-chatwoot.mdx │ │ └── set-chatwoot.mdx │ ├── dify │ │ ├── change-status.mdx │ │ ├── create-dify.mdx │ │ ├── find-bot-dify.mdx │ │ ├── find-dify.mdx │ │ ├── find-settings.mdx │ │ ├── find-status.mdx │ │ ├── set-settings-dify.mdx │ │ └── update-dify.mdx │ ├── evoai │ │ ├── change-status.mdx │ │ ├── create-evoai.mdx │ │ ├── find-bot-evoai.mdx │ │ ├── find-evoai.mdx │ │ ├── find-settings.mdx │ │ ├── find-status.mdx │ │ ├── set-settings-evoai.mdx │ │ └── update-evoai.mdx │ ├── evolution │ │ ├── change-status-session.mdx │ │ ├── create-bot.mdx │ │ ├── delete-bot.mdx │ │ ├── fetch-bots.mdx │ │ ├── fetch-session.mdx │ │ ├── find-bot.mdx │ │ ├── find-settings.mdx │ │ ├── set-settings.mdx │ │ └── update.mdx │ ├── flowise │ │ ├── change-session-status.mdx │ │ ├── create-bot.mdx │ │ ├── delete-flowise-bot.mdx │ │ ├── find-flowise-bot.mdx │ │ ├── find-flowise-bots.mdx │ │ ├── find-sessions.mdx │ │ ├── find-settings.mdx │ │ ├── set-settings.mdx │ │ └── update-flowise-bot.mdx │ ├── n8n │ │ ├── change-status.mdx │ │ ├── create-n8n.mdx │ │ ├── find-bot-n8n.mdx │ │ ├── find-n8n.mdx │ │ ├── find-settings.mdx │ │ ├── find-status.mdx │ │ ├── set-settings-n8n.mdx │ │ └── update-n8n.mdx │ ├── openai │ │ ├── change-status.mdx │ │ ├── create-bot.mdx │ │ ├── delete-bot.mdx │ │ ├── delete-creds.mdx │ │ ├── find-bot.mdx │ │ ├── find-bots.mdx │ │ ├── find-creds-openai.mdx │ │ ├── find-session.mdx │ │ ├── find-settings.mdx │ │ ├── set-creds.mdx │ │ ├── settings-openai.mdx │ │ └── update-bot.mdx │ ├── rabbitmq │ │ ├── find-rabbitmq.mdx │ │ └── set-rabbitmq.mdx │ ├── sqs │ │ ├── find-sqs.mdx │ │ └── set-sqs.mdx │ ├── typebot │ │ ├── change-session-status.mdx │ │ ├── delete-typebot.mdx │ │ ├── fetch-session.mdx │ │ ├── fetch-typebot.mdx │ │ ├── find-settings-typebot.mdx │ │ ├── find-typebot.mdx │ │ ├── set-typebot.mdx │ │ ├── settings-typebot.mdx │ │ ├── start-typebot.mdx │ │ └── update-typebot.mdx │ └── websocket │ │ ├── find-websocket.mdx │ │ └── set-websocket.mdx ├── message-controller │ ├── send-audio.mdx │ ├── send-button.mdx │ ├── send-contact.mdx │ ├── send-list.mdx │ ├── send-location.mdx │ ├── send-media.mdx │ ├── send-poll.mdx │ ├── send-reaction.mdx │ ├── send-status.mdx │ ├── send-sticker.mdx │ └── send-text.mdx ├── profile-settings │ ├── fetch-business-profile.mdx │ ├── fetch-privacy-settings.mdx │ ├── fetch-profile.mdx │ ├── remove-profile-picture.mdx │ ├── update-privacy-settings.mdx │ ├── update-profile-name.mdx │ ├── update-profile-picture.mdx │ └── update-profile-status.mdx ├── settings │ ├── get.mdx │ └── set.mdx └── webhook │ ├── get.mdx │ └── set.mdx ├── en ├── configuration │ ├── available-resources.mdx │ └── webhooks.mdx ├── env.mdx ├── get-started │ └── introduction.mdx ├── install │ ├── docker.mdx │ ├── nginx.mdx │ └── nvm.mdx ├── integrations │ ├── chatwoot.mdx │ ├── cloudapi.mdx │ ├── dify.mdx │ ├── evoai.mdx │ ├── evolution-bot.mdx │ ├── evolution-channel.mdx │ ├── flowise.mdx │ ├── openai.mdx │ ├── rabbitmq.mdx │ ├── s3minio.mdx │ ├── sqs.mdx │ ├── typebot.mdx │ └── websocket.mdx ├── requirements │ ├── database.mdx │ └── redis.mdx └── updates.mdx └── pt ├── configuration ├── available-resources.mdx └── webhooks.mdx ├── env.mdx ├── get-started └── introduction.mdx ├── install ├── docker.mdx ├── nginx.mdx └── nvm.mdx ├── integrations ├── chatwoot.mdx ├── cloudapi.mdx ├── dify.mdx ├── evoai.mdx ├── evolution-bot.mdx ├── evolution-channel.mdx ├── flowise.mdx ├── openai.mdx ├── rabbitmq.mdx ├── s3minio.mdx ├── sqs.mdx ├── typebot.mdx └── websocket.mdx ├── requirements ├── database.mdx └── redis.mdx └── updates.mdx /.gitignore: -------------------------------------------------------------------------------- 1 | ### VisualStudioCode ### 2 | .vscode/* 3 | !.vscode/settings.json 4 | !.vscode/tasks.json 5 | !.vscode/launch.json 6 | !.vscode/extensions.json 7 | !.vscode/*.code-snippets 8 | 9 | # Local History for Visual Studio Code 10 | .history/ 11 | 12 | # Built Visual Studio Code Extensions 13 | *.vsix 14 | 15 | ### VisualStudioCode Patch ### 16 | # Ignore all local history of files 17 | .history 18 | .ionide 19 | 20 | # End of https://www.toptal.com/developers/gitignore/api/visualstudiocode 21 | node_modules -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Mintlify Starter Kit 2 | 3 | Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including 4 | 5 | - Guide pages 6 | - Navigation 7 | - Customizations 8 | - API Reference pages 9 | - Use of popular components 10 | 11 | ### Development 12 | 13 | Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command 14 | 15 | ``` 16 | npm i -g mintlify 17 | ``` 18 | 19 | Run the following command at the root of your documentation (where mint.json is) 20 | 21 | ``` 22 | mintlify dev 23 | ``` 24 | 25 | ### Publishing Changes 26 | 27 | Install our Github App to autopropagate changes from youre repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard. 28 | 29 | #### Troubleshooting 30 | 31 | - Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies. 32 | - Page loads as a 404 - Make sure you are running in a folder with `mint.json` 33 | -------------------------------------------------------------------------------- /favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvolutionAPI/docs-evolution/433cea1845d3a6543d052a72e96cfc01fd031f1a/favicon.png -------------------------------------------------------------------------------- /images/brand/cover-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvolutionAPI/docs-evolution/433cea1845d3a6543d052a72e96cfc01fd031f1a/images/brand/cover-white.png -------------------------------------------------------------------------------- /images/brand/cover.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/EvolutionAPI/docs-evolution/433cea1845d3a6543d052a72e96cfc01fd031f1a/images/brand/cover.png -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs-evolution", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "react-icons": "^5.0.1" 9 | } 10 | }, 11 | "node_modules/js-tokens": { 12 | "version": "4.0.0", 13 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 14 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 15 | "peer": true 16 | }, 17 | "node_modules/loose-envify": { 18 | "version": "1.4.0", 19 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", 20 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", 21 | "peer": true, 22 | "dependencies": { 23 | "js-tokens": "^3.0.0 || ^4.0.0" 24 | }, 25 | "bin": { 26 | "loose-envify": "cli.js" 27 | } 28 | }, 29 | "node_modules/react": { 30 | "version": "18.2.0", 31 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", 32 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", 33 | "peer": true, 34 | "dependencies": { 35 | "loose-envify": "^1.1.0" 36 | }, 37 | "engines": { 38 | "node": ">=0.10.0" 39 | } 40 | }, 41 | "node_modules/react-icons": { 42 | "version": "5.0.1", 43 | "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz", 44 | "integrity": "sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==", 45 | "peerDependencies": { 46 | "react": "*" 47 | } 48 | } 49 | }, 50 | "dependencies": { 51 | "js-tokens": { 52 | "version": "4.0.0", 53 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", 54 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", 55 | "peer": true 56 | }, 57 | "loose-envify": { 58 | "version": "1.4.0", 59 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", 60 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", 61 | "peer": true, 62 | "requires": { 63 | "js-tokens": "^3.0.0 || ^4.0.0" 64 | } 65 | }, 66 | "react": { 67 | "version": "18.2.0", 68 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz", 69 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==", 70 | "peer": true, 71 | "requires": { 72 | "loose-envify": "^1.1.0" 73 | } 74 | }, 75 | "react-icons": { 76 | "version": "5.0.1", 77 | "resolved": "https://registry.npmjs.org/react-icons/-/react-icons-5.0.1.tgz", 78 | "integrity": "sha512-WqLZJ4bLzlhmsvme6iFdgO8gfZP17rfjYEJ2m9RsZjZ+cc4k1hTzknEz63YS1MeT50kVzoa1Nz36f4BEx+Wigw==", 79 | "requires": {} 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "react-icons": "^5.0.1" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /v1/api-reference/authentication.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Autenticação' 3 | --- 4 | 5 | Em Definições selecione a opção Referência de API. Copie o token gerado e use no header Authorization nas suas requisições como `Bearer `. 6 | -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/archive-chat.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Archive Chat' 3 | openapi: openapi-v1 PUT /chat/archiveChat/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/check-is-whatsapp.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Check is WhatsApp' 3 | openapi: openapi-v1 POST /chat/whatsappNumbers/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/delete-message-for-everyone.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Message for Everyone' 3 | openapi: openapi-v1 DELETE /chat/deleteMessageForEveryone/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/fetch-profilepic-url.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Profile Picture URL' 3 | openapi: openapi-v1 POST /chat/fetchProfilePictureUrl/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/find-chats.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Chats' 3 | openapi: openapi-v1 GET /chat/findChats/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/find-contacts.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Contacts' 3 | openapi: openapi-v1 POST /chat/findContacts/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/find-messages.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Messages' 3 | openapi: openapi-v1 POST /chat/findMessages/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/find-status-message.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Status Message' 3 | openapi: openapi-v1 POST /chat/findStatusMessage/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/mark-as-read.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Mark Message As Read' 3 | openapi: openapi-v1 PUT /chat/markMessageAsRead/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/send-presence.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Presence' 3 | openapi: openapi-v1 POST /chat/sendPresence/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/chat-controller/update-message.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Message' 3 | openapi: openapi-v1 PUT /chat/updateMessage/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/get-information.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Get Information' 3 | openapi: openapi-v1 GET / 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/accept-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Accept Invite Code' 3 | openapi: openapi-v1 GET /group/acceptInviteCode/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/fetch-all-groups.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch All Groups' 3 | openapi: openapi-v1 GET /group/fetchAllGroups/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/fetch-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Invite Code' 3 | openapi: openapi-v1 GET /group/inviteCode/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/find-group-by-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Group by Invite Code' 3 | openapi: openapi-v1 GET /group/inviteInfo/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/find-group-by-jid.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Group by JID' 3 | openapi: openapi-v1 GET /group/findGroupInfos/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/find-participants.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Group Members' 3 | openapi: openapi-v1 GET /group/participants/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/group-create.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Group' 3 | openapi: openapi-v1 POST /group/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/leave-group.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Leave Group' 3 | openapi: openapi-v1 DELETE /group/leaveGroup/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/revoke-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Revoke Invite Code' 3 | openapi: openapi-v1 PUT /group/revokeInviteCode/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/send-invite-url.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Group Invite' 3 | openapi: openapi-v1 POST /group/sendInvite/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/toggle-ephemeral.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Toggle Ephemeral' 3 | openapi: openapi-v1 PUT /group/toggleEphemeral/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/update-group-description.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Description' 3 | openapi: openapi-v1 PUT /group/updateGroupDescription/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/update-group-picture.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Picture' 3 | openapi: openapi-v1 PUT /group/updateGroupPicture/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/update-group-subject.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Subject' 3 | openapi: openapi-v1 PUT /group/updateGroupSubject/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/update-participant.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Members' 3 | openapi: openapi-v1 PUT /group/updateParticipant/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/group-controller/update-setting.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Setting' 3 | openapi: openapi-v1 PUT /group/updateSetting/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/connection-state.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Connection State' 3 | openapi: openapi-v1 GET /instance/connectionState/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/create-instance-basic.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Instance Basic' 3 | openapi: openapi-v1 POST /instance/create 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/delete-instance.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Instance' 3 | openapi: openapi-v1 DELETE /instance/delete/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/fetch-instances.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Instances' 3 | openapi: openapi-v1 GET /instance/fetchInstances 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/instance-connect.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Instance Connect' 3 | openapi: openapi-v1 GET /instance/connect/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/logout-instance.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Logout Instance' 3 | openapi: openapi-v1 DELETE /instance/logout/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/restart-instance.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Restart Instance' 3 | openapi: openapi-v1 PUT /instance/restart/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/instance-controller/set-presence.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Presence' 3 | openapi: openapi-v1 POST /instance/setPresence/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/chatwoot/find-chatwoot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Chatwoot' 3 | openapi: openapi-v1 GET /chatwoot/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/chatwoot/set-chatwoot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Chatwoot' 3 | openapi: openapi-v1 POST /chatwoot/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/rabbitmq/find-rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find RabbitMQ' 3 | openapi: openapi-v1 GET /rabbitmq/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/rabbitmq/set-rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set RabbitMQ' 3 | openapi: openapi-v1 POST /rabbitmq/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/sqs/find-sqs.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find SQS' 3 | openapi: openapi-v1 GET /sqs/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/sqs/set-sqs.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set SQS' 3 | openapi: openapi-v1 POST /sqs/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/typebot/change-session-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change Typebot Status' 3 | openapi: openapi-v1 POST /typebot/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/typebot/find-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Typebot' 3 | openapi: openapi-v1 GET /typebot/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/typebot/set-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Typebot' 3 | openapi: openapi-v1 POST /typebot/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/typebot/start-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Start Typebot' 3 | openapi: openapi-v1 POST /typebot/start/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/websocket/find-websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Chatwoot' 3 | openapi: openapi-v1 POST /chatwoot/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/integrations/websocket/set-websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Chatwoot' 3 | openapi: openapi-v1 GET /chatwoot/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-audio.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send WhatsApp Audio' 3 | openapi: openapi-v1 POST /message/sendWhatsAppAudio/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-contact.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Contact' 3 | openapi: openapi-v1 POST /message/sendContact/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-list.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send List' 3 | openapi: openapi-v1 POST /message/sendList/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-location.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Location' 3 | openapi: openapi-v1 POST /message/sendLocation/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-media.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Media' 3 | openapi: openapi-v1 POST /message/sendMedia/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-poll.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Poll' 3 | openapi: openapi-v1 POST /message/sendPoll/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-reaction.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Reaction' 3 | openapi: openapi-v1 POST /message/sendReaction/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Status' 3 | openapi: openapi-v1 POST /message/sendStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-sticker.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Sticker' 3 | openapi: openapi-v1 POST /message/sendSticker/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-template.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Template' 3 | openapi: openapi-v1 POST /message/sendTemplate/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/message-controller/send-text.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Plain Text' 3 | openapi: openapi-v1 POST /message/sendText/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/fetch-business-profile.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Business Profile' 3 | openapi: openapi-v1 POST /chat/fetchBusinessProfile/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/fetch-privacy-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Privacy Settings' 3 | openapi: openapi-v1 GET /chat/fetchPrivacySettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/fetch-profile.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Profile' 3 | openapi: openapi-v1 POST /chat/fetchProfile/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/remove-profile-picture.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Remove Profile Picture' 3 | openapi: openapi-v1 PUT /chat/removeProfilePicture/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/update-privacy-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Privacy Settings' 3 | openapi: openapi-v1 PUT /chat/updatePrivacySettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/update-profile-name.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Profile Name' 3 | openapi: openapi-v1 POST /chat/updateProfileName/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/update-profile-picture.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Profile Picture' 3 | openapi: openapi-v1 PUT /chat/updateProfilePicture/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/profile-settings/update-profile-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Profile Status' 3 | openapi: openapi-v1 POST /chat/updateProfileStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/settings/get.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Settings' 3 | openapi: openapi-v1 GET /settings/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/settings/set.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Settings' 3 | openapi: openapi-v1 POST /settings/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/webhook/get.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Webhook' 3 | openapi: openapi-v1 GET /webhook/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/api-reference/webhook/set.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Webhook' 3 | openapi: openapi-v1 POST /webhook/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v1/en/configuration/available-resources.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Available Resources' 3 | icon: wrench 4 | --- 5 | 6 | ## Messaging and Group features 7 | 8 | ### Messages (Individual or Group) 9 | 10 | | Feature | Availability | Description | 11 | |-:|:-:|-| 12 | | Send Text | ✅ | (Plain, bold, italic, strikethrough, monospaced text and emojis) | 13 | | Send Media | ✅ | (Vídeo, image and document) | 14 | | Send Narrated Audio | ✅ | (Working fine in Android and iOS) | 15 | | Send Location | ✅ | (With name and description of the place) | 16 | | Send Contact | ✅ | (With Name, Company, Phone, Email and Url) | 17 | | Send Reaction | ✅ | (Send any emoji for reaction) | 18 | | Send Link Preview | ✅ | (Searching for SEO information) 🆕 | 19 | | Send Reply | ✅ | (Mark messages in reply) 🆕 | 20 | | Send Mention | ✅ | (Individual, some or all members) 🆕 | 21 | | Send Poll Message | ✅ | (Send and receive votes from a poll) 🆕 | 22 | | Send Status/Storie | ✅ | (Text, linkpreview, vídeo, image and waveform) 🆕 | 23 | | Send Sticker | ✅ | (Static Image) 🆕 | 24 | | Send List (Homolog) | ✅ | (Testing) | 25 | | Send Buttons (Deprecated) | ❌ | (Only works on Cloud API) | 26 | 27 | ### Profile 28 | 29 | | Feature | Availability | Description | 30 | | -----------------: | :----------: | ----------------------------------------- | 31 | | Update Name | ✅ | (Change the connected profile name) | 32 | | Update Picture | ✅ | (Change the connected profile picture) 🆕 | 33 | | Update Status | ✅ | (Change the connected profile status) 🆕 | 34 | | And many others... | | | 35 | 36 | ### Group 37 | 38 | | Feature | Availability | Description | 39 | | ------------------ | :----------: | -------------------------------------- | 40 | | Create Group | ✅ | (New groups) | 41 | | Update Picture | ✅ | (Change group picture) | 42 | | Update Subject | ✅ | (Change group name) 🆕 | 43 | | Update Description | ✅ | (Change group description) 🆕 | 44 | | Fetch All Groups | ✅ | (Fetch all groups and participants) 🆕 | 45 | | And many others... | | | 46 | -------------------------------------------------------------------------------- /v1/en/get-started/introduction.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Introduction' 3 | icon: hand-wave 4 | --- 5 | 6 | **Evolution API** is a project dedicated to empowering small businesses, entrepreneurs, freelancers, and individuals with limited resources. 7 | 8 | Our mission is to provide a **WhatsApp™** messaging solution via API, enabling these groups to strengthen their local or online businesses. 9 | 10 | Best of all, our service is **completely free**, designed to support those striving to succeed in a competitive market landscape. 11 | 12 | Access our [repository](https://github.com/EvolutionAPI/evolution-api) and join our [community](https://evolution-api.com) to be a part of the project. 13 | 14 | ## Quick Start 15 | 16 | 17 | You will need to have Docker installed on your machine; see the [Official Docker Documentation](https://docs.docker.com/engine/install/). 18 | 19 | To run the test version and test the main features of the API, copy the command below, change the value of `AUTHENTICATION_API_KEY` to one of your choice, and execute the command: 20 | 21 | ~~~ sh Terminal 22 | docker run -d \ 23 | --name evolution_api \ 24 | -p 8080:8080 \ 25 | -e AUTHENTICATION_API_KEY=change-me \ 26 | atendai/evolution-api:latest 27 | ~~~ 28 | 29 | CLI execution is recommended for quick deployments, mainly for testing or development. It should not be used in production. Instead, we recommend using docker-compose for easier deployment and maintenance. 30 | 31 | This will run a Docker container exposing the application on port 8080, and you can start testing and requesting the WhatsApp QR code using the authentication variable content with the apikey header set. 32 | 33 | To ensure the API is running, access http://localhost:8080 in your browser. This should be the response from your browser: 34 | 35 | ~~~ json 36 | { 37 | "status":200, 38 | "message":"Welcome to the Evolution API, it is working!", 39 | "version":"1.x.x", 40 | "swagger":"http://localhost:8080/docs", 41 | "manager":"http://localhost:8080/manager", 42 | "documentation":"https://doc.evolution-api.com" 43 | } 44 | ~~~ 45 | 46 | ## Installation 47 | Learn how to install the full version at: 48 | 49 | 50 | 51 | Learn how to install the complete EvolutionAPI using Docker. 52 | 53 | 54 | Use the official API collection for Postman. 55 | 56 | 57 | 58 | 59 | 60 | View the API documentation with code examples. 61 | 62 | 63 | Use the official API collection for Postman. 64 | 65 | 66 | -------------------------------------------------------------------------------- /v1/en/install/docker.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Docker 3 | icon: docker 4 | --- 5 | 6 | 7 | These installation instructions assume you have already installed Docker on your machine. You can find 8 | information on how to install Docker in the 9 | [Official Docker Documentation](https://docs.docker.com/engine/install/). 10 | 11 | 12 | EvolutionAPI is Docker-ready and can be easily deployed with Docker in both standalone and swarm modes. The official EvolutionAPI repository contains all the necessary compose files to install the API. 13 | 14 | ## Docker Run 15 | ### Quick Start 16 | 17 | 18 | CLI installation is recommended for quick deployment, mainly for testing or development. It should not be 19 | used for production. Instead, we recommend that you [use docker-compose](#docker-compose) for 20 | easier deployment and maintenance. 21 | 22 | 23 | The fastest way to deploy EvolutionAPI with Docker is by using `docker run` on the command line interface. 24 | 25 | ~~~ bash Terminal 26 | docker run -d \ 27 | --name evolution-api \ 28 | -p 8080:8080 \ 29 | -e AUTHENTICATION_API_KEY=change-me \ 30 | atendai/evolution-api 31 | ~~~ 32 | 33 | This will run a Docker container exposing the application on port 8080, and you can start testing and requesting the WhatsApp QR code using the authentication variable content with the `apikey` header set. 34 | 35 | ### Quick Start with Volumes 36 | 37 | You can also deploy using Docker volumes to keep your EvolutionAPI's persistent data and all WhatsApp instances on your local machine, avoiding issues with container restarts by using `docker run` on the command line interface. 38 | 39 | Run the following command to deploy EvolutionAPI with the necessary volumes. This command maps the `evolution_store` and `evolution_instances` volumes to their respective directories inside the container. 40 | 41 | ~~~ bash Terminal 42 | docker run -d \ 43 | --name evolution-api \ 44 | -p 8080:8080 \ 45 | -e AUTHENTICATION_API_KEY=change-me \ 46 | -v evolution_store:/evolution/store \ 47 | -v evolution_instances:/evolution/instances \ 48 | atendai/evolution-api 49 | ~~~ 50 | 51 | ## Docker Compose 52 | 53 | Deploying EvolutionAPI using Docker Compose simplifies the setup and management of your Docker containers. It allows you to define your Docker environment in a `docker-compose.yaml` file and then use a single command to start everything. 54 | 55 | This is a Docker Compose example for standalone environments, i.e., a single running server. For synchronization of two servers in parallel, use Swarm. This is for more advanced Docker users. 56 | 57 | ### Standalone 58 | 59 | 60 | **Warning:** the commands featured here as `docker compose` might not work on older versions, and must be replaced by `docker-compose`. 61 | 62 | 63 | Docker standalone is suitable when your Evolution API will be running on just one machine, and you don't need scalability or other Docker Swarm features for now. It's the most convenient way to use Docker for most people. 64 | 65 | Create a `docker-compose.yml` file with this content: 66 | 67 | ~~~ yaml docker-compose.yml 68 | version: '3' 69 | services: 70 | evolution-api: 71 | container_name: evolution_api 72 | image: atendai/evolution-api 73 | restart: always 74 | ports: 75 | - "8080:8080" 76 | env_file: 77 | - .env 78 | volumes: 79 | - evolution_store:/evolution/store 80 | - evolution_instances:/evolution/instances 81 | 82 | volumes: 83 | evolution_store: 84 | evolution_instances: 85 | ~~~ 86 | 87 | Create a `.env` file in the same directory with the following: 88 | 89 | ~~~ bash .env 90 | AUTHENTICATION_API_KEY=change-me 91 | ~~~ 92 | 93 | For more configurations, take the example file from the 94 | [official repository](https://github.com/EvolutionAPI/evolution-api/blob/main/Docker/.env.example). And see the 95 | guide [here](/en/install/env). 96 | 97 | 98 | Navigate to the directory containing your docker-compose.yml file and run: 99 | services defined in the file 100 | 101 | ~~~ bash 102 | docker compose up -d 103 | ~~~ 104 | 105 | This command will download the necessary Docker images, create the defined services, networks, and volumes, and start the EvolutionAPI service. 106 | 107 | After running the docker-compose up command, you should see logs indicating that the services are running. 108 | 109 | ~~~ bash 110 | docker logs evolution_api 111 | ~~~ 112 | 113 | To stop the service, use: 114 | ~~~ bash 115 | docker compose down 116 | ~~~ 117 | 118 | Open your browser and go to http://localhost:8080 to check if the EvolutionAPI is operational. -------------------------------------------------------------------------------- /v1/en/optional-resources/mongo-db.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: MongoDB 3 | icon: database 4 | --- 5 | 6 | # Setup 7 | 8 | MongoDB, a NoSQL database, is known for high performance and scalability. It's ideal for handling large data volumes in the Evolution API. 9 | 10 | Set the MongoDB environment variables in the `.env` for Docker or the `dev-env.yml` for NPM file as follows: 11 | 12 | ~~~ shell .env or dev-env.yml 13 | # Set to true to enable MongoDB. 14 | DATABASE_ENABLED=true 15 | # Your MongoDB connection string. 16 | DATABASE_CONNECTION_URI=mongodb://user:password@database_URL/?authSource=admin&readPreference=primary&ssl=false&directConnection=true 17 | # Prefix for your database name. 18 | DATABASE_CONNECTION_DB_PREFIX_NAME=evo 19 | # Save WhatsApp connection credentials on Mongo 20 | DATABASE_SAVE_DATA_INSTANCE=false 21 | # Save new messages on Mongo 22 | DATABASE_SAVE_DATA_NEW_MESSAGE=false 23 | # Save message updates on Mongo 24 | DATABASE_SAVE_MESSAGE_UPDATE=false 25 | # Save imported contacts and new ones 26 | DATABASE_SAVE_DATA_CONTACTS=false 27 | # Save imported chats and new ones 28 | DATABASE_SAVE_DATA_CHATS=false 29 | ~~~ 30 | 31 | # Migrate your data in NPM or NVM 32 | 33 | Stop the PM2 execution: 34 | 35 | **Flush and Stop**: Clears all logs from PM2, useful for troubleshooting after the update and temporarily stops the Evolution API to safely apply updates. 36 | 37 | ~~~ shell 38 | # Clear all PM2 logs 39 | pm2 flush 40 | 41 | # Stop the current Evolution API process 42 | pm2 stop ApiEvolution 43 | ~~~ 44 | 45 | **Evolution API directory**: access your directory installation with the following command: 46 | ~~~ 47 | cd evolution-api 48 | ~~~ 49 | 50 | **Migrate command**: Run the migration command in the installation directory: 51 | ~~~ 52 | npx evolution-manager api migrate-to-mongo 53 | ~~~ 54 | 55 | Follow the script steps and migrate specific WhatsApp instances or all your instances. 56 | -------------------------------------------------------------------------------- /v1/en/optional-resources/rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: RabbitMQ 3 | icon: rabbit 4 | --- 5 | # Activating RabbitMQ 6 | 7 | To effectively utilize RabbitMQ with the Evolution API for managing WhatsApp instances, it's essential to activate RabbitMQ on each individual WhatsApp instance. This activation allows each instance to start receiving and processing AMQP (Advanced Message Queuing Protocol) queue requests that are specific to that particular WhatsApp instance. 8 | 9 | In other words, for each WhatsApp instance where you want to use RabbitMQ, you need to ensure that RabbitMQ integration is enabled. This setup will allow the instance to communicate with the RabbitMQ server and handle its queue of messages and requests. Enabling RabbitMQ on each instance is crucial for proper distribution and management of messaging tasks across different WhatsApp instances in your system. 10 | 11 | ## RabbitMQ setup for an individual instance 12 | 13 | For **developers** who wants to use in their applications AMQP messaging system, you could use RabbitMQ for queue your instances actions. 14 | 15 | To configure RabbitMQ for individual WhatsApp instances in the Evolution API, you can use the following endpoint: 16 | 17 | ~~~ POST 18 | [baseUrl]/rabbitmq/set/[instance_name] 19 | ~~~ 20 | 21 | This endpoint allows you to enable RabbitMQ and specify which events each WhatsApp instance should subscribe to in the AMQP queue. Below is an example of the JSON body for this endpoint: 22 | 23 | ~~~ json 24 | { 25 | "enabled": true, 26 | "events": [ 27 | // List of events to subscribe to. Uncomment the events you need. 28 | "APPLICATION_STARTUP", 29 | "QRCODE_UPDATED", 30 | "MESSAGES_SET", 31 | "MESSAGES_UPSERT", 32 | "MESSAGES_UPDATE", 33 | "MESSAGES_DELETE", 34 | "SEND_MESSAGE", 35 | "CONTACTS_SET", 36 | "CONTACTS_UPSERT", 37 | "CONTACTS_UPDATE", 38 | "PRESENCE_UPDATE", 39 | "CHATS_SET", 40 | "CHATS_UPSERT", 41 | "CHATS_UPDATE", 42 | "CHATS_DELETE", 43 | "GROUPS_UPSERT", 44 | "GROUP_UPDATE", 45 | "GROUP_PARTICIPANTS_UPDATE", 46 | "CONNECTION_UPDATE", 47 | "CALL", 48 | "NEW_JWT_TOKEN" 49 | ] 50 | } 51 | ~~~ 52 | 53 | Remove unused events to keep low resource usage with RabbitMQ. 54 | 55 | When setting up RabbitMQ integration, adjust the events array in the JSON body to include only the events you want to subscribe to. Uncomment any event you wish to enable for RabbitMQ notifications. 56 | 57 | Now you can send to your application the messages and consume them in RabbitMQ. 58 | 59 | If you want more in-depth over personalized configuration and installation check the environment variables section. 60 | 61 | Checkout RabbitMQ environment variables [here](/en/env#rabbitmq) 62 | -------------------------------------------------------------------------------- /v1/en/optional-resources/redis.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Redis 3 | icon: layer-group 4 | --- 5 | 6 | # Setup 7 | 8 | Redis is an in-memory data structure store, used as a database, cache, and message broker. It supports data structures such as strings, hashes, lists, sets, and more. Incorporating Redis can significantly improve the performance of Evolution API by enabling faster data access and efficient caching. 9 | 10 | Set the Redis environment variables in the `.env` for Docker or the `dev-env.yml` for NPM file as follows: 11 | 12 | ~~~ shell 13 | # Set to true to enable Redis. 14 | CACHE_REDIS_ENABLED=false 15 | # Redis server URI 16 | CACHE_REDIS_URI=redis://redis:6379 17 | # Prefix key word for redis data 18 | CACHE_REDIS_PREFIX_KEY=evolution 19 | # Time to keep data cached 20 | CACHE_REDIS_TTL=604800 21 | # Save WhatsApp credentials on Redis 22 | CACHE_REDIS_SAVE_INSTANCES=true 23 | ~~~ 24 | Checkout more on [Environment Variables](/en/env#redis). 25 | -------------------------------------------------------------------------------- /v1/en/optional-resources/websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Websocket 3 | icon: plug 4 | --- 5 | 6 | Evolution API utilizes socket.io to emit events, leveraging WebSocket technology. This makes the development of integrations more efficient and straightforward for developers. WebSocket provides a full-duplex communication channel over a single, long-lived connection, enabling real-time data flow between the client and server. 7 | 8 | In order to activate websockets, you must define the environment variable `WEBSOCKET_ENABLED` as `true`. Learn more on [Enviroment Variables](/en/env) 9 | 10 | ## Connecting to WebSocket 11 | 12 | To connect to the WebSocket server in the Evolution API, you can use the following URL format: 13 | ~~~ 14 | wss://api.yoursite.com/instance_name 15 | ~~~ 16 | 17 | Replace api.yoursite.com with your actual API domain and instance_name with the name of your specific instance. 18 | 19 | Example of Establishing a WebSocket Connection Here's a basic example of how to establish a WebSocket connection using JavaScript: 20 | 21 | ~~~ JavaScript 22 | const socket = io('wss://api.yoursite.com/instance_name', { 23 | transports: ['websocket'] 24 | }); 25 | 26 | socket.on('connect', () => { 27 | console.log('Connected to Evolution API WebSocket'); 28 | }); 29 | 30 | // Listening to events 31 | socket.on('event_name', (data) => { 32 | console.log('Event received:', data); 33 | }); 34 | 35 | // Handling disconnection 36 | socket.on('disconnect', () => { 37 | console.log('Disconnected from Evolution API WebSocket'); 38 | }); 39 | ~~~ 40 | 41 | In this example, replace event_name with the specific event you want to listen to. 42 | 43 | 44 | ## Handling Events 45 | 46 | Once connected, you can listen for various events emitted by the server. Each event may carry data relevant to the event's context. For instance, if you're listening for message updates, you might receive data containing the updated message content and metadata. 47 | 48 | 49 | ## Sending Messages 50 | 51 | You can also send messages to the server using the emit method: 52 | 53 | ~~~ javascript 54 | socket.emit('send_message', { message: 'Hello, World!' }); 55 | // In this case, send_message is the event name, and the object { message: 'Hello, World!' } is the data being sent. 56 | ~~~ 57 | 58 | 59 | ## Closing the Connection 60 | 61 | To close the WebSocket connection, use the disconnect method: 62 | 63 | ~~~ javascript 64 | socket.disconnect(); 65 | ~~~ 66 | 67 | Remember to handle the connection responsibly, disconnecting when your application or component unmounts to prevent memory leaks and ensure efficient resource usage. 68 | 69 | By leveraging WebSockets, Evolution API offers a powerful way to interact with the system in real time, providing a seamless experience for both developers and end-users. 70 | -------------------------------------------------------------------------------- /v1/en/updates.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Updates 3 | icon: code-pull-request 4 | --- 5 | 6 | Keeping your Evolution API instance up to date is crucial for security, performance, and access to new features. The update method depends on how you initially installed the API. This guide covers the steps to update your Evolution API using Docker Compose and NPM. 7 | 8 | 9 | Before updating Evolution, ensure that all integrated applications are working correctly with Evolution. Update at your own risk. 10 | 11 | 12 | ## Updating with Docker 13 | 14 | If you initially set up your Evolution API using Docker, follow these steps to update: 15 | 16 | ### Updating with Docker CLI 17 | 18 | If your Evolution API was initially installed using Docker Compose via the command line interface (CLI) and not through Portainer or any other container management tool, follow these steps to update it: 19 | 20 | 1. **Navigate to the Docker Compose Directory**: Open a terminal and go to the directory where your Docker Compose file (`docker-compose.yml`) is located. 21 | 22 | 2. **Pull the Latest Image**: Update the Evolution API image to the latest version by running the following command: 23 | 24 | ~~~ shell Terminal 25 | docker-compose pull atendai/evolution-api:latest 26 | ~~~ 27 | 28 | 3. **Stop and Restart the Containers**: After pulling the latest image, stop the current containers and restart them. This can be done using the following command: 29 | 30 | ~~~ shell Terminal 31 | docker-compose down && docker-compose up -d 32 | ~~~ 33 | 34 | ### Updating with Portainer 35 | 36 | If you are using Portainer for container management, follow these steps to update your Evolution API: 37 | 38 | 1. **Access the Portainer Dashboard**: Open your Portainer dashboard in a web browser. 39 | 40 | 2. **Navigate to Your Containers**: Go to the 'Stacks' section where your Evolution API container is listed. 41 | 42 | 3. **Update the Compose File**: 43 | - Locate the `image` field in your Docker Compose configuration. 44 | 45 | ~~~ yaml 46 | # ... (other services and configurations) 47 | evolution_api: 48 | # Update the Evolution API image version here 49 | # Use 'atendai/evolution-api:latest' for the latest version 50 | # Or specify a specific version like 'atendai/evolutionapi:v1.6.0' 51 | image: atendai/evolution-api:v1.x.x 52 | networks: 53 | - your_network 54 | 55 | # ... (remaining Docker Compose configuration) 56 | ~~~ 57 | 58 | - Update the value to `atendai/evolution-api:latest` for the latest version, or use `atendai/evolutionapi:v1.x.x` for a specific version. 59 | - After making the changes, click the 'Deploy' button at the bottom of the compose editing window. 60 | 61 | 4. **Verify the Update**: After recreating the container, verify that the Evolution API is running on the latest version. This can usually be checked via the API version endpoint or logs. 62 | 63 | 64 | For production environments, it is advisable to specify a specific version of the Evolution API (e.g., atendai/evolution-api:v1.x.x) instead of using latest. This practice ensures stability and predictability, protecting your production environment from potential issues caused by unexpected changes in the latest version. 65 | 66 | 67 | ## Updating with NPM 68 | 69 | Updating your Evolution API installation via NPM involves several steps to ensure a smooth transition to the new version. Here is a step-by-step guide: 70 | 71 | 1. **Clean and Stop**: Clean all PM2 logs, useful for troubleshooting after the update, and temporarily stop the Evolution API to apply updates safely. 72 | 73 | ~~~ shell Terminal 74 | # Clean all PM2 logs 75 | pm2 flush 76 | 77 | # Stop the current Evolution API process 78 | pm2 stop ApiEvolution 79 | ~~~ 80 | 81 | 2. **Reset the Local Repository and Pull the Latest Updates**: Ensure your local codebase is synchronized with the latest commit and pull the latest updates from the repository. Optionally, switch to a specific version if not using the latest. This is recommended for production environments. 82 | 83 | ~~~ shell Terminal 84 | # Reset your local repository to the latest commit 85 | git reset --hard HEAD 86 | 87 | # Pull the latest updates from the repository 88 | git pull 89 | 90 | # For a specific version, use 'git checkout main' for the latest, 91 | # or 'git checkout 1.x.x' for a specific version. Example: 92 | git checkout 1.x.x 93 | ~~~ 94 | 95 | 3. **Clean Installation**: Remove the current `node_modules` directory to avoid potential conflicts with new dependencies and install the required Node.js dependencies for the updated version. 96 | 97 | ~~~ shell Terminal 98 | # Remove the current node_modules directory to ensure a clean installation 99 | rm -rf node_modules 100 | 101 | # Install the dependencies with NPM 102 | npm i 103 | 104 | # Restart the Evolution API with the updated version 105 | pm2 start ApiEvolution 106 | 107 | # Optionally, view the PM2 logs for the Evolution API 108 | pm2 log ApiEvolution 109 | ~~~ 110 | -------------------------------------------------------------------------------- /v1/pt/configuration/available-resources.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Recursos Disponíveis' 3 | icon: wrench 4 | --- 5 | 6 | ## Recursos de Mensagens e Grupos 7 | 8 | ### Mensagens (Individuais ou em Grupo) 9 | 10 | | Recurso | Disponibilidade | Descrição | 11 | |-:|:-:|-| 12 | | Envio de Texto | ✅ | (Texto simples, em negrito, itálico, riscado, em formato de código e emojis) | 13 | | Envio de Mídia | ✅ | (Vídeo, imagem e documento) | 14 | | Envio de Áudio Narrado | ✅ | (Funcionando bem no Android e iOS) | 15 | | Envio de Localização | ✅ | (Com nome e descrição do local) | 16 | | Envio de Contato | ✅ | (Com Nome, Empresa, Telefone, E-mail e URL) | 17 | | Envio de Reação | ✅ | (Envie qualquer emoji para reação) | 18 | | Envio de Pré-visualização de Link | ✅ | (Busca por informações de SEO) 🆕 | 19 | | Envio de Resposta | ✅ | (Marcar mensagens em resposta) 🆕 | 20 | | Envio de Menção | ✅ | (Individual, para alguns ou todos os membros) 🆕 | 21 | | Envio de Enquete | ✅ | (Enviar e receber votos de uma enquete) 🆕 | 22 | | Envio de Status/História | ✅ | (Texto, pré-visualização de link, vídeo, imagem e forma de onda) 🆕 | 23 | | Envio de Adesivo | ✅ | (Imagem estática) 🆕 | 24 | | Envio de Lista (Homologação) | ✅ | (Testando) | 25 | | Envio de Botões (Descontinuado) | ❌ | (Só funciona na API em nuvem) | 26 | 27 | ### Perfil 28 | 29 | | Recurso | Disponibilidade | Descrição | 30 | | --- | :---: | --- | 31 | | Atualizar Nome | ✅ | (Alterar o nome do perfil conectado) | 32 | | Atualizar Foto | ✅ | (Alterar a foto do perfil conectado) 🆕 | 33 | | Atualizar Status | ✅ | (Alterar o status do perfil conectado) 🆕 | 34 | | E muitos outros... | | | 35 | 36 | ### Grupo 37 | 38 | | Recurso | Disponibilidade | Descrição | 39 | | --- | :---: | --- | 40 | | Criar Grupo | ✅ | (Novos grupos) | 41 | | Atualizar Foto | ✅ | (Alterar foto do grupo) | 42 | | Atualizar Assunto | ✅ | (Alterar o nome do grupo) 🆕 | 43 | | Atualizar Descrição | ✅ | (Alterar a descrição do grupo) 🆕 | 44 | | Obter Todos os Grupos | ✅ | (Obter todos os grupos e participantes) 🆕 | 45 | | E muitos outros... | | | 46 | -------------------------------------------------------------------------------- /v1/pt/get-started/introduction.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: 'Introdução' 3 | title: 'Introdução' 4 | icon: hand-wave 5 | --- 6 | 7 | 8 | 9 | **Evolution API** é um projeto dedicado a capacitar pequenas empresas, empreendedores, freelancers e indivíduos com recursos limitados. 10 | 11 | Nossa missão é fornecer uma solução de mensagens de **WhatsApp™** via API, permitindo que esses grupos reforcem seus negócios locais ou online. 12 | 13 | O melhor de tudo é que o nosso serviço é **totalmente gratuito**, concebido para apoiar aqueles que se esforçam para ter sucesso num cenário de mercado competitivo. 14 | 15 | Acesse nosso [repositório](https://github.com/EvolutionAPI/evolution-api) e faça parte da nossa [comunidade](https://evolution-api.com) para fazer parte do projeto. 16 | 17 | ## Início Rápido 18 | 19 | 20 | Você precisará ter o Docker instalado em sua máquina, veja a [Documentação Oficial do Docker](https://docs.docker.com/engine/install/) 21 | 22 | Para executar a versão de teste e testar as principais funcionalidades da API, copie o comando abaixo, modifique o valor de `AUTHENTICATION_API_KEY` para um de sua preferência, e execute o comando: 23 | ~~~ sh 24 | docker run -d \ 25 | --name evolution_api \ 26 | -p 8080:8080 \ 27 | -e AUTHENTICATION_API_KEY=mude-me \ 28 | atendai/evolution-api:latest 29 | ~~~ 30 | 31 | A execução via CLI é recomendada para implantações rápidas, principalmente para testes ou desenvolvimento. Não deve ser usada em produção. Em vez disso, recomendamos que você use o docker-compose para facilitar a implantação e manutenção. 32 | 33 | Isso executará um contêiner Docker expondo a aplicação na porta 8080 e você poderá começar a testar e solicitar o código QR do WhatsApp usando o conteúdo da variável de autenticação com o cabeçalho apikey definido. 34 | 35 | Para garantir que a API está em execução, acesse http://localhost:8080 em seu navegador. Esta deve ser a resposta do seu navegador: 36 | 37 | ~~~ json 38 | { 39 | "status":200, 40 | "message":"Welcome to the Evolution API, it is working!", 41 | "version":"1.x.x", 42 | "swagger":"http://localhost:8080/docs", 43 | "manager":"http://localhost:8080/manager", 44 | "documentation":"https://doc.evolution-api.com" 45 | } 46 | ~~~ 47 | 48 | ## Instalação 49 | Veja como instalar a versão completa em: 50 | 51 | 52 | 53 | Veja como instalar a EvolutionAPI completa pelo Docker 54 | 55 | 56 | Utilize a coleção oficial da API para Postman. 57 | 58 | 59 | 60 | 61 | 62 | Veja a documentação da API com exemplos de código 63 | 64 | 65 | Utilize a coleção oficial da API para Postman. 66 | 67 | 68 | -------------------------------------------------------------------------------- /v1/pt/install/docker.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Docker 3 | icon: docker 4 | --- 5 | 6 | 7 | Estas instruções de instalação assumem que você já instalou o Docker em sua máquina. Você pode encontrar 8 | informações sobre como instalar o Docker na 9 | [Documentação Oficial do Docker](https://docs.docker.com/engine/install/). 10 | 11 | 12 | O EvolutionAPI está pronto para o Docker e pode ser facilmente implantado com o Docker no modo standalone e swarm. O repositório oficial do 13 | EvolutionAPI possui todos os arquivos de composição necessários para instalar a API. 14 | 15 | ## Docker Run 16 | ### Início Rápido 17 | 18 | 19 | A instalação CLI é recomendada para implantação rápida, principalmente para testes ou desenvolvimento. Não deve 20 | ser usada para produção. Em vez disso, recomendamos que você [use o docker-compose](#docker-compose) para 21 | facilitar a implantação e a manutenção. 22 | 23 | 24 | A maneira mais rápida de fazer deploy da EvolutionAPI com o Docker é usando `docker run` na interface de linha de 25 | comando. 26 | 27 | ~~~ bash Terminal 28 | docker run -d \ 29 | --name evolution-api \ 30 | -p 8080:8080 \ 31 | -e AUTHENTICATION_API_KEY=mude-me \ 32 | atendai/evolution-api 33 | ~~~ 34 | 35 | Isso executará um contêiner do Docker expondo a aplicação na porta 8080 e você poderá começar a testar e solicitar 36 | o código QR do WhatsApp usando o conteúdo da variável de autenticação com o cabeçalho `apikey` definido. 37 | 38 | ### Início Rápido com Volumes 39 | 40 | Você também pode fazer deploy usando volumes docker para manter os dados persistentes da sua EvolutionAPI e todas 41 | as instâncias do WhatsApp em sua máquina local, evitando problemas com a reinicialização do contêiner usando o 42 | `docker run` na interface de linha de comando. 43 | 44 | Execute o comando a seguir para implementar o EvolutionAPI com os volumes necessários. Este comando mapeia os 45 | volumes `evolution_store` e `evolution_instances` para os respectivos diretórios dentro do contêiner. 46 | 47 | ~~~ bash Terminal 48 | docker run -d \ 49 | --name evolution-api \ 50 | -p 8080:8080 \ 51 | -e AUTHENTICATION_API_KEY=mude-me \ 52 | -v evolution_store:/evolution/store \ 53 | -v evolution_instances:/evolution/instances \ 54 | atendai/evolution-api 55 | ~~~ 56 | 57 | ## Docker Compose 58 | 59 | Fazer deploy da EvolutionAPI usando o Docker Compose simplifica a configuração e o gerenciamento de seus 60 | contêineres Docker. Ele permite que você defina seu ambiente Docker em um arquivo `docker-compose.yaml` e, em 61 | seguida, use um único comando para iniciar tudo. 62 | 63 | Este é um exemplo do Docker Compose para ambientes standalone, ou seja, um único servidor em execução. Para a 64 | sincronização de dois servidores em paralelo, use o Swarm. Isso é para usuários Docker mais avançados. 65 | 66 | ### Standalone 67 | 68 | 69 | **Atenção:** os comandos aqui descritos como `docker compose`, podem não funcionar em versões mais antigas, e devem ser substituídos por `docker-compose`. 70 | 71 | 72 | O Docker standalone é adequado quando sua API de evolução será executada apenas em uma máquina e você não precisará 73 | de escalabilidade ou outros recursos do Docker Swarm por enquanto. É a maneira mais conveniente de usar o Docker 74 | para a maioria das pessoas. 75 | 76 | Crie um arquivo `docker-compose.yml` com este conteúdo: 77 | 78 | ~~~ yaml docker-compose.yml 79 | version: '3' 80 | services: 81 | evolution-api: 82 | container_name: evolution_api 83 | image: atendai/evolution-api 84 | restart: always 85 | ports: 86 | - "8080:8080" 87 | env_file: 88 | - .env 89 | volumes: 90 | - evolution_store:/evolution/store 91 | - evolution_instances:/evolution/instances 92 | 93 | volumes: 94 | evolution_store: 95 | evolution_instances: 96 | ~~~ 97 | 98 | Crie um arquivo `.env` no mesmo diretório com o seguinte: 99 | 100 | ~~~ bash .env 101 | AUTHENTICATION_API_KEY=mude-me 102 | ~~~ 103 | 104 | Para mais configurações, pegue o arquivo de exemplo no 105 | [repositório oficial](https://github.com/EvolutionAPI/evolution-api/blob/main/Docker/.env.example). E veja o 106 | guia [aqui](/pt/install/env) 107 | 108 | 109 | Navegue até o diretório que contém seu arquivo docker-compose.yml e execute: 110 | serviços definidos no arquivo 111 | 112 | ~~~ bash 113 | docker compose up -d 114 | ~~~ 115 | 116 | Este comando baixará as imagens Docker necessárias, criará os serviços, redes e volumes definidos e iniciará o serviço da EvolutionAPI. 117 | 118 | Após executar o comando docker-compose up, você deve ver os logs indicando que os serviços estão em execução. 119 | 120 | ~~~ bash 121 | docker logs evolution_api 122 | ~~~ 123 | 124 | Para parar o serviço, utilize: 125 | ~~~ bash 126 | docker compose down 127 | ~~~ 128 | 129 | Abra seu navegador e acesse http://localhost:8080 para verificar se o EvolutionAPI está operacional. -------------------------------------------------------------------------------- /v1/pt/optional-resources/mongo-db.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: MongoDB 3 | icon: database 4 | --- 5 | 6 | # Setup 7 | 8 | MongoDB, um banco de dados NoSQL, é conhecido por seu alto desempenho e escalabilidade. Ele é ideal para lidar com altos volumes de dados na EvolutionAPI. 9 | 10 | Defina as variáveis de ambiente do MongoDB no arquivo `.env` para Docker ou o `dev-env.yml` para NPM da seguinte forma: 11 | 12 | ~~~ shell 13 | # Defina como true para habilitar o MongoDB. 14 | DATABASE_ENABLED=true 15 | # Sua string de conexão do MongoDB. 16 | DATABASE_CONNECTION_URI=mongodb://user:password@database_URL/?authSource=admin&readPreference=primary&ssl=false&directConnection=true 17 | # Prefixo para o nome do banco de dados. 18 | DATABASE_CONNECTION_DB_PREFIX_NAME=evo 19 | # Salva as credencias de conexão do whatsapp no mongoDB 20 | DATABASE_SAVE_DATA_INSTANCE=false 21 | # Salva as mensagens novas no mongo 22 | DATABASE_SAVE_DATA_NEW_MESSAGE=false 23 | # Salva as atualizações de mensagens no mongo 24 | DATABASE_SAVE_MESSAGE_UPDATE=false 25 | # Salva os contatos importados e novos contatos 26 | DATABASE_SAVE_DATA_CONTACTS=false 27 | # Salva os chats importados e novos 28 | DATABASE_SAVE_DATA_CHATS=false 29 | ~~~ 30 | 31 | # Migração de dados 32 | 33 | Alternar entre o armazenamento local para o MongoDB não transfere automaticamente suas instâncias do WhatsApp que estão atualmente sincronizadas com o local storage original. 34 | 35 | Certifique-se de já ter uma instância do MongoDB em execução com um banco de dados criado. 36 | 37 | Claro, aqui está a tradução da documentação para o português: 38 | 39 | # Migre seus dados no NPM ou NVM 40 | 41 | Pare a execução do PM2: 42 | 43 | **Flush e Stop**: Limpa todos os logs do PM2, útil para solução de problemas após a atualização e para parar temporariamente a Evolution API para aplicar atualizações com segurança. 44 | 45 | ~~~ shell 46 | # Limpar todos os logs do PM2 47 | pm2 flush 48 | 49 | # Parar o processo atual da Evolution API 50 | pm2 stop ApiEvolution 51 | ~~~ 52 | 53 | **Diretório da Evolution API**: acesse o diretório de instalação com o seguinte comando: 54 | ~~~ 55 | cd evolution-api 56 | ~~~ 57 | 58 | **Comando de migração**: Execute o comando de migração no diretório de instalação: 59 | ~~~ 60 | npx evolution-manager api migrate-to-mongo 61 | ~~~ 62 | 63 | Siga os passos do script e migre instâncias específicas do WhatsApp ou todas as suas instâncias. -------------------------------------------------------------------------------- /v1/pt/optional-resources/rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: RabbitMQ 3 | icon: rabbit 4 | --- 5 | 6 | # Ativando RabbitMQ 7 | 8 | Para utilizar efetivamente o **RabbitMQ** com a **Evolution API** para gerenciar instâncias do WhatsApp, é essencial **ativar o RabbitMQ** em cada **instância individual** do WhatsApp.
9 | Esta ativação permite que cada instância comece a receber e processar solicitações de fila AMQP (Advanced Message Queuing Protocol) específicas para essa instância do WhatsApp. 10 | 11 | Em outras palavras, para cada instância do WhatsApp onde você deseja usar o RabbitMQ, você precisa garantir que a integração com o RabbitMQ esteja habilitada. Essa configuração permitirá que a instância se comunique com o servidor RabbitMQ e gerencie sua fila de mensagens e solicitações. Habilitar o RabbitMQ em cada instância é crucial para a distribuição e gestão adequadas das tarefas de mensagens entre as diferentes instâncias do WhatsApp no seu sistema. 12 | 13 | ## Configuração do RabbitMQ para uma instância individual 14 | 15 | Para **desenvolvedores** que desejam usar o sistema de mensagens AMQP em suas aplicações, você pode usar o RabbitMQ para enfileirar as ações das suas instâncias. 16 | 17 | Para configurar o RabbitMQ para instâncias individuais do WhatsApp na Evolution API, você pode usar o seguinte endpoint: 18 | 19 | ~~~ POST 20 | [baseUrl]/rabbitmq/set/[instance_name] 21 | ~~~ 22 | 23 | Este endpoint permite habilitar o RabbitMQ e especificar quais eventos cada instância do WhatsApp deve assinar na fila AMQP. Abaixo está um exemplo do corpo JSON para este endpoint: 24 | 25 | ~~~ json 26 | { 27 | "enabled": true, 28 | "events": [ 29 | // Lista de eventos para assinar. Descomente os eventos que você precisar. 30 | "APPLICATION_STARTUP", 31 | "QRCODE_UPDATED", 32 | "MESSAGES_SET", 33 | "MESSAGES_UPSERT", 34 | "MESSAGES_UPDATE", 35 | "MESSAGES_DELETE", 36 | "SEND_MESSAGE", 37 | "CONTACTS_SET", 38 | "CONTACTS_UPSERT", 39 | "CONTACTS_UPDATE", 40 | "PRESENCE_UPDATE", 41 | "CHATS_SET", 42 | "CHATS_UPSERT", 43 | "CHATS_UPDATE", 44 | "CHATS_DELETE", 45 | "GROUPS_UPSERT", 46 | "GROUP_UPDATE", 47 | "GROUP_PARTICIPANTS_UPDATE", 48 | "CONNECTION_UPDATE", 49 | "CALL", 50 | "NEW_JWT_TOKEN" 51 | ] 52 | } 53 | ~~~ 54 | 55 | Remova eventos não utilizados para manter o baixo uso de recursos com o RabbitMQ. 56 | 57 | Ao configurar a integração com o RabbitMQ, ajuste o array de eventos no corpo JSON para incluir apenas os eventos aos quais você deseja assinar. Descomente qualquer evento que você deseja habilitar para notificações do RabbitMQ. 58 | 59 | Agora você pode enviar mensagens para sua aplicação e consumi-las no RabbitMQ. 60 | 61 | Se você quiser uma configuração mais detalhada e personalizada, consulte a seção de variáveis de ambiente. 62 | 63 | Confira as variáveis de ambiente do RabbitMQ [aqui](/pt/env#rabbitmq) -------------------------------------------------------------------------------- /v1/pt/optional-resources/redis.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Redis 3 | icon: layer-group 4 | --- 5 | 6 | # Configuração 7 | 8 | O Redis é um armazenamento de estrutura de dados em memória, usado como banco de dados, cache e corretor de mensagens. Ele suporta estruturas de dados como strings, hashes, listas, conjuntos e muito mais. Incorporar o Redis pode melhorar significativamente o desempenho da Evolution API, permitindo acesso mais rápido aos dados e cache eficiente. 9 | 10 | Defina as variáveis de ambiente do Redis no arquivo `.env` para Docker ou no arquivo `dev-env.yml` para NPM da seguinte forma: 11 | 12 | ~~~ shell 13 | # Defina como true para habilitar o Redis. 14 | CACHE_REDIS_ENABLED=false 15 | # URI do seu servidor Redis. 16 | CACHE_REDIS_URI=redis://redis:6379 17 | # Chave de prefixo para dados do Redis. 18 | CACHE_REDIS_PREFIX_KEY=evolution 19 | # Tempo que os dados são mantidos em cache 20 | CACHE_REDIS_TTL=604800 21 | # Salva as credencias de conexão do whatsapp no redis 22 | CACHE_REDIS_SAVE_INSTANCES=true 23 | ~~~ 24 | Veja mais em [Variáveis de ambiente](/pt/env#redis). -------------------------------------------------------------------------------- /v1/pt/optional-resources/websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Websocket 3 | icon: plug 4 | --- 5 | 6 | Evolution API utiliza o socket.io para emitir eventos, aproveitando a tecnologia WebSocket. Isso torna o desenvolvimento de integrações mais eficiente e direto para os desenvolvedores. WebSocket fornece um canal de comunicação full-duplex sobre uma única conexão duradoura, permitindo o fluxo de dados em tempo real entre o cliente e o servidor. 7 | 8 | Para ativar os websockets, defina a variável de ambiente `WEBSOCKET_ENABLED` como `true`. Veja mais em [Variáveis de Ambiente](/pt/env) 9 | 10 | ## Conexão ao WebSocket 11 | 12 | Para se conectar ao servidor WebSocket na Evolution API, você pode usar o seguinte formato de URL: 13 | ~~~ 14 | wss://api.seusite.com/nome_instancia 15 | ~~~ 16 | 17 | Substitua api.seusite.com pelo domínio real da sua API e nome_instancia pelo nome da sua instância específica. 18 | 19 | Exemplo de Estabelecimento de Conexão WebSocket Aqui está um exemplo básico de como estabelecer uma conexão WebSocket usando JavaScript: 20 | 21 | ~~~ JavaScript 22 | const socket = io('wss://api.seusite.com/nome_instancia', { 23 | transports: ['websocket'] 24 | }); 25 | 26 | socket.on('connect', () => { 27 | console.log('Conectado ao WebSocket da Evolution API'); 28 | }); 29 | 30 | // Escutando eventos 31 | socket.on('nome_evento', (data) => { 32 | console.log('Evento recebido:', data); 33 | }); 34 | 35 | // Lidando com desconexão 36 | socket.on('disconnect', () => { 37 | console.log('Desconectado do WebSocket da Evolution API'); 38 | }); 39 | ~~~ 40 | 41 | Neste exemplo, substitua `nome_evento` pelo evento específico que você deseja escutar. 42 | 43 | ## Manipulando Eventos 44 | 45 | Uma vez conectado, você pode escutar vários eventos emitidos pelo servidor. Cada evento pode carregar dados relevantes para o contexto do evento. Por exemplo, se estiver ouvindo atualizações de mensagens, você pode receber dados contendo o conteúdo da mensagem atualizada e metadados. 46 | 47 | 48 | ## Enviando Mensagens 49 | 50 | Você também pode enviar mensagens para o servidor usando o método emit: 51 | 52 | ~~~ javascript 53 | socket.emit('send_message', { message: 'Olá, Mundo!' }); 54 | // Neste caso, send_message é o nome do evento, e o objeto { message: 'Olá, Mundo!' } é os dados sendo enviados. 55 | ~~~ 56 | 57 | 58 | ## Fechando a Conexão 59 | 60 | Para fechar a conexão WebSocket, use o método disconnect: 61 | 62 | ~~~ javascript 63 | socket.disconnect(); 64 | ~~~ 65 | 66 | Lembre-se de manipular a conexão de forma responsável, desconectando quando sua aplicação ou componente for desmontado para evitar vazamentos de memória e garantir o uso eficiente de recursos. 67 | 68 | Ao aproveitar os WebSockets, a Evolution API oferece uma maneira poderosa de interagir com o sistema em tempo real, proporcionando uma experiência contínua tanto para desenvolvedores quanto para usuários finais. 69 | -------------------------------------------------------------------------------- /v1/pt/updates.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Atualização 3 | icon: code-pull-request 4 | --- 5 | 6 | Manter sua instância da Evolution API atualizada é crucial para segurança, desempenho e acesso a novos recursos. O método de atualização depende de como você inicialmente instalou a API. Este guia cobre os passos para atualizar sua Evolution API usando Docker Compose e NPM. 7 | 8 | Antes de atualizar a Evolution, certifique-se de que todos os aplicativos integrados estão realmente funcionando com a Evolution. Atualize por sua conta e risco. 9 | 10 | ## Atualização com Docker 11 | 12 | Se você configurou inicialmente sua Evolution API usando Docker, siga estas etapas para atualizar: 13 | 14 | ### Atualização com Docker CLI 15 | 16 | Se sua Evolution API foi instalada inicialmente usando Docker Compose via interface de linha de comando (CLI), e não através do Portainer ou qualquer outra ferramenta de gerenciamento de contêiner, siga estas etapas para atualizá-la: 17 | 18 | 1. **Navegue até o Diretório do Docker Compose**: Abra um terminal e vá para o diretório onde seu arquivo Docker Compose (`docker-compose.yml`) está localizado. 19 | 20 | 2. **Puxe a Imagem Mais Recente**: Atualize a imagem da Evolution API para a versão mais recente executando o seguinte comando: 21 | 22 | ~~~ shell 23 | docker compose pull atendai/evolution-api:latest 24 | ~~~ 25 | 26 | 3. **Pare e Reinicie os Contêineres**: Após puxar a imagem mais recente, pare os contêineres atuais e reinicie-os. Isso pode ser feito usando o seguinte comando: 27 | 28 | ~~~ shell 29 | docker compose down && docker compose up -d 30 | ~~~ 31 | 32 | ## Atualização com Portainer 33 | 34 | Se você está usando o Portainer para gerenciamento de contêineres, siga estas etapas para atualizar sua Evolution API: 35 | 36 | 1. **Acesse o Painel do Portainer**: Abra o painel do Portainer em um navegador web. 37 | 38 | 2. **Navegue até Seus Contêineres**: Vá para a seção 'Stacks' onde seu contêiner da Evolution API está listado. 39 | 40 | 3. **Atualize o Compose**: 41 | - Localize o campo `image` na sua configuração do Docker Compose. 42 | 43 | ~~~ yaml stack-file.yml 44 | # ... (outros serviços e configurações) 45 | evolution_api: 46 | # Atualize a versão da imagem da Evolution API aqui 47 | # Use 'atendai/evolution-api:latest' para a versão mais recente 48 | # Ou especifique uma versão específica como 'atendai/evolutionapi:v1.6.0' 49 | image: atendai/evolution-api:v1.x.x 50 | networks: 51 | - your_network 52 | 53 | # ... (restante da configuração do Docker Compose) 54 | ~~~ 55 | 56 | - Atualize o valor para `atendai/evolution-api:latest` para a versão mais recente, ou use `atendai/evolutionapi:v1.x.x` para uma versão específica. 57 | - Após fazer as alterações, clique no botão 'Deploy' no final da janela de edição do compose. 58 | 59 | 4. **Verifique a Atualização**: Após recriar o contêiner, verifique se a Evolution API está executando a versão mais recente. Isso pode ser verificado tipicamente através do endpoint de versão da API ou dos logs. 60 | 61 | 62 | Para ambientes de produção, é recomendável especificar uma versão particular da Evolution API (ex.: atendai/evolution-api:v1.x.x) em vez de usar latest. 63 | Esta prática garante estabilidade e previsibilidade, pois protege seu ambiente de produção de problemas potenciais decorrentes de mudanças inesperadas na versão mais recente. 64 | 65 | 66 | Seguindo esses passos, você pode garantir que sua Evolution API esteja sempre atualizada usando o Portainer. 67 | 68 | ## Atualização com NPM 69 | 70 | Atualizar sua instalação da Evolution API via NPM envolve várias etapas para garantir uma transição suave para a nova versão. Aqui está um guia passo a passo: 71 | 72 | 1. **Limpar e Parar**: Limpe todos os logs do PM2, útil para resolução de problemas após a atualização, e pare temporariamente a Evolution API para aplicar as atualizações com segurança. 73 | 74 | ~~~ shell Terminal 75 | # Limpar todos os logs do PM2 76 | pm2 flush 77 | 78 | # Parar o processo atual da Evolution API 79 | pm2 stop ApiEvolution 80 | ~~~ 81 | 82 | 2. **Resetar o repositório local e puxar as atualizações mais recentes**: Garanta que seu código local esteja em sincronia com o commit mais recente e baixe as atualizações mais recentes do repositório. Opcionalmente, mude para uma versão específica se não estiver usando a mais recente. É recomendado para ambientes de produção. 83 | 84 | ~~~ shell Terminal 85 | # Resetar seu repositório local para o commit mais recente 86 | git reset --hard HEAD 87 | 88 | # Puxar as atualizações mais recentes do repositório 89 | git pull 90 | 91 | # Para uma versão específica, use 'git checkout main' para a mais recente, 92 | # ou 'git checkout 1.x.x' para uma versão específica. Exemplo: 93 | git checkout 1.x.x 94 | ~~~ 95 | 96 | 3. **Instalação Limpa**: Remova o `node_modules` existente para evitar possíveis conflitos com novas dependências e instale as dependências necessárias do Node.js para a versão atualizada. 97 | 98 | ~~~ shell Terminal 99 | # Remover o diretório node_modules atual para garantir uma instalação limpa 100 | rm -rf node_modules 101 | 102 | # Instalar dependências com NPM 103 | npm i 104 | 105 | # Reiniciar a Evolution API com a versão atualizada 106 | pm2 start ApiEvolution 107 | 108 | # Opcionalmente, visualizar os logs do PM2 para a Evolution API 109 | pm2 log ApiEvolution 110 | ~~~ -------------------------------------------------------------------------------- /v2/api-reference/authentication.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Autenticação' 3 | --- 4 | 5 | Em Definições selecione a opção Referência de API. Copie o token gerado e use no header Authorization nas suas requisições como `Bearer `. 6 | -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/archive-chat.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Archive Chat' 3 | openapi: openapi-v2 POST /chat/archiveChat/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/check-is-whatsapp.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Check is WhatsApp' 3 | openapi: openapi-v2 POST /chat/whatsappNumbers/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/delete-message-for-everyone.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Message for Everyone' 3 | openapi: openapi-v2 DELETE /chat/deleteMessageForEveryone/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/fetch-profilepic-url.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Profile Picture URL' 3 | openapi: openapi-v2 POST /chat/fetchProfilePictureUrl/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/find-chats.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Chats' 3 | openapi: openapi-v2 POST /chat/findChats/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/find-contacts.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Contacts' 3 | openapi: openapi-v2 POST /chat/findContacts/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/find-messages.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Messages' 3 | openapi: openapi-v2 POST /chat/findMessages/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/find-status-message.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Status Message' 3 | openapi: openapi-v2 POST /chat/findStatusMessage/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/get-base64.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Get Base64' 3 | openapi: openapi-v2 POST /chat/getBase64FromMediaMessage/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/mark-as-read.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Mark Message As Read' 3 | openapi: openapi-v2 POST /chat/markMessageAsRead/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/mark-as-unread.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Mark Message As Unread' 3 | openapi: openapi-v2 POST /chat/markChatUnread/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/send-presence.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Presence' 3 | openapi: openapi-v2 POST /chat/sendPresence/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/update-message.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Message' 3 | openapi: openapi-v2 POST /chat/updateMessage/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/chat-controller/updateBlockStatus.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Block Status' 3 | openapi: openapi-v2 POST /message/updateBlockStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/get-information.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Get Information' 3 | openapi: openapi-v2 GET / 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/accept-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Accept Invite Code' 3 | openapi: openapi-v2 GET /group/acceptInviteCode/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/fetch-all-groups.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch All Groups' 3 | openapi: openapi-v2 GET /group/fetchAllGroups/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/fetch-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Invite Code' 3 | openapi: openapi-v2 GET /group/inviteCode/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/find-group-by-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Group by Invite Code' 3 | openapi: openapi-v2 GET /group/inviteInfo/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/find-group-by-jid.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Group by JID' 3 | openapi: openapi-v2 GET /group/findGroupInfos/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/find-participants.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Group Members' 3 | openapi: openapi-v2 GET /group/participants/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/group-create.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Group' 3 | openapi: openapi-v2 POST /group/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/leave-group.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Leave Group' 3 | openapi: openapi-v2 DELETE /group/leaveGroup/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/revoke-invite-code.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Revoke Invite Code' 3 | openapi: openapi-v2 POST /group/revokeInviteCode/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/send-invite-url.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Group Invite' 3 | openapi: openapi-v2 POST /group/sendInvite/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/toggle-ephemeral.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Toggle Ephemeral' 3 | openapi: openapi-v2 POST /group/toggleEphemeral/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/update-group-description.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Description' 3 | openapi: openapi-v2 POST /group/updateGroupDescription/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/update-group-picture.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Picture' 3 | openapi: openapi-v2 POST /group/updateGroupPicture/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/update-group-subject.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Subject' 3 | openapi: openapi-v2 POST /group/updateGroupSubject/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/update-participant.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Members' 3 | openapi: openapi-v2 POST /group/updateParticipant/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/group-controller/update-setting.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Group Setting' 3 | openapi: openapi-v2 POST /group/updateSetting/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/connection-state.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Connection State' 3 | openapi: openapi-v2 GET /instance/connectionState/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/create-instance-basic.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Instance' 3 | openapi: openapi-v2 POST /instance/create 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/delete-instance.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Instance' 3 | openapi: openapi-v2 DELETE /instance/delete/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/fetch-instances.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Instances' 3 | openapi: openapi-v2 GET /instance/fetchInstances 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/instance-connect.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Instance Connect' 3 | openapi: openapi-v2 GET /instance/connect/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/logout-instance.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Logout Instance' 3 | openapi: openapi-v2 DELETE /instance/logout/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/restart-instance.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Restart Instance' 3 | openapi: openapi-v2 PUT /instance/restart/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/instance-controller/set-presence.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Presence' 3 | openapi: openapi-v2 POST /instance/setPresence/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/chatwoot/find-chatwoot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Chatwoot' 3 | openapi: openapi-v2 GET /chatwoot/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/chatwoot/set-chatwoot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Chatwoot' 3 | openapi: openapi-v2 POST /chatwoot/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/change-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change Status Bot' 3 | openapi: openapi-v2 POST /dify/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/create-dify.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Dify Bot' 3 | openapi: openapi-v2 POST /dify/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/find-bot-dify.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Dify Bot' 3 | openapi: openapi-v2 GET /dify/find/:difyId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/find-dify.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Dify Bots' 3 | openapi: openapi-v2 GET /dify/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/find-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Dify Settings' 3 | openapi: openapi-v2 GET /dify/fetchSettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/find-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Status Bot' 3 | openapi: openapi-v2 GET /dify/fetchSessions/:difyId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/set-settings-dify.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Dify Settings' 3 | openapi: openapi-v2 POST /dify/settings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/dify/update-dify.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Dify Bot' 3 | openapi: openapi-v2 PUT /dify/update/:difyId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/change-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change Status Bot' 3 | openapi: openapi-v2 POST /evoai/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/create-evoai.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create EvoAI Bot' 3 | openapi: openapi-v2 POST /evoai/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/find-bot-evoai.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find EvoAI Bot' 3 | openapi: openapi-v2 GET /evoai/find/:evoaiId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/find-evoai.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find EvoAI Bots' 3 | openapi: openapi-v2 GET /evoai/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/find-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find EvoAI Settings' 3 | openapi: openapi-v2 GET /evoai/fetchSettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/find-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Status Bot' 3 | openapi: openapi-v2 GET /evoai/fetchSessions/:evoaiId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/set-settings-evoai.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set EvoAI Settings' 3 | openapi: openapi-v2 POST /evoai/settings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evoai/update-evoai.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update EvoAI Bot' 3 | openapi: openapi-v2 PUT /evoai/update/:evoaiId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/change-status-session.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change Evolution Bot status' 3 | openapi: openapi-v2 POST /evolutionBot/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/create-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Evolution Bot' 3 | openapi: openapi-v2 POST /evolutionBot/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/delete-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Evolution Bot' 3 | openapi: openapi-v2 DELETE /evolutionBot/delete/:evolutionBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/fetch-bots.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Evolution Bot' 3 | openapi: openapi-v2 GET /evolutionBot/fetch/:evolutionBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/fetch-session.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Evolution Bot Session' 3 | openapi: openapi-v2 GET /evolutionBot/fetchSessions/:evolutionBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/find-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Evolution Bots' 3 | openapi: openapi-v2 GET /evolutionBot/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/find-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Settings Bot' 3 | openapi: openapi-v2 GET /evolutionBot/fetchSettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/set-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Settings Bot' 3 | openapi: openapi-v2 POST /evolutionBot/settings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/evolution/update.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Evolution Bot' 3 | openapi: openapi-v2 PUT /evolutionBot/update/:evolutionBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/change-session-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change Status Session' 3 | openapi: openapi-v2 POST /flowise/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/create-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Flowise Bot' 3 | openapi: openapi-v2 POST /flowise/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/delete-flowise-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Flowise Bot' 3 | openapi: openapi-v2 DELETE /flowise/delete/:flowiseId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/find-flowise-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Flowise Bot' 3 | openapi: openapi-v2 GET /flowise/find/:flowiseId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/find-flowise-bots.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Flowise Bots' 3 | openapi: openapi-v2 GET /flowise/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/find-sessions.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Sessions Flowise' 3 | openapi: openapi-v2 GET /flowise/fetchSessions/:flowiseId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/find-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Flowise settings' 3 | openapi: openapi-v2 GET /flowise/fetchSettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/set-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Settings Flowise Bots' 3 | openapi: openapi-v2 POST /flowise/settings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/flowise/update-flowise-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Flowise Bot' 3 | openapi: openapi-v2 POST /flowise/update/:flowiseId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/change-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change Status Bot' 3 | openapi: openapi-v2 POST /n8n/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/create-n8n.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create n8n Bot' 3 | openapi: openapi-v2 POST /n8n/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/find-bot-n8n.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find n8n Bot' 3 | openapi: openapi-v2 GET /n8n/find/:n8nId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/find-n8n.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find n8n Bots' 3 | openapi: openapi-v2 GET /n8n/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/find-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find n8n Settings' 3 | openapi: openapi-v2 GET /n8n/fetchSettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/find-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Status Bot' 3 | openapi: openapi-v2 GET /n8n/fetchSessions/:n8nId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/set-settings-n8n.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set n8n Settings' 3 | openapi: openapi-v2 POST /n8n/settings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/n8n/update-n8n.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update n8n Bot' 3 | openapi: openapi-v2 PUT /n8n/update/:n8nId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/change-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change status OpenAI' 3 | openapi: openapi-v2 POST /openai/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/create-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create OpenIA Bot' 3 | openapi: openapi-v2 POST /openai/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/delete-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete OpenIA Bot' 3 | openapi: openapi-v2 DELETE /openai/delete/:openaiBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/delete-creds.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete OpenIA Bot' 3 | openapi: openapi-v2 DELETE /openai/creds/:openaiCredsId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/find-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find OpenIA Bot' 3 | openapi: openapi-v2 GET /openai/find/:openaiBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/find-bots.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find OpenIA Bots' 3 | openapi: openapi-v2 GET /openai/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/find-creds-openai.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find OpenIA Creds' 3 | openapi: openapi-v2 GET /openai/creds/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/find-session.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find sessions OpenAI' 3 | openapi: openapi-v2 GET /openai/fetchSessions/:openaiBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/find-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find settings OpenAI' 3 | openapi: openapi-v2 GET /openai/fetchSettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/set-creds.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Creds config OpenAI' 3 | openapi: openapi-v2 POST /openai/creds/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/settings-openai.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Settigns config OpenAI' 3 | openapi: openapi-v2 POST /openai/settings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/openai/update-bot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Bot' 3 | openapi: openapi-v2 PUT /openai/update/:openaiBotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/rabbitmq/find-rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find RabbitMQ' 3 | openapi: openapi-v2 GET /rabbitmq/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/rabbitmq/set-rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set RabbitMQ' 3 | openapi: openapi-v2 POST /rabbitmq/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/sqs/find-sqs.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find SQS' 3 | openapi: openapi-v2 GET /sqs/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/sqs/set-sqs.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set SQS' 3 | openapi: openapi-v2 POST /sqs/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/change-session-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Change Session Status' 3 | openapi: openapi-v2 POST /typebot/changeStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/delete-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Delete Typebot' 3 | openapi: openapi-v2 Delete /typebot/delete/:typebotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/fetch-session.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Session Typebot' 3 | openapi: openapi-v2 GET /typebot/fetchSessions/:typebotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/fetch-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Typebot' 3 | openapi: openapi-v2 GET /typebot/fetch/:typebotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/find-settings-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Typebot Settings' 3 | openapi: openapi-v2 GET /typebot/fetchSettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/find-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Typebot' 3 | openapi: openapi-v2 GET /typebot/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/set-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Create Typebot' 3 | openapi: openapi-v2 POST /typebot/create/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/settings-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Settings Typebot' 3 | openapi: openapi-v2 POST /typebot/settings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/start-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Start Typebot' 3 | openapi: openapi-v2 POST /typebot/start/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/typebot/update-typebot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Typebot' 3 | openapi: openapi-v2 POST /typebot/update/:typebotId/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/websocket/find-websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Websocket' 3 | openapi: openapi-v2 GET /websocket/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/integrations/websocket/set-websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Websocket' 3 | openapi: openapi-v2 POST /websocket/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-audio.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send WhatsApp Audio' 3 | openapi: openapi-v2 POST /message/sendWhatsAppAudio/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-button.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Buttons' 3 | openapi: openapi-v2 POST /message/sendButtons/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-contact.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Contact' 3 | openapi: openapi-v2 POST /message/sendContact/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-list.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send List' 3 | openapi: openapi-v2 POST /message/sendList/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-location.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Location' 3 | openapi: openapi-v2 POST /message/sendLocation/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-media.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Media' 3 | openapi: openapi-v2 POST /message/sendMedia/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-poll.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Poll' 3 | openapi: openapi-v2 POST /message/sendPoll/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-reaction.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Reaction' 3 | openapi: openapi-v2 POST /message/sendReaction/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Status' 3 | openapi: openapi-v2 POST /message/sendStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-sticker.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Sticker' 3 | openapi: openapi-v2 POST /message/sendSticker/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/message-controller/send-text.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Send Plain Text' 3 | openapi: openapi-v2 POST /message/sendText/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/fetch-business-profile.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Business Profile' 3 | openapi: openapi-v2 POST /chat/fetchBusinessProfile/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/fetch-privacy-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Privacy Settings' 3 | openapi: openapi-v2 GET /chat/fetchPrivacySettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/fetch-profile.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Fetch Profile' 3 | openapi: openapi-v2 POST /chat/fetchProfile/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/remove-profile-picture.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Remove Profile Picture' 3 | openapi: openapi-v2 DELETE /chat/removeProfilePicture/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/update-privacy-settings.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Privacy Settings' 3 | openapi: openapi-v2 POST /chat/updatePrivacySettings/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/update-profile-name.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Profile Name' 3 | openapi: openapi-v2 POST /chat/updateProfileName/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/update-profile-picture.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Profile Picture' 3 | openapi: openapi-v2 POST /chat/updateProfilePicture/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/profile-settings/update-profile-status.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Update Profile Status' 3 | openapi: openapi-v2 POST /chat/updateProfileStatus/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/settings/get.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Settings' 3 | openapi: openapi-v2 GET /settings/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/settings/set.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Settings' 3 | openapi: openapi-v2 POST /settings/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/webhook/get.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Find Webhook' 3 | openapi: openapi-v2 GET /webhook/find/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/api-reference/webhook/set.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Set Webhook' 3 | openapi: openapi-v2 POST /webhook/set/{instance} 4 | --- -------------------------------------------------------------------------------- /v2/en/configuration/available-resources.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Available Features' 3 | icon: wrench 4 | --- 5 | 6 | ## Messaging and Group Features 7 | 8 | ### Messages (Individual or Group) 9 | 10 | | Feature | Availability | Description | 11 | |-:|:-:|-| 12 | | Send Text | ✅ | (Plain text, bold, italic, strikethrough, code format, and emojis) | 13 | | Send Media | ✅ | (Video, image, and document) | 14 | | Send Voice Message | ✅ | (Works well on Android and iOS) | 15 | | Send Location | ✅ | (With name and description of the place) | 16 | | Send Contact | ✅ | (With Name, Company, Phone, Email, and URL) | 17 | | Send Reaction | ✅ | (Send any emoji as a reaction) | 18 | | Send Link Preview | ✅ | (Fetches SEO information) 🆕 | 19 | | Send Reply | ✅ | (Mark messages as a reply) 🆕 | 20 | | Send Mention | ✅ | (Individual, to some or all members) 🆕 | 21 | | Send Poll | ✅ | (Send and receive votes on a poll) 🆕 | 22 | | Send Status/Story | ✅ | (Text, link preview, video, image, and waveform) 🆕 | 23 | | Send Sticker | ✅ | (Static image) 🆕 | 24 | | Send List (Staging) | ✅ | (Testing) | 25 | | Send Buttons (Discontinued) | ❌ | (Only works on cloud API) | 26 | 27 | ### Profile 28 | 29 | | Feature | Availability | Description | 30 | | --- | :---: | --- | 31 | | Update Name | ✅ | (Change the connected profile name) | 32 | | Update Photo | ✅ | (Change the connected profile picture) 🆕 | 33 | | Update Status | ✅ | (Change the connected profile status) 🆕 | 34 | | And many more... | | | 35 | 36 | ### Group 37 | 38 | | Feature | Availability | Description | 39 | | --- | :---: | --- | 40 | | Create Group | ✅ | (New groups) | 41 | | Update Photo | ✅ | (Change group photo) | 42 | | Update Subject | ✅ | (Change group name) 🆕 | 43 | | Update Description | ✅ | (Change group description) 🆕 | 44 | | Get All Groups | ✅ | (Get all groups and participants) 🆕 | 45 | | And many more... | | | -------------------------------------------------------------------------------- /v2/en/get-started/introduction.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: 'Introduction' 3 | title: 'Introduction' 4 | icon: hand-wave 5 | --- 6 | 7 | **Evolution API v2** is a robust platform dedicated to empowering small businesses, entrepreneurs, freelancers, and individuals with limited resources, 8 | going beyond a simple messaging solution via **WhatsApp™**. 9 | 10 | Our mission is to provide a comprehensive API that enables these groups to strengthen their businesses, whether locally or online, by integrating with **multiple platforms and services**. 11 | 12 | The best part is that our service is **completely free**, designed to support those striving to succeed in a competitive market landscape. 13 | 14 | Originally, **Evolution API** started as a WhatsApp control API based on CodeChat, utilizing the Baileys library. Over time, the platform expanded to 15 | support not only WhatsApp but also integrations with services like **Typebot, Chatwoot, Dify, and OpenAI**. 16 | Additionally, the Evolution API supports both the WhatsApp API based on Baileys and the official WhatsApp Business API, with future support planned for Instagram and Messenger. 17 | 18 | Visit our [repository](https://github.com/EvolutionAPI/evolution-api) and join our [community](https://evolution-api.com) to be a part of the project. 19 | 20 | ## Installation 21 | Learn how to install the full version at: 22 | 23 | 24 | 25 | Learn how to install the full Evolution API with Docker 26 | 27 | 28 | Learn how to install the Evolution API with NVM 29 | 30 | 31 | 32 | 33 | 34 | View the API documentation with code examples 35 | 36 | 37 | Use the official API collection for Postman. 38 | 39 | -------------------------------------------------------------------------------- /v2/en/install/nginx.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Nginx and SSL 3 | icon: globe 4 | --- 5 | 6 | ## Nginx Configuration 7 | 8 | To securely expose the Evolution API on the web, you can configure Nginx as a reverse proxy. 9 | 10 | ### Installing Nginx 11 | 12 | Install, start, and enable Nginx: 13 | 14 | ```bash 15 | apt-get install -y nginx 16 | systemctl start nginx 17 | systemctl enable nginx 18 | systemctl status nginx 19 | ``` 20 | 21 | If the message "Active: active (running)" appears, Nginx is working correctly. 22 | 23 | ### Nginx Configuration 24 | 25 | Remove the default Nginx configuration: 26 | 27 | ```bash 28 | rm /etc/nginx/sites-enabled/default 29 | ``` 30 | 31 | Create a new configuration file: 32 | 33 | ```bash 34 | nano /etc/nginx/conf.d/default.conf 35 | ``` 36 | 37 | Add the following configuration: 38 | 39 | ```nginx 40 | server { 41 | listen 80; 42 | listen [::]:80; 43 | server_name _; 44 | 45 | location / { 46 | proxy_pass http://127.0.0.1:8080; 47 | proxy_http_version 1.1; 48 | proxy_set_header Upgrade $http_upgrade; 49 | proxy_set_header Connection 'upgrade'; 50 | proxy_set_header Host $host; 51 | proxy_set_header X-Real-IP $remote_addr; 52 | proxy_set_header X-Forwarded-Proto $scheme; 53 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 54 | proxy_cache_bypass $http_upgrade; 55 | } 56 | 57 | location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ { 58 | expires 360d; 59 | } 60 | 61 | location ~ /\.ht { 62 | deny all; 63 | } 64 | } 65 | ``` 66 | 67 | Reload Nginx to apply the changes: 68 | 69 | ```bash 70 | systemctl reload nginx 71 | ``` 72 | 73 | If necessary, make the `nginx` user the owner of the web directory: 74 | 75 | ```bash 76 | chown www-data:www-data /usr/share/nginx/html -R 77 | ``` 78 | 79 | To configure a Virtual Host, create a configuration file: 80 | 81 | ```bash 82 | nano /etc/nginx/sites-available/api 83 | ``` 84 | 85 | Add the following configuration: 86 | 87 | ```nginx 88 | server { 89 | server_name replace-this-with-your-cool-domain.com; 90 | 91 | location / { 92 | proxy_pass http://127.0.0.1:8080; 93 | proxy_http_version 1.1; 94 | proxy_set_header Upgrade $http_upgrade; 95 | proxy_set_header Connection 'upgrade'; 96 | proxy_set_header Host $host; 97 | proxy_set_header X-Real-IP $remote_addr; 98 | proxy_set_header X-Forwarded-Proto $scheme; 99 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 100 | proxy_cache_bypass $http_upgrade; 101 | } 102 | } 103 | ``` 104 | 105 | Create a symbolic link to enable the configuration: 106 | 107 | ```bash 108 | ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled 109 | nginx -t 110 | ``` 111 | 112 | Reload Nginx: 113 | 114 | ```bash 115 | systemctl reload nginx 116 | ``` 117 | 118 | ## Install Certbot for SSL Certificate 119 | 120 | To secure your Evolution API with SSL, install Certbot: 121 | 122 | ```bash 123 | snap install --classic certbot 124 | ``` 125 | 126 | ### Configure SSL with Certbot 127 | 128 | To configure SSL, use the command: 129 | 130 | ```bash 131 | certbot --nginx -d replace-this-with-your-cool-domain.com 132 | ``` 133 | 134 | 135 | If the process is successful, you will see the message "Congratulations! You have successfully enabled HTTPS". 136 | -------------------------------------------------------------------------------- /v2/en/install/nvm.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: NVM 3 | icon: js 4 | --- 5 | 6 | ## Prerequisites 7 | 8 | Before starting the installation of Evolution API v2, ensure that you have already configured the necessary services, such as PostgreSQL and Redis. Follow the links below for more details: 9 | 10 | - [Database Configuration](/v2/pt/requirements/database) 11 | - [Redis Configuration](/v2/pt/requirements/redis) 12 | 13 | ## NVM Installation 14 | 15 | Evolution API can be easily installed using Node Version Manager (NVM). Follow these steps to set up your environment and start the Evolution API on your server. 16 | 17 | ### Install NVM 18 | 19 | First, download and install Node.js with the following commands: 20 | 21 | ```bash 22 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash 23 | ``` 24 | 25 | Now, load the environment and install Node.js: 26 | 27 | ```bash 28 | # Load NVM into the current environment 29 | source ~/.bashrc 30 | 31 | # Install and use the required Node.js version 32 | nvm install v20.10.0 && nvm use v20.10.0 33 | ``` 34 | 35 | Confirm that NVM was successfully installed: 36 | 37 | ```bash 38 | command -v nvm 39 | ``` 40 | 41 | 42 | If you haven't set it up yet, you can also configure your server's timezone with the command: 43 | 44 | ```bash 45 | dpkg-reconfigure tzdata 46 | ``` 47 | 48 | 49 | ## Cloning the Repository and Installing Dependencies 50 | 51 | Clone the official Evolution API v2 repository from the correct branch: 52 | 53 | ```bash 54 | git clone -b v2.0.0 https://github.com/EvolutionAPI/evolution-api.git 55 | ``` 56 | 57 | Navigate to the project directory and install the dependencies: 58 | 59 | ```bash 60 | cd evolution-api 61 | npm install 62 | ``` 63 | 64 | ## Environment Variables Configuration 65 | 66 | Now let's configure the environment variables. First, copy the `.env.example` file to `.env`: 67 | 68 | ```bash 69 | cp ./.env.example ./.env 70 | ``` 71 | 72 | Edit the `.env` file with your specific settings: 73 | 74 | ```bash 75 | nano ./.env 76 | ``` 77 | 78 | Replace the default values with your configurations, such as database connection strings, API keys, server ports, etc. 79 | 80 | 81 | Visit the [environment variables section](/v2/pt/env) for detailed instructions on how to configure your `.env` file. 82 | 83 | 84 | ## Database Generation and Deployment 85 | 86 | After setting up the environment, you will need to generate the Prisma client files and deploy the migrations to the database. Use the following commands, depending on the database you are using (PostgreSQL or MySQL): 87 | 88 | 1. Generate the Prisma client files: 89 | 90 | ```bash 91 | npm run db:generate 92 | ``` 93 | 94 | 2. Deploy the migrations: 95 | 96 | ```bash 97 | npm run db:deploy 98 | ``` 99 | 100 | ## Starting the Evolution API 101 | 102 | After configuration, you can start the Evolution API with the following command: 103 | 104 | ```bash 105 | npm run build 106 | npm run start:prod 107 | ``` 108 | 109 | ## PM2 Installation and Configuration 110 | 111 | Use PM2 to manage the API process: 112 | 113 | ```bash 114 | npm install pm2 -g 115 | pm2 start 'npm run start:prod' --name ApiEvolution 116 | pm2 startup 117 | pm2 save --force 118 | ``` 119 | 120 | 121 | If your server has more memory, consider configuring PM2 to utilize more resources: 122 | 123 | ```bash 124 | pm2 start 'npm run start:prod' --name ApiEvolution -- start --node-args="--max-old-space-size=4096" --max-memory-restart 4G 125 | ``` 126 | 127 | This is recommended for servers with at least 4GB of RAM exclusively available for the Evolution API. 128 | 129 | 130 | To verify that the API is running, visit [http://localhost:8080](http://localhost:8080). You should see the following response: 131 | 132 | ```json 133 | { 134 | "status": 200, 135 | "message": "Welcome to the Evolution API, it is working!", 136 | "version": "2.0.10", 137 | "clientName": "evolution01", 138 | "manager": "https://evo2.site.com/manager", 139 | "documentation": "https://doc.evolution-api.com" 140 | } 141 | ``` 142 | 143 | 144 | Make your life easier with the JSON Formatter extension on [Google Chrome](https://chromewebstore.google.com/detail/json-formatter/gpmodmeblccallcadopbcoeoejepgpnb?hl=en) or [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/json-formatter/hdebmbedhflilekbidmmdiaiilaegkjl). 145 | -------------------------------------------------------------------------------- /v2/en/integrations/chatwoot.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Chatwoot 3 | icon: comment 4 | --- 5 | 6 | The Evolution API allows direct integration with **Chatwoot**, a customer support platform that centralizes communications from multiple channels. This documentation details how to configure this integration both when creating a new instance and in an existing instance. 7 | 8 | ## Chatwoot Integration Configuration 9 | 10 | ### 1. Configuration During Instance Creation 11 | 12 | You can configure Chatwoot directly when creating a new instance in the Evolution API. Use the following request body for the `/instance/create` endpoint: 13 | 14 | #### Endpoint 15 | 16 | ~~~http 17 | POST {{baseUrl}}/instance/create 18 | ~~~ 19 | 20 | #### Request Body 21 | 22 | ~~~json 23 | { 24 | "instanceName": "INSTANCE NAME", 25 | "number": "WHATSAPP NUMBER TO GENERATE PAIRING CODE", 26 | "qrcode": true, 27 | "integration": "WHATSAPP-BAILEYS", 28 | "chatwootAccountId": "1", 29 | "chatwootToken": "TOKEN", 30 | "chatwootUrl": "https://chatwoot.com", 31 | "chatwootSignMsg": true, 32 | "chatwootReopenConversation": true, 33 | "chatwootConversationPending": false, 34 | "chatwootImportContacts": true, 35 | "chatwootNameInbox": "evolution", 36 | "chatwootMergeBrazilContacts": true, 37 | "chatwootImportMessages": true, 38 | "chatwootDaysLimitImportMessages": 3, 39 | "chatwootOrganization": "Evolution Bot", 40 | "chatwootLogo": "https://evolution-api.com/files/evolution-api-favicon.png" 41 | } 42 | ~~~ 43 | 44 | ### 2. Configuration for Existing Instances 45 | 46 | If you already have an instance created and want to configure or change the integration with Chatwoot, use the `/chatwoot/set/{{instance}}` endpoint with the following request format: 47 | 48 | #### Endpoint 49 | 50 | ~~~http 51 | POST {{baseUrl}}/chatwoot/set/{{instance}} 52 | ~~~ 53 | 54 | #### Request Body 55 | 56 | Here is an example of how the request body should look to configure the integration: 57 | 58 | ~~~json 59 | { 60 | "enabled": true, 61 | "accountId": "1", 62 | "token": "TOKEN", 63 | "url": "https://chatwoot.com", 64 | "signMsg": true, 65 | "reopenConversation": true, 66 | "conversationPending": false, 67 | "nameInbox": "evolution", 68 | "mergeBrazilContacts": true, 69 | "importContacts": true, 70 | "importMessages": true, 71 | "daysLimitImportMessages": 2, 72 | "signDelimiter": "\n", 73 | "autoCreate": true, 74 | "organization": "BOT", 75 | "logo": "your_logo_link" 76 | } 77 | ~~~ 78 | 79 | ### Parameters Explanation 80 | 81 | - **`enabled`**: Enables (`true`) or disables (`false`) the Chatwoot integration for the instance. 82 | - **`accountId`**: The Chatwoot account ID associated with the integration. 83 | - **`token`**: The authentication token of the admin user in Chatwoot. 84 | - **`url`**: The base URL of Chatwoot. Important: Do not include a trailing `/` in the URL. 85 | - **`signMsg`**: When enabled (`true`), adds the attendant's signature to the messages sent. 86 | - **`reopenConversation`**: Defines whether the integration should always reopen the same conversation (`true`) or create a new one. 87 | - **`conversationPending`**: Starts conversations as pending (`true`), awaiting action from an attendant. 88 | - **`nameInbox`**: Custom name for the inbox in Chatwoot. If not provided, the instance name will be used. 89 | - **`mergeBrazilContacts`**: Merges Brazilian contacts that have the additional `9` digit in their numbers (`true`). 90 | - **`importContacts`**: Imports WhatsApp contacts into Chatwoot (`true`). 91 | - **`importMessages`**: Imports WhatsApp messages into Chatwoot (`true`). 92 | - **`daysLimitImportMessages`**: Sets the limit of days for importing old WhatsApp messages. 93 | - **`signDelimiter`**: Delimiter used to separate the signature from the message body. 94 | - **`autoCreate`**: If enabled (`true`), automatically creates the inbox configuration in Chatwoot. 95 | - **`organization`**: The name of the bot command contact, used to customize the interaction. 96 | - **`logo`**: URL of the image to be used as the profile picture for the bot command contact. 97 | 98 | ## Steps to Configure the Integration 99 | 100 | 1. **Obtain Credentials and URLs**: 101 | - Access the Chatwoot dashboard and obtain the `accountId` and `token` of the admin user. 102 | - Verify your Chatwoot's base URL and configure it without a trailing `/`. 103 | 104 | 2. **Create or Configure the Instance**: 105 | - Use the `/instance/create` endpoint to configure Chatwoot during instance creation. 106 | - Use the `/chatwoot/set/{{instance}}` endpoint to configure Chatwoot in an existing instance. 107 | 108 | 3. **Verify the Configuration**: 109 | - Access Chatwoot to ensure the inbox has been created and the settings are correct. 110 | - Test sending and receiving messages to confirm the integration. 111 | 112 | ## Final Considerations 113 | 114 | The integration of Evolution API with Chatwoot allows you to centralize and automate WhatsApp communication directly in your customer support platform. With options for customization, importing contacts and messages, and the ability to reopen existing conversations, this integration offers flexibility to meet the specific needs of your workflow. 115 | 116 | 117 | For more details on other integrations and configurations, check the [environment variables section](/v2/pt/env). 118 | -------------------------------------------------------------------------------- /v2/en/integrations/cloudapi.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: WhatsApp Cloud API 3 | icon: whatsapp 4 | --- 5 | 6 | Evolution API v2 allows you to integrate your application with the official WhatsApp Cloud API to manage messages, contacts, and other functionalities directly through the API. Below are the prerequisites and the integration process. 7 | 8 | ## Prerequisites 9 | 10 | Before starting the integration with the WhatsApp Cloud API, ensure that the following steps have been completed: 11 | 12 | ### 1. Business Manager (BM) Creation and Approval 13 | 14 | To use the official WhatsApp Cloud API, you need an approved **Business Manager** (BM). This process involves: 15 | 16 | - Creating an account on [Facebook Business Manager](https://business.facebook.com/). 17 | - Following the steps to verify your business. 18 | - Waiting for your account approval. 19 | 20 | ### 2. Creating the App on Facebook Developers 21 | 22 | After your BM is approved, you need to create an app on the [Facebook Developers](https://developers.facebook.com/) platform: 23 | 24 | - Access your Facebook Developers account and click on **My Apps**. 25 | - Click on **Create App** and follow the instructions to set up a new app. 26 | - Make sure to add the WhatsApp API to your app. 27 | 28 | ### 3. Configuring the Number in the App 29 | 30 | After creating the app, you need to configure the WhatsApp number: 31 | 32 | - In your app's dashboard on Facebook Developers, go to the **WhatsApp** section. 33 | - Add and verify the phone number you want to use with the Cloud API. 34 | - Note the **Number ID** provided. 35 | 36 | ### 4. Create a Permanent Token 37 | 38 | To avoid the access token from expiring, create a **permanent token** for the admin user of your BM: 39 | 40 | - Go to the **Access Tokens** section on Facebook Developers. 41 | - Generate a token with the necessary permissions for the WhatsApp API. 42 | - Ensure that this token is permanent, so it doesn't need to be renewed periodically. 43 | 44 | ## Configuration in Evolution API v2 45 | 46 | Now that you have completed the prerequisites, follow the steps below to configure the integration with Evolution API v2. 47 | 48 | ### 1. Creating the Instance 49 | 50 | To create an instance that uses the WhatsApp Cloud API, you need to access the `/instance/create` route of Evolution API v2 with the following request body: 51 | 52 | ```json 53 | { 54 | "instanceName": "INSTANCE NAME", 55 | "token": "PERMANENT TOKEN OF BM ADMIN USER", 56 | "number": "WHATSAPP NUMBER ID", 57 | "businessId": "BUSINESS ID OF WHATSAPP ACCOUNT", 58 | "qrcode": false, 59 | "integration": "WHATSAPP-BUSINESS" 60 | } 61 | ``` 62 | 63 | ### Request Body Parameters: 64 | 65 | - **`instanceName`**: The name of the instance you are creating. 66 | - **`token`**: Permanent token generated for the admin user of your BM. 67 | - **`number`**: WhatsApp Number ID that you configured in the Facebook Developers app. 68 | - **`businessId`**: ID of the business account associated with WhatsApp. 69 | - **`qrcode`**: Set to `false` because the integration is token-based, not QR Code-based. 70 | - **`integration`**: Use `"WHATSAPP-BUSINESS"` to specify that this integration is with the official WhatsApp Business API. 71 | 72 | ### Example Request: 73 | 74 | ```bash 75 | curl -X POST http://API_URL/instance/create \ 76 | -H "Content-Type: application/json" \ 77 | -d '{ 78 | "instanceName": "MyInstance", 79 | "token": "EAAGm0PX4ZCpsBA...", 80 | "number": "1234567890", 81 | "businessId": "9876543210", 82 | "qrcode": false, 83 | "integration": "WHATSAPP-BUSINESS" 84 | }' 85 | ``` 86 | 87 | ### 2. Webhook Configuration 88 | 89 | After creating the instance, you need to configure the webhook in the Meta app to receive events and messages from WhatsApp. 90 | 91 | #### Webhook URL 92 | 93 | In your app's dashboard on Facebook Developers, configure the webhook with the following URL: 94 | 95 | ```plaintext 96 | API_URL/webhook/meta 97 | ``` 98 | 99 | #### Webhook Token 100 | 101 | The token to validate the webhook should be configured in the `WA_BUSINESS_TOKEN_WEBHOOK` variable in your `.env` file: 102 | 103 | ```plaintext 104 | WA_BUSINESS_TOKEN_WEBHOOK=your_webhook_token 105 | ``` 106 | 107 | This token will be used by Meta to validate requests sent to your webhook. 108 | 109 | ### Conclusion 110 | 111 | With the instance created and the webhook configured, your Evolution API v2 is ready to operate with the official WhatsApp Cloud API. All messages and events related to the configured number will be automatically managed by Evolution API. 112 | 113 | This documentation provides a clear and detailed overview of how to integrate the WhatsApp Cloud API with Evolution API v2, from the necessary preparation to the final configuration. By following all the steps, you will be prepared to utilize WhatsApp functionalities in your application through Evolution API v2. -------------------------------------------------------------------------------- /v2/en/integrations/evolution-channel.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Evolution Channel 3 | icon: messages 4 | --- 5 | 6 | **Evolution Channel** is a universal integration channel that allows messages to be received through webhooks, providing flexibility to connect various systems and applications with the Evolution API. This channel facilitates automation and message management, supporting multiple integrations and workflows. 7 | 8 | --- 9 | 10 | ## 1. Configuring the Evolution Instance 11 | 12 | To configure an instance in the Evolution Channel, you need to access the `/instance/create` route of the Evolution API with the following request body: 13 | 14 | ### Creating the Instance 15 | 16 | **Endpoint** 17 | ```http 18 | POST {{baseUrl}}/instance/create 19 | ``` 20 | 21 | **Request Body** 22 | 23 | Here is an example of how to create an instance in the Evolution Channel: 24 | ```json 25 | { 26 | "instanceName": "INSTANCE NAME", 27 | "token": "INSTANCE TOKEN (OPTIONAL)", 28 | "number": "INSTANCE NUMBER ID", 29 | "qrcode": false, 30 | "integration": "EVOLUTION" 31 | } 32 | ``` 33 | 34 | ### Request Body Parameters 35 | 36 | - **`instanceName`**: Name of the instance you are creating. 37 | - **`token`**: Optional token to authenticate the instance. 38 | - **`number`**: Number ID of the instance that will be used to receive and send messages. 39 | - **`qrcode`**: Set to `false` because the integration does not require a QR Code. 40 | - **`integration`**: Use `"EVOLUTION"` to specify that this integration is with the universal Evolution channel. 41 | 42 | **Example Request** 43 | ```bash 44 | curl -X POST http://API_URL/instance/create \ 45 | -H "Content-Type: application/json" \ 46 | -d '{ 47 | "instanceName": "MyInstance", 48 | "token": "123456", 49 | "number": "9876543210", 50 | "qrcode": false, 51 | "integration": "EVOLUTION" 52 | }' 53 | ``` 54 | 55 | --- 56 | 57 | ## 2. Message Input in the Evolution Channel 58 | 59 | After creating the instance, the Evolution Channel will receive the messages sent to the configured instance. These messages are sent to the `{baseUrl}/webhook/evolution` route as POST requests. This is the entry point for messages that the Evolution Channel will process. 60 | 61 | **Webhook URL for Message Input** 62 | ```http 63 | POST {{baseUrl}}/webhook/evolution 64 | ``` 65 | 66 | ### Example of Message Input Payload 67 | 68 | Here is an example of the payload format sent to the Evolution Channel when a message is received: 69 | 70 | ```json 71 | { 72 | "numberId": "1234567", 73 | "key": { 74 | "remoteJid": "557499879409", 75 | "fromMe": false, 76 | "id": "ABC1234" 77 | }, 78 | "pushName": "Davidson", 79 | "message": { 80 | "conversation": "What is your name?" 81 | }, 82 | "messageType": "conversation" 83 | } 84 | ``` 85 | 86 | ### Explanation of Payload Fields 87 | 88 | - **`numberId`**: ID of the number registered when creating the instance. 89 | - **`key.remoteJid`**: Number or unique ID of the contact who sent the message. 90 | - **`key.fromMe`**: Indicates whether the message was sent by the contact (`false`) or by the system itself (`true`). 91 | - **`key.id`**: Unique ID of the message. 92 | - **`pushName`**: Name of the contact who sent the message. 93 | - **`message.conversation`**: Content of the received message. 94 | - **`messageType`**: Type of message (in this case, `conversation`). 95 | 96 | --- 97 | 98 | ## 3. Feedback and Postbacks 99 | 100 | The Evolution Channel sends feedback and postbacks through configured event channels such as webhooks, RabbitMQ, or SQS. This allows you to receive real-time notifications about the status of messages and interactions, keeping your system up to date. 101 | 102 | **Examples of Event Channels** 103 | - **Webhook**: Notifications are sent to a specified HTTP endpoint. 104 | - **RabbitMQ**: Messages are sent to a configured RabbitMQ queue. 105 | - **SQS**: Messages are sent to an AWS SQS queue. 106 | 107 | **Event Channel Configuration** 108 | To configure event channels, define the necessary parameters in your configuration file or directly in the instance, according to the Evolution API specifications. 109 | 110 | --- 111 | 112 | ## Conclusion 113 | 114 | With the instance created and the message input webhook configured, your Evolution API is ready to operate with the Evolution Channel. All received messages and associated events will be managed centrally, allowing for seamless and efficient integration with your messaging and automation systems. 115 | 116 | This documentation provides a clear and detailed overview of how to integrate the Evolution Channel with the Evolution API, from instance creation to configuring webhooks and event channels. By following these steps, you will be prepared to use the universal Evolution channel in your application. -------------------------------------------------------------------------------- /v2/en/integrations/rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: RabbitMQ 3 | icon: rabbit 4 | --- 5 | 6 | The Evolution API allows integration with **RabbitMQ** to manage events and message queues, facilitating efficient and scalable task communication and processing. Below, you will find information on how to configure RabbitMQ both globally and for individual instances. 7 | 8 | ## Global RabbitMQ Configuration 9 | 10 | With the new global configuration, it's possible to centralize event processing in unified queues, rather than configuring separate queues for each instance. This simplifies event management as all system events are routed through specific queues based on the event type. 11 | 12 | ### Environment Variable Configuration 13 | 14 | Here are the necessary environment variables to enable and configure RabbitMQ globally: 15 | 16 | ```plaintext 17 | RABBITMQ_ENABLED=true 18 | RABBITMQ_URI=amqp://admin:admin@localhost:5672/default 19 | RABBITMQ_EXCHANGE_NAME=evolution_exchange 20 | RABBITMQ_GLOBAL_ENABLED=true 21 | ``` 22 | 23 | ### Configurable Events 24 | 25 | With global mode enabled (`RABBITMQ_GLOBAL_ENABLED=true`), all events are queued in specific queues by event type rather than by instance. Here is a list of events you can activate globally: 26 | 27 | ```plaintext 28 | RABBITMQ_EVENTS_APPLICATION_STARTUP=true 29 | RABBITMQ_EVENTS_INSTANCE_CREATE=true 30 | RABBITMQ_EVENTS_INSTANCE_DELETE=true 31 | RABBITMQ_EVENTS_QRCODE_UPDATED=true 32 | RABBITMQ_EVENTS_MESSAGES_SET=true 33 | RABBITMQ_EVENTS_MESSAGES_UPSERT=true 34 | RABBITMQ_EVENTS_MESSAGES_EDITED=true 35 | RABBITMQ_EVENTS_MESSAGES_UPDATE=true 36 | RABBITMQ_EVENTS_MESSAGES_DELETE=true 37 | RABBITMQ_EVENTS_SEND_MESSAGE=true 38 | RABBITMQ_EVENTS_CONTACTS_SET=true 39 | RABBITMQ_EVENTS_CONTACTS_UPSERT=true 40 | RABBITMQ_EVENTS_CONTACTS_UPDATE=true 41 | RABBITMQ_EVENTS_PRESENCE_UPDATE=true 42 | RABBITMQ_EVENTS_CHATS_SET=true 43 | RABBITMQ_EVENTS_CHATS_UPSERT=true 44 | RABBITMQ_EVENTS_CHATS_UPDATE=true 45 | RABBITMQ_EVENTS_CHATS_DELETE=true 46 | RABBITMQ_EVENTS_GROUPS_UPSERT=true 47 | RABBITMQ_EVENTS_GROUP_UPDATE=true 48 | RABBITMQ_EVENTS_GROUP_PARTICIPANTS_UPDATE=true 49 | RABBITMQ_EVENTS_CONNECTION_UPDATE=true 50 | RABBITMQ_EVENTS_CALL=true 51 | RABBITMQ_EVENTS_TYPEBOT_START=true 52 | RABBITMQ_EVENTS_TYPEBOT_CHANGE_STATUS=true 53 | ``` 54 | 55 | ### Operation 56 | 57 | - **Queue by Event**: In global mode, events are queued in specific queues for each event type. For example, all message update events (`MESSAGES_UPDATE`) will be queued in the same queue, regardless of the originating instance. 58 | - **Ease of Management**: This approach simplifies the management and monitoring of events, allowing for centralized operations and simplifying the logic for message consumption in your system. 59 | 60 | ## RabbitMQ Configuration for Individual Instances 61 | 62 | While global configuration is recommended for centralizing event processing, it's still possible to configure RabbitMQ for individual instances if segmentation by instance is needed. 63 | 64 | ### Endpoint for Individual Configuration 65 | 66 | To configure RabbitMQ for a specific WhatsApp instance in the Evolution API, use the following endpoint: 67 | 68 | ~~~ http 69 | POST [baseUrl]/rabbitmq/set/[instance_name] 70 | ~~~ 71 | 72 | ### Request Body 73 | 74 | Here is an example of a JSON request body to configure events for a specific instance: 75 | 76 | ~~~ json 77 | { 78 | "enabled": true, 79 | "events": [ 80 | "APPLICATION_STARTUP", 81 | "QRCODE_UPDATED", 82 | "MESSAGES_SET", 83 | "MESSAGES_UPSERT", 84 | "MESSAGES_UPDATE", 85 | "MESSAGES_DELETE", 86 | "SEND_MESSAGE", 87 | "CONTACTS_SET", 88 | "CONTACTS_UPSERT", 89 | "CONTACTS_UPDATE", 90 | "PRESENCE_UPDATE", 91 | "CHATS_SET", 92 | "CHATS_UPSERT", 93 | "CHATS_UPDATE", 94 | "CHATS_DELETE", 95 | "GROUPS_UPSERT", 96 | "GROUP_UPDATE", 97 | "GROUP_PARTICIPANTS_UPDATE", 98 | "CONNECTION_UPDATE", 99 | "CALL", 100 | "NEW_JWT_TOKEN" 101 | ] 102 | } 103 | ~~~ 104 | 105 | 106 | Remove unused events to optimize RabbitMQ resource usage. 107 | 108 | 109 | When configuring RabbitMQ integration for individual instances, adjust the event array in the JSON body to include only the events relevant to that instance. 110 | 111 | ## Final Considerations 112 | 113 | RabbitMQ configuration in the Evolution API offers flexibility to manage events centrally with global configuration or segmented by instance, depending on your system's needs. Use the global configuration to simplify event management in complex environments, or configure it individually for more granular control. 114 | 115 | 116 | For more details on RabbitMQ environment variables and other advanced configurations, consult the [environment variables section](/v2/pt/env#rabbitmq). 117 | -------------------------------------------------------------------------------- /v2/en/integrations/s3minio.mdx: -------------------------------------------------------------------------------- 1 | Aqui está a tradução para o inglês: 2 | 3 | --- 4 | 5 | title: S3/Minio 6 | icon: cloud 7 | 8 | --- 9 | 10 | The Evolution API supports integration with Amazon S3 or Minio to store WhatsApp media files such as images, audio, and documents. This integration allows files to be stored securely and made accessible, with links automatically generated and included in the webhooks sent by the API. 11 | 12 | ## Environment Variable Configuration 13 | 14 | To enable S3 or Minio storage, you need to set the appropriate environment variables in the Evolution API's `.env` file. Below are the required variables and their functions: 15 | 16 | ### Configuration Variables for S3 17 | 18 | ```plaintext 19 | S3_ENABLED=true 20 | S3_ACCESS_KEY=lJiKQSKlco6UfSUJSnZt 21 | S3_SECRET_KEY=gZXkzkXQwhME8XEmZVNF0ImSWxIpbXeJ5UoPy4s1 22 | S3_BUCKET=evolution 23 | S3_PORT=443 24 | S3_ENDPOINT=s3.eu-west-3.amazonaws.com 25 | S3_USE_SSL=true 26 | S3_REGION=eu-west-3 27 | ``` 28 | 29 | ### Explanation of Variables 30 | 31 | - **`S3_ENABLED`**: Enables (`true`) or disables (`false`) the use of S3 or Minio for file storage. 32 | - **`S3_ACCESS_KEY`**: Access key provided by the service provider (AWS or Minio). 33 | - **`S3_SECRET_KEY`**: Secret key corresponding to the access key, used for authentication. 34 | - **`S3_BUCKET`**: Name of the bucket where files will be stored. 35 | - **`S3_PORT`**: Port used for the connection, usually `443` for SSL connections. 36 | - **`S3_ENDPOINT`**: Endpoint of the S3 or Minio service. For Amazon S3, it’s necessary to include the region in the format `region: s3.[region].amazonaws.com`, e.g., `s3.eu-west-3.amazonaws.com`. 37 | - **`S3_USE_SSL`**: Defines whether the connection should use SSL (`true` or `false`). 38 | - **`S3_REGION`**: The region of the S3 bucket (default is `us-east-1`). 39 | 40 | ### Configuration Examples 41 | 42 | #### Amazon S3 43 | 44 | When using Amazon S3, it is essential to specify the endpoint correctly, including the region. Here is an example: 45 | 46 | ```plaintext 47 | S3_ENABLED=true 48 | S3_ACCESS_KEY=your-aws-access-key 49 | S3_SECRET_KEY=your-aws-secret-key 50 | S3_BUCKET=my-s3-bucket 51 | S3_PORT=443 52 | S3_ENDPOINT=s3.eu-west-3.amazonaws.com 53 | S3_USE_SSL=true 54 | S3_REGION=eu-west-3 55 | ``` 56 | 57 | #### Minio 58 | 59 | For Minio, the endpoint can be the service's custom domain: 60 | 61 | ```plaintext 62 | S3_ENABLED=true 63 | S3_ACCESS_KEY=your-minio-access-key 64 | S3_SECRET_KEY=your-minio-secret-key 65 | S3_BUCKET=my-minio-bucket 66 | S3_PORT=443 67 | S3_ENDPOINT=minio.mycompany.com 68 | S3_USE_SSL=true 69 | ``` 70 | 71 | ## How Media Storage Works 72 | 73 | When S3 or Minio storage is correctly configured, all media files received from WhatsApp (such as images, videos, audio, etc.) are automatically uploaded to the configured bucket. The public URL of the stored file is then generated and included in the Evolution API webhook. 74 | 75 | ### Webhook with `mediaUrl` 76 | 77 | When a media file is received and stored, the webhook sent by the Evolution API will include the `mediaUrl` in the message body. This allows your application to directly access the file stored in S3 or Minio. 78 | 79 | ### Webhook Example 80 | 81 | Here is an example of how the webhook with `mediaUrl` might appear: 82 | 83 | ~~~json 84 | { 85 | "event": "messages.upsert", 86 | "data": { 87 | "message": { 88 | ... 89 | "mediaUrl": "https://files.evolution-api-pro.com/bucket/path/to/media/file.jpg", 90 | ... 91 | } 92 | } 93 | } 94 | ~~~ 95 | 96 | ## Final Considerations 97 | 98 | Integrating the Evolution API with Amazon S3 or Minio for media file storage provides a scalable and secure solution for managing WhatsApp media content. By correctly configuring the environment variables, you ensure that all media files are stored and accessible as needed, providing greater control over data and the ability to easily integrate it into your applications. 99 | 100 | 101 | For more details on environment variables and other advanced configurations, consult the [environment variables section](/v2/pt/env#s3). 102 | -------------------------------------------------------------------------------- /v2/en/integrations/sqs.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Amazon SQS 3 | icon: aws 4 | --- 5 | 6 | The Evolution API allows integration with **Amazon SQS (Simple Queue Service)** to manage events and message queues in a scalable and reliable way. Similar to RabbitMQ, SQS in the Evolution API can be configured globally or for individual instances. 7 | 8 | ## Global SQS Configuration 9 | 10 | To enable SQS and configure centralized event processing, use the following environment variables: 11 | 12 | ### Environment Variable Configuration 13 | 14 | ```plaintext 15 | SQS_ENABLED=true 16 | SQS_ACCESS_KEY_ID=your-access-key-id 17 | SQS_SECRET_ACCESS_KEY=your-secret-access-key 18 | SQS_ACCOUNT_ID=your-account-id 19 | SQS_REGION=your-region 20 | ``` 21 | 22 | ### Explanation of Variables 23 | 24 | - **`SQS_ENABLED`**: Enables (`true`) or disables (`false`) integration with Amazon SQS. 25 | - **`SQS_ACCESS_KEY_ID`**: AWS access key for authentication. 26 | - **`SQS_SECRET_ACCESS_KEY`**: Secret key corresponding to the access key for authentication. 27 | - **`SQS_ACCOUNT_ID`**: AWS account ID where SQS is configured. 28 | - **`SQS_REGION`**: AWS region where your SQS queues are located (e.g., `us-east-1`). 29 | 30 | ### How It Works 31 | 32 | - **Queue by Event**: In global mode, all events are queued in specific queues by event type. This means that events from different instances are centralized in unified event queues, simplifying processing and monitoring. 33 | 34 | ## SQS Configuration for Individual Instances 35 | 36 | Although global configuration is recommended for centralized event processing, you can configure SQS for individual instances if you need to segment queues by instance. 37 | 38 | ### Endpoint for Individual Configuration 39 | 40 | To configure SQS for a specific WhatsApp instance in the Evolution API, use the following endpoint: 41 | 42 | ~~~ http 43 | POST [baseUrl]/sqs/set/[instance_name] 44 | ~~~ 45 | 46 | ### Request Body 47 | 48 | Here is an example of the JSON body to configure events in a specific instance: 49 | 50 | ~~~ json 51 | { 52 | "enabled": true, 53 | "events": [ 54 | "APPLICATION_STARTUP", 55 | "QRCODE_UPDATED", 56 | "MESSAGES_SET", 57 | "MESSAGES_UPSERT", 58 | "MESSAGES_UPDATE", 59 | "MESSAGES_DELETE", 60 | "SEND_MESSAGE", 61 | "CONTACTS_SET", 62 | "CONTACTS_UPSERT", 63 | "CONTACTS_UPDATE", 64 | "PRESENCE_UPDATE", 65 | "CHATS_SET", 66 | "CHATS_UPSERT", 67 | "CHATS_UPDATE", 68 | "CHATS_DELETE", 69 | "GROUPS_UPSERT", 70 | "GROUP_UPDATE", 71 | "GROUP_PARTICIPANTS_UPDATE", 72 | "CONNECTION_UPDATE", 73 | "CALL", 74 | "NEW_JWT_TOKEN" 75 | ] 76 | } 77 | ~~~ 78 | 79 | 80 | Remove unused events to optimize SQS resource usage. 81 | 82 | 83 | ### How It Works 84 | 85 | - **Instance Segmentation**: When configuring SQS for individual instances, each instance can have its specific queues for the configured events. This allows for greater control and segmentation of events if you need to separate processing by instance. 86 | 87 | ## Final Considerations 88 | 89 | Integration with Amazon SQS in the Evolution API offers a powerful solution for managing events in a scalable and reliable way, both centrally and segmented by instance. Use the global configuration to simplify processing in complex environments, or configure individually for more granular control. 90 | 91 | 92 | For more details on environment variables and other advanced configurations, refer to the [environment variables section](/v2/pt/env#sqs). 93 | -------------------------------------------------------------------------------- /v2/en/integrations/websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | Title: WebSocket 3 | Icon: plug 4 | --- 5 | 6 | The Evolution API uses `socket.io` to emit real-time events, leveraging WebSocket technology. This makes integration development more efficient and straightforward for developers. WebSocket provides a full-duplex communication channel over a single, long-lasting connection, enabling real-time data flow between the client and the server. 7 | 8 | 9 | To enable WebSockets, set the `WEBSOCKET_ENABLED` environment variable to `true`. See more details in [Environment Variables](/v2/en/env). 10 | 11 | 12 | ## WebSocket Operating Modes 13 | 14 | ### Global Mode 15 | 16 | In **global mode**, the `WEBSOCKET_GLOBAL_EVENTS` environment variable must be set to `true`. In this mode, the WebSocket is initialized when the service starts and sends events from all instances, regardless of channels. This means that any client connected to the WebSocket will receive global events, covering all Evolution API instances configured in the system. 17 | 18 | - **Activation**: Configure in the `.env` file: 19 | 20 | ```plaintext 21 | WEBSOCKET_GLOBAL_EVENTS=true 22 | ``` 23 | 24 | - **Functionality**: Ideal for scenarios where you want to monitor or process events from all instances simultaneously without needing to establish a separate connection for each instance. 25 | 26 | - **Connection**: In global mode, the WebSocket connection **does not** require the use of `/instance_name` in the URL. The connection URL will simply be: 27 | 28 | ```plaintext 29 | wss://api.yoursite.com 30 | ``` 31 | 32 | ### Traditional Mode 33 | 34 | In **traditional mode**, the WebSocket can only be connected after executing the `set` command on the instance. This allows the WebSocket to be specific to each instance, and real-time communication is restricted to that instance. 35 | 36 | - **Activation**: Ensure that `WEBSOCKET_GLOBAL_EVENTS` is set to `false` or not configured, and follow the traditional instance setup flow. 37 | 38 | - **Functionality**: Ideal for scenarios where you want more isolated real-time communication, focused on a single instance, allowing greater control and segmentation of events. 39 | 40 | - **Connection**: In traditional mode, the WebSocket connection requires the use of `/instance_name` in the URL: 41 | 42 | ```plaintext 43 | wss://api.yoursite.com/instance_name 44 | ``` 45 | 46 | ## Connecting to the WebSocket 47 | 48 | ### Global Mode 49 | 50 | In global mode, the connection URL is simpler and does not require the instance name: 51 | 52 | ~~~plaintext 53 | wss://api.yoursite.com 54 | ~~~ 55 | 56 | ### Traditional Mode 57 | 58 | In traditional mode, use the following URL format: 59 | 60 | ~~~plaintext 61 | wss://api.yoursite.com/instance_name 62 | ~~~ 63 | 64 | Replace `api.yoursite.com` with your API's actual domain and `instance_name` with your specific instance name. 65 | 66 | ### WebSocket Connection Example 67 | 68 | Here is a basic example of how to establish a WebSocket connection using JavaScript: 69 | 70 | ~~~javascript 71 | const socket = io('wss://api.yoursite.com/instance_name', { 72 | transports: ['websocket'] 73 | }); 74 | 75 | socket.on('connect', () => { 76 | console.log('Connected to the Evolution API WebSocket'); 77 | }); 78 | 79 | // Listening to events 80 | socket.on('event_name', (data) => { 81 | console.log('Event received:', data); 82 | }); 83 | 84 | // Handling disconnection 85 | socket.on('disconnect', () => { 86 | console.log('Disconnected from the Evolution API WebSocket'); 87 | }); 88 | ~~~ 89 | 90 | In this example, replace `event_name` with the specific event you want to listen to. 91 | 92 | ## Handling Events 93 | 94 | Once connected, you can listen to various events emitted by the server. Each event can carry data relevant to the event's context. For instance, if you are listening for message updates, you may receive data containing the updated message content and metadata. 95 | 96 | ## Closing the Connection 97 | 98 | To close the WebSocket connection, use the `disconnect` method: 99 | 100 | ~~~javascript 101 | socket.disconnect(); 102 | ~~~ 103 | 104 | Remember to handle the connection responsibly by disconnecting when your application or component is unmounted to avoid memory leaks and ensure efficient resource usage. 105 | 106 | ## Final Considerations 107 | 108 | The Evolution API provides a powerful way to interact in real-time through WebSockets, offering a seamless experience for both developers and end users. Whether in global mode, monitoring all instances simultaneously, or in traditional mode, focused on a single instance, the system's flexibility allows for adaptation to the specific needs of your project. -------------------------------------------------------------------------------- /v2/en/requirements/database.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Database 3 | icon: database 4 | --- 5 | 6 | The database is a fundamental part of the Evolution API v2, responsible for storing all the application's critical information. The API supports both PostgreSQL and MySQL, using Prisma as the ORM (Object-Relational Mapping) to facilitate interaction with these databases. 7 | 8 | ## Database Choice 9 | 10 | Evolution API v2 offers the flexibility to choose between PostgreSQL and MySQL as the database provider. The choice can be configured through the `DATABASE_PROVIDER` environment variable, and connections are managed by Prisma. 11 | 12 | ## Installation and Configuration 13 | 14 | ### Using Docker 15 | 16 | The easiest and fastest way to set up a database for Evolution API v2 is through Docker. Below are the instructions to configure both PostgreSQL and MySQL using Docker Compose. 17 | 18 | #### PostgreSQL 19 | 20 | To set up PostgreSQL via Docker, follow these steps: 21 | 22 | 1. Download the `docker-compose.yaml` file for PostgreSQL available [here](https://github.com/EvolutionAPI/evolution-api/blob/v2.0.0/Docker/postgres/docker-compose.yaml). 23 | 2. Navigate to the directory where the file was downloaded and run the command: 24 | 25 | ```bash 26 | docker-compose up -d 27 | ``` 28 | 29 | 3. The PostgreSQL instance will be available at `localhost` on port `5432`. 30 | 31 | #### MySQL 32 | 33 | To set up MySQL via Docker, follow these steps: 34 | 35 | 1. Download the `docker-compose.yaml` file for MySQL available [here](https://github.com/EvolutionAPI/evolution-api/blob/v2.0.0/Docker/mysql/docker-compose.yaml). 36 | 2. Navigate to the directory where the file was downloaded and run the command: 37 | 38 | ```bash 39 | docker-compose up -d 40 | ``` 41 | 42 | 3. The MySQL instance will be available at `localhost` on port `3306`. 43 | 44 | ### Environment Variables Configuration 45 | 46 | After setting up the database, define the following environment variables in your `.env` file: 47 | 48 | ```env 49 | # Enable the use of the database 50 | DATABASE_ENABLED=true 51 | 52 | # Choose the database provider: postgresql or mysql 53 | DATABASE_PROVIDER=postgresql 54 | 55 | # Database connection URI 56 | DATABASE_CONNECTION_URI='postgresql://user:pass@localhost:5432/evolution?schema=public' 57 | 58 | # Client name for the database connection 59 | DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange 60 | 61 | # Choose the data you want to save in the application database 62 | DATABASE_SAVE_DATA_INSTANCE=true 63 | DATABASE_SAVE_DATA_NEW_MESSAGE=true 64 | DATABASE_SAVE_MESSAGE_UPDATE=true 65 | DATABASE_SAVE_DATA_CONTACTS=true 66 | DATABASE_SAVE_DATA_CHATS=true 67 | DATABASE_SAVE_DATA_LABELS=true 68 | DATABASE_SAVE_DATA_HISTORIC=true 69 | ``` 70 | 71 | ### Local Installation 72 | 73 | If you prefer to set up the database locally without using Docker, follow the instructions below: 74 | 75 | #### PostgreSQL 76 | 77 | 1. Install PostgreSQL on your machine. On Ubuntu-based systems, for example, you can use: 78 | 79 | ```bash 80 | sudo apt-get update 81 | sudo apt-get install postgresql postgresql-contrib 82 | ``` 83 | 84 | 2. Start the PostgreSQL service: 85 | 86 | ```bash 87 | sudo service postgresql start 88 | ``` 89 | 90 | 3. Create a database for Evolution API v2: 91 | 92 | ```bash 93 | sudo -u postgres createdb evolution 94 | ``` 95 | 96 | #### MySQL 97 | 98 | 1. Install MySQL on your machine. On Ubuntu-based systems, you can use: 99 | 100 | ```bash 101 | sudo apt-get update 102 | sudo apt-get install mysql-server 103 | ``` 104 | 105 | 2. Start the MySQL service: 106 | 107 | ```bash 108 | sudo service mysql start 109 | ``` 110 | 111 | 3. Create a database for Evolution API v2: 112 | 113 | ```bash 114 | mysql -u root -p -e "CREATE DATABASE evolution;" 115 | ``` -------------------------------------------------------------------------------- /v2/en/requirements/redis.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Redis 3 | icon: layer-group 4 | --- 5 | 6 | Redis is used by Evolution API v2 as a caching system to optimize the application's performance and speed. It can be configured to store temporary information and improve operational efficiency. 7 | 8 | ## Installation and Configuration 9 | 10 | ### Using Docker 11 | 12 | The easiest and fastest way to set up Redis for Evolution API v2 is through Docker. Below are the instructions to configure Redis using Docker Compose. 13 | 14 | #### Redis 15 | 16 | To set up Redis via Docker, follow these steps: 17 | 18 | 1. Download the `docker-compose.yaml` file for Redis available [here](https://github.com/EvolutionAPI/evolution-api/blob/v2.0.0/Docker/redis/docker-compose.yaml). 19 | 2. Navigate to the directory where the file was downloaded and run the command: 20 | 21 | ```bash 22 | docker-compose up -d 23 | ``` 24 | 25 | 3. The Redis instance will be available at `localhost` on port `6379`. 26 | 27 | ### Environment Variables Configuration 28 | 29 | After setting up Redis, define the following environment variables in your `.env` file: 30 | 31 | ```env 32 | # Enable Redis cache 33 | CACHE_REDIS_ENABLED=true 34 | 35 | # Redis connection URI 36 | CACHE_REDIS_URI=redis://localhost:6379/6 37 | 38 | # Prefix to differentiate data from different installations using the same Redis 39 | CACHE_REDIS_PREFIX_KEY=evolution 40 | 41 | # Enable to save connection information in Redis instead of the database 42 | CACHE_REDIS_SAVE_INSTANCES=false 43 | 44 | # Enable local cache 45 | CACHE_LOCAL_ENABLED=false 46 | ``` 47 | 48 | ### Local Installation 49 | 50 | If you prefer to set up Redis locally without using Docker, follow the instructions below: 51 | 52 | #### Redis 53 | 54 | 1. Install Redis on your machine. On Ubuntu-based systems, for example, you can use: 55 | 56 | ```bash 57 | sudo apt-get update 58 | sudo apt-get install redis-server 59 | ``` 60 | 61 | 2. Start the Redis service: 62 | 63 | ```bash 64 | sudo service redis-server start 65 | ``` 66 | 67 | 3. Verify that Redis is running correctly with the command: 68 | 69 | ```bash 70 | redis-cli ping 71 | ``` 72 | 73 | If everything is working correctly, you will see the response `PONG`. 74 | 75 | ### Cache Configuration in Evolution API v2 76 | 77 | After installing and configuring Redis, the next step is to configure caching in Evolution API v2 using environment variables. This will enable the API to use Redis to cache important data and improve the overall performance of the application. -------------------------------------------------------------------------------- /v2/en/updates.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Update 3 | icon: code-pull-request 4 | --- 5 | 6 | Keeping your Evolution API instance updated is crucial for security, performance, and access to new features. The update method depends on how you initially installed the API. This guide covers the steps to update your Evolution API using Docker Compose and NPM. 7 | 8 | Before updating Evolution, make sure all integrated applications are actually working with Evolution. Update at your own risk. 9 | 10 | ## Updating with Docker 11 | 12 | If you initially set up your Evolution API using Docker, follow these steps to update: 13 | 14 | ### Updating with Docker CLI 15 | 16 | If your Evolution API was initially installed using Docker Compose via the command-line interface (CLI), and not through Portainer or any other container management tool, follow these steps to update it: 17 | 18 | 1. **Navigate to the Docker Compose Directory**: Open a terminal and go to the directory where your Docker Compose file (`docker-compose.yml`) is located. 19 | 20 | 2. **Pull the Latest Image**: Update the Evolution API image to the latest version by running the following command: 21 | 22 | ~~~ shell 23 | docker compose pull atendai/evolution-api:v2.1.1 24 | ~~~ 25 | 26 | 3. **Stop and Restart the Containers**: After pulling the latest image, stop the current containers and restart them. This can be done using the following command: 27 | 28 | ~~~ shell 29 | docker compose down && docker compose up -d 30 | ~~~ 31 | 32 | ## Updating with Portainer 33 | 34 | If you are using Portainer for container management, follow these steps to update your Evolution API: 35 | 36 | 1. **Access the Portainer Dashboard**: Open the Portainer dashboard in a web browser. 37 | 38 | 2. **Navigate to Your Containers**: Go to the 'Stacks' section where your Evolution API container is listed. 39 | 40 | 3. **Update the Compose**: 41 | - Locate the `image` field in your Docker Compose configuration. 42 | 43 | ~~~ yaml stack-file.yml 44 | # ... (other services and configurations) 45 | evolution_api: 46 | # Update the Evolution API image version here 47 | # Use 'atendai/evolution-api:latest' for the latest version 48 | # Or specify a specific version like 'atendai/evolutionapi:v2.1.1' 49 | image: atendai/evolution-api:v2.x.x 50 | networks: 51 | - your_network 52 | ~~~ 53 | 54 | - Update the value to `atendai/evolution-api:v2.1.1` for the latest version, or use `atendai/evolutionapi:v2.x.x` for a specific version. 55 | - After making the changes, click the 'Deploy' button at the end of the compose editing window. 56 | 57 | 4. **Verify the Update**: After recreating the container, verify that the Evolution API is running the latest version. This can typically be checked through the API version endpoint or the logs. 58 | 59 | 60 | For production environments, it is recommended to specify a particular version of the Evolution API (e.g., atendai/evolution-api:v1.x.x) instead of using latest. 61 | This practice ensures stability and predictability, as it protects your production environment from potential issues arising from unexpected changes in the latest version. 62 | 63 | 64 | By following these steps, you can ensure that your Evolution API is always up to date using Portainer. 65 | 66 | ## Updating with NPM 67 | 68 | Updating your Evolution API installation via NPM involves several steps to ensure a smooth transition to the new version. Here’s a step-by-step guide: 69 | 70 | 1. **Clean and Stop**: Clear all PM2 logs, which is useful for troubleshooting after the update, and temporarily stop the Evolution API to apply updates safely. 71 | 72 | ~~~ shell Terminal 73 | # Clear all PM2 logs 74 | pm2 flush 75 | 76 | # Stop the current Evolution API process 77 | pm2 stop ApiEvolution 78 | ~~~ 79 | 80 | 2. **Reset the Local Repository and Pull the Latest Updates**: Ensure that your local code is in sync with the latest commit and pull the latest updates from the repository. Optionally, switch to a specific version if you are not using the latest one. This is recommended for production environments. 81 | 82 | ~~~ shell Terminal 83 | # Reset your local repository to the latest commit 84 | git reset --hard HEAD 85 | 86 | # Pull the latest updates from the repository 87 | git pull 88 | 89 | # For a specific version, use 'git checkout main' for the latest, 90 | # or 'git checkout 1.x.x' for a specific version. Example: 91 | git checkout 1.x.x 92 | ~~~ 93 | 94 | 3. **Clean Installation**: Remove the existing `node_modules` to avoid potential conflicts with new dependencies and install the necessary Node.js dependencies for the updated version. 95 | 96 | ~~~ shell Terminal 97 | # Remove the current node_modules directory to ensure a clean installation 98 | rm -rf node_modules 99 | 100 | # Install dependencies with NPM 101 | npm i 102 | 103 | # Restart the Evolution API with the updated version 104 | pm2 start ApiEvolution 105 | 106 | # Optionally, view the PM2 logs for the Evolution API 107 | pm2 log ApiEvolution 108 | ~~~ -------------------------------------------------------------------------------- /v2/pt/configuration/available-resources.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Recursos Disponíveis' 3 | icon: wrench 4 | --- 5 | 6 | ## Recursos de Mensagens e Grupos 7 | 8 | ### Mensagens (Individuais ou em Grupo) 9 | 10 | | Recurso | Disponibilidade | Descrição | 11 | |-:|:-:|-| 12 | | Envio de Texto | ✅ | (Texto simples, em negrito, itálico, riscado, em formato de código e emojis) | 13 | | Envio de Mídia | ✅ | (Vídeo, imagem e documento) | 14 | | Envio de Áudio Narrado | ✅ | (Funcionando bem no Android e iOS) | 15 | | Envio de Localização | ✅ | (Com nome e descrição do local) | 16 | | Envio de Contato | ✅ | (Com Nome, Empresa, Telefone, E-mail e URL) | 17 | | Envio de Reação | ✅ | (Envie qualquer emoji para reação) | 18 | | Envio de Pré-visualização de Link | ✅ | (Busca por informações de SEO) 🆕 | 19 | | Envio de Resposta | ✅ | (Marcar mensagens em resposta) 🆕 | 20 | | Envio de Menção | ✅ | (Individual, para alguns ou todos os membros) 🆕 | 21 | | Envio de Enquete | ✅ | (Enviar e receber votos de uma enquete) 🆕 | 22 | | Envio de Status/História | ✅ | (Texto, pré-visualização de link, vídeo, imagem e forma de onda) 🆕 | 23 | | Envio de Adesivo | ✅ | (Imagem estática) 🆕 | 24 | | Envio de Lista (Homologação) | ✅ | (Testando) | 25 | | Envio de Botões (Descontinuado) | ❌ | (Só funciona na API em nuvem) | 26 | 27 | ### Perfil 28 | 29 | | Recurso | Disponibilidade | Descrição | 30 | | --- | :---: | --- | 31 | | Atualizar Nome | ✅ | (Alterar o nome do perfil conectado) | 32 | | Atualizar Foto | ✅ | (Alterar a foto do perfil conectado) 🆕 | 33 | | Atualizar Status | ✅ | (Alterar o status do perfil conectado) 🆕 | 34 | | E muitos outros... | | | 35 | 36 | ### Grupo 37 | 38 | | Recurso | Disponibilidade | Descrição | 39 | | --- | :---: | --- | 40 | | Criar Grupo | ✅ | (Novos grupos) | 41 | | Atualizar Foto | ✅ | (Alterar foto do grupo) | 42 | | Atualizar Assunto | ✅ | (Alterar o nome do grupo) 🆕 | 43 | | Atualizar Descrição | ✅ | (Alterar a descrição do grupo) 🆕 | 44 | | Obter Todos os Grupos | ✅ | (Obter todos os grupos e participantes) 🆕 | 45 | | E muitos outros... | | | 46 | -------------------------------------------------------------------------------- /v2/pt/get-started/introduction.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | sidebarTitle: 'Introdução' 3 | title: 'Introdução' 4 | icon: hand-wave 5 | --- 6 | 7 | 8 | 9 | **Evolution API v2** é uma plataforma robusta dedicada a capacitar pequenas empresas, empreendedores, freelancers e indivíduos com recursos limitados, 10 | indo além de uma simples solução de mensagens via **WhatsApp™**. 11 | 12 | Nossa missão é fornecer uma API abrangente que permite a esses grupos reforçarem seus negócios, seja localmente ou online, integrando-se com **múltiplas plataformas e serviços**. 13 | 14 | O melhor de tudo é que o nosso serviço é **totalmente gratuito**, concebido para apoiar aqueles que se esforçam para ter sucesso num cenário de mercado competitivo. 15 | 16 | Originalmente, a **Evolution API** começou como uma API de controle de WhatsApp baseada no CodeChat, utilizando a biblioteca Baileys. Com o tempo, a plataforma se expandiu para 17 | suportar não apenas o WhatsApp, mas também integrações com serviços como **Typebot, Chatwoot, Dify e OpenAI**. 18 | Além disso, a Evolution API suporta tanto a API de WhatsApp baseada no Baileys quanto a API oficial do WhatsApp Business, com suporte futuro planejado para Instagram e Messenger. 19 | 20 | Acesse nosso [repositório](https://github.com/EvolutionAPI/evolution-api) e faça parte da nossa [comunidade](https://evolution-api.com) para fazer parte do projeto. 21 | 22 | ## Instalação 23 | Veja como instalar a versão completa em: 24 | 25 | 26 | 27 | Veja como instalar a EvolutionAPI completa pelo Docker 28 | 29 | 30 | Veja como instalar a EvolutionAPI com o NVM 31 | 32 | 33 | 34 | 35 | 36 | Veja a documentação da API com exemplos de código 37 | 38 | 39 | Utilize a coleção oficial da API para Postman. 40 | 41 | 42 | -------------------------------------------------------------------------------- /v2/pt/install/nginx.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Nginx e SSL 3 | icon: globe 4 | --- 5 | 6 | ## Configuração do Nginx 7 | 8 | Para expor a Evolution API na web de forma segura, você pode configurar o Nginx como um proxy reverso. 9 | 10 | ### Instalação do Nginx 11 | 12 | Instale, inicie e habilite o Nginx: 13 | 14 | ```bash 15 | apt-get install -y nginx 16 | systemctl start nginx 17 | systemctl enable nginx 18 | systemctl status nginx 19 | ``` 20 | 21 | Se a informação "Ativo: ativo (em execução)" aparecer, o Nginx está funcionando corretamente. 22 | 23 | ### Configuração do Nginx 24 | 25 | Remova a configuração padrão do Nginx: 26 | 27 | ```bash 28 | rm /etc/nginx/sites-enabled/default 29 | ``` 30 | 31 | Crie um novo arquivo de configuração: 32 | 33 | ```bash 34 | nano /etc/nginx/conf.d/default.conf 35 | ``` 36 | 37 | Adicione a seguinte configuração: 38 | 39 | ```nginx 40 | server { 41 | listen 80; 42 | listen [::]:80; 43 | server_name _; 44 | 45 | location / { 46 | proxy_pass http://127.0.0.1:8080; 47 | proxy_http_version 1.1; 48 | proxy_set_header Upgrade $http_upgrade; 49 | proxy_set_header Connection 'upgrade'; 50 | proxy_set_header Host $host; 51 | proxy_set_header X-Real-IP $remote_addr; 52 | proxy_set_header X-Forwarded-Proto $scheme; 53 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 54 | proxy_cache_bypass $http_upgrade; 55 | } 56 | 57 | location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ { 58 | expires 360d; 59 | } 60 | 61 | location ~ /\.ht { 62 | deny all; 63 | } 64 | } 65 | ``` 66 | 67 | Recarregue o Nginx para aplicar as alterações: 68 | 69 | ```bash 70 | systemctl reload nginx 71 | ``` 72 | 73 | Se necessário, faça o usuário `nginx` ser o proprietário do diretório da web: 74 | 75 | ```bash 76 | chown www-data:www-data /usr/share/nginx/html -R 77 | ``` 78 | 79 | Para configurar um Virtual Host, crie um arquivo de configuração: 80 | 81 | ```bash 82 | nano /etc/nginx/sites-available/api 83 | ``` 84 | 85 | Adicione a seguinte configuração: 86 | 87 | ```nginx 88 | server { 89 | server_name substitua-isso-pelo-seu-domínio-legal.com; 90 | 91 | location / { 92 | proxy_pass http://127.0.0.1:8080; 93 | proxy_http_version 1.1; 94 | proxy_set_header Upgrade $http_upgrade; 95 | proxy_set_header Connection 'upgrade'; 96 | proxy_set_header Host $host; 97 | proxy_set_header X-Real-IP $remote_addr; 98 | proxy_set_header X-Forwarded-Proto $scheme; 99 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 100 | proxy_cache_bypass $http_upgrade; 101 | } 102 | } 103 | ``` 104 | 105 | Crie um link simbólico para habilitar a configuração: 106 | 107 | ```bash 108 | ln -s /etc/nginx/sites-available/api /etc/nginx/sites-enabled 109 | nginx -t 110 | ``` 111 | 112 | Recarregue o Nginx: 113 | 114 | ```bash 115 | systemctl reload nginx 116 | ``` 117 | 118 | ## Instalar o Certbot para o Certificado SSL 119 | 120 | Para proteger sua Evolution API com SSL, instale o Certbot: 121 | 122 | ```bash 123 | snap install --classic certbot 124 | ``` 125 | 126 | ### Configurar SSL com Certbot 127 | 128 | Para configurar o SSL, use o comando: 129 | 130 | ```bash 131 | certbot --nginx -d substitua-isso-pelo-seu-domínio-legal.com 132 | ``` 133 | 134 | 135 | Se o processo for bem-sucedido, você verá a mensagem "Congratulations! You have successfully enabled HTTPS". 136 | 137 | -------------------------------------------------------------------------------- /v2/pt/install/nvm.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: NVM 3 | icon: js 4 | --- 5 | 6 | ## Pré-requisitos 7 | 8 | Antes de iniciar a instalação da Evolution API v2, certifique-se de que você já configurou os serviços necessários, como PostgreSQL e Redis. Siga os links abaixo para mais detalhes: 9 | 10 | - [Configuração do Banco de Dados](/v2/pt/requirements/database) 11 | - [Configuração do Redis](/v2/pt/requirements/redis) 12 | 13 | ## Instalação do NVM 14 | 15 | A Evolution API pode ser facilmente instalada usando o Node Version Manager (NVM). Siga estas etapas para configurar seu ambiente e iniciar a Evolution API em seu servidor. 16 | 17 | ### Instalar NVM 18 | 19 | Primeiro, baixe e instale o Node.js com os seguintes comandos: 20 | 21 | ```bash 22 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash 23 | ``` 24 | 25 | Agora, carregue o ambiente e instale o Node.js: 26 | 27 | ```bash 28 | # Carregar o NVM no ambiente atual 29 | source ~/.bashrc 30 | 31 | # Instalar e usar a versão necessária do Node.js 32 | nvm install v20.10.0 && nvm use v20.10.0 33 | ``` 34 | 35 | Confirme que o NVM foi instalado com sucesso: 36 | 37 | ```bash 38 | command -v nvm 39 | ``` 40 | 41 | 42 | Se você ainda não configurou, também pode configurar o fuso horário do seu servidor com o comando: 43 | 44 | ```bash 45 | dpkg-reconfigure tzdata 46 | ``` 47 | 48 | 49 | ## Clonando o Repositório e Instalando Dependências 50 | 51 | Clone o repositório oficial da Evolution API v2 a partir da branch correta: 52 | 53 | ```bash 54 | git clone -b v2.0.0 https://github.com/EvolutionAPI/evolution-api.git 55 | ``` 56 | 57 | Acesse o diretório do projeto e instale as dependências: 58 | 59 | ```bash 60 | cd evolution-api 61 | npm install 62 | ``` 63 | 64 | ## Configuração de Variáveis de Ambiente 65 | 66 | Agora vamos configurar as variáveis de ambiente. Primeiro, copie o arquivo `.env.example` para `.env`: 67 | 68 | ```bash 69 | cp ./.env.example ./.env 70 | ``` 71 | 72 | Edite o arquivo `.env` com suas configurações específicas: 73 | 74 | ```bash 75 | nano ./.env 76 | ``` 77 | 78 | Substitua os valores padrão pelas suas configurações, como strings de conexão de banco de dados, chaves de API, portas do servidor, etc. 79 | 80 | 81 | Acesse a [seção de variáveis de ambiente](/v2/pt/env) para instruções detalhadas sobre como configurar seu arquivo `.env`. 82 | 83 | 84 | ## Geração e Deploy do Banco de Dados 85 | 86 | Após configurar o ambiente, você precisará realizar a geração dos arquivos do cliente Prisma e o deploy das migrations no banco de dados. Utilize os comandos abaixo, dependendo do banco de dados que você está utilizando (PostgreSQL ou MySQL): 87 | 88 | 1. Gerar os arquivos do cliente Prisma: 89 | 90 | ```bash 91 | npm run db:generate 92 | ``` 93 | 94 | 2. Realizar o deploy das migrations: 95 | 96 | ```bash 97 | npm run db:deploy 98 | ``` 99 | 100 | ## Inicializando a Evolution API 101 | 102 | Após a configuração, você pode iniciar a Evolution API com o seguinte comando: 103 | 104 | ```bash 105 | npm run build 106 | npm run start:prod 107 | ``` 108 | 109 | ## Instalação e Configuração do PM2 110 | 111 | Use o PM2 para gerenciar o processo da API: 112 | 113 | ```bash 114 | npm install pm2 -g 115 | pm2 start 'npm run start:prod' --name ApiEvolution 116 | pm2 startup 117 | pm2 save --force 118 | ``` 119 | 120 | 121 | Se o seu servidor tiver mais memória, considere configurar o PM2 para utilizar mais recursos: 122 | 123 | ```bash 124 | pm2 start 'npm run start:prod' --name ApiEvolution -- start --node-args="--max-old-space-size=4096" --max-memory-restart 4G 125 | ``` 126 | 127 | Isso é recomendado para servidores com pelo menos 4GB de RAM disponíveis exclusivamente para a Evolution API. 128 | 129 | 130 | Para verificar se a API está em execução, acesse [http://localhost:8080](http://localhost:8080). Você deve ver a seguinte resposta: 131 | 132 | ```json 133 | { 134 | "status": 200, 135 | "message": "Welcome to the Evolution API, it is working!", 136 | "version": "2.0.10", 137 | "clientName": "evolution01", 138 | "manager": "https://evo2.site.com/manager", 139 | "documentation": "https://doc.evolution-api.com" 140 | } 141 | ``` 142 | 143 | 144 | Facilite sua vida com a extensão JSON Formatter no [Google Chrome](https://chromewebstore.google.com/detail/json-formatter/gpmodmeblccallcadopbcoeoejepgpnb?hl=pt-BR) ou [Microsoft Edge](https://microsoftedge.microsoft.com/addons/detail/json-formatter/hdebmbedhflilekbidmmdiaiilaegkjl). 145 | -------------------------------------------------------------------------------- /v2/pt/integrations/cloudapi.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: WhatsApp Cloud API 3 | icon: whatsapp 4 | --- 5 | 6 | A Evolution API v2 permite integrar sua aplicação com a Cloud API oficial do WhatsApp para gerenciar mensagens, contatos, e outras funcionalidades diretamente através da API. A seguir, são detalhados os pré-requisitos e o processo de integração. 7 | 8 | ## Pré-requisitos 9 | 10 | Antes de iniciar a integração com a Cloud API do WhatsApp, você deve garantir que os seguintes passos foram concluídos: 11 | 12 | ### 1. Criação da Business Manager (BM) e Aprovação 13 | 14 | Para utilizar a Cloud API oficial do WhatsApp, você precisa de uma **Business Manager** (BM) aprovada. Este processo envolve: 15 | 16 | - Criar uma conta no [Facebook Business Manager](https://business.facebook.com/). 17 | - Seguir os passos para verificação da sua empresa. 18 | - Aguardar a aprovação da sua conta. 19 | 20 | ### 2. Criação do App no Facebook Developers 21 | 22 | Após a aprovação da sua BM, você precisa criar um aplicativo na plataforma [Facebook Developers](https://developers.facebook.com/): 23 | 24 | - Acesse a sua conta do Facebook Developers e clique em **Meus Apps**. 25 | - Clique em **Criar App** e siga as instruções para configurar um novo aplicativo. 26 | - Certifique-se de adicionar a API do WhatsApp ao seu aplicativo. 27 | 28 | ### 3. Configuração do Número no Aplicativo 29 | 30 | Após criar o aplicativo, você precisa configurar o número do WhatsApp: 31 | 32 | - No painel do seu aplicativo no Facebook Developers, vá para a seção **WhatsApp**. 33 | - Adicione e verifique o número de telefone que deseja usar com a Cloud API. 34 | - Anote o **Number ID** fornecido. 35 | 36 | ### 4. Criar um Token Permanente 37 | 38 | Para evitar que o token de acesso expire, crie um **token permanente** para o usuário admin da sua BM: 39 | 40 | - Vá para a seção **Tokens de Acesso** no Facebook Developers. 41 | - Gere um token com as permissões necessárias para a API do WhatsApp. 42 | - Certifique-se de que este token é permanente, para não precisar ser renovado periodicamente. 43 | 44 | ## Configuração na Evolution API v2 45 | 46 | Agora que você completou os pré-requisitos, siga os passos abaixo para configurar a integração com a Evolution API v2. 47 | 48 | ### 1. Criação da Instância 49 | 50 | Para criar uma instância que utiliza a Cloud API do WhatsApp, você precisará acessar a rota `/instance/create` da Evolution API v2 com o seguinte corpo de requisição: 51 | 52 | ```json 53 | { 54 | "instanceName": "NOME DA INSTANCIA", 55 | "token": "TOKEN PERMANENTE DO USUARIO ADMIN DA BM", 56 | "number": "NUMBER ID DO WHATSAPP", 57 | "businessId": "BUSINESS ID DA CONTA DO WHATSAPP", 58 | "qrcode": false, 59 | "integration": "WHATSAPP-BUSINESS" 60 | } 61 | ``` 62 | 63 | ### Parâmetros do Corpo da Requisição: 64 | 65 | - **`instanceName`**: Nome da instância que você está criando. 66 | - **`token`**: Token permanente gerado para o usuário admin da sua BM. 67 | - **`number`**: Number ID do WhatsApp que você configurou no aplicativo do Facebook Developers. 68 | - **`businessId`**: ID da conta de negócios associada ao WhatsApp. 69 | - **`qrcode`**: Defina como `false` pois a integração é baseada em token, e não em QR Code. 70 | - **`integration`**: Use `"WHATSAPP-BUSINESS"` para especificar que esta integração é com a API oficial do WhatsApp Business. 71 | 72 | ### Exemplo de Requisição: 73 | 74 | ```bash 75 | curl -X POST http://API_URL/instance/create \ 76 | -H "Content-Type: application/json" \ 77 | -d '{ 78 | "instanceName": "MinhaInstancia", 79 | "token": "EAAGm0PX4ZCpsBA...", 80 | "number": "1234567890", 81 | "businessId": "9876543210", 82 | "qrcode": false, 83 | "integration": "WHATSAPP-BUSINESS" 84 | }' 85 | ``` 86 | 87 | ### 2. Configuração do Webhook 88 | 89 | Depois de criar a instância, é necessário configurar o webhook no aplicativo da Meta para receber eventos e mensagens do WhatsApp. 90 | 91 | #### URL do Webhook 92 | 93 | No painel do seu aplicativo no Facebook Developers, configure o webhook com a seguinte URL: 94 | 95 | ```plaintext 96 | API_URL/webhook/meta 97 | ``` 98 | 99 | #### Token do Webhook 100 | 101 | O token para validar o webhook deve ser configurado na variável `WA_BUSINESS_TOKEN_WEBHOOK` no seu arquivo `.env`: 102 | 103 | ```plaintext 104 | WA_BUSINESS_TOKEN_WEBHOOK=seu_token_webhook 105 | ``` 106 | 107 | Este token será usado pela Meta para validar as requisições enviadas para o seu webhook. 108 | 109 | ### Conclusão 110 | 111 | Com a instância criada e o webhook configurado, a sua Evolution API v2 está pronta para operar com a Cloud API oficial do WhatsApp. Todas as mensagens e eventos relacionados ao número configurado serão gerenciados automaticamente pela Evolution API. 112 | 113 | Esta documentação fornece uma visão clara e detalhada de como integrar a Cloud API do WhatsApp com a Evolution API v2, desde a preparação necessária até a configuração final. Se você seguir todas as etapas, estará preparado para utilizar as funcionalidades do WhatsApp em sua aplicação através da Evolution API v2. -------------------------------------------------------------------------------- /v2/pt/integrations/evolution-channel.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Canal Evolution 3 | icon: messages 4 | --- 5 | 6 | O **Evolution Channel** é um canal universal de integração que permite a entrada de mensagens através de webhooks, proporcionando flexibilidade para conectar diversos sistemas e aplicativos com a Evolution API. Este canal facilita a automação e o gerenciamento de mensagens, suportando diversas integrações e fluxos de trabalho. 7 | 8 | --- 9 | 10 | ## 1. Configuração da Instância Evolution 11 | 12 | Para configurar uma instância no Evolution Channel, você precisará acessar a rota `/instance/create` da Evolution API com o seguinte corpo de requisição: 13 | 14 | ### Criação da Instância 15 | 16 | **Endpoint** 17 | ```http 18 | POST {{baseUrl}}/instance/create 19 | ``` 20 | 21 | **Corpo da Requisição** 22 | 23 | Aqui está um exemplo de como criar uma instância no Evolution Channel: 24 | ```json 25 | { 26 | "instanceName": "NOME DA INSTANCIA", 27 | "token": "TOKEN DA INSTANCIA (OPCIONAL)", 28 | "number": "NUMBER ID DA INSTANCIA", 29 | "qrcode": false, 30 | "integration": "EVOLUTION" 31 | } 32 | ``` 33 | 34 | ### Parâmetros do Corpo da Requisição 35 | 36 | - **`instanceName`**: Nome da instância que você está criando. 37 | - **`token`**: Token opcional para autenticar a instância. 38 | - **`number`**: Number ID da instância que será utilizado para receber e enviar mensagens. 39 | - **`qrcode`**: Defina como `false` pois a integração não requer QR Code. 40 | - **`integration`**: Use `"EVOLUTION"` para especificar que esta integração é com o canal universal Evolution. 41 | 42 | **Exemplo de Requisição** 43 | ```bash 44 | curl -X POST http://API_URL/instance/create \ 45 | -H "Content-Type: application/json" \ 46 | -d '{ 47 | "instanceName": "MinhaInstancia", 48 | "token": "123456", 49 | "number": "9876543210", 50 | "qrcode": false, 51 | "integration": "EVOLUTION" 52 | }' 53 | ``` 54 | 55 | --- 56 | 57 | ## 2. Entrada de Mensagens no Evolution Channel 58 | 59 | Após a criação da instância, o Evolution Channel receberá as mensagens enviadas para a instância configurada. Essas mensagens são enviadas para a rota `{baseUrl}/webhook/evolution` como requisições POST. Este é o ponto de entrada para as mensagens que o Evolution Channel irá processar. 60 | 61 | **URL do Webhook para Entrada de Mensagens** 62 | ```http 63 | POST {{baseUrl}}/webhook/evolution 64 | ``` 65 | 66 | ### Exemplo de Payload de Entrada de Mensagem 67 | 68 | Aqui está um exemplo do formato de payload enviado para o Evolution Channel quando uma mensagem é recebida: 69 | 70 | ```json 71 | { 72 | "numberId": "1234567", 73 | "key": { 74 | "remoteJid": "557499879409", 75 | "fromMe": false, 76 | "id": "ABC1234" 77 | }, 78 | "pushName": "Davidson", 79 | "message": { 80 | "conversation": "Qual o seu nome?" 81 | }, 82 | "messageType": "conversation" 83 | } 84 | ``` 85 | 86 | ### Explicação dos Campos do Payload 87 | 88 | - **`numberId`**: ID do número cadastrado na criação da instância. 89 | - **`key.remoteJid`**: Número ou ID único do contato que enviou a mensagem. 90 | - **`key.fromMe`**: Indica se a mensagem foi enviada pelo contato (`false`) ou pelo próprio sistema (`true`). 91 | - **`key.id`**: ID único da mensagem. 92 | - **`pushName`**: Nome do contato que enviou a mensagem. 93 | - **`message.conversation`**: Conteúdo da mensagem recebida. 94 | - **`messageType`**: Tipo da mensagem (neste caso, `conversation`). 95 | 96 | --- 97 | 98 | ## 3. Feedback e Postbacks 99 | 100 | O Evolution Channel envia feedback e postbacks através dos canais de eventos configurados, como webhooks, RabbitMQ, ou SQS. Isso permite que você receba notificações em tempo real sobre o status das mensagens e interações, mantendo seu sistema atualizado. 101 | 102 | **Exemplos de Canais de Eventos** 103 | - **Webhook**: Notificações são enviadas para um endpoint HTTP especificado. 104 | - **RabbitMQ**: Mensagens são enviadas para uma fila RabbitMQ configurada. 105 | - **SQS**: Mensagens são enviadas para uma fila SQS da AWS. 106 | 107 | **Configuração de Canais de Eventos** 108 | Para configurar os canais de eventos, defina os parâmetros necessários no seu arquivo de configuração ou diretamente na instância, conforme as especificações da Evolution API. 109 | 110 | --- 111 | 112 | ## Conclusão 113 | 114 | Com a instância criada e a configuração do webhook de entrada de mensagens, a sua Evolution API está pronta para operar com o Evolution Channel. Todas as mensagens recebidas e os eventos associados serão gerenciados de forma centralizada, permitindo uma integração fluida e eficiente com seus sistemas de mensagens e automação. 115 | 116 | Esta documentação fornece uma visão clara e detalhada de como integrar o Evolution Channel com a Evolution API, desde a criação da instância até a configuração dos webhooks e canais de eventos. Seguindo estas etapas, você estará preparado para utilizar o canal universal Evolution em sua aplicação. -------------------------------------------------------------------------------- /v2/pt/integrations/rabbitmq.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: RabbitMQ 3 | icon: rabbit 4 | --- 5 | 6 | A Evolution API permite a integração com o **RabbitMQ** para gerenciar eventos e filas de mensagens, facilitando a comunicação e processamento de tarefas de forma eficiente e escalável. A seguir, você encontrará informações sobre como configurar o RabbitMQ tanto em modo global quanto em instâncias individuais. 7 | 8 | ## Configuração Global do RabbitMQ 9 | 10 | Com a nova configuração global, é possível centralizar o processamento de eventos em filas unificadas, em vez de configurar filas separadas para cada instância. Isso simplifica a gestão de eventos, pois todos os eventos do sistema passam por filas específicas de acordo com o tipo de evento. 11 | 12 | ### Configuração de Variáveis de Ambiente 13 | 14 | Aqui estão as variáveis de ambiente necessárias para habilitar e configurar o RabbitMQ em modo global: 15 | 16 | ```plaintext 17 | RABBITMQ_ENABLED=true 18 | RABBITMQ_URI=amqp://admin:admin@localhost:5672/default 19 | RABBITMQ_EXCHANGE_NAME=evolution_exchange 20 | RABBITMQ_GLOBAL_ENABLED=true 21 | ``` 22 | 23 | ### Eventos Configuráveis 24 | 25 | Com o modo global habilitado (`RABBITMQ_GLOBAL_ENABLED=true`), todos os eventos são enfileirados em filas específicas por tipo de evento, em vez de por instância. Aqui está a lista de eventos que você pode ativar globalmente: 26 | 27 | ```plaintext 28 | RABBITMQ_EVENTS_APPLICATION_STARTUP=true 29 | RABBITMQ_EVENTS_INSTANCE_CREATE=true 30 | RABBITMQ_EVENTS_INSTANCE_DELETE=true 31 | RABBITMQ_EVENTS_QRCODE_UPDATED=true 32 | RABBITMQ_EVENTS_MESSAGES_SET=true 33 | RABBITMQ_EVENTS_MESSAGES_UPSERT=true 34 | RABBITMQ_EVENTS_MESSAGES_EDITED=true 35 | RABBITMQ_EVENTS_MESSAGES_UPDATE=true 36 | RABBITMQ_EVENTS_MESSAGES_DELETE=true 37 | RABBITMQ_EVENTS_SEND_MESSAGE=true 38 | RABBITMQ_EVENTS_CONTACTS_SET=true 39 | RABBITMQ_EVENTS_CONTACTS_UPSERT=true 40 | RABBITMQ_EVENTS_CONTACTS_UPDATE=true 41 | RABBITMQ_EVENTS_PRESENCE_UPDATE=true 42 | RABBITMQ_EVENTS_CHATS_SET=true 43 | RABBITMQ_EVENTS_CHATS_UPSERT=true 44 | RABBITMQ_EVENTS_CHATS_UPDATE=true 45 | RABBITMQ_EVENTS_CHATS_DELETE=true 46 | RABBITMQ_EVENTS_GROUPS_UPSERT=true 47 | RABBITMQ_EVENTS_GROUP_UPDATE=true 48 | RABBITMQ_EVENTS_GROUP_PARTICIPANTS_UPDATE=true 49 | RABBITMQ_EVENTS_CONNECTION_UPDATE=true 50 | RABBITMQ_EVENTS_CALL=true 51 | RABBITMQ_EVENTS_TYPEBOT_START=true 52 | RABBITMQ_EVENTS_TYPEBOT_CHANGE_STATUS=true 53 | ``` 54 | 55 | ### Funcionamento 56 | 57 | - **Fila por Evento**: No modo global, os eventos são enfileirados em filas específicas para cada tipo de evento. Por exemplo, todos os eventos de atualização de mensagens (`MESSAGES_UPDATE`) serão enfileirados na mesma fila, independentemente da instância de origem. 58 | - **Facilidade de Gerenciamento**: Essa abordagem facilita o gerenciamento e monitoramento dos eventos, permitindo uma centralização das operações e simplificando a lógica de consumo de mensagens no seu sistema. 59 | 60 | ## Configuração do RabbitMQ para Instâncias Individuais 61 | 62 | Embora a configuração global seja recomendada para centralizar o processamento de eventos, ainda é possível configurar o RabbitMQ para instâncias individuais, caso haja necessidade de segmentação por instância. 63 | 64 | ### Endpoint para Configuração Individual 65 | 66 | Para configurar o RabbitMQ para uma instância específica do WhatsApp na Evolution API, utilize o seguinte endpoint: 67 | 68 | ~~~ http 69 | POST [baseUrl]/rabbitmq/set/[instance_name] 70 | ~~~ 71 | 72 | ### Corpo da Requisição 73 | 74 | Aqui está um exemplo do corpo JSON para configurar eventos em uma instância específica: 75 | 76 | ~~~ json 77 | { 78 | "enabled": true, 79 | "events": [ 80 | "APPLICATION_STARTUP", 81 | "QRCODE_UPDATED", 82 | "MESSAGES_SET", 83 | "MESSAGES_UPSERT", 84 | "MESSAGES_UPDATE", 85 | "MESSAGES_DELETE", 86 | "SEND_MESSAGE", 87 | "CONTACTS_SET", 88 | "CONTACTS_UPSERT", 89 | "CONTACTS_UPDATE", 90 | "PRESENCE_UPDATE", 91 | "CHATS_SET", 92 | "CHATS_UPSERT", 93 | "CHATS_UPDATE", 94 | "CHATS_DELETE", 95 | "GROUPS_UPSERT", 96 | "GROUP_UPDATE", 97 | "GROUP_PARTICIPANTS_UPDATE", 98 | "CONNECTION_UPDATE", 99 | "CALL", 100 | "NEW_JWT_TOKEN" 101 | ] 102 | } 103 | ~~~ 104 | 105 | 106 | Remova eventos não utilizados para otimizar o uso de recursos do RabbitMQ. 107 | 108 | 109 | Ao configurar a integração com o RabbitMQ para instâncias individuais, ajuste o array de eventos no corpo JSON para incluir apenas os eventos relevantes para aquela instância. 110 | 111 | ## Considerações Finais 112 | 113 | A configuração do RabbitMQ na Evolution API oferece flexibilidade para gerenciar eventos de forma centralizada com a configuração global, ou de forma segmentada por instância, dependendo das necessidades do seu sistema. Utilize a configuração global para simplificar a gestão de eventos em ambientes complexos, ou configure individualmente para controle mais granular. 114 | 115 | 116 | Para mais detalhes sobre as variáveis de ambiente do RabbitMQ e outras configurações avançadas, consulte a [seção de variáveis de ambiente](/v2/pt/env#rabbitmq). 117 | 118 | -------------------------------------------------------------------------------- /v2/pt/integrations/s3minio.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: S3/Minio 3 | icon: cloud 4 | --- 5 | 6 | A Evolution API suporta a integração com Amazon S3 ou Minio para armazenar arquivos de mídia do WhatsApp, como imagens, áudios e documentos. Essa integração permite que os arquivos sejam armazenados de forma segura e acessível, com links gerados automaticamente e incluídos nos webhooks enviados pela API. 7 | 8 | ## Configuração de Variáveis de Ambiente 9 | 10 | Para habilitar o armazenamento S3 ou Minio, você deve definir as variáveis de ambiente adequadas no arquivo `.env` da Evolution API. Abaixo estão as variáveis necessárias e suas funções: 11 | 12 | ### Variáveis de Configuração para S3 13 | 14 | ```plaintext 15 | S3_ENABLED=true 16 | S3_ACCESS_KEY=lJiKQSKlco6UfSUJSnZt 17 | S3_SECRET_KEY=gZXkzkXQwhME8XEmZVNF0ImSWxIpbXeJ5UoPy4s1 18 | S3_BUCKET=evolution 19 | S3_PORT=443 20 | S3_ENDPOINT=s3.eu-west-3.amazonaws.com 21 | S3_USE_SSL=true 22 | S3_REGION=eu-west-3 23 | ``` 24 | 25 | ### Explicação das Variáveis 26 | 27 | - **`S3_ENABLED`**: Ativa (`true`) ou desativa (`false`) o uso do S3 ou Minio para armazenamento de arquivos. 28 | - **`S3_ACCESS_KEY`**: Chave de acesso fornecida pelo provedor do serviço (AWS ou Minio). 29 | - **`S3_SECRET_KEY`**: Chave secreta correspondente à chave de acesso, usada para autenticação. 30 | - **`S3_BUCKET`**: Nome do bucket onde os arquivos serão armazenados. 31 | - **`S3_PORT`**: Porta utilizada para a conexão. Normalmente `443` para conexões SSL. 32 | - **`S3_ENDPOINT`**: Endpoint do serviço S3 ou Minio. Para Amazon S3, é necessário incluir a região no formato `region: s3.[region].amazonaws.com`, por exemplo, `s3.eu-west-3.amazonaws.com`. 33 | - **`S3_USE_SSL`**: Define se a conexão deve usar SSL (`true` ou `false`). 34 | - **`S3_REGION`**: A região do bucket S3 (padrão é `us-east-1`). 35 | 36 | ### Exemplos de Configuração 37 | 38 | #### Amazon S3 39 | 40 | Ao utilizar o Amazon S3, é essencial especificar o endpoint corretamente, incluindo a região. Aqui está um exemplo: 41 | 42 | ```plaintext 43 | S3_ENABLED=true 44 | S3_ACCESS_KEY=your-aws-access-key 45 | S3_SECRET_KEY=your-aws-secret-key 46 | S3_BUCKET=my-s3-bucket 47 | S3_PORT=443 48 | S3_ENDPOINT=s3.eu-west-3.amazonaws.com 49 | S3_USE_SSL=true 50 | S3_REGION=eu-west-3 51 | ``` 52 | 53 | #### Minio 54 | 55 | Para Minio, o endpoint pode ser o domínio personalizado do serviço: 56 | 57 | ```plaintext 58 | S3_ENABLED=true 59 | S3_ACCESS_KEY=your-minio-access-key 60 | S3_SECRET_KEY=your-minio-secret-key 61 | S3_BUCKET=my-minio-bucket 62 | S3_PORT=443 63 | S3_ENDPOINT=minio.mycompany.com 64 | S3_USE_SSL=true 65 | ``` 66 | 67 | ## Como Funciona o Armazenamento de Mídia 68 | 69 | Quando o armazenamento S3 ou Minio é configurado corretamente, todos os arquivos de mídia recebidos do WhatsApp (como imagens, vídeos, áudios, etc.) são automaticamente enviados para o bucket configurado. A URL pública do arquivo armazenado é então gerada e incluída no webhook da Evolution API. 70 | 71 | ### Webhook com `mediaUrl` 72 | 73 | Quando um arquivo de mídia é recebido e armazenado, o webhook enviado pela Evolution API incluirá o `mediaUrl` no corpo da mensagem. Isso permite que sua aplicação acesse diretamente o arquivo armazenado no S3 ou Minio. 74 | 75 | ### Exemplo de Webhook 76 | 77 | Aqui está um exemplo de como o webhook com `mediaUrl` pode aparecer: 78 | 79 | ~~~json 80 | { 81 | "event": "messages.upsert", 82 | "data": { 83 | "message": { 84 | ... 85 | "mediaUrl": "https://files.evolution-api-pro.com/bucket/path/to/media/file.jpg", 86 | ... 87 | } 88 | } 89 | } 90 | ~~~ 91 | 92 | ## Considerações Finais 93 | 94 | Integrar a Evolution API com Amazon S3 ou Minio para o armazenamento de arquivos de mídia oferece uma solução escalável e segura para gerenciar conteúdos de mídia do WhatsApp. Ao configurar as variáveis de ambiente corretamente, você garante que todos os arquivos de mídia sejam armazenados e acessíveis conforme necessário, proporcionando maior controle sobre os dados e a capacidade de integrá-los facilmente em suas aplicações. 95 | 96 | 97 | Para mais detalhes sobre as variáveis de ambiente e outras configurações avançadas, consulte a [seção de variáveis de ambiente](/v2/pt/env#s3). 98 | -------------------------------------------------------------------------------- /v2/pt/integrations/sqs.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Amazon SQS 3 | icon: aws 4 | --- 5 | 6 | A Evolution API permite a integração com o **Amazon SQS (Simple Queue Service)** para gerenciar eventos e filas de mensagens de forma escalável e confiável. Assim como no RabbitMQ, o SQS na Evolution API pode ser configurado tanto de maneira global quanto para instâncias individuais. 7 | 8 | ## Configuração Global do SQS 9 | 10 | Para habilitar o SQS e configurar o processamento de eventos de forma centralizada, utilize as seguintes variáveis de ambiente: 11 | 12 | ### Configuração de Variáveis de Ambiente 13 | 14 | ```plaintext 15 | SQS_ENABLED=true 16 | SQS_ACCESS_KEY_ID=your-access-key-id 17 | SQS_SECRET_ACCESS_KEY=your-secret-access-key 18 | SQS_ACCOUNT_ID=your-account-id 19 | SQS_REGION=your-region 20 | ``` 21 | 22 | ### Explicação das Variáveis 23 | 24 | - **`SQS_ENABLED`**: Ativa (`true`) ou desativa (`false`) a integração com o Amazon SQS. 25 | - **`SQS_ACCESS_KEY_ID`**: Chave de acesso da AWS para autenticação. 26 | - **`SQS_SECRET_ACCESS_KEY`**: Chave secreta correspondente à chave de acesso para autenticação. 27 | - **`SQS_ACCOUNT_ID`**: ID da conta AWS onde o SQS está configurado. 28 | - **`SQS_REGION`**: Região da AWS onde suas filas SQS estão localizadas (por exemplo, `us-east-1`). 29 | 30 | ### Funcionamento 31 | 32 | - **Fila por Evento**: No modo global, todos os eventos são enfileirados em filas específicas para cada tipo de evento. Isso significa que eventos de diferentes instâncias são centralizados em filas unificadas por evento, simplificando o processamento e o monitoramento. 33 | 34 | ## Configuração do SQS para Instâncias Individuais 35 | 36 | Embora a configuração global seja recomendada para centralizar o processamento de eventos, você pode configurar o SQS para instâncias individuais caso precise segmentar as filas por instância. 37 | 38 | ### Endpoint para Configuração Individual 39 | 40 | Para configurar o SQS para uma instância específica do WhatsApp na Evolution API, utilize o seguinte endpoint: 41 | 42 | ~~~ http 43 | POST [baseUrl]/sqs/set/[instance_name] 44 | ~~~ 45 | 46 | ### Corpo da Requisição 47 | 48 | Aqui está um exemplo do corpo JSON para configurar eventos em uma instância específica: 49 | 50 | ~~~ json 51 | { 52 | "enabled": true, 53 | "events": [ 54 | "APPLICATION_STARTUP", 55 | "QRCODE_UPDATED", 56 | "MESSAGES_SET", 57 | "MESSAGES_UPSERT", 58 | "MESSAGES_UPDATE", 59 | "MESSAGES_DELETE", 60 | "SEND_MESSAGE", 61 | "CONTACTS_SET", 62 | "CONTACTS_UPSERT", 63 | "CONTACTS_UPDATE", 64 | "PRESENCE_UPDATE", 65 | "CHATS_SET", 66 | "CHATS_UPSERT", 67 | "CHATS_UPDATE", 68 | "CHATS_DELETE", 69 | "GROUPS_UPSERT", 70 | "GROUP_UPDATE", 71 | "GROUP_PARTICIPANTS_UPDATE", 72 | "CONNECTION_UPDATE", 73 | "CALL", 74 | "NEW_JWT_TOKEN" 75 | ] 76 | } 77 | ~~~ 78 | 79 | 80 | Remova eventos não utilizados para otimizar o uso de recursos do SQS. 81 | 82 | 83 | ### Funcionamento 84 | 85 | - **Segmentação por Instância**: Ao configurar o SQS para instâncias individuais, cada instância pode ter suas próprias filas específicas para os eventos configurados. Isso permite maior controle e segmentação dos eventos, caso você precise separar o processamento por instância. 86 | 87 | ## Considerações Finais 88 | 89 | A integração com o Amazon SQS na Evolution API oferece uma solução poderosa para gerenciar eventos de forma escalável e confiável, tanto de maneira centralizada quanto segmentada por instância. Utilize a configuração global para simplificar o processamento em ambientes complexos, ou configure individualmente para um controle mais granular. 90 | 91 | 92 | Para mais detalhes sobre as variáveis de ambiente e outras configurações avançadas, consulte a [seção de variáveis de ambiente](/v2/pt/env#sqs). 93 | -------------------------------------------------------------------------------- /v2/pt/integrations/websocket.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: WebSocket 3 | icon: plug 4 | --- 5 | 6 | A Evolution API utiliza o `socket.io` para emitir eventos em tempo real, aproveitando a tecnologia WebSocket. Isso torna o desenvolvimento de integrações mais eficiente e direto para os desenvolvedores. O WebSocket fornece um canal de comunicação full-duplex sobre uma única conexão duradoura, permitindo o fluxo de dados em tempo real entre o cliente e o servidor. 7 | 8 | 9 | Para ativar os WebSockets, defina a variável de ambiente `WEBSOCKET_ENABLED` como `true`. Veja mais detalhes em [Variáveis de Ambiente](/v2/pt/env). 10 | 11 | 12 | ## Modos de Operação do WebSocket 13 | 14 | ### Modo Global 15 | 16 | No **modo global**, a variável de ambiente `WEBSOCKET_GLOBAL_EVENTS` deve ser definida como `true`. Nesse modo, o WebSocket é inicializado no start do serviço e envia eventos de todas as instâncias, independentemente dos canais. Isso significa que qualquer cliente conectado ao WebSocket receberá eventos globais, abrangendo todas as instâncias da Evolution API configuradas no sistema. 17 | 18 | - **Ativação**: Configure no arquivo `.env`: 19 | 20 | ```plaintext 21 | WEBSOCKET_GLOBAL_EVENTS=true 22 | ``` 23 | 24 | - **Funcionamento**: Ideal para cenários onde você deseja monitorar ou processar eventos de todas as instâncias simultaneamente, sem precisar estabelecer uma conexão separada para cada instância. 25 | 26 | - **Conexão**: No modo global, a conexão ao WebSocket **não** requer o uso do `/nome_instancia` na URL. A URL de conexão será simplesmente: 27 | 28 | ```plaintext 29 | wss://api.seusite.com 30 | ``` 31 | 32 | ### Modo Tradicional 33 | 34 | No **modo tradicional**, o WebSocket só pode ser conectado após a execução do comando `set` na instância. Isso permite que o WebSocket seja específico para cada instância, e a comunicação em tempo real é restrita àquela instância. 35 | 36 | - **Ativação**: Certifique-se de que `WEBSOCKET_GLOBAL_EVENTS` esteja definido como `false` ou não esteja configurado, e siga o fluxo tradicional de configuração da instância. 37 | 38 | - **Funcionamento**: Ideal para cenários onde você deseja uma comunicação em tempo real mais isolada, focada em uma única instância, permitindo maior controle e segmentação dos eventos. 39 | 40 | - **Conexão**: No modo tradicional, a conexão ao WebSocket requer o uso do `/nome_instancia` na URL: 41 | 42 | ```plaintext 43 | wss://api.seusite.com/nome_instancia 44 | ``` 45 | 46 | ## Conexão ao WebSocket 47 | 48 | ### Modo Global 49 | 50 | No modo global, a URL de conexão é mais simples e não requer o nome da instância: 51 | 52 | ~~~plaintext 53 | wss://api.seusite.com 54 | ~~~ 55 | 56 | ### Modo Tradicional 57 | 58 | No modo tradicional, utilize o seguinte formato de URL: 59 | 60 | ~~~plaintext 61 | wss://api.seusite.com/nome_instancia 62 | ~~~ 63 | 64 | Substitua `api.seusite.com` pelo domínio real da sua API e `nome_instancia` pelo nome da sua instância específica. 65 | 66 | ### Exemplo de Estabelecimento de Conexão WebSocket 67 | 68 | Aqui está um exemplo básico de como estabelecer uma conexão WebSocket usando JavaScript: 69 | 70 | ~~~javascript 71 | const socket = io('wss://api.seusite.com/nome_instancia', { 72 | transports: ['websocket'] 73 | }); 74 | 75 | socket.on('connect', () => { 76 | console.log('Conectado ao WebSocket da Evolution API'); 77 | }); 78 | 79 | // Escutando eventos 80 | socket.on('nome_evento', (data) => { 81 | console.log('Evento recebido:', data); 82 | }); 83 | 84 | // Lidando com desconexão 85 | socket.on('disconnect', () => { 86 | console.log('Desconectado do WebSocket da Evolution API'); 87 | }); 88 | ~~~ 89 | 90 | Neste exemplo, substitua `nome_evento` pelo evento específico que você deseja escutar. 91 | 92 | ## Manipulação de Eventos 93 | 94 | Uma vez conectado, você pode escutar vários eventos emitidos pelo servidor. Cada evento pode carregar dados relevantes para o contexto do evento. Por exemplo, se estiver ouvindo atualizações de mensagens, você pode receber dados contendo o conteúdo da mensagem atualizada e metadados. 95 | 96 | ## Fechamento da Conexão 97 | 98 | Para fechar a conexão WebSocket, utilize o método `disconnect`: 99 | 100 | ~~~javascript 101 | socket.disconnect(); 102 | ~~~ 103 | 104 | Lembre-se de manipular a conexão de forma responsável, desconectando quando sua aplicação ou componente for desmontado para evitar vazamentos de memória e garantir o uso eficiente de recursos. 105 | 106 | ## Considerações Finais 107 | 108 | A Evolution API oferece uma forma poderosa de interação em tempo real através dos WebSockets, proporcionando uma experiência contínua tanto para desenvolvedores quanto para usuários finais. Seja no modo global, monitorando todas as instâncias simultaneamente, ou no modo tradicional, focado em uma única instância, a flexibilidade do sistema permite a adaptação às necessidades específicas do seu projeto. 109 | -------------------------------------------------------------------------------- /v2/pt/requirements/database.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Banco de Dados 3 | icon: database 4 | --- 5 | 6 | O banco de dados é uma parte fundamental da Evolution API v2, responsável por armazenar todas as informações críticas da aplicação. A API suporta tanto PostgreSQL quanto MySQL, utilizando o Prisma como ORM (Object-Relational Mapping) para facilitar a interação com esses bancos de dados. 7 | 8 | ## Escolha do Banco de Dados 9 | 10 | A Evolution API v2 permite a flexibilidade de escolher entre PostgreSQL e MySQL como provedor de banco de dados. A escolha pode ser configurada através da variável de ambiente `DATABASE_PROVIDER` e as conexões são gerenciadas pelo Prisma. 11 | 12 | ## Instalação e Configuração 13 | 14 | ### Utilizando Docker 15 | 16 | A maneira mais fácil e rápida de configurar um banco de dados para a Evolution API v2 é através do Docker. Abaixo estão as instruções para configurar tanto o PostgreSQL quanto o MySQL usando Docker Compose. 17 | 18 | #### PostgreSQL 19 | 20 | Para configurar o PostgreSQL via Docker, siga os passos abaixo: 21 | 22 | 1. Baixe o arquivo `docker-compose.yaml` para o PostgreSQL disponível [aqui](https://github.com/EvolutionAPI/evolution-api/blob/main/Docker/postgres/docker-compose.yaml). 23 | 2. Navegue até o diretório onde o arquivo foi baixado e execute o comando: 24 | 25 | ```bash 26 | docker-compose up -d 27 | ``` 28 | 29 | 3. A instância do PostgreSQL estará disponível no endereço `localhost` na porta `5432`. 30 | 31 | #### MySQL 32 | 33 | Para configurar o MySQL via Docker, siga os passos abaixo: 34 | 35 | 1. Baixe o arquivo `docker-compose.yaml` para o MySQL disponível [aqui](https://github.com/EvolutionAPI/evolution-api/blob/v2.0.0/Docker/mysql/docker-compose.yaml). 36 | 2. Navegue até o diretório onde o arquivo foi baixado e execute o comando: 37 | 38 | ```bash 39 | docker-compose up -d 40 | ``` 41 | 42 | 3. A instância do MySQL estará disponível no endereço `localhost` na porta `3306`. 43 | 44 | ### Configuração das Variáveis de Ambiente 45 | 46 | Após configurar o banco de dados, defina as seguintes variáveis de ambiente no seu arquivo `.env`: 47 | 48 | ```env 49 | # Habilitar o uso do banco de dados 50 | DATABASE_ENABLED=true 51 | 52 | # Escolher o provedor do banco de dados: postgresql ou mysql 53 | DATABASE_PROVIDER=postgresql 54 | 55 | # URI de conexão com o banco de dados 56 | DATABASE_CONNECTION_URI='postgresql://user:pass@localhost:5432/evolution?schema=public' 57 | 58 | # Nome do cliente para a conexão do banco de dados 59 | DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange 60 | 61 | # Escolha os dados que você deseja salvar no banco de dados da aplicação 62 | DATABASE_SAVE_DATA_INSTANCE=true 63 | DATABASE_SAVE_DATA_NEW_MESSAGE=true 64 | DATABASE_SAVE_MESSAGE_UPDATE=true 65 | DATABASE_SAVE_DATA_CONTACTS=true 66 | DATABASE_SAVE_DATA_CHATS=true 67 | DATABASE_SAVE_DATA_LABELS=true 68 | DATABASE_SAVE_DATA_HISTORIC=true 69 | ``` 70 | 71 | ### Instalação Local 72 | 73 | Caso prefira configurar o banco de dados localmente sem utilizar Docker, siga as instruções abaixo: 74 | 75 | #### PostgreSQL 76 | 77 | 1. Instale o PostgreSQL na sua máquina. Em sistemas baseados em Ubuntu, por exemplo, você pode usar: 78 | 79 | ```bash 80 | sudo apt-get update 81 | sudo apt-get install postgresql postgresql-contrib 82 | ``` 83 | 84 | 2. Inicie o serviço do PostgreSQL: 85 | 86 | ```bash 87 | sudo service postgresql start 88 | ``` 89 | 90 | 3. Crie um banco de dados para a Evolution API v2: 91 | 92 | ```bash 93 | sudo -u postgres createdb evolution 94 | ``` 95 | 96 | #### MySQL 97 | 98 | 1. Instale o MySQL na sua máquina. Em sistemas baseados em Ubuntu, você pode usar: 99 | 100 | ```bash 101 | sudo apt-get update 102 | sudo apt-get install mysql-server 103 | ``` 104 | 105 | 2. Inicie o serviço do MySQL: 106 | 107 | ```bash 108 | sudo service mysql start 109 | ``` 110 | 111 | 3. Crie um banco de dados para a Evolution API v2: 112 | 113 | ```bash 114 | mysql -u root -p -e "CREATE DATABASE evolution;" 115 | ``` 116 | -------------------------------------------------------------------------------- /v2/pt/requirements/redis.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Redis 3 | icon: layer-group 4 | --- 5 | 6 | O Redis é utilizado pela Evolution API v2 como um sistema de cache para otimizar o desempenho e a velocidade da aplicação. Ele pode ser configurado para armazenar informações temporárias e melhorar a eficiência das operações. 7 | 8 | ## Instalação e Configuração 9 | 10 | ### Utilizando Docker 11 | 12 | A maneira mais fácil e rápida de configurar o Redis para a Evolution API v2 é através do Docker. Abaixo estão as instruções para configurar o Redis usando Docker Compose. 13 | 14 | #### Redis 15 | 16 | Para configurar o Redis via Docker, siga os passos abaixo: 17 | 18 | 1. Baixe o arquivo `docker-compose.yaml` para o Redis disponível [aqui](https://github.com/EvolutionAPI/evolution-api/blob/v2.0.0/Docker/redis/docker-compose.yaml). 19 | 2. Navegue até o diretório onde o arquivo foi baixado e execute o comando: 20 | 21 | ```bash 22 | docker-compose up -d 23 | ``` 24 | 25 | 3. A instância do Redis estará disponível no endereço `localhost` na porta `6379`. 26 | 27 | ### Configuração das Variáveis de Ambiente 28 | 29 | Após configurar o Redis, defina as seguintes variáveis de ambiente no seu arquivo `.env`: 30 | 31 | ```env 32 | # Habilitar o cache Redis 33 | CACHE_REDIS_ENABLED=true 34 | 35 | # URI de conexão com o Redis 36 | CACHE_REDIS_URI=redis://localhost:6379/6 37 | 38 | # Prefixo para diferenciar os dados de diferentes instalações que utilizam o mesmo Redis 39 | CACHE_REDIS_PREFIX_KEY=evolution 40 | 41 | # Habilitar para salvar as informações de conexão no Redis ao invés do banco de dados 42 | CACHE_REDIS_SAVE_INSTANCES=false 43 | 44 | # Habilitar o cache local 45 | CACHE_LOCAL_ENABLED=false 46 | ``` 47 | 48 | ### Instalação Local 49 | 50 | Caso prefira configurar o Redis localmente sem utilizar Docker, siga as instruções abaixo: 51 | 52 | #### Redis 53 | 54 | 1. Instale o Redis na sua máquina. Em sistemas baseados em Ubuntu, por exemplo, você pode usar: 55 | 56 | ```bash 57 | sudo apt-get update 58 | sudo apt-get install redis-server 59 | ``` 60 | 61 | 2. Inicie o serviço do Redis: 62 | 63 | ```bash 64 | sudo service redis-server start 65 | ``` 66 | 67 | 3. Verifique se o Redis está rodando corretamente com o comando: 68 | 69 | ```bash 70 | redis-cli ping 71 | ``` 72 | 73 | Se tudo estiver funcionando corretamente, você verá a resposta `PONG`. 74 | 75 | ### Configuração do Cache na Evolution API v2 76 | 77 | Após a instalação e configuração do Redis, a próxima etapa é configurar o cache na Evolution API v2 utilizando as variáveis de ambiente. Isso permitirá que a API utilize o Redis para cachear dados importantes e melhorar a performance geral da aplicação. 78 | -------------------------------------------------------------------------------- /v2/pt/updates.mdx: -------------------------------------------------------------------------------- 1 | --- 2 | title: Atualização 3 | icon: code-pull-request 4 | --- 5 | 6 | Manter sua instância da Evolution API atualizada é crucial para segurança, desempenho e acesso a novos recursos. O método de atualização depende de como você inicialmente instalou a API. Este guia cobre os passos para atualizar sua Evolution API usando Docker Compose e NPM. 7 | 8 | Antes de atualizar a Evolution, certifique-se de que todos os aplicativos integrados estão realmente funcionando com a Evolution. Atualize por sua conta e risco. 9 | 10 | ## Atualização com Docker 11 | 12 | Se você configurou inicialmente sua Evolution API usando Docker, siga estas etapas para atualizar: 13 | 14 | ### Atualização com Docker CLI 15 | 16 | Se sua Evolution API foi instalada inicialmente usando Docker Compose via interface de linha de comando (CLI), e não através do Portainer ou qualquer outra ferramenta de gerenciamento de contêiner, siga estas etapas para atualizá-la: 17 | 18 | 1. **Navegue até o Diretório do Docker Compose**: Abra um terminal e vá para o diretório onde seu arquivo Docker Compose (`docker-compose.yml`) está localizado. 19 | 20 | 2. **Puxe a Imagem Mais Recente**: Atualize a imagem da Evolution API para a versão mais recente executando o seguinte comando: 21 | 22 | ~~~ shell 23 | docker pull atendai/evolution-api:v2.1.1 24 | ~~~ 25 | 26 | 3. **Pare e Reinicie os Contêineres**: Após puxar a imagem mais recente, pare os contêineres atuais e reinicie-os. Isso pode ser feito usando o seguinte comando: 27 | 28 | ~~~ shell 29 | docker compose down && docker compose up -d 30 | ~~~ 31 | 32 | ## Atualização com Portainer 33 | 34 | Se você está usando o Portainer para gerenciamento de contêineres, siga estas etapas para atualizar sua Evolution API: 35 | 36 | 1. **Acesse o Painel do Portainer**: Abra o painel do Portainer em um navegador web. 37 | 38 | 2. **Navegue até Seus Contêineres**: Vá para a seção 'Stacks' onde seu contêiner da Evolution API está listado. 39 | 40 | 3. **Atualize o Compose**: 41 | - Localize o campo `image` na sua configuração do Docker Compose. 42 | 43 | ~~~ yaml stack-file.yml 44 | # ... (outros serviços e configurações) 45 | evolution_api: 46 | # Atualize a versão da imagem da Evolution API aqui 47 | # Use 'atendai/evolution-api:latest' para a versão mais recente 48 | # Ou especifique uma versão específica como 'atendai/evolutionapi:2.1.1' 49 | image: atendai/evolution-api:v2.x.x 50 | networks: 51 | - your_network 52 | 53 | ~~~ 54 | 55 | - Atualize o valor para `atendai/evolution-api:v2.1.1` para a versão mais recente, ou use `atendai/evolutionapi:v2.x.x` para uma versão específica. 56 | - Após fazer as alterações, clique no botão 'Deploy' no final da janela de edição do compose. 57 | 58 | 4. **Verifique a Atualização**: Após recriar o contêiner, verifique se a Evolution API está executando a versão mais recente. Isso pode ser verificado tipicamente através do endpoint de versão da API ou dos logs. 59 | 60 | 61 | Para ambientes de produção, é recomendável especificar uma versão particular da Evolution API (ex.: atendai/evolution-api:v1.x.x) em vez de usar latest. 62 | Esta prática garante estabilidade e previsibilidade, pois protege seu ambiente de produção de problemas potenciais decorrentes de mudanças inesperadas na versão mais recente. 63 | 64 | 65 | Seguindo esses passos, você pode garantir que sua Evolution API esteja sempre atualizada usando o Portainer. 66 | 67 | ## Atualização com NPM 68 | 69 | Atualizar sua instalação da Evolution API via NPM envolve várias etapas para garantir uma transição suave para a nova versão. Aqui está um guia passo a passo: 70 | 71 | 1. **Limpar e Parar**: Limpe todos os logs do PM2, útil para resolução de problemas após a atualização, e pare temporariamente a Evolution API para aplicar as atualizações com segurança. 72 | 73 | ~~~ shell Terminal 74 | # Limpar todos os logs do PM2 75 | pm2 flush 76 | 77 | # Parar o processo atual da Evolution API 78 | pm2 stop ApiEvolution 79 | ~~~ 80 | 81 | 2. **Resetar o repositório local e puxar as atualizações mais recentes**: Garanta que seu código local esteja em sincronia com o commit mais recente e baixe as atualizações mais recentes do repositório. Opcionalmente, mude para uma versão específica se não estiver usando a mais recente. É recomendado para ambientes de produção. 82 | 83 | ~~~ shell Terminal 84 | # Resetar seu repositório local para o commit mais recente 85 | git reset --hard HEAD 86 | 87 | # Puxar as atualizações mais recentes do repositório 88 | git pull 89 | 90 | # Para uma versão específica, use 'git checkout main' para a mais recente, 91 | # ou 'git checkout 1.x.x' para uma versão específica. Exemplo: 92 | git checkout 1.x.x 93 | ~~~ 94 | 95 | 3. **Instalação Limpa**: Remova o `node_modules` existente para evitar possíveis conflitos com novas dependências e instale as dependências necessárias do Node.js para a versão atualizada. 96 | 97 | ~~~ shell Terminal 98 | # Remover o diretório node_modules atual para garantir uma instalação limpa 99 | rm -rf node_modules 100 | 101 | # Instalar dependências com NPM 102 | npm i 103 | 104 | # Reiniciar a Evolution API com a versão atualizada 105 | pm2 start ApiEvolution 106 | 107 | # Opcionalmente, visualizar os logs do PM2 para a Evolution API 108 | pm2 log ApiEvolution 109 | ~~~ --------------------------------------------------------------------------------