Skip to content

requestSetup

RequestSetup sends a Customer’s admin a link to connect their own sign-in, directory or verified domain to the Tenant.

Inputs

InputTypeRequiredDescription
tenantTenantrequiredThe Tenant to set up.
adminPersonrequiredThe Customer’s admin who receives the link.
intentstringrequiredWhat the link sets up.

Outputs

OutputTypeRequiredDescription
linkurlrequiredThe single-use setup link, valid for 7 days.
tenantTenantrequiredThe Tenant being set up.

Effects

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.Tenant.requestSetup

When it waits

GateDefault
Decision classLow: two-way, nothing at stake
Delay windowNone: it runs once review passes.
LimitThe call Limit of the Permission it runs under.
Over the LimitIt 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

Tenant.requestSetupMode do
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' })"
  }
}