Startup routes: claim, clone, hold, import
The Startup Verbs claim, clone, hold, import as api.sb routes, with inputs, result, refusals and an example.
Reference for Startup, one group of Startup routes.
Startup.claim
Claim binds a provisional Startup to a verified owner, which enables payments and every Verb that moves money. Verb page.
POST /{namespace}/ startups/ {startup}/ claimPath: startup. Body, as JSON: the other inputs. Emits Startup.claimed.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
startup | Startup | required | The provisional Startup. |
claimToken | string | required | The token issued when the Startup was created. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
startup | Startup | required | The Startup, now owned. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read the schema of the operation, then send every required field with the right type. | None. |
| 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. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ startups/ startup_l3hr1EnUGY/ claim \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"claimToken": "Example claim token"}'{
"api": "https: //api.sb/ leaseline.app",
"startup": {
"$id": "https: //api.sb/ leaseline.app/ startups/ startup_l3hr1EnUGY",
"$type": "Startup",
"name": "Leaseline"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Startup.claim",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Startup.clone
Clone copies a Startup’s definition into a new Startup once, with no link back to the source. Verb page.
POST /{namespace}/ startups/ {startup}/ clonePath: startup. Body, as JSON: the other inputs. Emits Startup.cloned.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
startup | Startup | required | The Startup to copy. |
name | string | required | The new Startup’s name. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
clone | Startup | required | The new Startup, in Idea. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read the schema of the operation, then send every required field with the right type. | None. |
| 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 POST https: //api.sb/ leaseline.app/ startups/ startup_l3hr1EnUGY/ clone \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"name": "Leaseline"}'{
"api": "https: //api.sb/ leaseline.app",
"clone": {
"$id": "https: //api.sb/ leaseline.app/ startups/ startup_l3hr1EnUGY",
"$type": "Startup",
"name": "Leaseline"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Startup.clone",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Startup.hold
Hold keeps a Startup running in its current Lifecycle state with no new investment from the Studio. Verb page.
POST /{namespace}/ startups/ {startup}/ holdPath: startup. Body, as JSON: the other inputs. Emits Startup.held.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
startup | Startup | required | The Startup to hold. |
reason | text | Why the Studio holds it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
startup | Startup | required | The Startup, now on Hold. |
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. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ startups/ startup_l3hr1EnUGY/ hold \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"{
"api": "https: //api.sb/ leaseline.app",
"startup": {
"$id": "https: //api.sb/ leaseline.app/ startups/ startup_l3hr1EnUGY",
"$type": "Startup",
"name": "Leaseline"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Startup.hold",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}Startup.import
Import builds a new Startup from an existing business’s definition: its Offers, Pages, Nouns and Processes. Verb page.
POST /{namespace}/ startups/ importBody, as JSON: the inputs. Emits Startup.imported.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
source | url | required | The existing business’s site or export. |
template | Template | The Template to map the definition onto. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
startup | Startup | required | The new Startup, in Idea. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The input does not match the schema of the operation. | invalid-input | Read the schema of the operation, then send every required field with the right type. | None. |
| 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. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
curl -X POST https: //api.sb/ leaseline.app/ startups/ import \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"source": "https: //leaseline.app"}'{
"api": "https: //api.sb/ leaseline.app",
"startup": {
"$id": "https: //api.sb/ leaseline.app/ startups/ startup_VBluhMC0sH",
"$type": "Startup",
"name": "Leaseline"
},
"action": {
"$id": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG",
"operation": "Startup.import",
"status": "done"
},
"links": {
"self": "https: //api.sb/ leaseline.app/ actions/ act_br07HsG8MG"
}
}