Skip to content

Company routes: update

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

Reference for Company, one group of Company routes.

Company.update

Changes the given properties of a Company. Verb page.

Text
PATCH /{namespace}/companies/{id}

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

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Company.
namestringThe legal or personal name.
legalNamestringThe registered name.
jurisdictionstringWhere it is incorporated.

Returns

OutputTypeRequiredDescription
companyCompanyrequiredThe Company.

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/companies/company_28zYNZEno0 \
  -H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"legalName":"Leaseline Inc."}'
JSON
{
  "api": "https://api.sb/leaseline.app",
  "company": {
    "$id": "https://api.sb/leaseline.app/companies/company_28zYNZEno0",
    "$type": "Company",
    "name": "Leaseline",
    "legalName": "Leaseline Inc.",
    "jurisdiction": "US-DE",
    "status": "forming"
  },
  "action": {
    "$id": "https://api.sb/leaseline.app/actions/act_br07HsG8MG",
    "operation": "Company.update",
    "status": "done"
  },
  "links": {
    "self": "https://api.sb/leaseline.app/actions/act_br07HsG8MG"
  }
}