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

# Personal API access

> Enable member credentials, work a lead portfolio, and connect Zapier or Make as a member.

Personal API access lets a **member** connect tools (Zapier, Make, n8n, scripts) to **their current lead portfolio**: assigned leads that are not disabled.

It starts **off**. An owner or admin turns it on in the dashboard under **Settings → API keys** (`Acceso API de members`). After that, each member creates their own credential. Turning the switch off blocks new use; it does not undo work already saved in the CRM. Reactivating it does not restore revoked keys.

> [!WARNING]
>
> The full secret is shown **once**. If you lose it, revoke it and create a new one.

## Identity

A personal credential (API key or OAuth) is bound to **one membership** and **one organization**. Every read and write is limited to that portfolio.

* Asking for extra OAuth scopes does not grant admin. Scopes are clipped to the operational profile when the token is issued (and again at authenticate for older grants).
* Promoting the user to admin does **not** widen an existing personal credential.
* Leaving and rejoining does **not** revive the previous membership's keys or grants. Create new ones.

See [Authentication](https://developers.flowestate.app/authentication.md) and [Scopes](https://developers.flowestate.app/scopes.md).

## Operational profile

Personal credentials always carry this set:

`leads:read`, `leads:write`, `pipeline:read`, `sequences:read`, `sequences:write`, `whatsapp:read`, `whatsapp:write`.

Routes outside this profile return `403 FORBIDDEN` (`This credential cannot perform this operation`), even if the same HTTP path exists for other credentials.

## What you can do

| Action | Method |
| - | - |
| List / search / get / timeline | `GET /leads`, `/leads/search`, `/leads/{leadId}`, `/leads/{leadId}/activities` |
| Pipeline stages | `GET /pipeline/stages` |
| Note | `POST /leads/{leadId}/notes` |
| Logged communication (does not send) | `POST /leads/{leadId}/communications` |
| Commercial follow-up | `PATCH /leads/{leadId}/commercial` |
| Enrichment | `POST /leads/{leadId}/enrichment` |
| Active sequences | `GET /sequences` |
| Enrollments for a lead | `GET` / `POST /leads/{leadId}/sequence-contacts` |
| Pause / resume / withdraw | `PATCH /leads/{leadId}/sequence-contacts/{contactId}` |
| Own WhatsApp | `GET /whatsapp/accounts`, `POST /whatsapp/send` |
| Connection check | `GET /me` |

Details live in the [Leads](https://developers.flowestate.app/api-reference/leads.md), [Sequences](https://developers.flowestate.app/api-reference/sequences.md), and [WhatsApp](https://developers.flowestate.app/api-reference/whatsapp.md) reference.

A lead (or sequence participation) that is not in the **current** portfolio returns `404 NOT_FOUND`. Reassignment or disable takes effect immediately.

## Commercial follow-up

`PATCH /leads/{leadId}/commercial` updates `status`, `stageId`, `temperature`, `estimatedValue`, and the next follow-up (`followUpAt`, `followUpChannel`, `followUpNote`, `completeFollowUp`). It does not change assignment, source, consents, or `customFields`.

Unknown `stageId` → `400 INVALID_STAGE`. An active follow-up that would be overwritten → `409 FOLLOW_UP_ACTIVE` (complete it or clear it first).

## Enrichment

`POST /leads/{leadId}/enrichment` fills **empty** fields by default (`firstName`, `lastName`, `email`, `phone`, `company`, `jobTitle`, `city`, `state`, `country`).

To overwrite a value that already exists, send `correct: [{ field, expected }]`. If `expected` no longer matches the stored value → `409 STALE_CORRECTION`. If email or phone already belong to another lead → `409 IDENTITY_CONFLICT` (the other record is not revealed).

## Sequences

`GET /sequences` with a personal credential returns **running** sequences only, as `{ id, name, channel, status }`. It does not include `channelConfig`, audience criteria, throttle, or org-wide progress.

* `POST .../sequence-contacts` enrolls one portfolio lead. Failures: `400 SEQUENCE_INACTIVE`, `400 INELIGIBLE`, `409 ALREADY_ENROLLED`.
* `pause` is a manual pause; progress is kept.
* `resume` undoes that pause only if the sequence is still running and the lead is still eligible. A future `scheduledAt` is kept.
* `withdraw` ends participation. The member cannot enroll that lead in the same sequence again (`409 WITHDRAWN` if already ended).

## WhatsApp

Only the member's **own connected account**. List requires `whatsapp:read`; send requires `whatsapp:write`. A rejected send never reaches the provider. Audit logs do not store the message body.

Using another member's account or the org-global account → `403 FORBIDDEN`. Opt-out → `400 OPTED_OUT`. Unusable account → `400 ACCOUNT_UNAVAILABLE`. Number paused or out of budget → `429 NUMBER_RATE_LIMITED`.

## Audit

Dashboard **Settings → API activity** lists who did what. Members see their own events (and never the detail of a lead that left their portfolio). Owners and admins see organization activity. Field names may be recorded; WhatsApp bodies are not.

## Stop access

Turn off **Acceso API de members** and/or revoke personal keys and OAuth authorizations. That does not roll back CRM changes already persisted.


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