> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wppfy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Start Here

> Powerful API for managing instances and automations on WhatsApp. Connect, send messages, and manage events with ease.

{document.querySelectorAll("#footer a").forEach((a) => a.remove())}

<Note>
  **Base URL:** `https://api.wppfy.com`
</Note>

## <Icon icon="robot" size={22} /> Docs for AI

Integrating with a coding assistant? Pick your tool, copy the prompt, and paste it into the chat. It points the AI to the documentation index at [`llms.txt`](https://docs.wppfy.com/llms.txt) (full version at [`llms-full.txt`](https://docs.wppfy.com/llms-full.txt)).

<CodeGroup>
  ```text Claude Code icon="https://www.google.com/s2/favicons?domain=claude.ai&sz=64" wrap theme={null}
  I'm going to integrate the WppFy WhatsApp API into this project.
  Before writing any code, read the documentation at https://docs.wppfy.com/llms.txt and open the .md pages for the endpoints you need.

  Rules:
  - Base URL: https://api.wppfy.com
  - Authentication: `token` header with the instance token, read from an environment variable (WPPFY_TOKEN), never hardcoded.
  - Follow the documented payloads and responses exactly; don't invent fields or endpoints.
  - Handle HTTP errors (401, 404, 429, 500) and the instance state (disconnected, connecting, connected).

  Task: [describe what you want to build here]
  ```

  ```text Codex icon="https://www.google.com/s2/favicons?domain=openai.com&sz=64" wrap theme={null}
  Context: integration with the WppFy WhatsApp API.
  Documentation (LLM index): https://docs.wppfy.com/llms.txt
  Full documentation: https://docs.wppfy.com/llms-full.txt

  Read the documentation before implementing. Use the Base URL https://api.wppfy.com and send the `token` header with the instance token from the WPPFY_TOKEN environment variable. Use only documented endpoints and fields, handle HTTP errors, and write tests for the main calls.

  Task: [describe what you want to build here]
  ```

  ```text Cursor icon="https://www.google.com/s2/favicons?domain=cursor.com&sz=64" wrap theme={null}
  @https://docs.wppfy.com/llms.txt

  Use the WppFy documentation above as the reference for integrating the WhatsApp API into this project.
  - Base URL: https://api.wppfy.com
  - Authentication header: `token` (instance token, via the WPPFY_TOKEN environment variable)
  - Check the .md pages listed in llms.txt for the exact payloads of each endpoint.
  - Don't invent fields; handle errors and the instance connection state.

  Task: [describe what you want to build here]
  ```

  ```text Replit icon="https://www.google.com/s2/favicons?domain=replit.com&sz=64" wrap theme={null}
  Create an integration with the WppFy WhatsApp API.
  Documentation: https://docs.wppfy.com/llms.txt (read it before starting).

  - Base URL: https://api.wppfy.com
  - Store the instance token in Replit Secrets as WPPFY_TOKEN and send it in the `token` header.
  - To receive messages, expose a webhook route (POST) and log the events received.
  - Use only endpoints and fields that are in the documentation.

  Task: [describe what you want to build here]
  ```

  ```text Lovable icon="https://www.google.com/s2/favicons?domain=lovable.dev&sz=64" wrap theme={null}
  I want to add sending and receiving WhatsApp messages to my app using the WppFy API.
  Read the documentation at https://docs.wppfy.com/llms.txt before implementing.

  - Base URL: https://api.wppfy.com
  - The instance token is secret: store it as a secret (WPPFY_TOKEN) and make the calls from the backend (Edge Function), never directly from the browser.
  - Send the token in the `token` header.
  - Follow the payloads exactly as documented.

  Task: [describe what you want to build here]
  ```

  ```text Bolt.new icon="https://www.google.com/s2/favicons?domain=bolt.new&sz=64" wrap theme={null}
  Integrate the WppFy WhatsApp API into this app.
  Reference documentation: https://docs.wppfy.com/llms.txt

  - Base URL: https://api.wppfy.com
  - `token` header with the instance token, read from an environment variable (WPPFY_TOKEN) in a server endpoint; don't expose the token on the front end.
  - Use only documented endpoints and fields and handle the errors returned by the API.

  Task: [describe what you want to build here]
  ```

  ```text v0 icon="https://www.google.com/s2/favicons?domain=v0.app&sz=64" wrap theme={null}
  Build the integration with the WppFy WhatsApp API.
  Documentation: https://docs.wppfy.com/llms.txt

  - Base URL: https://api.wppfy.com
  - Make the calls server-side, with the instance token in an environment variable (WPPFY_TOKEN) sent in the `token` header.
  - Never expose the token on the client.
  - Follow the documented payloads without inventing fields.

  Task: [describe what you want to build here]
  ```
</CodeGroup>

## <Icon icon="triangle-exclamation" size={22} /> Important Recommendation

<Warning>
  **Use WhatsApp Business**

  We strongly recommend using **WhatsApp Business** accounts to avoid disconnections, sending limitations, and connection instability.
</Warning>

## Authentication

To interact with the API, you will need to configure the *Headers* of your requests. Choose the type of access you need:

<CodeGroup>
  ```bash Instance Token theme={null}
  # Header para rotas de envio e controle de sessão
  token: SEU_TOKEN_AQUI
  ```
</CodeGroup>

## Session States

Understand what each connection state means so you can monitor your instances in real time.

<CardGroup cols={3}>
  <Card title="Disconnected" icon="circle-xmark" color="#ef4444">
    The instance is fully disconnected from the WhatsApp server.
  </Card>

  <Card title="Connecting" icon="rotate" color="#eab308">
    The system is trying to establish the handshake with WhatsApp.
  </Card>

  <Card title="Connected" icon="circle-check" color="#22c55e">
    Stable connection. The instance is ready to send and receive data.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.