Skip to content

Story routes: update, delete

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

Reference for Story, one group of Story routes.

Story.update

Changes the given properties of a Story. Verb page.

Text
PATCH /{namespace}/stories/{id}

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

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Story.
icpICPThe ICP it speaks to: one Story per ICP.
herotextWho the customer is and what they want.
problemProblemThe Problem: external, internal, and the villain behind it.
guidetextThe Startup’s empathy and authority, the authority read from Metrics and Evidence.
plantextThree steps, each naming a declared Event.
successtextWhat the customer gains.
failuretextWhat the customer risks without it.
oneLinerstringThe Story in one sentence.
directOfferThe direct call to action: an Offer that makes a Customer.
transitionalFunnelThe transitional call to action: a Funnel opt-in that makes a Lead.
fromstringLineage: the slot it compiles from, as Hypothesis#<slot>@v<version>.
stancestringThe positioning the Positioning tournament chose, graded Behavior; every compiled asset recompiles when it changes.
categorystringThe market category name the Story claims, as answer engines repeat it.

Returns

OutputTypeRequiredDescription
storyStoryrequiredThe Story.

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/stories/story_ujkz1xjvrp \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"icp":"icp_EwhsJU4AOW"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "story": {
    "$id": "https://api.sb/leaseline.app/stories/story_ujkz1xjvrp",
    "$type": "Story",
    "icp": "icp_EwhsJU4AOW",
    "hero": "Example hero",
    "problem": "problem_UzvXXfKsJB",
    "from": "Hypothesis#approach@v1"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Story.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Story.delete

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

Text
DELETE /{namespace}/stories/{id}

Path: id. Emits Story.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Story.

Returns

OutputTypeRequiredDescription
storyStoryrequiredThe Story.

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/stories/story_ujkz1xjvrp \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "story": {
    "$id": "https://api.sb/leaseline.app/stories/story_ujkz1xjvrp",
    "$type": "Story",
    "icp": "icp_EwhsJU4AOW",
    "hero": "Example hero",
    "problem": "problem_UzvXXfKsJB",
    "from": "Hypothesis#approach@v1"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Story.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}