Skip to content

Opening routes: update, delete

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

Reference for Opening, one group of Opening routes.

Opening.update

Changes the given properties of an Opening. Verb page.

Text
PATCH /{namespace}/openings/{id}

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

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Opening.
roleRoleThe Role the Human joins, by taking a share of it.
kindstringOne of floor, contractor, employee, or cofounder.
reasonstringOne of floor, credential, edge, relationship, capital, capacity, or distribution.
hypothesisHypothesisThe result a hire must beat the incumbent Agent on.
skillslist of SkillThe Skills required, each citing the Evidence that shows the gap.
credentialslist of CredentialThe Credentials a Reserved Act in the Role requires.
commitmentstringHours per week, from a few hours to full time.
termsurlThe published terms for this kind of Opening.
listedbooleanTrue once the Opening is public; unlisted Openings reach only the talent pool.

Returns

OutputTypeRequiredDescription
openingOpeningrequiredThe Opening.

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/openings/opening_3rD8qFSOyQ \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"role":"role_oloMFMUeCH"}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "opening": {
    "$id": "https://api.sb/leaseline.app/openings/opening_3rD8qFSOyQ",
    "$type": "Opening",
    "role": "role_oloMFMUeCH",
    "kind": "floor",
    "reason": "floor",
    "hypothesis": "hypothesis_Z1gjx1kbtc"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Opening.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}

Opening.delete

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

Text
DELETE /{namespace}/openings/{id}

Path: id. Emits Opening.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Opening.

Returns

OutputTypeRequiredDescription
openingOpeningrequiredThe Opening.

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/openings/opening_3rD8qFSOyQ \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY"
JSON
{
  "api": "https://api.sb/leaseline.app",
  "opening": {
    "$id": "https://api.sb/leaseline.app/openings/opening_3rD8qFSOyQ",
    "$type": "Opening",
    "role": "role_oloMFMUeCH",
    "kind": "floor",
    "reason": "floor",
    "hypothesis": "hypothesis_Z1gjx1kbtc"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Opening.delete",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}