API ReferenceClients
clients.setContactFlag
Authorization
ApiKeyAuth x-api-key<token>
API key from /account/api-keys. Free tier: 100 req/hr. Pro tier: 1000 req/hr.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://gmp.ffstudios.io/api/rpc/clients/setContactFlag" \ -H "Content-Type: application/json" \ -d '{ "clientId": "string", "contactJid": "string", "flag": "blacklist", "value": true }'{
"success": true,
"cancelledRunIds": [
"string"
]
}Notes
Sets a per-client tag on a contact JID. Two flags exist:
blacklist— blocks the contact from triggering flows; in-flight flow states for that JID are cancelled.favourite— purely cosmetic / for filtering.
Setting flag: "blacklist", value: true cancels any active flow state for the contact via cancelFlowStatesForContact. The cancelled run IDs are returned in cancelledRunIds so the editor can show the impact. Hard-deletes flow_states rows (cascade clears flow_state_events + flow_state_transitions) and invalidates the Redis session cache.
oRPC client example
import { orpc } from "@/utils/orpc";
import { useMutation } from "@tanstack/react-query";
const flag = useMutation(orpc.clients.setContactFlag.mutationOptions());
flag.mutate({
clientId: "my-client",
contactJid: "919876543210@s.whatsapp.net",
flag: "blacklist",
value: true,
});