Tenant commands: invite, pin, provision, requestSetup
The Tenant Verbs invite, pin, provision, requestSetup as CLI commands, with inputs, result, refusals and an example.
Reference for Tenant, one group of Tenant commands.
Tenant.invite
Invite asks a Person to join a Customer’s Tenant, and resizes the Subscription when the Offer prices per member. Verb page.
npx startup-builder do Tenant.invite --json '<input>' [--try | --send | --do]Emits Tenant.invited.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Customer’s Tenant. |
email | email | required | Where the invitation goes. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
person | Person | required | The invited Person. |
tenant | Tenant | required | The Tenant the Person was invited to. |
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. |
Example
npx startup-builder do Tenant.invite --json '{"tenant": "ten_Bu63f0he26", "email": "dana@leaseline.app"}'Tenant.pin
Pin moves a Tenant’s keys to another API version, or to latest, once a call with its test key passes there. Verb page.
npx startup-builder do Tenant.pin --json '<input>' [--try | --send | --do]Emits Tenant.pinned.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Tenant whose keys move. |
apiVersion | string | required | The version to answer at, such as v2, or latest to track the newest. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Tenant, answering at its new 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. |
| Until a call with the Tenant’s test key succeeds at the target version | refused | Clear what the check names, then call it again. | None. |
Example
npx startup-builder do Tenant.pin --json '{"tenant": "ten_Bu63f0he26", "apiVersion": "v2"}'Tenant.provision
Provision creates a Customer’s Tenant in a Startup’s App, holding that Customer’s records apart from every other. Verb page.
npx startup-builder do Tenant.provision --json '<input>' [--try | --send | --do]Emits Tenant.provisioned.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
customer | Customer | required | The Customer the Tenant serves. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The new Tenant. |
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The operation is part of an Offer the caller has not accepted or paid for. | payment-required | Accept the Offer named in the response, then retry the call. | Offer.accept |
| 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. |
| The record is not in a state that allows this Verb, so the call is refused. | refused | Read the record, run the Verb that moves it to an allowed state, then retry. | None. |
Example
npx startup-builder do Tenant.provision --json '{"customer": "cus_K1BROJhqzZ"}'Tenant.requestSetup
RequestSetup sends a Customer’s admin a link to connect their own sign-in, directory or verified domain to the Tenant. Verb page.
npx startup-builder do Tenant.requestSetup --json '<input>' [--try | --send | --do]Emits Tenant.setupRequested.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
tenant | Tenant | required | The Tenant to set up. |
admin | Person | required | The Customer’s admin who receives the link. |
intent | string | required | What the link sets up. |
Returns
| Output | Type | Required | Description |
|---|---|---|---|
link | url | required | The single-use setup link, valid for 7 days. |
tenant | Tenant | required | The Tenant being set up. |
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. |
Example
npx startup-builder do Tenant.requestSetup --json '{"tenant": "ten_Bu63f0he26", "admin": "person_sLqbXbW683", "intent": "sso"}'