requestSetup
RequestSetup sends a Customer’s admin a link to connect their own sign-in, directory or verified domain to the Tenant.
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. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
link | url | required | The single-use setup link, valid for 7 days. |
tenant | Tenant | required | The Tenant being set up. |
Effects
- Emits
Tenant.setupRequested. - Performed by the Security Engineer.
- Two-way: it runs at once, in the
try,sendanddomodes. - Sends the link to the admin; it sets up only what it names.
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. | Tenant.requestSetup |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |
Example
You, to your agent
Request setup the latest tenant with a person.
curl -X POST https: //api.sb/ tutorloop.com/ tenants/ tenant_1/ requestSetup \
-H "Authorization: Bearer $STARTUP_BUILDER_API_KEY" \
-H "Content-Type: application/ json" \
-d '{"admin": "person_1", "intent": "sso"}'
import { $ } from 'startup-builder'
const { link, tenant } = await $.Tenant.requestSetup({ tenant: 'tenant_1', admin: 'person_1', intent: 'sso' })
npx startup-builder do Tenant.requestSetup --json '{"tenant": "tenant_1", "admin": "person_1", "intent": "sso"}'
{
"name": "do",
"arguments": {
"code": "return await $.Tenant.requestSetup({ tenant: 'tenant_1', admin: 'person_1', intent: 'sso' })"
}
}