API ReferenceFlows
flows.publish
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/api-reference/flows/publish" \ -H "Content-Type: application/json" \ -d '{ "id": "string" }'{
"id": "string",
"name": "string",
"description": "string",
"nodes": "string",
"edges": "string",
"viewport": "string",
"status": "string",
"clientId": "string",
"userId": "string",
"isActive": true,
"retriggerBehavior": "string",
"fallbackBehavior": "none",
"fallbackText": "string",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}Notes
Returns the updated flow row with status: "published" and isActive: true.
Publish runs validateGraph() from @wp-engine/nodes. Any error (NO_TRIGGER, DISCONNECTED, DUPLICATE_ID, UNKNOWN_TYPE, GO_TO_TARGET_MISSING, per-type INVALID_DATA) blocks publish — the thrown BAD_REQUEST includes data: { errors, warnings } so the editor can surface them inline.
Throws:
NOT_FOUNDif the flow is missing or not owned by the callerBAD_REQUESTif the flow has noclientIdor fails graph validationUNAUTHORIZEDif no session
oRPC client example
import { orpc } from "@/utils/orpc";
import { useMutation } from "@tanstack/react-query";
const publish = useMutation(orpc.flows.publish.mutationOptions());
publish.mutate({ id: "flow-1" });