### OpenAPI Specification for GET / Source: https://doc.evolution-api.com/v2/api-reference/get-information This OpenAPI v3 specification defines the GET / endpoint for retrieving information about the EvolutionAPI. It outlines the request parameters, responses, and data structures, including an example response. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /: get: summary: Get information about your EvolutionAPI description: Get information about your EvolutionAPI operationId: getEvoInfo parameters: - name: instance in: path required: true description: ID of the instance to connect schema: type: string responses: '200': description: Ok content: application/json: schema: type: object properties: status: type: integer description: The HTTP status of the response message: type: string description: Descriptive message about the current state of the API version: type: string description: The current version of the API swagger: type: string description: URL to the API's Swagger documentation manager: type: string description: URL to the API manager documentation: type: string description: URL to the detailed API documentation example: status: 200 message: Welcome to the Evolution API, it is working! version: 1.7.4 swagger: http://example.evolution-api.com/docs manager: http://example.evolution-api.com/manager documentation: https://doc.evolution-api.com deprecated: false ``` -------------------------------- ### GET /flowise/fetchSettings/{instance} Source: https://doc.evolution-api.com/v2/api-reference/integrations/flowise/find-settings Fetches the settings for a specified Flowise instance. This is useful for discovering the configuration of a bot. ```APIDOC ## GET /flowise/fetchSettings/{instance} ### Description Fetch settings flowise ### Method GET ### Endpoint /flowise/fetchSettings/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Nome da instância. ### Response #### Success Response (200) - **sessions** (string) - Description of the sessions retrieved. #### Response Example { "sessions": "[Example sessions string]" } ``` -------------------------------- ### OpenAPI Specification for Starting Typebot Source: https://doc.evolution-api.com/v2/api-reference/integrations/typebot/start-typebot This OpenAPI 3.0.3 specification defines the POST request to the /typebot/start/{instance} endpoint. It includes parameters for the instance name, and a request body for Typebot configuration such as URL, name, receiver JID, session start flag, and variables. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /typebot/start/{instance}: post: tags: - Typebot Controller summary: Start Typebot description: Start typebot operationId: startTypebot parameters: - name: instance in: path required: true description: Name of the instance schema: type: string requestBody: content: application/json: schema: type: object properties: url: type: string description: Typebot URL typebot: type: string description: Typebot name remoteJid: type: string description: Receiver remote JID startSession: type: boolean description: Start a new session variables: type: array items: type: object properties: name: type: string description: Variable name value: type: string description: Variable value responses: '200': description: Ok content: {} deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: apikey description: Your authorization key header ``` -------------------------------- ### Start Typebot Source: https://doc.evolution-api.com/v2/api-reference/integrations/typebot/start-typebot Initiates a Typebot session. You can provide a Typebot URL, name, receiver JID, and session start flag, along with custom variables. ```APIDOC ## POST /typebot/start/{instance} ### Description Start typebot ### Method POST ### Endpoint /typebot/start/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance #### Request Body - **url** (string) - Optional - Typebot URL - **typebot** (string) - Optional - Typebot name - **remoteJid** (string) - Optional - Receiver remote JID - **startSession** (boolean) - Optional - Start a new session - **variables** (array) - Optional - List of variables to pass to the Typebot session - **name** (string) - Optional - Variable name - **value** (string) - Optional - Variable value ### Request Example { "url": "string", "typebot": "string", "remoteJid": "string", "startSession": true, "variables": [ { "name": "string", "value": "string" } ] } ### Response #### Success Response (200) - (empty response body) #### Response Example { "example": "" } ``` -------------------------------- ### OpenAPI Specification for Find Settings Source: https://doc.evolution-api.com/v2/api-reference/settings/get This OpenAPI v3 specification defines the GET /settings/find/{instance} endpoint for fetching Webhook configuration. It includes parameters, response schemas, and example responses. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /settings/find/{instance}: get: tags: - Webhook Controller summary: Find Webhook description: Fetch Webhook configuration operationId: findWebhook parameters: - name: instance in: path required: true description: Name of the instance to get settings schema: type: string responses: '200': description: Ok content: application/json: schema: type: object properties: reject_call: type: boolean description: Indicates whether to reject incoming calls. groups_ignore: type: boolean description: Indicates whether to ignore group messages. always_online: type: boolean description: Indicates whether to always keep the instance online. read_messages: type: boolean description: Indicates whether to mark messages as read. read_status: type: boolean description: Indicates whether to read status updates. sync_full_history: type: boolean description: Indicates whether to synchronize full message history. example: reject_call: true groups_ignore: true always_online: true read_messages: true read_status: true sync_full_history: false deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: apikey description: Your authorization key header ``` -------------------------------- ### Get Information about EvolutionAPI Source: https://doc.evolution-api.com/v2/api-reference/get-information Retrieves general information about the EvolutionAPI instance, such as its status, version, and documentation links. ```APIDOC ## GET / ### Description Get information about your EvolutionAPI. ### Method GET ### Endpoint / ### Parameters #### Path Parameters - **instance** (string) - Required - ID of the instance to connect ### Response #### Success Response (200) - **status** (integer) - The HTTP status of the response - **message** (string) - Descriptive message about the current state of the API - **version** (string) - The current version of the API - **swagger** (string) - URL to the API's Swagger documentation - **manager** (string) - URL to the API manager - **documentation** (string) - URL to the detailed API documentation #### Response Example { "example": "{\"status\": 200, \"message\": \"Welcome to the Evolution API, it is working!\", \"version\": \"1.7.4\", \"swagger\": \"http://example.evolution-api.com/docs\", \"manager\": \"http://example.evolution-api.com/manager\", \"documentation\": \"https://doc.evolution-api.com\"}" } ``` -------------------------------- ### Instance Connect OpenAPI Specification Source: https://doc.evolution-api.com/v2/api-reference/instance-controller/instance-connect This OpenAPI v3 specification defines the GET /instance/connect/{instance} endpoint. It includes details on parameters, responses for success (200) and failure (404), and security schemes. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /instance/connect/{instance}: get: tags: - Instance Controller summary: Instances Connect description: Generates and returns the QR code for WhatsApp connection operationId: instanceConnect parameters: - name: instance in: path required: true description: Name of the instance to connect schema: type: string - name: number description: Phone number (with country code) to be connected in: query schema: type: string responses: '200': description: Ok content: application/json: schema: type: object properties: pairingCode: type: string description: The unique code used for pairing a device or account. code: type: string description: >- A specific code associated with the pairing process. This may include tokens or other identifiers. count: type: integer description: >- The count or number of attempts or instances related to the pairing process. example: pairingCode: WZYEH1YY code: 2@y8eK+bjtEjUWy9/FOM... count: 1 '404': description: Instance not found content: application/json: schema: type: object properties: status: type: integer description: The HTTP status of the response error: type: string description: The error message indicating the type of error response: type: object properties: message: type: array items: type: string description: List of detailed error messages example: status: 404 error: Not Found response: message: - The "invalid-instance" instance does not exist deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: apikey description: Your authorization key header ``` -------------------------------- ### OpenAPI Specification for Fetch EvoAI Settings Source: https://doc.evolution-api.com/v2/api-reference/integrations/evoai/find-settings This OpenAPI v3 specification defines the `GET /evoai/fetchSettings/{instance}` endpoint. Use this to understand the request and response structure for retrieving EvoAI bot settings. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /evoai/fetchSettings/{instance}: get: tags: - EvoAI Controller summary: Find settings EvoAI bot description: Find settigns EvoAI bot operationId: findEvoAISettings parameters: - name: instance in: path required: true description: Nome da instância schema: type: string responses: '200': description: Configurações do bot EvoAI atualizadas com sucesso. content: application/json: schema: type: object properties: message: type: string example: Configurações do bot EvoAI atualizadas com sucesso security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: apikey description: Your authorization key header ``` -------------------------------- ### OpenAPI Specification for Fetch n8n Settings Source: https://doc.evolution-api.com/v2/api-reference/integrations/n8n/find-settings This OpenAPI 3.0.3 specification defines the GET request to the `/n8n/fetchSettings/{instance}` endpoint. It includes parameters, responses, and security schemes required to interact with the n8n bot settings. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /n8n/fetchSettings/{instance}: get: tags: - n8n Controller summary: Find settings n8n bot description: Find settigns n8n bot operationId: findN8nSettings parameters: - name: instance in: path required: true description: Nome da instância schema: type: string responses: '200': description: Configurações do bot n8n atualizadas com sucesso. content: application/json: schema: type: object properties: message: type: string example: Configurações do bot n8n atualizadas com sucesso security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: apikey description: Your authorization key header ``` -------------------------------- ### Create Instance Basic Source: https://doc.evolution-api.com/v2/api-reference/instance-controller/create-instance-basic Allows the creation of a new instance with optional configurations for webhook, RabbitMQ, SQS, and Chatwoot integrations. ```APIDOC ## POST /api/v2/instance ### Description Creates a new instance with specified configurations for various integrations. ### Method POST ### Endpoint /api/v2/instance ### Request Body - **webhook** (object) - Optional - Webhook URL configuration. - **url** (string) - Required - The URL to send events to. - **rabbitmq** (object) - Optional - RabbitMQ integration configuration. - **enabled** (boolean) - Required - Enable RabbitMQ. - **events** (array) - Required - Events to be sent to RabbitMQ. - **enum** (string) - Allowed values: APPLICATION_STARTUP, QRCODE_UPDATED, MESSAGES_SET, MESSAGES_UPSERT, MESSAGES_UPDATE, MESSAGES_DELETE, SEND_MESSAGE, CONTACTS_SET, CONTACTS_UPSERT, CONTACTS_UPDATE, PRESENCE_UPDATE, CHATS_SET, CHATS_UPSERT, CHATS_UPDATE, CHATS_DELETE, GROUPS_UPSERT, GROUP_UPDATE, GROUP_PARTICIPANTS_UPDATE, CONNECTION_UPDATE, LABELS_EDIT, LABELS_ASSOCIATION, CALL, TYPEBOT_START, TYPEBOT_CHANGE_STATUS - **sqs** (object) - Optional - SQS integration configuration. - **enabled** (boolean) - Required - Enable SQS. - **events** (array) - Required - Events to be sent to the SQS. - **enum** (string) - Allowed values: APPLICATION_STARTUP, QRCODE_UPDATED, MESSAGES_SET, MESSAGES_UPSERT, MESSAGES_UPDATE, MESSAGES_DELETE, SEND_MESSAGE, CONTACTS_SET, CONTACTS_UPSERT, CONTACTS_UPDATE, PRESENCE_UPDATE, CHATS_SET, CHATS_UPSERT, CHATS_UPDATE, CHATS_DELETE, GROUPS_UPSERT, GROUP_UPDATE, GROUP_PARTICIPANTS_UPDATE, CONNECTION_UPDATE, CALL, NEW_JWT_TOKEN, TYPEBOT_START, TYPEBOT_CHANGE_STATUS - **chatwootAccountId** (integer) - Optional - Chatwoot account ID. - **chatwootToken** (string) - Optional - Chatwoot authentication token. - **chatwootUrl** (string) - Optional - Chatwoot server URL. - **chatwootSignMsg** (boolean) - Optional - Send message signature on Chatwoot. - **chatwootReopenConversation** (boolean) - Optional - Reopen conversation on Chatwoot. - **chatwootConversationPending** (boolean) - Optional - TODO. - **chatwootImportContacts** (boolean) - Optional - Import Chatwoot contacts. - **chatwootNameInbox** (string) - Optional - Name inbox chatwoot. - **chatwootMergeBrazilContacts** (boolean) - Optional - TODO. - **chatwootImportMessages** (boolean) - Optional - Import chatwoot messages. - **chatwootDaysLimitImportMessages** (integer) - Optional - Limit message import chatwoot. - **chatwootOrganization** (string) - Optional - Evolution Bot. - **chatwootLogo** (string) - Optional - URL for the Chatwoot logo. ### Response #### Success Response (201) - **instance** (object) - Information about the created instance. - **instanceName** (string) - The name of the created instance. ``` -------------------------------- ### POST /instance/create Source: https://doc.evolution-api.com/v2/api-reference/instance-controller/create-instance-basic Creates a new WhatsApp instance. You can configure various settings such as instance name, integration type, QR code generation, call rejection, message handling, and webhook configurations. ```APIDOC ## POST /instance/create ### Description Creates a new WhatsApp instance with specified configurations. ### Method POST ### Endpoint /instance/create ### Parameters #### Request Body - **instanceName** (string) - Required - Instance name. - **token** (string) - Optional - API key. Leave empty to create dynamically. - **qrcode** (boolean) - Optional - Create QR Code automatically after creation. - **number** (string) - Optional - Instance owner number with Country Code (e.g., 559999999999). - **integration** (string) - Required - WhatsApp engine. Enum: WHATSAPP-BAILEYS, WHATSAPP-BUSINESS. - **rejectCall** (boolean) - Optional - Reject WhatsApp calls automatically. - **msgCall** (string) - Optional - Message to be sent when a call is rejected automatically. - **groupsIgnore** (boolean) - Optional - Ignore group messages. - **alwaysOnline** (boolean) - Optional - Keep WhatsApp always online. - **readMessages** (boolean) - Optional - Send read receipts to received messages. - **readStatus** (boolean) - Optional - Show sent messages read status. - **syncFullHistory** (boolean) - Optional - Synchronize full WhatsApp history with EvolutionAPI. - **proxyHost** (string) - Optional - Proxy host. - **proxyPort** (string) - Optional - Proxy port. - **proxyProtocol** (string) - Optional - Proxy protocol. - **proxyUsername** (string) - Optional - Proxy Username. - **proxyPassword** (string) - Optional - Proxy password. - **webhook** (object) - Optional - Webhook configuration. - **url** (string) - Required - The URL of the webhook. - **byEvents** (boolean) - Optional - Enable Webhook by events. - **base64** (boolean) - Optional - Sends files in base64 when available. - **headers** (object) - Optional - Headers for sending the API from webhook. - **authorization** (string) - Optional - Your authorization key header. - **Content-Type** (string) - Optional - Content-Type header. - **events** (array) - Optional - Events to trigger webhook. Enum: APPLICATION_STARTUP, QRCODE_UPDATED, MESSAGES_SET, MESSAGES_UPSERT, MESSAGES_UPDATE, MESSAGES_DELETE, SEND_MESSAGE, CONTACTS_SET, CONTACTS_UPSERT, CONTACTS_UPDATE, PRESENCE_UPDATE, CHATS_SET, CHATS_UPSERT, CHATS_UPDATE, CHATS_DELETE, GROUPS_UPSERT, GROUP_UPDATE, GROUP_PARTICIPANTS_UPDATE, CONNECTION_UPDATE, CALL, NEW_JWT_TOKEN, TYPEBOT_START, TYPEBOT_CHANGE_STATUS. ### Request Example ```json { "instanceName": "myInstance", "integration": "WHATSAPP-BAILEYS", "token": "your_api_key", "qrcode": true, "number": "559999999999", "rejectCall": false, "msgCall": "", "groupsIgnore": false, "alwaysOnline": true, "readMessages": false, "readStatus": false, "syncFullHistory": false, "proxyHost": "", "proxyPort": "", "proxyProtocol": "", "proxyUsername": "", "proxyPassword": "", "webhook": { "url": "https://your-webhook.com", "byEvents": true, "base64": false, "headers": { "authorization": "Bearer your_token", "Content-Type": "application/json" }, "events": [ "QRCODE_UPDATED", "MESSAGES_UPSERT" ] } } ``` ### Response #### Success Response (200) - **status** (string) - Status of the operation. - **message** (string) - Message indicating the result of the operation. #### Response Example ```json { "status": "success", "message": "Instance created successfully" } ``` ``` -------------------------------- ### OpenAPI Specification for Fetch All Groups Source: https://doc.evolution-api.com/v2/api-reference/group-controller/fetch-all-groups This OpenAPI 3.0.3 specification defines the GET /group/fetchAllGroups/{instance} endpoint for fetching all groups. It includes parameters for instance name and whether to include participants, along with response schemas and an example. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /group/fetchAllGroups/{instance}: get: tags: - Group Controller summary: Fetch All Groups description: Fetch all groups operationId: fetchAllGroups parameters: - name: instance in: path required: true description: 'Name of the instance ' schema: type: string - name: getParticipants in: query required: true description: Whether to get the group members or not schema: type: boolean responses: '200': description: Ok content: application/json: schema: type: array items: type: object properties: id: type: string description: The ID of the group. subject: type: string description: The subject (name) of the group. subjectOwner: type: string description: The ID of the user who set the subject. subjectTime: type: integer description: The timestamp when the subject was set. pictureUrl: type: string description: URL of the group's profile picture. size: type: integer description: The number of participants in the group. creation: type: integer description: The timestamp when the group was created. owner: type: string description: The ID of the group owner. desc: type: string description: The description of the group. descId: type: string description: The ID of the description message. restrict: type: boolean description: >- Indicates if the group is restricted (only admins can send messages). announce: type: boolean description: >- Indicates if the group is an announcement group (only admins can send messages). required: - id - subject - subjectOwner - subjectTime - size - creation - owner - restrict - announce description: Array of objects representing WhatsApp group details. example: - id: 120363295648424210@g.us subject: Example Group subjectOwner: 553198296801@s.whatsapp.net subjectTime: 1714769954 pictureUrl: null size: 1 creation: 1714769954 owner: 553198296801@s.whatsapp.net desc: optional descId: BAE57E16498982ED restrict: false announce: false deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: apikey description: Your authorization key header ``` -------------------------------- ### POST /openai/create/{instance} Source: https://doc.evolution-api.com/v2/api-reference/integrations/openai/create-bot Create an OpenAI bot with detailed configuration. This endpoint allows for the creation of a new OpenAI bot, specifying various parameters to control its behavior, triggers, and responses. ```APIDOC ## POST /openai/create/{instance} ### Description Create an OpenAI bot with detailed configuration ### Method POST ### Endpoint /openai/create/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance #### Request Body - **enabled** (boolean) - Required - Indicates whether the bot is enabled - **openaiCredsId** (string) - Required - ID of the OpenAI credentials - **botType** (string) - Required - Type of the bot (e.g., 'assistant') - **assistantId** (string) - Required - Unique identifier for the assistant - **functionUrl** (string) - Required - URL for additional bot functionality - **model** (string) - Required - Model to be used (e.g., 'gpt-4o') - **systemMessages** (array) - Required - Messages to define system behavior - **assistantMessages** (array) - Required - Predefined assistant messages - **userMessages** (array) - Required - Predefined user messages - **maxTokens** (integer) - Required - Maximum number of tokens per interaction - **triggerType** (string) - Required - Type of trigger for the bot - **triggerOperator** (string) - Required - Operator for trigger evaluation - **triggerValue** (string) - Required - Value to trigger the bot - **expire** (integer) - Required - Expiration time in seconds - **keywordFinish** (string) - Required - Keyword to terminate the bot interaction - **delayMessage** (integer) - Required - Delay before the bot responds, in milliseconds - **unknownMessage** (string) - Required - Message to display for unrecognized input - **listeningFromMe** (boolean) - Required - Indicates if the bot listens to messages from the user - **stopBotFromMe** (boolean) - Required - Indicates if the bot can be stopped by the user - **keepOpen** (boolean) - Required - Indicates if the bot session remains open - **debounceTime** (integer) - Required - Debounce time for message processing - **ignoreJids** (array) - Required - List of JIDs to ignore ### Response #### Success Response (200) Ok ``` -------------------------------- ### Create Instance Basic Source: https://doc.evolution-api.com/v2/api-reference/instance-controller/create-instance-basic Creates a new instance with basic configuration. This endpoint allows for the creation of a new instance, specifying its name and optional webhook details. It returns the instance details upon successful creation. ```APIDOC ## POST /instances ### Description Creates a new instance with basic configuration. This endpoint allows for the creation of a new instance, specifying its name and optional webhook details. It returns the instance details upon successful creation. ### Method POST ### Endpoint /instances ### Parameters #### Request Body - **instance** (object) - Required - Object containing instance details. - **instanceName** (string) - Required - The name of the instance. - **webhook_wa_business** (string) - Optional - The webhook URL for WhatsApp Business integration. - **access_token_wa_business** (string) - Optional - The access token for WhatsApp Business. - **hash** (object) - Required - Object containing authentication details. - **apikey** (string) - Required - The API key for authentication. - **settings** (object) - Optional - Object containing instance settings. - **reject_call** (boolean) - Optional - Indicates whether calls are rejected. - **msg_call** (string) - Optional - Message to be sent when a call is rejected. - **groups_ignore** (boolean) - Optional - Indicates whether groups are ignored. - **always_online** (boolean) - Optional - Indicates whether the instance is always online. - **read_messages** (boolean) - Optional - Indicates whether messages are marked as read. - **read_status** (boolean) - Optional - Indicates whether status updates are marked as read. - **sync_full_history** (boolean) - Optional - Indicates whether the full message history is synchronized. ### Request Example { "instance": { "instanceName": "teste-docs", "webhook_wa_business": null, "access_token_wa_business": "" }, "hash": { "apikey": "123456" }, "settings": { "reject_call": false, "msg_call": "", "groups_ignore": true, "always_online": false, "read_messages": false, "read_status": false, "sync_full_history": false } } ### Response #### Success Response (200) - **instance** (object) - Details of the created instance. - **instanceName** (string) - The name of the instance. - **instanceId** (string) - The unique identifier for the instance. - **webhook_wa_business** (string) - The webhook URL for WhatsApp Business integration. - **access_token_wa_business** (string) - The access token for WhatsApp Business. - **status** (string) - The current status of the instance. - **hash** (object) - Authentication details. - **apikey** (string) - The API key for authentication. - **settings** (object) - Instance settings. - **reject_call** (boolean) - Indicates whether calls are rejected. - **msg_call** (string) - Message to be sent when a call is rejected. - **groups_ignore** (boolean) - Indicates whether groups are ignored. - **always_online** (boolean) - Indicates whether the instance is always online. - **read_messages** (boolean) - Indicates whether messages are marked as read. - **read_status** (boolean) - Indicates whether status updates are marked as read. - **sync_full_history** (boolean) - Indicates whether the full message history is synchronized. #### Response Example { "instance": { "instanceName": "teste-docs", "instanceId": "af6c5b7c-ee27-4f94-9ea8-192393746ddd", "webhook_wa_business": null, "access_token_wa_business": "", "status": "created" }, "hash": { "apikey": "123456" }, "settings": { "reject_call": false, "msg_call": "", "groups_ignore": true, "always_online": false, "read_messages": false, "read_status": false, "sync_full_history": false } } #### Error Response (403) - **status** (integer) - The HTTP status of the response. - **error** (string) - The error message indicating the type of error. - **response** (object) - Detailed error messages. - **message** (array of strings) - List of detailed error messages. #### Error Response Example { "status": 403, "error": "Forbidden", "response": { "message": [ "This name \"instance-example-name\" is already in use." ] } } ### Security - ApiKeyAuth: [] ``` -------------------------------- ### OpenAPI Specification for Connection State Source: https://doc.evolution-api.com/v2/api-reference/instance-controller/connection-state This OpenAPI 3.0.3 specification defines the GET /instance/connectionState/{instance} endpoint. It details the parameters, responses, and provides examples for retrieving an instance's connection state or handling a 'not found' error. ```yaml openapi: 3.0.3 info: title: Evolution API version: 2.1.1 servers: - url: https://{server-url} variables: server-url: default: evolution-example description: The URL of your EvolutionAPI server description: Your instance domain security: [] paths: /instance/connectionState/{instance}: get: tags: - Instance Controller summary: Connection State description: Gets the state of the connection operationId: connectionState parameters: - name: instance in: path required: true description: Name of the instance to get status connect schema: type: string responses: '200': description: Ok content: application/json: schema: type: object properties: instance: type: object properties: instanceName: type: string description: The name of the instance. state: type: string description: The state of the instance. example: instance: instanceName: teste-docs state: open '404': description: Instance not found content: application/json: schema: type: object properties: status: type: integer description: The HTTP status of the response error: type: string description: The error message indicating the type of error response: type: object properties: message: type: array items: type: string description: List of detailed error messages example: status: 404 error: Not Found response: message: - The "invalid-instance" instance does not exist deprecated: false security: - ApiKeyAuth: [] components: securitySchemes: ApiKeyAuth: type: apiKey in: header name: apikey description: Your authorization key header ``` -------------------------------- ### Message Location Example Source: https://doc.evolution-api.com/v2/api-reference/message-controller/send-location An example of a message containing location data, including latitude, longitude, name, and address. This is part of the OpenAPI schema. ```json { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE51B6FF4470AF9" }, "message": { "locationMessage": { "degreesLatitude": -19.93359, "degreesLongitude": -43.93851, "name": "Palácio da Liberdade", "address": "Praça da Liberdade, Belo Horizonte, MG 30140-050", "contextInfo": {} } }, "messageTimestamp": "1717779606", "status": "PENDING" } ``` -------------------------------- ### POST /evoai/create/{instance} Source: https://doc.evolution-api.com/v2/api-reference/integrations/evoai/create-evoai Creates a new EvoAI bot instance with the specified configuration. This endpoint allows for detailed customization of the bot's behavior, including its activation triggers, message handling, and interaction settings. ```APIDOC ## POST /evoai/create/{instance} ### Description Creates a new EvoAI bot with the provided configuration. ### Method POST ### Endpoint /evoai/create/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance #### Request Body - **enabled** (boolean) - Required - Whether the bot is enabled - **agentUrl** (string) - Required - The URL of the agent - **apiKey** (string) - Required - The API key for authentication - **triggerType** (string) - Optional - Type of trigger (all, keyword) - **triggerOperator** (string) - Optional - Operator for keyword trigger (contains, equals, startsWith, endsWith, regex, none) - **triggerValue** (string) - Optional - The value for the trigger - **expire** (integer) - Optional - Expiration time in seconds - **keywordFinish** (string) - Optional - Keyword to finish the bot - **delayMessage** (integer) - Optional - Delay in milliseconds before sending a message - **unknownMessage** (string) - Optional - Message to send when input is unknown - **listeningFromMe** (boolean) - Optional - Whether to listen to messages from self - **stopBotFromMe** (boolean) - Optional - Whether to stop the bot from self - **keepOpen** (boolean) - Optional - Whether to keep the bot open - **debounceTime** (integer) - Optional - Debounce time in milliseconds - **ignoreJids** (array) - Optional - List of JIDs to ignore ### Request Example { "example": "{\n \"enabled\": true,\n \"agentUrl\": \"https://agent.example.com\",\n \"apiKey\": \"YOUR_API_KEY\",\n \"triggerType\": \"keyword\",\n \"triggerOperator\": \"contains\",\n \"triggerValue\": \"help\",\n \"expire\": 3600,\n \"keywordFinish\": \"goodbye\",\n \"delayMessage\": 1000,\n \"unknownMessage\": \"I don\'t understand.\",\n \"listeningFromMe\": false,\n \"stopBotFromMe\": false,\n \"keepOpen\": true,\n \"debounceTime\": 500,\n \"ignoreJids\": [\"jid1@example.com\", \"jid2@example.com\"]\n}" } ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating successful creation. #### Response Example { "example": "{\n \"message\": \"EvoAI bot instance created successfully\"\n}" } ERROR HANDLING: - **400**: Bad Request - Invalid or missing parameters - **404**: Not Found - Instance could not be created - **500**: Internal Server Error ``` -------------------------------- ### Poll Creation Message Example Source: https://doc.evolution-api.com/v2/api-reference/message-controller/send-list An example of a poll creation message payload, including poll name, options, and selectable count. This structure is used when creating a new poll within a message. ```json { "key": { "remoteJid": "553198296801@s.whatsapp.net", "fromMe": true, "id": "BAE53EC8D8E1FD8A" }, "message": { "messageContextInfo": { "messageSecret": "lX/+cLHHNfnTTKZi+88mrhoyi6KNuUzWjgfaB0bTfOY=" }, "pollCreationMessage": { "name": "Poll Name", "options": [ { "optionName": "Option 1" }, { "optionName": "Option 2" }, { "optionName": "Option 3" } ], "selectableOptionsCount": 1 } }, "messageTimestamp": "1717781848", "status": "PENDING" } ``` -------------------------------- ### Instance Connect Source: https://doc.evolution-api.com/v2/api-reference/instance-controller/instance-connect Generates and returns the QR code for WhatsApp connection. This endpoint is used to initiate the WhatsApp connection process by providing the instance name and optionally a phone number. ```APIDOC ## GET /instance/connect/{instance} ### Description Generates and returns the QR code for WhatsApp connection. ### Method GET ### Endpoint /instance/connect/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance to connect #### Query Parameters - **number** (string) - Optional - Phone number (with country code) to be connected ### Response #### Success Response (200) - **pairingCode** (string) - The unique code used for pairing a device or account. - **code** (string) - A specific code associated with the pairing process. This may include tokens or other identifiers. - **count** (integer) - The count or number of attempts or instances related to the pairing process. #### Response Example ```json { "pairingCode": "WZYEH1YY", "code": "2@y8eK+bjtEjUWy9/FOM...", "count": 1 } ``` #### Error Response (404) - **status** (integer) - The HTTP status of the response - **error** (string) - The error message indicating the type of error - **response** (object) - Contains detailed error messages - **message** (array of strings) - List of detailed error messages #### Response Example ```json { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } ``` ``` -------------------------------- ### Connection State Source: https://doc.evolution-api.com/v2/api-reference/instance-controller/connection-state Gets the state of the connection for a given instance. ```APIDOC ## GET /instance/connectionState/{instance} ### Description Gets the state of the connection for a specific instance. ### Method GET ### Endpoint /instance/connectionState/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance to get status connect ### Response #### Success Response (200) - **instance** (object) - Description of the instance object - **instanceName** (string) - The name of the instance. - **state** (string) - The state of the instance. #### Response Example ```json { "instance": { "instanceName": "teste-docs", "state": "open" } } ``` #### Error Response (404) - **status** (integer) - The HTTP status of the response - **error** (string) - The error message indicating the type of error - **response** (object) - Object containing detailed error messages - **message** (array of strings) - List of detailed error messages #### Response Example ```json { "status": 404, "error": "Not Found", "response": { "message": [ "The \"invalid-instance\" instance does not exist" ] } } ``` ``` -------------------------------- ### Create Typebot Source: https://doc.evolution-api.com/v2/api-reference/integrations/typebot/set-typebot Sets up and configures a Typebot for a specific instance. This includes defining its activation status, URL, trigger conditions, and session management settings. ```APIDOC ## POST /typebot/create/{instance} ### Description Set typebot ### Method POST ### Endpoint /typebot/create/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance #### Request Body - **enabled** (boolean) - Required - **url** (string) - Required - Typebot URL - **typebot** (string) - Required - Typebot name - **triggerType** (string) - Required - All or keyword - **triggerOperator** (string) - Required - Operator logic, ex: contains, equals, startsWith, endsWith, regex - **triggerValue** (string) - Required - All or keyword - **expire** (number) - Required - Time to expire session - **keywordFinish** (string) - Required - Keyword to finish session - **delayMessage** (number) - Required - Delay when the bot send message - **unknownMessage** (string) - Required - Unrecognized message - **listeningFromMe** (boolean) - Required - Marked as viewed - **stopBotFromMe** (boolean) - Required - Stop bot when I send message - **keepOpen** (boolean) - Required - Keep session open - **debounceTime** (number) - Required - Start typebot for your own messages ### Response #### Success Response (200) - (empty object) ### Security - ApiKeyAuth ``` -------------------------------- ### Find EvoBot Settings Source: https://doc.evolution-api.com/v2/api-reference/integrations/evolution/find-settings Find evolution bot settings by providing the instance name. ```APIDOC ## GET /evolutionBot/fetchSettings/{instance} ### Description Find evolution bot settings. ### Method GET ### Endpoint /evolutionBot/fetchSettings/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance ### Response #### Success Response (200) Description: Ok ```