Skip to content

Interface commands: deprecate, sunset

The Interface Verbs deprecate, sunset as CLI commands, with inputs, result, refusals and an example.

Interface.deprecateMode do
curl -X POST https://api.sb/leaseline.app/interfaces/interface_TMyQ3kh9uX/deprecate \
  -H "Authorization: Bearer $SB_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"version":"Example version","sunsetAt":"2026-10-22"}'
API referenceInterface.deprecate
npx startup-builder do Interface.deprecate --data '{"interface":"interface_TMyQ3kh9uX","version":"Example version","sunsetAt":"2026-10-22"}'
CLI referenceInterface.deprecate
{
  "name": "do",
  "arguments": {
    "code": "return await $.Interface.deprecate({ interface: 'interface_TMyQ3kh9uX', version: 'Example version', sunsetAt: '2026-10-22' })"
  }
}
MCP referenceInterface.deprecate
import { $ } from 'startup-builder'

const result = await $.Interface.deprecate({ interface: 'interface_TMyQ3kh9uX', version: 'Example version', sunsetAt: '2026-10-22' })
SDK referenceInterface.deprecate

Reference for Interface, one group of Interface commands.

Interface.deprecate

Deprecate marks an API version for retirement, posts its sunset date and lists each Tenant still pinned to it. Verb page.

Text
npx startup-builder do Interface.deprecate --data '<input>' [--try | --send | --do]

Emits Interface.deprecated.

Inputs

InputTypeRequiredDescription
interfaceInterfacerequiredThe API.
versionstringrequiredThe version to retire, such as v1.
sunsetAtdaterequiredThe date it stops serving, once no Tenant pins it.

Returns

OutputTypeRequiredDescription
interfaceInterfacerequiredThe API, with the version deprecated.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operationforbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
interface is missing, or is not a interfaceinvalid-inputSend interface as a interface, then call it again.None.
version is missing, or is not a stringinvalid-inputSend version as a string, then call it again.None.
sunsetAt is missing, or is not a dateinvalid-inputSend sunsetAt as a date, then call it again.None.
The Idempotency-Key was sent before with another operation or other inputidempotency-mismatchSend a new key for new input; reuse a key only to retry the same request.None.

Example

Terminal
npx startup-builder do Interface.deprecate --data '{"interface":"interface_TMyQ3kh9uX","version":"Example version","sunsetAt":"2026-10-22"}' \
  --idempotency-key leaseline-interface-deprecate-1

Interface.sunset

Sunset stops serving a deprecated API version once no Tenant pins it. Verb page.

Text
npx startup-builder do Interface.sunset --data '<input>' [--try | --send | --do]

Emits Interface.sunsetted.

Inputs

InputTypeRequiredDescription
interfaceInterfacerequiredThe API.
versionstringrequiredThe deprecated version.

Returns

OutputTypeRequiredDescription
interfaceInterfacerequiredThe API, without the version.

Refuses when

CheckErrorFixThen call
The key is valid, but its scopes do not allow this operationforbiddenUse a key whose scopes cover the operation, or ask an owner of the namespace to grant them.None.
Any Tenant still pins the versionrefusedClear what the check names, then call it again.None.
interface is missing, or is not a interfaceinvalid-inputSend interface as a interface, then call it again.None.
version is missing, or is not a stringinvalid-inputSend version as a string, then call it again.None.
The Idempotency-Key was sent before with another operation or other inputidempotency-mismatchSend a new key for new input; reuse a key only to retry the same request.None.

Example

Terminal
npx startup-builder do Interface.sunset --data '{"interface":"interface_TMyQ3kh9uX","version":"Example version"}' \
  --idempotency-key leaseline-interface-sunset-1