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.
PATCH /{namespace}/ stories/ {id}Path: id. Body, as JSON: the other inputs. Emits Story.updated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Story. |
icp | ICP | The ICP it speaks to: one Story per ICP. | |
hero | text | Who the customer is and what they want. | |
problem | Problem | The Problem: external, internal, and the villain behind it. | |
guide | text | The Startup’s empathy and authority, the authority read from Metrics and Evidence. | |
plan | text | Three steps, each naming a declared Event. | |
success | text | What the customer gains. | |
failure | text | What the customer risks without it. | |
oneLiner | string | The Story in one sentence. | |
direct | Offer | The direct call to action: an Offer that makes a Customer. | |
transitional | Funnel | The transitional call to action: a Funnel opt-in that makes a Lead. | |
from | string | Lineage: the slot it compiles from, as Hypothesis#<slot>@v<version>. | |
stance | string | The positioning the Positioning tournament chose, graded Behavior; every compiled asset recompiles when it changes. | |
category | string | The market category name the Story claims, as answer engines repeat it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
story | Story | required | The Story. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
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"}'{
"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.
DELETE /{namespace}/ stories/ {id}Path: id. Emits Story.deleted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Story. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
story | Story | required | The Story. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
Example
curl -X DELETE https: //api.sb/ leaseline.app/ stories/ story_ujkz1xjvrp \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"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"
}
}