Skip to content
APIProductSites and appsFlow

Flow routes: update, delete

The Flow Verbs update, delete as api.sb routes, with inputs, result, refusals and an example.

Reference for Flow, one group of Flow routes.

Flow.update

Changes the given properties of a Flow. Verb page.

Text
PATCH /{namespace}/flows/{id}

Path: id. Body, as JSON: the other inputs. Emits Flow.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Flow.
personaPersonaThe Persona it guides; its Role decides which Verbs each step offers.
offerOfferThe Offer whose activation Event ends the Flow; time to value reads from first step to that Event.
stepslist of DashboardThe Dashboards in order, first run first, each ending in the Verb that opens the next.

Returns

OutputTypeRequiredDescription
flowFlowrequiredThe Flow.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X PATCH https://api.sb/leaseline.app/flows/flow_uuJzIzjvrp \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"persona":"persona_YdpO6wSexq"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "flow": {
    "$id": "https://api.sb/leaseline.app/flows/flow_uuJzIzjvrp",
    "$type": "Flow",
    "persona": "persona_YdpO6wSexq",
    "offer": "offer_2hzYe1ERo0",
    "steps": [
      "dashboard_QL9I0ALqO4"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Flow.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Flow.delete

Deletes a Flow: a soft delete that keeps its history, undone by Thing.restore. Verb page.

Text
DELETE /{namespace}/flows/{id}

Path: id. Emits Flow.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Flow.

Returns

OutputTypeRequiredDescription
flowFlowrequiredThe Flow.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operation.forbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.

Example

Terminal
curl -X DELETE https://api.sb/leaseline.app/flows/flow_uuJzIzjvrp \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "flow": {
    "$id": "https://api.sb/leaseline.app/flows/flow_uuJzIzjvrp",
    "$type": "Flow",
    "persona": "persona_YdpO6wSexq",
    "offer": "offer_2hzYe1ERo0",
    "steps": [
      "dashboard_QL9I0ALqO4"
    ]
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Flow.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}