Flows
How to trigger Quotient flows from your application
Overview
Programmatic flows let you trigger automated sequences from your application
code. Set a flow's trigger type to PROGRAMMATIC in the Quotient UI, then
call the trigger endpoint with a person ID.
| Endpoint | API Key | Server SDK | Client SDK |
|---|---|---|---|
| Trigger flow | public or private | flow.trigger() | flow.trigger() |

Trigger a Flow
flow.trigger(options)
POST /api/v0/flow/{flowId}/triggerAuth: public or private key · scope:
FLOW_TRIGGER
| Param | Type | Required | Description |
|---|---|---|---|
flowId | string | Yes | The flow ID to trigger |
personId | string | Yes | The person to enroll in the flow |
await client.flow.trigger({
flowId: "YOUR-FLOW-ID",
personId: "PERSON-FOR-FLOW",
});
Returns:
{
success: boolean;
}
Server Side
import { QuotientServer } from "@quotientjs/server";
const client = new QuotientServer({ privateKey: "sk_..." });
await client.flow.trigger({
flowId: "YOUR-FLOW-ID",
personId: "PERSON-FOR-FLOW",
});
Client Side
import { QuotientClient } from "@quotientjs/client";
const client = await QuotientClient.init({ apiKey: "pk_..." });
await client.flow.trigger({
flowId: "YOUR-FLOW-ID",
personId: "PERSON-FOR-FLOW",
});