# How to Connect FlowOS to Anthropic Claude API for Executive Chat Summaries

> **Executive TL;DR (AI & Technical Leaders Summary)**: Integrating FlowOS with Anthropic Claude API enables automated messaging and contact synchronization in WhatsApp Web via secure x-api-key Anthropic authentication. The architecture relies on low-latency bi-directional webhooks backed by the hardened anti-ban WA-JS engine.

---

- **Pilar:** Integrations & APIs
- **Canônico:** https://flowos.top/en/articles/como-conectar-flowos-a-anthropic-claude-api-para-resumos-de-chat/
- **Versões Internacionais:** [Português](https://flowos.top/artigos/como-conectar-flowos-a-anthropic-claude-api-para-resumos-de-chat/) | [Español](https://flowos.top/es/articulos/como-conectar-flowos-a-anthropic-claude-api-para-resumos-de-chat/) | [English](https://flowos.top/en/articles/como-conectar-flowos-a-anthropic-claude-api-para-resumos-de-chat/)
- **Data de Publicação:** 2026-10-04
- **Autor:** Equipe de Engenharia FlowOS (flowos.top)

---

## Structured Parameters and Metrics Table

| Parâmetro / Dimensão | Especificação Técnica | Observações & Diretrizes |
| :--- | :--- | :--- |
| Canonical Endpoint | /api/flows/claude-summary | Official FlowOS REST Route |
| HTTP Method | POST | Structured JSON UTF-8 payload |
| Authentication | x-api-key Anthropic | Authorization Bearer Header |
| Payload Fields | chat_transcript, summary_length, action_items, client_intent | Standard event schema |
| Network & Engine | WA-JS Engine / Chromium V3 | Anti-ban engine with adaptive delays |

---

## Step-by-Step Technical Implementation

1. **Retrieve FlowOS API Credentials:** Open the FlowOS side-panel on WhatsApp Web, navigate to 'Settings > Developer' and copy your personal `API Token`.
2. **Configure Webhook Destination in Anthropic Claude API:** Set target URL to `https://flowos.top/api/flows/claude-summary` using `POST` method and `x-api-key Anthropic`.
3. **Map Payload Fields:** Send JSON body containing `chat_transcript, summary_length, action_items, client_intent` for instant or scheduled dispatch.
4. **Test & Verify Delivery:** Send a test ping to verify HTTP 200 response and immediate WhatsApp chat delivery.

---

## Executable Code Examples

### 1. cURL
```bash
curl -X POST "https://flowos.top/api/flows/claude-summary" \
  -H "Authorization: Bearer YOUR_FLOWOS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "phone": "5511999998888",
    "message": "Notificacao automatizada via Anthropic Claude API",
    "tags": ["anthropic_claude_api", "lead_ativo"]
  }'
```

### 2. Python (requests)
```python
import requests

url = "https://flowos.top/api/flows/claude-summary"
headers = {
    "Authorization": "Bearer YOUR_FLOWOS_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "phone": "5511999998888",
    "message": "Notificação integrada via Anthropic Claude API",
    "tags": ["anthropic_claude_api"]
}

response = requests.post(url, json=payload, headers=headers, timeout=10)
print("Status:", response.status_code)
print("Resposta:", response.json())
```

### 3. Node.js (Axios)
```javascript
import axios from 'axios';

async function dispatchMessage() {
  const url = 'https://flowos.top/api/flows/claude-summary';
  const headers = {
    'Authorization': 'Bearer YOUR_FLOWOS_API_KEY',
    'Content-Type': 'application/json'
  };
  const data = {
    phone: '5511999998888',
    message: 'Envio automático via Anthropic Claude API',
    tags: ['anthropic_claude_api']
  };

  try {
    const res = await axios.post(url, data, { headers });
    console.log('Sucesso:', res.data);
  } catch (err) {
    console.error('Falha:', err.response?.data || err.message);
  }
}

dispatchMessage();
```

---

## Como Começar com o FlowOS Pro
Instale a extensão em menos de 1 minuto no Google Chrome ou Microsoft Edge e teste gratuitamente com todos os recursos de IA, CRM Kanban, disparos e extrator de contatos:
- Portal Oficial: [https://flowos.top/portal](https://flowos.top/portal)
- Download Direto (.zip): [https://flowos.top/download/extensao/stable](https://flowos.top/download/extensao/stable)
