participantIds array.
Connections route inbound leads into a pool by matching their origin — a generic webhook, a meta page/form/ad/campaign, an automation provider (Zapier, Make, n8n), or a workflow. When a lead arrives, FlowEstate picks the active pool whose connection matches the lead’s source and assigns it through that pool’s rotation.
Every endpoint on this page operates inside the calling organization’s tenant — you cannot read or write round robin pools from another organization with the same key.
List pools
round-robin:read. Lists the organization’s round robin pools, newest first.
Query parameters
| Param | Type | Notes |
|---|---|---|
limit | number | 1..100, default 50. |
offset | number | Default 0. |
query | string | Case-insensitive match on the pool name. |
status | enum | all (default), active, or inactive. |
Request
Response 200
nextParticipantOrder is the 1-based order value of the participant who will receive the next lead. participantCount counts only active participants.
Create a pool
round-robin:write
Request body
| Field | Type | Notes |
|---|---|---|
name | string | Required, 1..200 chars. |
participantIds | string[] | Required, at least one UUID. Array order becomes the rotation order. Every id must be a member of the organization; no duplicates. |
followerUserId | string | Optional UUID. A member who follows the pool’s activity. Must be an org member. |
goalTotalDeals | number | Optional, integer ≥ 0. |
goalWonDeals | number | Optional, integer ≥ 0. |
isActive | boolean | Default true. Only active pools assign leads. |
assignInboundLeads | boolean | Default true. Assign leads arriving from connections (Meta, webhook, automation, workflow). |
assignManualLeads | boolean | Default false. Assign leads created manually (source: "manual"). |
emailNotificationsEnabled | boolean | Default false. Email the assigned participant on each assignment. |
connections | object[] | Default []. See connection object. |
Connection object
Each entry inconnections (and the body of POST .../connections) has this shape:
| Field | Type | Notes |
|---|---|---|
source | enum | Default webhook. One of RoundRobinConnectionSource: webhook, meta, automation, workflow. |
provider | enum | RoundRobinConnectionProvider: custom, make, n8n, zapier. Required when source is automation. |
sourceKey | string | Optional, 1..200 chars. Free-form key to match a custom source. |
metaPageId, metaFormId, metaAdId, metaCampaignId | string | Optional, 1..200 chars each. Used to match meta leads. |
utmCampaign | string | Optional, 1..200 chars. |
workflowId | string | Optional, 1..200 chars. Required when source is workflow. |
Only one pool per organization may hold the generic
webhook connection, and the organization’s universal lead webhook integration must be enabled. Duplicate connections (identical field-for-field) are rejected.Request
Response 201
Common errors
400 VALIDATION_ERROR— invalid body (emptyparticipantIds, automation connection missingprovider, workflow connection missingworkflowId, etc.).400 BAD_REQUEST— a participant or follower is not an organization member, duplicate participants, or duplicate connections.400 BAD_REQUEST—webhookconnection requested but the universal lead webhook integration is not enabled.409 CONFLICT— the universalwebhookconnection is already assigned to another pool.
Get a pool
round-robin:read. Returns the pool with its ordered participants, connections, a settings summary, and assignment stats. 404 NOT_FOUND if the pool doesn’t exist or belongs to another org.
Response 200
order ascending).
Update a pool
round-robin:write. Body is the create body minus name’s required flag — every field is optional; send only what you want to change. 404 NOT_FOUND if the pool doesn’t exist or belongs to another org.
| Field | Type | Notes |
|---|---|---|
name | string | 1..200 chars. |
isActive | boolean | Activate or deactivate the pool. Deactivated pools stop receiving leads. |
participantIds | string[] | At least one UUID. Replaces the full participant list; the array order becomes the new rotation order and resets the pointer to the first participant. |
followerUserId | string | null | UUID or null to clear. |
goalTotalDeals | number | null | Integer ≥ 0 or null. |
goalWonDeals | number | null | Integer ≥ 0 or null. |
assignInboundLeads | boolean | — |
assignManualLeads | boolean | — |
emailNotificationsEnabled | boolean | — |
connections | object[] | Replaces the full connection list. See connection object. |
Request
Reorder the rotation and deactivate the pool:Response 200
Common errors
400 VALIDATION_ERROR/400 BAD_REQUEST— same validation rules as create (membership, duplicates, connection requirements).409 CONFLICT— the universalwebhookconnection is already held by another pool.
Delete a pool
round-robin:write. Removes the pool and its participants, connections, and assignment history. 404 NOT_FOUND if the pool doesn’t exist or belongs to another org.
Response 200
Add a connection
round-robin:write. Adds a single routing connection to an existing pool. Body is the connection object. 404 NOT_FOUND if the pool doesn’t exist or belongs to another org.
Request
Response 201
Common errors
400 VALIDATION_ERROR— automation connection missingprovider, or workflow connection missingworkflowId.400 BAD_REQUEST—webhookconnection requested but the universal lead webhook integration is not enabled.409 CONFLICT— an identical connection already exists on this pool, or the universalwebhookconnection is held by another pool.
Remove a connection
round-robin:write. 404 NOT_FOUND if the connection doesn’t exist on that pool or belongs to another org.
Response 200
List assignments
round-robin:read. Lists the pool’s assignment history, newest first.
Query parameters
| Param | Type | Notes |
|---|---|---|
limit | number | 1..100, default 50. |
offset | number | Default 0. |
source | enum | Optional. Filter by RoundRobinAssignmentSource: manual, meta, webhook, whatsapp, system. |
Response 200
turnOrder is the participant’s order value at the time of assignment. metadata is a JSON-encoded string (or null) describing how the lead matched a connection.
Assign a lead
round-robin:write. Runs a lead through the matching active pool’s pointer rotation, assigns it to the next eligible participant, and advances the pointer.
Request body
| Field | Type | Notes |
|---|---|---|
leadId | string | Required UUID. The lead must belong to your organization. |
source | enum | Default system. One of RoundRobinAssignmentSource: manual, meta, webhook, whatsapp, system. A manual source routes through pools with assignManualLeads enabled; all other sources route through pools with assignInboundLeads enabled. |
Request
Response 200
When a participant is assigned:The lead is only assigned if it currently has no assignee. A lead that already has an owner returns
{ "assigned": false } and is left untouched.Common errors
400 VALIDATION_ERROR—leadIdis not a UUID, orsourceis not a known value.404 NOT_FOUND— the lead does not exist or belongs to another organization.