### GET /api/instance/getSettings/:instance Source: https://docs.ryzeapi.cloud/pt/api/instance/settings-read Recupera as configurações atuais de comportamento da instância especificada. ```APIDOC ## GET /api/instance/getSettings/:instance ### Description Retorna as 7 flags de comportamento da instância, incluindo rejeição de chamadas, ignorar grupos, manter online, marcar como lida, sync de histórico e ignorar status. ### Method GET ### Endpoint /api/instance/getSettings/:instance ### Parameters #### Path Parameters - **instance** (string) - Required - Nome da instância. #### Headers - **token** (string) - Required - TokenAccount ou TokenInstance. ### Response #### Success Response (200) - **success** (boolean) - Indica sucesso da operação. - **message** (string) - Mensagem de confirmação. - **settings** (object) - Objeto contendo as configurações da instância. #### Response Example { "success": true, "message": "Settings retrieved successfully", "settings": { "autoRejectCalls": false, "callRejectMessage": "", "ignoreGroupMessages": false, "keepOnlineStatus": false, "autoReadMessages": false, "disableHistorySync": true, "ignoreStatus": false } } ``` -------------------------------- ### Success Response Example Source: https://docs.ryzeapi.cloud/pt/api/chat/mute Example of a successful JSON response when muting a chat for 8 hours. ```json { "success": true, "message": "Chat muted for 8 hours", "chat_jid": "5511999999999@s.whatsapp.net", "muted": true, "duration": 28800 } ``` -------------------------------- ### Create Instance with Full Configuration Source: https://docs.ryzeapi.cloud/pt/api/instance/create Demonstrates how to create a new instance with all available configuration options enabled via cURL or JavaScript. ```bash curl -X POST "https://ryzeapi.cloud/api/instance/new" \ -H "token: $Token_Account" \ -H "Content-Type: application/json" \ -d '{ "name": "marketing", "token": "meu-token-customizado-123", "proxyEnabled": true, "proxyProtocol": "socks5", "proxyHost": "proxy.empresa.com", "proxyPort": "1080", "proxyUsername": "usuario", "proxyPassword": "senha-do-proxy", "webhookEnabled": true, "webhookURL": "https://meuservidor.com/webhook", "webhookAuthorization": "Bearer secret-key-123", "webhookByEvents": false, "webhookEvents": ["message.exchange", "call.update"], "webhookMediaBase64": false, "websocketEnabled": true, "websocketEvents": ["message.exchange", "call.update"], "websocketMediaBase64": false, "chatwootEnabled": true, "chatwootBaseUrl": "https://chatwoot.example.com", "chatwootAccountId": 5, "chatwootApiToken": "sk_live_abc123...", "chatwootInboxName": "Marketing", "chatwootSignMessages": true, "chatwootIgnoreGroups": false, "chatwootStartAsPending": false, "chatwootReopenResolved": true, "autoRejectCalls": true, "callRejectMessage": "Este número não aceita ligações.", "ignoreGroupMessages": false, "keepOnlineStatus": true, "autoReadMessages": false, "disableHistorySync": false, "ignoreStatus": true, "s3Enabled": true, "s3Region": "us-east-1", "s3Bucket": "meu-bucket-media", "s3AccessKey": "AKIA...", "s3SecretKey": "secret...", "s3Endpoint": "https://s3.amazonaws.com", "s3PathPrefix": "media/" }' ``` ```javascript await fetch("https://ryzeapi.cloud/api/instance/new", { method: "POST", headers: { "token": process.env.Token_Account, "Content-Type": "application/json" }, body: JSON.stringify({ name: "marketing", token: "meu-token-customizado-123", proxyEnabled: true, proxyProtocol: "socks5", proxyHost: "proxy.empresa.com", proxyPort: "1080", proxyUsername: "usuario", proxyPassword: "senha-do-proxy", webhookEnabled: true, webhookURL: "https://meuservidor.com/webhook", webhookAuthorization: "Bearer secret-key-123", webhookByEvents: false, webhookEvents: ["message.exchange", "call.update"], webhookMediaBase64: false, websocketEnabled: true, websocketEvents: ["message.exchange", "call.update"], websocketMediaBase64: false, chatwootEnabled: true, chatwootBaseUrl: "https://chatwoot.example.com", chatwootAccountId: 5, chatwootApiToken: "sk_live_abc123...", chatwootInboxName: "Marketing", chatwootSignMessages: true, chatwootIgnoreGroups: false, chatwootStartAsPending: false, chatwootReopenResolved: true, autoRejectCalls: true, callRejectMessage: "Este número não aceita ligações.", ignoreGroupMessages: false, keepOnlineStatus: true, autoReadMessages: false, disableHistorySync: false, ignoreStatus: true, s3Enabled: true, s3Region: "us-east-1", s3Bucket: "meu-bucket-media", s3AccessKey: "AKIA...", s3SecretKey: "secret...", s3Endpoint: "https://s3.amazonaws.com", s3PathPrefix: "media/" }) }); ``` -------------------------------- ### Error 400 Response Example Source: https://docs.ryzeapi.cloud/pt/api/chat/mute Example of a 400 Bad Request response when an invalid duration is provided. ```json { "success": false, "error": { "message": "Invalid duration: 5y" } } ``` -------------------------------- ### Create Instance with Full Configuration Source: https://docs.ryzeapi.cloud/pt/api/instance/create Demonstrates how to send a POST request to create a new instance with all available integration and behavior settings. ```python import os, requests requests.post( "https://ryzeapi.cloud/api/instance/new", headers={ "token": os.environ["Token_Account"], "Content-Type": "application/json" }, json={ "name": "marketing", "token": "meu-token-customizado-123", "proxyEnabled": True, "proxyProtocol": "socks5", "proxyHost": "proxy.empresa.com", "proxyPort": "1080", "proxyUsername": "usuario", "proxyPassword": "senha-do-proxy", "webhookEnabled": True, "webhookURL": "https://meuservidor.com/webhook", "webhookAuthorization": "Bearer secret-key-123", "webhookByEvents": False, "webhookEvents": ["message.exchange", "call.update"], "webhookMediaBase64": False, "websocketEnabled": True, "websocketEvents": ["message.exchange", "call.update"], "websocketMediaBase64": False, "chatwootEnabled": True, "chatwootBaseUrl": "https://chatwoot.example.com", "chatwootAccountId": 5, "chatwootApiToken": "sk_live_abc123...", "chatwootInboxName": "Marketing", "chatwootSignMessages": True, "chatwootIgnoreGroups": False, "chatwootStartAsPending": False, "chatwootReopenResolved": True, "autoRejectCalls": True, "callRejectMessage": "Este número não aceita ligações.", "ignoreGroupMessages": False, "keepOnlineStatus": True, "autoReadMessages": False, "disableHistorySync": False, "ignoreStatus": True, "s3Enabled": True, "s3Region": "us-east-1", "s3Bucket": "meu-bucket-media", "s3AccessKey": "AKIA...", "s3SecretKey": "secret...", "s3Endpoint": "https://s3.amazonaws.com", "s3PathPrefix": "media/" } ) ``` ```go package main import ( "net/http" "os" "strings" ) func main() { body := strings.NewReader(`{ "name": "marketing", "token": "meu-token-customizado-123", "proxyEnabled": true, "proxyProtocol": "socks5", "proxyHost": "proxy.empresa.com", "proxyPort": "1080", "proxyUsername": "usuario", "proxyPassword": "senha-do-proxy", "webhookEnabled": true, "webhookURL": "https://meuservidor.com/webhook", "webhookAuthorization": "Bearer secret-key-123", "webhookByEvents": false, "webhookEvents": ["message.exchange", "call.update"], "webhookMediaBase64": false, "websocketEnabled": true, "websocketEvents": ["message.exchange", "call.update"], "websocketMediaBase64": false, "chatwootEnabled": true, "chatwootBaseUrl": "https://chatwoot.example.com", "chatwootAccountId": 5, "chatwootApiToken": "sk_live_abc123...", "chatwootInboxName": "Marketing", "chatwootSignMessages": true, "chatwootIgnoreGroups": false, "chatwootStartAsPending": false, "chatwootReopenResolved": true, "autoRejectCalls": true, "callRejectMessage": "Este número não aceita ligações.", "ignoreGroupMessages": false, "keepOnlineStatus": true, "autoReadMessages": false, "disableHistorySync": false, "ignoreStatus": true, "s3Enabled": true, "s3Region": "us-east-1", "s3Bucket": "meu-bucket-media", "s3AccessKey": "AKIA...", "s3SecretKey": "secret...", "s3Endpoint": "https://s3.amazonaws.com", "s3PathPrefix": "media/" }`) req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/instance/new", body) req.Header.Set("token", os.Getenv("Token_Account")) req.Header.Set("Content-Type", "application/json") http.DefaultClient.Do(req) } ``` -------------------------------- ### Error Payload Example Source: https://docs.ryzeapi.cloud/pt/api/typebot/set Example of a JSON error response returned when a keyword trigger is missing required operator or value fields. ```json { "success": false, "error": { "message": "triggerOperator and triggerValue are required when triggerType is 'keyword'" } } ``` -------------------------------- ### Error response payload example Source: https://docs.ryzeapi.cloud/pt/api/typebot/update Example of a JSON response body returned when a requested botId is not found within the specified instance. ```json { "success": false, "error": { "message": "bot not found for this instance" } } ``` -------------------------------- ### POST /api/instance/new Source: https://docs.ryzeapi.cloud/pt/api/instance/create Creates a new instance with custom settings applied immediately upon creation. ```APIDOC ## POST /api/instance/new ### Description Creates a new instance with custom settings, including call rejection, online status, and history synchronization preferences. ### Method POST ### Endpoint https://ryzeapi.cloud/api/instance/new ### Request Body - **name** (string) - Required - The name of the instance. - **autoRejectCalls** (boolean) - Optional - Whether to automatically reject incoming calls. - **callRejectMessage** (string) - Optional - The message sent when rejecting calls. - **ignoreGroupMessages** (boolean) - Optional - Whether to ignore group messages. - **keepOnlineStatus** (boolean) - Optional - Whether to maintain online status. - **autoReadMessages** (boolean) - Optional - Whether to automatically mark messages as read. - **disableHistorySync** (boolean) - Optional - Whether to disable history synchronization. - **ignoreStatus** (boolean) - Optional - Whether to ignore status updates (stories). ### Request Example { "name": "minha-instancia", "autoRejectCalls": true, "callRejectMessage": "Este número não aceita ligações.", "ignoreGroupMessages": false, "keepOnlineStatus": true, "autoReadMessages": false, "disableHistorySync": true, "ignoreStatus": true } ``` -------------------------------- ### GET /api/typebot/list/suporte Source: https://docs.ryzeapi.cloud/pt/api/typebot/list Retrieves a list of all available Typebots. ```APIDOC ## GET /api/typebot/list/suporte ### Description Retrieves a list of all Typebots associated with the account. ### Method GET ### Endpoint https://ryzeapi.cloud/api/typebot/list/suporte ### Parameters #### Headers - **token** (string) - Required - The account authentication token. ``` -------------------------------- ### POST /api/instance/new Source: https://docs.ryzeapi.cloud/pt/api/instance/create Creates a new instance with the provided configuration parameters. ```APIDOC ## POST /api/instance/new ### Description Creates a new instance in the RyzeAPI system with specified settings for proxy, webhooks, websockets, Chatwoot integration, and S3 storage. ### Method POST ### Endpoint https://ryzeapi.cloud/api/instance/new ### Parameters #### Request Body - **name** (string) - Required - Name of the instance - **token** (string) - Optional - Custom token for the instance - **proxyEnabled** (boolean) - Optional - Enable proxy settings - **proxyProtocol** (string) - Optional - Proxy protocol (e.g., socks5) - **proxyHost** (string) - Optional - Proxy host address - **proxyPort** (string) - Optional - Proxy port - **proxyUsername** (string) - Optional - Proxy username - **proxyPassword** (string) - Optional - Proxy password - **webhookEnabled** (boolean) - Optional - Enable webhook notifications - **webhookURL** (string) - Optional - Webhook destination URL - **webhookAuthorization** (string) - Optional - Authorization header for webhooks - **webhookByEvents** (boolean) - Optional - Filter webhooks by events - **webhookEvents** (array) - Optional - List of webhook events - **webhookMediaBase64** (boolean) - Optional - Send media as base64 in webhooks - **websocketEnabled** (boolean) - Optional - Enable websocket connection - **websocketEvents** (array) - Optional - List of websocket events - **websocketMediaBase64** (boolean) - Optional - Send media as base64 in websockets - **chatwootEnabled** (boolean) - Optional - Enable Chatwoot integration - **chatwootBaseUrl** (string) - Optional - Chatwoot base URL - **chatwootAccountId** (number) - Optional - Chatwoot account ID - **chatwootApiToken** (string) - Optional - Chatwoot API token - **chatwootInboxName** (string) - Optional - Chatwoot inbox name - **chatwootSignMessages** (boolean) - Optional - Sign messages in Chatwoot - **chatwootIgnoreGroups** (boolean) - Optional - Ignore group messages in Chatwoot - **chatwootStartAsPending** (boolean) - Optional - Start conversations as pending - **chatwootReopenResolved** (boolean) - Optional - Reopen resolved conversations - **autoRejectCalls** (boolean) - Optional - Automatically reject incoming calls - **callRejectMessage** (string) - Optional - Message sent when rejecting calls - **ignoreGroupMessages** (boolean) - Optional - Ignore group messages - **keepOnlineStatus** (boolean) - Optional - Maintain online status - **autoReadMessages** (boolean) - Optional - Automatically mark messages as read - **disableHistorySync** (boolean) - Optional - Disable history synchronization - **ignoreStatus** (boolean) - Optional - Ignore status updates - **s3Enabled** (boolean) - Optional - Enable S3 storage - **s3Region** (string) - Optional - S3 region - **s3Bucket** (string) - Optional - S3 bucket name - **s3AccessKey** (string) - Optional - S3 access key - **s3SecretKey** (string) - Optional - S3 secret key - **s3Endpoint** (string) - Optional - S3 endpoint URL - **s3PathPrefix** (string) - Optional - S3 path prefix ``` -------------------------------- ### GET /api/typebot/sessions/:instance Source: https://docs.ryzeapi.cloud/pt/api/typebot/overview Lists live sessions. ```APIDOC ## GET /api/typebot/sessions/:instance ### Description Lists live conversations that are currently opened or paused. ### Method GET ### Endpoint /api/typebot/sessions/:instance?botId= ``` -------------------------------- ### POST /instance/connect/{instance} Source: https://docs.ryzeapi.cloud/pt/api/instance/connect Initiates the connection process for a specified instance. Depending on the parameters, it returns either a QR code or a pairing code for authentication. ```APIDOC ## POST /instance/connect/{instance} ### Description Initiates the connection for a WhatsApp instance. Users can authenticate via QR code or by providing a phone number to receive a pairing code. ### Method POST ### Endpoint /instance/connect/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance to connect. #### Headers - **token** (string) - Required - TokenAccount or TokenInstance for the specified instance. #### Query Parameters - **number** (string) - Optional - International phone number format (e.g., 5511999999999). Forces login via pairing code. - **history** (integer) - Optional - Number of days of history to sync during initial pairing. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - Status message. - **qrCode** (string) - ASCII string of the QR code (if applicable). - **qrCodeBase64** (string) - Base64 encoded PNG of the QR code (if applicable). - **pairingCode** (string) - Code to be entered on the mobile device (if applicable). - **status** (string) - Current status of the connection process. ``` -------------------------------- ### POST /api/typebot/start/:instance Source: https://docs.ryzeapi.cloud/pt/api/typebot/start Inicia manualmente um fluxo do Typebot para um número, disparando o startChat e persistindo a sessão. ```APIDOC ## POST /api/typebot/start/:instance ### Description Inicia manualmente um fluxo do Typebot para um número, sem esperar por uma mensagem de trigger. A RyzeAPI dispara o startChat do bot indicado e persiste a sessão. ### Method POST ### Endpoint https://ryzeapi.cloud/api/typebot/start/:instance ### Parameters #### Path Parameters - **instance** (string) - Required - Nome da instância (ex.: suporte). #### Headers - **token** (string) - Required - TokenAccount ou TokenInstance. - **Content-Type** (string) - Required - application/json #### Request Body - **number** (string) - Required - Número de destino no formato E.164 sem o + (ex.: 5511999999999). - **botId** (string) - Required - UUID do bot a iniciar. - **variables** (object) - Optional - Variáveis prefilled passadas ao Typebot (mapa string → string). ### Request Example { "number": "5511999999999", "botId": "8f3a1c2e-...-b7d9", "variables": { "nome": "João", "plano": "premium" } } ### Response #### Success Response (200) - **success** (boolean) - Indica sucesso da operação. - **message** (string) - Mensagem de confirmação. #### Response Example { "success": true, "message": "typebot flow started" } ``` -------------------------------- ### GET /api/typebot/list/:instance Source: https://docs.ryzeapi.cloud/pt/api/typebot/overview Lists bots and their integration status. ```APIDOC ## GET /api/typebot/list/:instance ### Description Lists all bots or a specific bot if a botId is provided. Includes the status of the integration. ### Method GET ### Endpoint /api/typebot/list/:instance?botId= ``` -------------------------------- ### Pin Chat Success Response Source: https://docs.ryzeapi.cloud/pt/api/chat/pinChat Example of a successful response when a chat is pinned. ```json { "success": true, "message": "Chat pinned successfully", "chat_jid": "5511999999999@s.whatsapp.net", "pinned": true } ``` -------------------------------- ### GET /api/instance/connect/:instance Source: https://docs.ryzeapi.cloud/pt/api/instance/connect Inicia a conexão via whatsmeow. Sem parâmetros, gera um QR code. Com o parâmetro 'number', gera um pairing code de 8 caracteres. O parâmetro 'history' pode ser usado para solicitar sincronização de histórico de mensagens. ```APIDOC ## GET /api/instance/connect/:instance ### Description Inicia a conexão com o WhatsApp. Bloqueia até obter o código ou erro (timeout interno ~60s). ### Method GET ### Endpoint https://ryzeapi.cloud/api/instance/connect/:instance ### Parameters #### Path Parameters - **instance** (string) - Required - O identificador da instância. #### Query Parameters - **number** (string) - Optional - Número de telefone para gerar pairing code (8 caracteres). - **history** (integer) - Optional - Quantidade de dias de histórico de mensagens para sincronizar. ### Request Example curl -X GET "https://ryzeapi.cloud/api/instance/connect/minha-instancia?number=5511999999999" -H "token: $Token_Instance" ``` -------------------------------- ### POST /api/instance/create Source: https://docs.ryzeapi.cloud/pt/api/instance/create Cria uma nova instância de WhatsApp na conta. A instância é criada desconectada, exigindo uma chamada subsequente para conexão. ```APIDOC ## POST /api/instance/create ### Description Cria uma nova instância de WhatsApp na sua conta. A instância nasce desconectada, sendo necessário chamar o endpoint de conexão para obter o QR code ou pairing code. ### Method POST ### Endpoint /api/instance/create ### Auth TokenAccount ### Rate-limit 20/min ### Request Body - **proxy** (object) - Optional - Configuração de proxy - **webhook** (object) - Optional - Configuração de webhook - **websocket** (object) - Optional - Configuração de WebSocket - **chatwoot** (object) - Optional - Configuração de integração Chatwoot - **typebot** (object) - Optional - Configuração de integração Typebot - **s3** (object) - Optional - Configuração de armazenamento S3 - **settings** (object) - Optional - Ajustes de comportamento da instância ### Response #### Success Response (200) - **instance** (object) - Detalhes da instância criada - **chatwoot** (object) - Status da integração Chatwoot (inclui campos de erro se houver falha) #### Error Response (403) - **message** (string) - "Account instance quota exceeded" ``` -------------------------------- ### Success Response Example Source: https://docs.ryzeapi.cloud/pt/api/chat/mark-chat-read The response returned when the chat status is successfully updated. ```json { "success": true, "message": "Chat marked as read successfully", "chat_jid": "5511999999999@s.whatsapp.net", "read": true } ``` -------------------------------- ### POST /api/instance/new Source: https://docs.ryzeapi.cloud/pt/api/instance/create Creates a new instance with optional S3 storage configuration. ```APIDOC ## POST /api/instance/new ### Description Creates a new instance on the RyzeAPI platform. Optionally configures AWS S3 storage for media uploads. ### Method POST ### Endpoint https://ryzeapi.cloud/api/instance/new ### Parameters #### Request Body - **name** (string) - Required - The name of the instance. - **s3Enabled** (boolean) - Optional - Whether to enable S3 storage. - **s3Region** (string) - Optional - The AWS region for the bucket. - **s3Bucket** (string) - Optional - The name of the S3 bucket. - **s3AccessKey** (string) - Optional - The AWS access key. - **s3SecretKey** (string) - Optional - The AWS secret key. - **s3Endpoint** (string) - Optional - The S3 service endpoint URL. - **s3PathPrefix** (string) - Optional - The prefix path for media uploads. ### Request Example { "name": "minha-instancia", "s3Enabled": true, "s3Region": "us-east-1", "s3Bucket": "meu-bucket-media", "s3AccessKey": "AKIA...", "s3SecretKey": "secret...", "s3Endpoint": "https://s3.amazonaws.com", "s3PathPrefix": "media/" } ``` -------------------------------- ### Error Response Example Source: https://docs.ryzeapi.cloud/pt/api/calls/fake The structure of an error response when the request fails validation. ```json { "success": false, "error": { "message": "Duration must be between 1 and 60 seconds" } } ``` -------------------------------- ### POST /api/instance/new Source: https://docs.ryzeapi.cloud/pt/api/instance/create Creates a new instance. You can either let the server generate a token automatically or provide a custom token. ```APIDOC ## POST /api/instance/new ### Description Creates a new instance. If no token is provided, the server generates one automatically and returns it in the response. ### Method POST ### Endpoint https://ryzeapi.cloud/api/instance/new ### Parameters #### Request Body - **name** (string) - Required - The name of the instance. - **token** (string) - Optional - A custom token for the instance. Must be unique within your account. ### Request Example { "name": "minha-instancia", "token": "meu-token-customizado-123" } ### Response #### Success Response (200) - **instance.token** (string) - The token generated by the server (if not provided in the request). ``` -------------------------------- ### GET /groups/info Source: https://docs.ryzeapi.cloud/pt/api/groups/info Retrieves information about a WhatsApp group based on the provided identifier. ```APIDOC ## GET /groups/info ### Description Retrieves detailed information about a WhatsApp group. The identifier can be a JID, an invite code, or a full invite link. ### Method GET ### Endpoint /groups/info ### Parameters #### Path Parameters - **instance** (string) - Required - Name of the instance. #### Query Parameters - **identifier** (string) - Required - JID (@g.us), invite code, or full invite link. - **participants** (boolean) - Optional - When false, omits the participant list for a lighter response. ### Response #### Success Response (200) - **image** (string) - Temporary URL for the group image. - **lid** (string) - Lite identifier for the user. #### Error Response (400/404) - **success** (boolean) - Always false. - **error** (object) - Contains the error message. ``` -------------------------------- ### POST /api/instance/reconnect/{instance} Source: https://docs.ryzeapi.cloud/pt/api/instance/reconnect Reutiliza a sessão whatsmeow já armazenada para restabelecer a conexão sem novo QR/pairing. Funciona se a instância já foi conectada pelo menos uma vez. ```APIDOC ## POST /api/instance/reconnect/{instance} ### Description Reutiliza a sessão whatsmeow já armazenada para restabelecer a conexão sem novo QR/pairing. Funciona se a instância já foi conectada pelo menos uma vez. ### Method POST ### Endpoint /api/instance/reconnect/{instance} ### Parameters #### Path Parameters - **instance** (string) - Required - Nome da instância. #### Headers - **token** (string) - Required - TokenAccount ou TokenInstance. ### Response #### Success Response (200) - **success** (boolean) - Indica sucesso da operação. - **message** (string) - Mensagem de status. - **status** (string) - Estado da conexão. #### Response Example { "success": true, "message": "Reconnect initiated", "status": "connecting" } ``` -------------------------------- ### GET /webhooks Source: https://docs.ryzeapi.cloud/pt/api/events/webhook-list Retrieves a list of all webhooks or a specific one if a label is provided. ```APIDOC ## GET /webhooks ### Description Retrieves webhook configurations. Without a label, it returns an array of all webhooks. With a label, it returns the specific configuration object. ### Method GET ### Endpoint /webhooks ### Parameters #### Query Parameters - **label** (string) - Optional - The unique label of the webhook to retrieve. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - Status message. - **webhooks** (array) - List of webhook objects (returned when label is absent). - **webhook** (object) - Single webhook object (returned when label is present). #### Response Example (List) { "success": true, "message": "Webhook configurations retrieved", "webhooks": [ { "label": "analytics-pipeline", "enabled": true, "url": "https://analytics.meuapp.com/events", "authorization": "Bearer svc-token-xyz", "byEvents": false, "events": ["message.exchange", "message.status"], "mediaBase64": false } ] } ``` -------------------------------- ### GET /api/chat/contactsByLabel/{Instance_Name} Source: https://docs.ryzeapi.cloud/pt/api/chat/overview Lists all chats associated with a specific label ID. ```APIDOC ## GET /api/chat/contactsByLabel/{Instance_Name} ### Description Retrieves a list of contacts associated with the provided label IDs. ### Method GET ### Endpoint https://ryzeapi.cloud/api/chat/contactsByLabel/{Instance_Name} ### Parameters #### Path Parameters - **Instance_Name** (string) - Required - The name of the instance. #### Query Parameters - **labelIds** (string) - Required - The ID of the label to filter by. ``` -------------------------------- ### POST /api/instance/settings/{instance_id} Source: https://docs.ryzeapi.cloud/pt/api/instance/settings-update Atualiza as configurações de comportamento da instância. Aceita um corpo parcial, mantendo os campos não enviados inalterados. ```APIDOC ## POST /api/instance/settings/{instance_id} ### Description Atualiza configurações de comportamento da instância. Aceita body parcial, onde campos não enviados são mantidos. Pelo menos um campo deve ser informado. ### Method POST ### Endpoint https://ryzeapi.cloud/api/instance/settings/{instance_id} ### Parameters #### Path Parameters - **instance_id** (string) - Required - O identificador da instância a ser configurada. #### Request Body - **autoReadMessages** (boolean) - Optional - Define se as mensagens devem ser lidas automaticamente. - **keepOnlineStatus** (boolean) - Optional - Define se o status online deve ser mantido. - **ignoreGroupMessages** (boolean) - Optional - Define se mensagens de grupo devem ser ignoradas. - **ignoreStatus** (boolean) - Optional - Define se status (stories) devem ser ignorados. - **autoRejectCalls** (boolean) - Optional - Define se chamadas devem ser rejeitadas automaticamente. - **callRejectMessage** (string) - Optional - Mensagem enviada ao rejeitar uma chamada. ### Request Example { "autoReadMessages": true } ### Response #### Success Response (200) - **settings** (object) - O objeto completo das configurações da instância após a atualização. ``` -------------------------------- ### GET /api/events/getWebsocket/:instance Source: https://docs.ryzeapi.cloud/pt/api/events/overview Lê a configuração atual do WebSocket para a instância. ```APIDOC ## GET /api/events/getWebsocket/:instance ### Descrição Retorna a configuração atual do WebSocket para a instância especificada. ### Método GET ### Endpoint /api/events/getWebsocket/:instance ### Parâmetros #### Path Parameters - **instance** (string) - Obrigatório - Identificador da instância. ``` -------------------------------- ### POST /api/instance/new Source: https://docs.ryzeapi.cloud/pt/api/instance/create Provisions a new instance with an authenticated SOCKS5 proxy. ```APIDOC ## POST /api/instance/new ### Description Provisions a new instance pointing to an authenticated SOCKS5 proxy. The proxy password is encrypted at-rest with AES-256-GCM and is not returned in the response. ### Method POST ### Endpoint https://ryzeapi.cloud/api/instance/new ### Parameters #### Request Body - **name** (string) - Required - The name of the instance. - **proxyEnabled** (boolean) - Required - Whether to enable proxy usage. - **proxyProtocol** (string) - Required - The proxy protocol (e.g., "socks5"). - **proxyHost** (string) - Required - The proxy host address. - **proxyPort** (string) - Required - The proxy port number. - **proxyUsername** (string) - Required - The username for proxy authentication. - **proxyPassword** (string) - Required - The password for proxy authentication. ### Request Example { "name": "minha-instancia", "proxyEnabled": true, "proxyProtocol": "socks5", "proxyHost": "proxy.empresa.com", "proxyPort": "1080", "proxyUsername": "usuario", "proxyPassword": "senha-do-proxy" } ``` -------------------------------- ### POST /api/typebot/start/:instance Source: https://docs.ryzeapi.cloud/pt/api/typebot/overview Manually triggers a flow. ```APIDOC ## POST /api/typebot/start/:instance ### Description Dispatches a flow manually to a specific number. ### Method POST ### Endpoint /api/typebot/start/:instance ``` -------------------------------- ### GET /api/chat/status/{instance_name} Source: https://docs.ryzeapi.cloud/pt/api/chat/contact-status Retrieves the status of a specific message identified by its messageId. ```APIDOC ## GET /api/chat/status/{instance_name} ### Description Retrieves the current status of a message sent or received by the specified instance. ### Method GET ### Endpoint https://ryzeapi.cloud/api/chat/status/{instance_name} ### Parameters #### Path Parameters - **instance_name** (string) - Required - The name of the instance to query. #### Query Parameters - **messageId** (string) - Required - The unique identifier of the message. ### Response #### Success Response (200) - **success** (boolean) - Indicates if the request was successful. - **message** (string) - Status message description. - **message_id** (string) - The ID of the queried message. - **status** (string) - The textual status (sent, received, delivered, read, played, error, pending). - **status_code** (integer) - The numeric status code (0-5). - **direction** (string) - The direction of the message (sent or received). - **chat_jid** (string) - The JID of the chat. - **timestamp** (string) - The ISO 8601 timestamp of the message status. #### Response Example { "success": true, "message": "Message status retrieved successfully", "message_id": "3EB08FCF27E532F1B0F5", "status": "read", "status_code": 4, "direction": "sent", "chat_jid": "5511999999999@s.whatsapp.net", "timestamp": "2026-04-28T14:30:00Z" } ``` -------------------------------- ### Consultar configuração de WebSocket Source: https://docs.ryzeapi.cloud/pt/api/events/websocket-read Exemplos de como realizar a requisição GET para o endpoint getWebsocket utilizando diferentes linguagens. ```bash curl -X GET "https://ryzeapi.cloud/api/events/getWebsocket/$Instance_Name" \ -H "token: $Token_Instance" ``` ```javascript await fetch(`https://ryzeapi.cloud/api/events/getWebsocket/${process.env.Instance_Name}`, { method: "GET", headers: { "token": process.env.Token_Instance } }); ``` ```python import os, requests requests.get( f"https://ryzeapi.cloud/api/events/getWebsocket/{os.environ['Instance_Name']}", headers={ "token": os.environ["Token_Instance"] } ) ``` ```go package main import ( "net/http" "os" ) func main() { req, _ := http.NewRequest("GET", "https://ryzeapi.cloud/api/events/getWebsocket/"+os.Getenv("Instance_Name"), nil) req.Header.Set("token", os.Getenv("Token_Instance")) http.DefaultClient.Do(req) } ``` -------------------------------- ### Success Response Example Source: https://docs.ryzeapi.cloud/pt/api/calls/fake The structure of a successful API response indicating the call was placed. ```json { "success": true, "message": "Call placed successfully", "callId": "3EB08FCF27E532F1D3D3", "number": "5511999999999", "duration": 8 } ``` -------------------------------- ### Enviar lista simples (1 seção) Source: https://docs.ryzeapi.cloud/pt/api/messages/list Exemplos de implementação para enviar um menu de lista com uma única seção contendo duas opções. ```bash curl -X POST "https://ryzeapi.cloud/api/message/list/$Instance_Name" \ -H "token: $Token_Instance" \ -H "Content-Type: application/json" \ -d '{ "number": "5511999999999", "contentText": "Selecione um item do cardápio:", "buttonText": "Ver opções", "sections": [ { "title": "Pratos", "rows": [ { "id": "p1", "title": "Lasanha", "description": "Bolonhesa, 4 fatias" }, { "id": "p2", "title": "Risoto", "description": "Funghi" } ] } ] }' ``` ```javascript await fetch(`https://ryzeapi.cloud/api/message/list/${process.env.Instance_Name}`, { method: "POST", headers: { "token": process.env.Token_Instance, "Content-Type": "application/json" }, body: JSON.stringify({ number: "5511999999999", contentText: "Selecione um item do cardápio:", buttonText: "Ver opções", sections: [ { title: "Pratos", rows: [ { id: "p1", title: "Lasanha", description: "Bolonhesa, 4 fatias" }, { id: "p2", title: "Risoto", description: "Funghi" } ] } ] }) }); ``` ```python import os, requests requests.post( f"https://ryzeapi.cloud/api/message/list/{os.environ['Instance_Name']}", headers={ "token": os.environ["Token_Instance"], "Content-Type": "application/json" }, json={ "number": "5511999999999", "contentText": "Selecione um item do cardápio:", "buttonText": "Ver opções", "sections": [ { "title": "Pratos", "rows": [ {"id": "p1", "title": "Lasanha", "description": "Bolonhesa, 4 fatias"}, {"id": "p2", "title": "Risoto", "description": "Funghi"} ] } ] } ) ``` ```go package main import ( "net/http" "os" "strings" ) func main() { body := strings.NewReader(`{ "number": "5511999999999", "contentText": "Selecione um item do cardápio:", "buttonText": "Ver opções", "sections": [ { "title": "Pratos", "rows": [ { "id": "p1", "title": "Lasanha", "description": "Bolonhesa, 4 fatias" }, { "id": "p2", "title": "Risoto", "description": "Funghi" } ] } ] }`) req, _ := http.NewRequest("POST", "https://ryzeapi.cloud/api/message/list/"+os.Getenv("Instance_Name"), body) req.Header.Set("token", os.Getenv("Token_Instance")) req.Header.Set("Content-Type", "application/json") http.DefaultClient.Do(req) } ``` -------------------------------- ### GET /api/profile/getPrivacy/:instance Source: https://docs.ryzeapi.cloud/pt/api/profile/overview Retrieves the current privacy settings for the specified WhatsApp instance. ```APIDOC ## GET /api/profile/getPrivacy/:instance ### Description Retrieves the current privacy settings for the specified WhatsApp instance. ### Method GET ### Endpoint /api/profile/getPrivacy/:instance ### Parameters #### Path Parameters - **instance** (string) - Required - The instance identifier. ``` -------------------------------- ### GET /api/profile/getAccount/:instance Source: https://docs.ryzeapi.cloud/pt/api/profile/overview Retrieves the profile information for the authenticated account or a third-party profile. ```APIDOC ## GET /api/profile/getAccount/:instance ### Description Retrieves the profile information for the authenticated account or a third-party profile. ### Method GET ### Endpoint /api/profile/getAccount/:instance ### Parameters #### Path Parameters - **instance** (string) - Required - The instance identifier. ### Response #### Success Response (200) - **profilePicture** (string) - URL of the profile picture - **profileName** (string) - Display name - **profileStatus** (string) - Current status message - **phoneNumber** (string) - Phone number - **jid** (string) - WhatsApp JID - **lid** (string) - WhatsApp LID ```