### Session Configuration Examples Source: https://waha.devlike.pro/swagger/openapi Provides examples of session configurations, including default settings, session apps with call rejection, and full session examples with metadata, debug, and webhook configurations. These examples demonstrate how to structure the JSON payload for session creation and management. ```json { "default": { "summary": "Default Session Example", "value": { "name": "default", "start": true } }, "withApps": { "summary": "Session Apps", "value": { "name": "default", "apps": [ { "app": "calls", "id": "app_unique_id", "session": "", "config": { "dm": { "reject": true, "message": "šŸ“žāŒ We don't take calls right now.\nšŸŽ¤ Please send a voice message or šŸ“ text — we'll reply ASAP!" }, "group": { "reject": true, "message": "šŸ“žāŒ We don't take calls right now.\nšŸŽ¤ Please send a voice message or šŸ“ text — we'll reply ASAP!" } } } ], "start": true } }, "full": { "summary": "Full Session Example", "value": { "name": "default", "start": true, "config": { "metadata": { "user.id": "123" }, "debug": true, "webhooks": [ { "url": "https://example.com/webhooks/waha", "events": [ "message", "session.status" ], "hmac": { "key": "super-secret" } } ] }, "apps": [ { "app": "calls", "enabled": true, "config": { "dm": { "reject": true, "message": "šŸ“žāŒ We don't take calls right now.\nšŸŽ¤ Please send a voice message or šŸ“ text — we'll reply ASAP!" }, "group": { "reject": true } } } ] } } } ``` -------------------------------- ### POST /api/sessions/start (Deprecated) Source: https://waha.devlike.pro/swagger/openapi Creates a session if it does not exist, or updates its configuration if it does, and then starts it. This endpoint is deprecated. ```APIDOC ## POST /api/sessions/start (Deprecated) ### Description Upsert and Start session. Create session (if not exists) or update a config (if exists) and start it. ### Method POST ### Endpoint /api/sessions/start ### Request Body - **SessionStartDeprecatedRequest** (object) - Required - Request body for starting a session ### Response #### Success Response (201) - **SessionDTO** (object) - Description of the session object ``` -------------------------------- ### Start Session API Endpoint Source: https://waha.devlike.pro/swagger/openapi Initiates a session with the specified name. This is an idempotent operation, ensuring that repeated calls do not alter the session state beyond the initial start. The session must already exist to be started. ```http POST /api/sessions/{session}/start --- operationId: SessionsController_start summary: Start the session description: Start the session with the given name. The session must exist. Idempotent operation. parameters: - name: session required: true in: path schema: ``` -------------------------------- ### GET /api/server/version Source: https://waha.devlike.pro/swagger/openapi Retrieves the current version of the server. ```APIDOC ## GET /api/server/version ### Description Retrieves the current version of the server. ### Method GET ### Endpoint /api/server/version ### Parameters None ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **version** (string) - The version of the server. - **environment** (string) - The environment the server is running in. - **node_version** (string) - The Node.js version. - **platform** (string) - The operating system platform. - **arch** (string) - The system architecture. #### Response Example ```json { "version": "1.0.0", "environment": "production", "node_version": "18.17.0", "platform": "linux", "arch": "x64" } ``` ``` -------------------------------- ### GET /labels Source: https://waha.devlike.pro/swagger/openapi Retrieves a list of all available labels. Requires a session. ```APIDOC ## GET /labels ### Description Retrieves a list of all available labels. Requires a session. ### Method GET ### Endpoint /labels ### Parameters #### Query Parameters - **session** (string) - Required - The session to use for retrieving labels. ### Response #### Success Response (200) - **labels** (array) - A list of label objects. - **id** (string) - The ID of the label. - **name** (string) - The name of the label. - **colorHex** (string) - The color of the label in hex format. #### Response Example ```json { "labels": [ { "id": "1", "name": "Lead", "colorHex": "#ff9485" }, { "id": "2", "name": "Customer", "colorHex": "#a0e7e5" } ] } ``` ``` -------------------------------- ### POST /api/sessions/{session}/start Source: https://waha.devlike.pro/swagger/openapi Starts a session by its name. The session must already exist. This is an idempotent operation. ```APIDOC ## POST /api/sessions/{session}/start ### Description Starts the session with the given name. The session must exist. Idempotent operation. ### Method POST ### Endpoint /api/sessions/{session}/start #### Path Parameters - **session** (string) - Required - The name of the session to start. ### Response #### Success Response (200) - Description: Successfully started the session. #### Response Example (No specific response body example provided in the source) ``` -------------------------------- ### GET /api/server/environment Source: https://waha.devlike.pro/swagger/openapi Retrieves the server environment variables. Optionally includes all environment variables. ```APIDOC ## GET /api/server/environment ### Description Retrieves the server environment variables. Optionally includes all environment variables. ### Method GET ### Endpoint /api/server/environment ### Parameters #### Query Parameters - **all** (boolean) - Optional - Include all environment variables (defaults to false) ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **environment** (object) - An object containing environment variables. - **NODE_ENV** (string) - The Node.js environment (e.g., "production", "development"). - **PORT** (string) - The port the server is listening on. - ... (other environment variables) #### Response Example ```json { "environment": { "NODE_ENV": "production", "PORT": "3000" } } ``` ``` -------------------------------- ### GET /api/keys Source: https://waha.devlike.pro/swagger/openapi Retrieves a list of all API keys. ```APIDOC ## GET /api/keys ### Description Get all API keys ### Method GET ### Endpoint /api/keys ### Response #### Success Response (200) - **Array of ApiKeyDTO** (array) - A list of API key details. #### Response Example ```json { "example": "Array of ApiKeyDTO objects" } ``` ``` -------------------------------- ### POST /api/startTyping Source: https://waha.devlike.pro/swagger/openapi Indicates that the user has started typing a message. This endpoint is used to show a typing indicator to other participants in the chat. ```APIDOC ## POST /api/startTyping ### Description Indicates that the user has started typing a message. This endpoint is used to show a typing indicator to other participants in the chat. ### Method POST ### Endpoint /api/startTyping ### Parameters #### Request Body - **schema** (object) - Required - Refers to the ChatRequest schema for request body details. ### Request Example ```json { "example": "ChatRequest body" } ``` ### Response #### Success Response (201) - **description** (string) - Description of the success response (details not provided in schema). #### Response Example ```json { "example": "Success response body" } ``` ``` -------------------------------- ### GET /ping Source: https://waha.devlike.pro/swagger/openapi Checks if the server is alive and responding to requests. ```APIDOC ## GET /ping ### Description Ping the server to check if it is alive and responding to requests. ### Method GET ### Endpoint /ping ### Parameters None ### Response #### Success Response (200) - **PingResponse** (object) - An object indicating the server's status. #### Response Example ```json { "message": "pong" } ``` ``` -------------------------------- ### GET /api/version Source: https://waha.devlike.pro/swagger/openapi Retrieves the server version. This endpoint is deprecated and users should use 'GET /api/server/version' instead. ```APIDOC ## GET /api/version ### Description Get the server version. This endpoint is deprecated. Use 'GET /api/server/version' instead. ### Method GET ### Endpoint /api/version ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **WAHAEnvironment** (object) - Information about the server environment. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### POST /api/{session}/chats/overview Source: https://waha.devlike.pro/swagger/openapi Provides an alternative method to get chat overviews, especially useful when the number of chat IDs exceeds the limits of GET request query parameters. Accepts chat IDs in the request body. ```APIDOC ## POST /api/{session}/chats/overview ### Description Retrieves an overview of chats using a POST request. This method is recommended when you have a large number of chat IDs to filter by, as GET requests may have limitations on query parameter length. The chat IDs are provided in the request body. ### Method POST ### Endpoint `/api/{session}/chats/overview` ### Parameters #### Path Parameters - **session** (string) - Required - Session name #### Request Body - **ids** (array[string]) - Required - A list of chat IDs to retrieve overviews for. ### Request Example ```json { "example": { "ids": [ "111111111@c.us", "222222222@c.us" ] } } ``` ### Response #### Success Response (201) - **array[ChatSummary]** - An array of chat summary objects. #### Response Example ```json { "example": [ { "chatId": "111111111@c.us", "name": "Jane Smith", "picture": "https://example.com/path/to/another_picture.png", "lastMessage": { "timestamp": 1678886000, "text": "See you later!" } } ] } ``` ``` -------------------------------- ### GET /api/server/debug/heapsnapshot Source: https://waha.devlike.pro/swagger/openapi Returns a heap snapshot for the current Node.js process, providing insights into memory usage. ```APIDOC ## GET /api/server/debug/heapsnapshot ### Description Return a heapsnapshot for the current nodejs process. Return a heapsnapshot of the server's memory. ### Method GET ### Endpoint /api/server/debug/heapsnapshot ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET "/api/server/debug/heapsnapshot" ``` ### Response #### Success Response (200) - The response will be a file containing the heap snapshot. #### Response Example (Binary file content for heap snapshot) ``` -------------------------------- ### GET /api/server/debug/cpu Source: https://waha.devlike.pro/swagger/openapi Collects and returns a CPU profile for the current Node.js process. Useful for performance analysis. ```APIDOC ## GET /api/server/debug/cpu ### Description Collect and return a CPU profile for the current nodejs process. Uses the Node.js inspector profiler to capture a .cpuprofile. ### Method GET ### Endpoint /api/server/debug/cpu ### Parameters #### Path Parameters None #### Query Parameters - **seconds** (number) - Optional - How many seconds to sample CPU. Defaults to 30. #### Request Body None ### Request Example ```bash curl -X GET "/api/server/debug/cpu?seconds=60" ``` ### Response #### Success Response (200) - The response will be a file containing the CPU profile. #### Response Example (Binary file content for .cpuprofile) ``` -------------------------------- ### GET /api/server/debug/browser/trace/{session} Source: https://waha.devlike.pro/swagger/openapi Collects and returns a trace.json file for Chrome DevTools, using Puppeteer's tracing capabilities. ```APIDOC ## GET /api/server/debug/browser/trace/{session} ### Description Collect and get a trace.json for Chrome DevTools. Uses https://pptr.dev/api/puppeteer.tracing. ### Method GET ### Endpoint /api/server/debug/browser/trace/{session} ### Parameters #### Path Parameters - **session** (string) - Required - Session name. Defaults to "default". #### Query Parameters - **seconds** (number) - Required - How many seconds to trace. Defaults to 30. - **categories** (array of strings) - Required - Categories to trace (all by default). Defaults to ["*"] ### Request Example ```bash curl -X GET "/api/server/debug/browser/trace/mySession?seconds=10&categories=*" ``` ### Response #### Success Response (200) - The response will be a file containing the trace.json. #### Response Example (JSON file content for trace.json) ``` -------------------------------- ### Sessions API Source: https://waha.devlike.pro/swagger/index Manage WhatsApp sessions (accounts), including listing, creating, getting information, updating, deleting, starting, stopping, logging out, and restarting sessions. ```APIDOC ## Sessions API ### Description Endpoints for controlling WhatsApp sessions (accounts). ### Endpoints * **GET `/api/sessions`**: List all sessions. * **POST `/api/sessions`**: Create a new session. * **GET `/api/sessions/{session}`**: Get information about a specific session. * **PUT `/api/sessions/{session}`**: Update a specific session. * **DELETE `/api/sessions/{session}`**: Delete a specific session. * **GET `/api/sessions/{session}/me`**: Get information about the authenticated account for a session. * **POST `/api/sessions/{session}/start`**: Start a specific session. * **POST `/api/sessions/{session}/stop`**: Stop a specific session. * **POST `/api/sessions/{session}/logout`**: Log out from a specific session. * **POST `/api/sessions/{session}/restart`**: Restart a specific session. * **POST `/api/sessions/start`**: Upsert and start sessions. * **POST `/api/sessions/stop`**: Stop (and optionally logout) sessions. * **POST `/api/sessions/logout`**: Logout and delete sessions. ``` -------------------------------- ### GET /api/sendText (Deprecated) Source: https://waha.devlike.pro/swagger/openapi Sends a text message using GET parameters. This method is deprecated. ```APIDOC ## GET /api/sendText (Deprecated) ### Description Sends a text message using GET parameters. This method is deprecated. ### Method GET ### Endpoint /api/sendText ### Parameters #### Query Parameters - **phone** (string) - Required - The recipient's phone number. - **text** (string) - Required - The text content of the message. - **session** (string) - Required - The session name, defaults to 'default'. ### Response #### Success Response (200) - **object** (object) - A generic object, likely indicating success. #### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### Session Creation Request Schema Source: https://waha.devlike.pro/swagger/openapi Defines the parameters required to create a new session. It includes the session name and an optional list of applications to be synchronized. A boolean flag indicates whether the session should start automatically upon creation. ```json { "type": "object", "properties": { "name": { "type": "string", "example": "default", "description": "Session name (id)" }, "apps": { "nullable": true, "description": "Apps to be synchronized for this session.", "type": "array", "items": { "$ref": "#/components/schemas/App" } }, "start": { "type": "boolean", "description": "Start session after creation", "example": true, "default": true } } } ``` -------------------------------- ### GET /api/contacts Source: https://waha.devlike.pro/swagger/openapi Retrieves basic information for a specific contact identified by their contact ID. This endpoint is useful for getting quick details about a contact. ```APIDOC ## GET /api/contacts ### Description Get contact basic info. The method always returns a result, even if the phone number is not registered in WhatsApp. For that - use /contacts/check-exists endpoint below. ### Method GET ### Endpoint /api/contacts ### Parameters #### Query Parameters - **contactId** (string) - Required - The ID of the contact (e.g., '11111111111@c.us'). - **session** (string) - Required - The session name. ### Response #### Success Response (200) - **description** (string) - Description of the success response. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### NowebStoreConfig Source: https://waha.devlike.pro/swagger/openapi Configuration for the Noweb store, controlling whether the store is enabled and the behavior of full synchronization. ```APIDOC ## NowebStoreConfig ### Description Configuration for the Noweb store, controlling whether the store is enabled and the behavior of full synchronization. ### Method N/A (Schema Definition) ### Endpoint N/A (Schema Definition) ### Parameters #### Request Body - **enabled** (boolean) - Required - Enable or disable the store for contacts, chats, and messages. Example: `true` - **fullSync** (boolean) - Required - Enable full sync on session initialization (when scanning QR code). Full sync will download all contacts, chats, and messages from the phone. If disabled, only messages early than 90 days will be downloaded and some contacts may be missing. Example: `false` ### Request Example ```json { "enabled": true, "fullSync": false } ``` ### Response #### Success Response (200) - **enabled** (boolean) - Indicates if the store is enabled. - **fullSync** (boolean) - Indicates if full synchronization is enabled. #### Response Example ```json { "enabled": true, "fullSync": false } ``` ``` -------------------------------- ### GET /api/messages Source: https://waha.devlike.pro/swagger/openapi Retrieves messages from a chat. This endpoint is deprecated and "GET /api/chats/{id}/messages" should be used instead. Requires an API key for authentication. ```APIDOC ## GET /api/messages ### Description DEPRECATED. Use "GET /api/chats/{id}/messages" instead. Retrieves messages in a chat. ### Method GET ### Endpoint /api/messages ### Parameters #### Query Parameters - **sortBy** (string) - Optional - Sort by field. Allowed values: "timestamp", "messageTimestamp". Default: "timestamp". - **sortOrder** (string) - Optional - Sort order. Allowed values: "desc", "asc". - **downloadMedia** (boolean) - Optional - Download media for messages. Default: true. - **chatId** (string) - Required - The ID of the chat. - **session** (string) - Required - The session name. Default: "default". - **limit** (number) - Required - The maximum number of messages to retrieve. Default: 10. - **offset** (number) - Optional - The number of messages to skip. - **filter.timestamp.lte** (number) - Optional - Filter messages before this timestamp (inclusive). - **filter.timestamp.gte** (number) - Optional - Filter messages after this timestamp (inclusive). ### Request Example ```json { "example": "request body" } ``` ### Response #### Success Response (200) - **body** (object) - Response body containing messages #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### POST /api/keys Source: https://waha.devlike.pro/swagger/openapi Creates a new API key. ```APIDOC ## POST /api/keys ### Description Create a new API key ### Method POST ### Endpoint /api/keys ### Parameters #### Request Body - **ApiKeyRequest** (object) - Required - The request body for creating an API key. ### Request Example ```json { "example": "ApiKeyRequest body" } ``` ### Response #### Success Response (201) - **ApiKeyDTO** (object) - The created API key details. #### Response Example ```json { "example": "ApiKeyDTO object" } ``` ``` -------------------------------- ### POST /labels Source: https://waha.devlike.pro/swagger/openapi Creates a new label with a given name and color. Requires a session. ```APIDOC ## POST /labels ### Description Creates a new label with a given name and color. Requires a session. ### Method POST ### Endpoint /labels ### Parameters #### Request Body - **name** (string) - Required - The name of the label. - **colorHex** (string) - Optional - The color of the label in hex format (e.g., '#ff9485'). - **session** (string) - Required - The session to use for creating the label. ### Request Example ```json { "name": "Lead", "colorHex": "#ff9485", "session": "default" } ``` ### Response #### Success Response (200) - **message** (string) - Indicates the success of the operation. #### Response Example ```json { "message": "Label created successfully" } ``` ``` -------------------------------- ### Send Message with Link Preview (JSON) Source: https://waha.devlike.pro/swagger/openapi This JSON object defines a request to send a message with a custom link preview. It requires a chatId, text (including the URL), and preview data. The preview data includes the URL, title, and description for the link preview. Optionally, it can specify if the preview should be high quality and which session to use. ```json { "chatId": "11111111111@c.us", "text": "Check this out! https://github.com/", "reply_to": null, "linkPreviewHighQuality": true, "preview": { "image": { "url": "https://github.com/devlikeapro/waha/raw/core/examples/waha.jpg" }, "url": "https://github.com/", "title": "Your Title", "description": "Check this out, amazing!" }, "session": "default" } ``` -------------------------------- ### GET /api/session/status Source: https://waha.devlike.pro/swagger/openapi Retrieves the status of the WAHA session. ```APIDOC ## GET /api/session/status ### Description Retrieves the status of the WAHA session. ### Method GET ### Endpoint /api/session/status ### Parameters #### Path Parameters None #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **name** (string) - The name of the session. - **status** (string) - The current status of the session (e.g., STOPPED, STARTING, SCAN_QR_CODE, WORKING, FAILED). - **statuses** (array) - An array of session status points. - **status** (string) - The status at a specific point in time. - **timestamp** (number) - The timestamp of the status update. #### Response Example ```json { "name": "default", "status": "WORKING", "statuses": [ { "status": "STARTING", "timestamp": 1723788847000 }, { "status": "SCAN_QR_CODE", "timestamp": 1723788850000 }, { "status": "WORKING", "timestamp": 1723788900000 } ] } ``` ``` -------------------------------- ### Create Channel API Source: https://waha.devlike.pro/swagger/openapi Facilitates the creation of a new channel with a name, description, and optional picture. ```APIDOC ## POST /channel/create ### Description Creates a new channel. ### Method POST ### Endpoint /channel/create ### Parameters #### Request Body - **name** (string) - Required - The name of the channel (e.g., "Channel Name"). - **description** (string) - Optional - A description for the channel (e.g., "Channel Description"). - **picture** (object) - Optional - The profile picture for the channel. Can be a remote file or binary file. - **url** (string) - Required if picture is provided - URL of the picture. ### Request Example ```json { "name": "My New Channel", "description": "This is a test channel.", "picture": { "url": "https://example.com/image.jpg" } } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the newly created channel. - **invite** (string) - The invite link for the channel. #### Response Example ```json { "id": "123123123123@newsletter", "invite": "https://www.whatsapp.com/channel/111111111111111111111111" } ``` ``` -------------------------------- ### POST /api/{session}/channels/{id}/follow Source: https://waha.devlike.pro/swagger/openapi Follow a specific WhatsApp channel. This action subscribes the user to updates from the channel. ```APIDOC ## POST /api/{session}/channels/{id}/follow ### Description Follow the channel. This action subscribes the user to updates from the channel. ### Method POST ### Endpoint /api/{session}/channels/{id}/follow ### Parameters #### Path Parameters - **session** (string) - Required - Session name - **id** (string) - Required - WhatsApp Channel ID ### Response #### Success Response (201) - Description: Indicates the channel was successfully followed. #### Response Example ```json { "message": "Channel followed successfully" } ``` ``` -------------------------------- ### GowsConfig Source: https://waha.devlike.pro/swagger/openapi Overall configuration for Gows, including storage settings. ```APIDOC ## GowsConfig ### Description Overall configuration for Gows, including storage settings. ### Method N/A (Schema Definition) ### Endpoint N/A (Schema Definition) ### Parameters #### Request Body - **storage** (object) - Optional - Storage configuration for Gows. References `#/components/schemas/GowsStorageConfig`. ### Request Example ```json { "storage": { "messages": true, "groups": true, "chats": true, "labels": true } } ``` ### Response #### Success Response (200) - **storage** (object) - Storage configuration details. #### Response Example ```json { "storage": { "messages": true, "groups": true, "chats": true, "labels": true } } ``` ``` -------------------------------- ### Observability API Source: https://waha.devlike.pro/swagger/index Endpoints for monitoring server health, version, environment, and debugging. ```APIDOC ## GET /ping ### Description Ping the server to check its availability. ### Method GET ### Endpoint /ping ### Response #### Success Response (200) - **status** (string) - Server status, typically "pong". #### Response Example ```json { "status": "pong" } ``` ## GET /health ### Description Check the health of the server. ### Method GET ### Endpoint /health ### Response #### Success Response (200) - **health** (string) - Server health status. #### Response Example ```json { "health": "ok" } ``` ## GET /api/server/version ### Description Get the version of the server. ### Method GET ### Endpoint /api/server/version ### Response #### Success Response (200) - **version** (string) - The server version. #### Response Example ```json { "version": "1.0.0" } ``` ## GET /api/server/environment ### Description Get the server environment details. ### Method GET ### Endpoint /api/server/environment ### Response #### Success Response (200) - **environment** (string) - The server environment (e.g., production, development). #### Response Example ```json { "environment": "production" } ``` ## GET /api/server/status ### Description Get the current status of the server. ### Method GET ### Endpoint /api/server/status ### Response #### Success Response (200) - **status** (string) - The server status. #### Response Example ```json { "status": "running" } ``` ## POST /api/server/stop ### Description Stop and restart the server. ### Method POST ### Endpoint /api/server/stop ### Response #### Success Response (200) - **message** (string) - Confirmation message of the server stop/restart. #### Response Example ```json { "message": "Server stopping and restarting." } ``` ## GET /api/server/debug/cpu ### Description Collect and return a CPU profile for the current Node.js process. ### Method GET ### Endpoint /api/server/debug/cpu ### Response #### Success Response (200) - **cpu_profile** (string) - The collected CPU profile data. #### Response Example ```json { "cpu_profile": "profile_data" } ``` ## GET /api/server/debug/heapsnapshot ### Description Return a heapsnapshot for the current Node.js process. ### Method GET ### Endpoint /api/server/debug/heapsnapshot ### Response #### Success Response (200) - **heapsnapshot** (string) - The heapsnapshot data. #### Response Example ```json { "heapsnapshot": "snapshot_data" } ``` ## GET /api/server/debug/browser/trace/{session} ### Description Collect and get a trace.json for Chrome DevTools. ### Method GET ### Endpoint /api/server/debug/browser/trace/{session} ### Parameters #### Path Parameters - **session** (string) - Required - The session identifier. ### Response #### Success Response (200) - **trace_data** (string) - The trace.json data. #### Response Example ```json { "trace_data": "trace_json_data" } ``` ## GET /api/version ### Description Get the server version. ### Method GET ### Endpoint /api/version ### Response #### Success Response (200) - **version** (string) - The server version. #### Response Example ```json { "version": "1.0.0" } ``` ``` -------------------------------- ### GET /contacts/count Source: https://waha.devlike.pro/swagger/openapi Retrieves the total count of contacts. Requires a session. ```APIDOC ## GET /contacts/count ### Description Retrieves the total count of contacts. Requires a session. ### Method GET ### Endpoint /contacts/count ### Parameters #### Query Parameters - **session** (string) - Required - The session to use for counting contacts. ### Response #### Success Response (200) - **count** (number) - The total number of contacts. #### Response Example ```json { "count": 150 } ``` ``` -------------------------------- ### GET /api/apps/chatwoot/locales Source: https://waha.devlike.pro/swagger/openapi Retrieves a list of available languages for the Chatwoot app. ```APIDOC ## GET /api/apps/chatwoot/locales ### Description Retrieves a list of available languages for the Chatwoot app. ### Method GET ### Endpoint /api/apps/chatwoot/locales ### Parameters #### Query Parameters (No query parameters defined) ### Response #### Success Response (200) - **(array of objects)** - A list of available languages. #### Response Example { "example": "response body" } ``` -------------------------------- ### Create Session Configuration Source: https://waha.devlike.pro/swagger/openapi Defines the configuration for creating a new session, including metadata, debug settings, and webhook configurations. Webhooks can be set up to receive event notifications with optional HMAC security. ```json { "name": "default", "start": true, "config": { "metadata": { "user.id": "123" }, "debug": true, "webhooks": [ { "url": "https://example.com/webhooks/waha", "events": [ "message", "session.status" ], "hmac": { "key": "super-secret" } } ] }, "apps": [ { "app": "calls", "enabled": true, "config": { "dm": { "reject": true, "message": "šŸ“žāŒ We don't take calls right now.\nšŸŽ¤ Please send a voice message or šŸ“ text — we'll reply ASAP!" }, "group": { "reject": true } } } ] } ``` -------------------------------- ### GET /api/apps/{id} Source: https://waha.devlike.pro/swagger/openapi Retrieves a specific app by its unique identifier. ```APIDOC ## GET /api/apps/{id} ### Description Retrieves a specific app by its unique identifier. ### Method GET ### Endpoint /api/apps/{id} ### Parameters #### Path Parameters - **id** (string) - Required - The unique identifier of the app. ### Response #### Success Response (200) - **(object)** - Details of the app. #### Response Example { "example": "response body" } ``` -------------------------------- ### GET /api/{session}/labels Source: https://waha.devlike.pro/swagger/openapi Retrieves all labels for a given session. ```APIDOC ## GET /api/{session}/labels ### Description Retrieves all labels for a given session. ### Method GET ### Endpoint /api/{session}/labels #### Path Parameters - **session** (string) - Required - Session name ### Response #### Success Response (200) - **items** (array) - An array of Label objects. #### Response Example { "example": "[ { "id": "string", "name": "string" } ]" } ``` -------------------------------- ### NowebConfig Source: https://waha.devlike.pro/swagger/openapi Configuration for the Noweb client, including options for marking the session as online and store settings. ```APIDOC ## NowebConfig ### Description Configuration for the Noweb client, including options for marking the session as online and store settings. ### Method N/A (Schema Definition) ### Endpoint N/A (Schema Definition) ### Parameters #### Request Body - **markOnline** (boolean) - Required - Mark the session as online when it connects to the server. Example: `true` - **store** (object) - Optional - Configuration for the Noweb store. References `#/components/schemas/NowebStoreConfig`. ### Request Example ```json { "markOnline": true, "store": { "enabled": true, "fullSync": false } } ``` ### Response #### Success Response (200) - **markOnline** (boolean) - Indicates if the session is marked as online. - **store** (object) - Store configuration details. #### Response Example ```json { "markOnline": true, "store": { "enabled": true, "fullSync": false } } ``` ``` -------------------------------- ### GET /api/{session}/profile Source: https://waha.devlike.pro/swagger/openapi Retrieves the profile information for the specified session. ```APIDOC ## GET /api/{session}/profile ### Description Retrieves the profile information for the specified session. ### Method GET ### Endpoint /api/{session}/profile ### Parameters #### Path Parameters - **session** (string) - Required - Session name ### Response #### Success Response (200) - **MyProfile** (object) - The user's profile details. #### Response Example ```json { "example": "Profile details object" } ``` ``` -------------------------------- ### POST /api/sessions Source: https://waha.devlike.pro/swagger/openapi Creates a new session with the specified configuration. This includes setting metadata, enabling debug mode, and configuring webhooks and applications. ```APIDOC ## POST /api/sessions ### Description Creates a new session with the specified configuration. This includes setting metadata, enabling debug mode, and configuring webhooks and applications. ### Method POST ### Endpoint /api/sessions ### Parameters #### Request Body - **name** (string) - Required - The name of the session. - **start** (boolean) - Required - Whether to start the session immediately. - **config** (object) - Optional - Configuration settings for the session. - **metadata** (object) - Optional - Metadata for the session. - **user.id** (string) - Optional - The user ID associated with the session. - **debug** (boolean) - Optional - Enable or disable debug mode. - **webhooks** (array) - Optional - A list of webhook configurations. - **url** (string) - Required - The URL for the webhook. - **events** (array) - Required - A list of events to trigger the webhook. - (string) - The event name. - **hmac** (object) - Optional - HMAC configuration for webhook security. - **key** (string) - Required - The HMAC key. - **retries** (object) - Optional - Retry configuration for webhooks. - **delaySeconds** (integer) - Optional - Delay in seconds between retries. - **attempts** (integer) - Optional - Maximum number of retry attempts. - **policy** (string) - Optional - Retry policy (e.g., 'linear'). - **customHeaders** (array) - Optional - Custom headers for webhooks. - **name** (string) - Required - The header name. - **value** (string) - Required - The header value. - **apps** (array) - Optional - A list of application configurations. - **app** (string) - Required - The name of the application. - **enabled** (boolean) - Required - Whether the application is enabled. - **config** (object) - Optional - Application-specific configuration. - **dm** (object) - Optional - Direct message configuration. - **reject** (boolean) - Optional - Whether to reject direct messages. - **message** (string) - Optional - The message to send when rejecting direct messages. - **group** (object) - Optional - Group configuration. - **reject** (boolean) - Optional - Whether to reject group messages. ### Request Example ```json { "name": "default", "start": true, "config": { "metadata": { "user.id": "123" }, "debug": true, "webhooks": [ { "url": "https://example.com/webhooks/waha", "events": [ "message", "session.status" ], "hmac": { "key": "super-secret" } } ], "apps": [ { "app": "calls", "enabled": true, "config": { "dm": { "reject": true, "message": "šŸ“žāŒ We don't take calls right now.\nšŸŽ¤ Please send a voice message or šŸ“ text — we'll reply ASAP!" }, "group": { "reject": true } } } ] } } ``` ### Response #### Success Response (201) - **SessionDTO** (object) - The created session data transfer object. #### Response Example ```json { "example": "SessionDTO object" } ``` ``` -------------------------------- ### GET /api/{session}/groups/join-info Source: https://waha.devlike.pro/swagger/openapi Fetches information about a group before joining it, using either a group code or a WhatsApp group URL. ```APIDOC ## GET /api/{session}/groups/join-info ### Description Get info about the group before joining. ### Method GET ### Endpoint /api/{session}/groups/join-info #### Path Parameters - **session** (string) - Required - Session name #### Query Parameters - **code** (string) - Required - Group code or URL (e.g., `https://chat.whatsapp.com/1234567890abcdef`) ### Response #### Success Response (200) - **(object)** - The schema for the response body is a generic object. ``` -------------------------------- ### GET /health Source: https://waha.devlike.pro/swagger/openapi Performs all health checks and returns the server's health status. ```APIDOC ## GET /health ### Description Check the health of the server by performing all health checks and returning the server's health status. ### Method GET ### Endpoint /health ### Parameters None ### Response #### Success Response (200) - **status** (string) - The overall health status of the server (e.g., "ok"). - **info** (object) - An object containing information about the health of various services (e.g., database). - **error** (object) - An object containing information about any health check errors. #### Response Example ```json { "status": "ok", "info": { "database": { "status": "up" } }, "error": {} } ``` ``` -------------------------------- ### Session Configuration Schema Source: https://waha.devlike.pro/swagger/openapi Defines the configuration options for a session, including metadata, proxy settings, debugging, ignored events, client information, and specific settings for Noweb, Gows, WebJS, and webhooks. It allows for detailed customization of how a session operates and interacts with various services. ```json { "type": "object", "properties": { "metadata": { "type": "object", "example": { "user.id": "123", "user.email": "email@example.com" }, "description": "Metadata for the session. You'll get 'metadata' in all webhooks." }, "proxy": { "example": null, "allOf": [ { "$ref": "#/components/schemas/ProxyConfig" } ] }, "debug": { "type": "boolean", "default": false }, "ignore": { "example": { "status": null, "groups": null, "channels": null }, "description": "Ignore some events related to specific chats", "allOf": [ { "$ref": "#/components/schemas/IgnoreConfig" } ] }, "client": { "description": "How connected session renders in device - in format 'Browser (Device)' - Firefox (MacOS)", "example": { "browserName": "Firefox", "deviceName": "MacOS" }, "allOf": [ { "$ref": "#/components/schemas/ClientSessionConfig" } ] }, "noweb": { "example": { "store": { "enabled": true, "fullSync": false } }, "allOf": [ { "$ref": "#/components/schemas/NowebConfig" } ] }, "gows": { "example": { "storage": { "messages": true, "groups": true, "chats": true, "labels": true } }, "allOf": [ { "$ref": "#/components/schemas/GowsConfig" } ] }, "webjs": { "description": "WebJS-specific settings.", "allOf": [ { "$ref": "#/components/schemas/WebjsConfig" } ] }, "webhooks": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookConfig" } } } } ``` -------------------------------- ### GET /api/screenshot Source: https://waha.devlike.pro/swagger/openapi Retrieves a screenshot of the current WhatsApp session. This endpoint is specifically for WEBJS. ```APIDOC ## GET /api/screenshot ### Description Get a screenshot of the current WhatsApp session (**WEBJS** only). ### Method GET ### Endpoint /api/screenshot ### Parameters #### Query Parameters - **session** (string) - Required - The session name for which to get the screenshot. ### Response #### Success Response (200) - **Base64File** (object) - The screenshot data encoded in base64. - **image/jpeg** (binary) - The screenshot image in JPEG format. #### Response Example ```json { "data": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=" } ``` ``` -------------------------------- ### POST /api/{session}/channels Source: https://waha.devlike.pro/swagger/openapi Creates a new WhatsApp channel. Requires a session name and channel creation details in the request body. ```APIDOC ## POST /api/{session}/channels ### Description Creates a new WhatsApp channel. ### Method POST ### Endpoint /api/{session}/channels ### Parameters #### Path Parameters - **session** (string) - Required - Session name #### Request Body - **CreateChannelRequest** (object) - Required - Details for creating the channel (schema reference: #/components/schemas/CreateChannelRequest) ### Request Example ```json { "example": "request body for CreateChannelRequest" } ``` ### Response #### Success Response (201) - **Channel** (object) - Details of the created channel (schema reference: #/components/schemas/Channel) #### Response Example ```json { "example": "response body for Channel" } ``` ```