Skip to content

Startup routes: update, delete

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

Reference for Startup, one group of Startup routes.

Startup.update

Changes the given properties of a Startup. Verb page.

Text
PATCH /{namespace}/startups/{id}

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

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Startup.
namestringThe name the Startup trades under.
domainurlThe canonical hostname of the Startup.
launchedAtdatetimeWhen the Startup went live.
templatestringThe slug of the template it extends; the root one when none is named.
ideatextThe Idea it starts from, in a sentence, recorded as its Idea.
spendStatestringHow freely money Limits allow spend: free, tight (discretionary Limits halved) or hold (one-way spend stops).

Returns

OutputTypeRequiredDescription
startupStartuprequiredThe Startup.

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/startups/startup_l3hr1EnUGY \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Leaseline"}'
JSON
{
  "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.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Startup.delete

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

Text
DELETE /{namespace}/startups/{id}

Path: id. Emits Startup.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Startup.

Returns

OutputTypeRequiredDescription
startupStartuprequiredThe Startup.

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/startups/startup_l3hr1EnUGY \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "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.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}