Skip to content

Credential methods: update, delete

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

Reference for Credential, one group of Credential methods.

Credential.update

Changes the given properties of a Credential. Verb page.

TypeScript
interface CredentialVerbs {
  update(input: CredentialUpdateInput, options?: SB.CallOptions): SB.Call<Credential>
}

Emits Credential.updated.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Credential.
issuerstringThe regulator or registry that grants it.
jurisdictionstringWhere it applies.
standingstringWhether it is in good standing, read fresh on every use.

Returns

OutputTypeRequiredDescription
credentialCredentialrequiredThe Credential.

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 credential = await $.Credential.update({ id: 'credential_Abb9zatRR1', jurisdiction: 'US-DE' })

Credential.delete

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

TypeScript
interface CredentialVerbs {
  delete(input: CredentialDeleteInput, options?: SB.CallOptions): SB.Call<Credential>
}

Emits Credential.deleted.

Inputs

InputTypeRequiredDescription
idstringrequiredThe id of the Credential.

Returns

OutputTypeRequiredDescription
credentialCredentialrequiredThe Credential.

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 credential = await $.Credential.delete({ id: 'credential_Abb9zatRR1' })