Skip to content

Organization methods: update, delete

The Organization Verbs update, delete as typed SDK methods, with inputs, result, refusals and an example.

Reference for Organization, one group of Organization methods.

Organization.update

Changes the given properties of an Organization. Verb page.

TypeScript
interface OrganizationVerbs {
  update(input: OrganizationUpdateInput, options?: SB.CallOptions): SB.Call<Organization>
}

Emits Organization.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Organization.
namestringThe name it trades under.
hostnamestringThe web domain that keys it.

Returns

OutputTypeRequiredDescription
organizationOrganizationrequiredThe Organization.

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

TypeScript
import { $ } from 'startup-builder'

const organization = await $.Organization.update({ id: 'organization_v0SkRLrXCN', name: 'Leaseline' })

Organization.delete

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

TypeScript
interface OrganizationVerbs {
  delete(input: OrganizationDeleteInput, options?: SB.CallOptions): SB.Call<Organization>
}

Emits Organization.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Organization.

Returns

OutputTypeRequiredDescription
organizationOrganizationrequiredThe Organization.

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

TypeScript
import { $ } from 'startup-builder'

const organization = await $.Organization.delete({ id: 'organization_v0SkRLrXCN' })