Interface commands: deprecate, sunset
The Interface Verbs deprecate, sunset as CLI commands, with inputs, result, refusals and an example.
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 reference
Interface.deprecatenpx startup-builder do Interface.deprecate --data '{"interface": "interface_TMyQ3kh9uX", "version": "Example version", "sunsetAt": "2026-10-22"}'
CLI reference
Interface.deprecate{
"name": "do",
"arguments": {
"code": "return await $.Interface.deprecate({ interface: 'interface_TMyQ3kh9uX', version: 'Example version', sunsetAt: '2026-10-22' })"
}
}
MCP reference
Interface.deprecateimport { $ } from 'startup-builder'
const result = await $.Interface.deprecate({ interface: 'interface_TMyQ3kh9uX', version: 'Example version', sunsetAt: '2026-10-22' })
SDK reference
Interface.deprecateReference 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.
npx startup-builder do Interface.deprecate --data '<input>' [--try | --send | --do]Emits Interface.deprecated.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
interface | Interface | required | The API. |
version | string | required | The version to retire, such as v1. |
sunsetAt | date | required | The date it stops serving, once no Tenant pins it. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
interface | Interface | required | The API, with the version deprecated. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation | forbidden | Use 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 interface | invalid-input | Send interface as a interface, then call it again. | None. |
version is missing, or is not a string | invalid-input | Send version as a string, then call it again. | None. |
sunsetAt is missing, or is not a date | invalid-input | Send sunsetAt as a date, then call it again. | None. |
The Idempotency-Key was sent before with another operation or other input | idempotency-mismatch | Send a new key for new input; reuse a key only to retry the same request. | None. |
Example
npx startup-builder do Interface.deprecate --data '{"interface": "interface_TMyQ3kh9uX", "version": "Example version", "sunsetAt": "2026-10-22"}' \
--idempotency-key leaseline-interface-deprecate-1Interface.sunset
Sunset stops serving a deprecated API version once no Tenant pins it. Verb page.
npx startup-builder do Interface.sunset --data '<input>' [--try | --send | --do]Emits Interface.sunsetted.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
interface | Interface | required | The API. |
version | string | required | The deprecated version. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
interface | Interface | required | The API, without the version. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | None. |
| Any Tenant still pins the version | refused | Clear what the check names, then call it again. | None. |
interface is missing, or is not a interface | invalid-input | Send interface as a interface, then call it again. | None. |
version is missing, or is not a string | invalid-input | Send version as a string, then call it again. | None. |
The Idempotency-Key was sent before with another operation or other input | idempotency-mismatch | Send a new key for new input; reuse a key only to retry the same request. | None. |
Example
npx startup-builder do Interface.sunset --data '{"interface": "interface_TMyQ3kh9uX", "version": "Example version"}' \
--idempotency-key leaseline-interface-sunset-1