We create customer tenants with create_admin_user: true and want to list the ones whose admin hasn't activated yet. Filtering on status=pending returns an empty list.
GET /api/v1/tenants?status=pending returns nothing
Common question, written up by the Supero team.
1 answer
status has no pending value. A tenant's status is active, suspended or archived, plus pending_setup, which is reserved and never written. The create endpoint always writes active, whether or not it created an admin user who still has to activate.
Activation is tracked separately in activation_status, which is pending or active. It's on the create response and on the tenant record, so filter on that. For a tenant that's still waiting, POST /api/v1/tenants/{uuid}/resend-activation sends the admin's activation email again.
status itself only moves through the action endpoints: /activate, /suspend, /unsuspend and /archive under /api/v1/tenants/{uuid}.
Your answer
Know the answer? Sign in to post it. It takes an email address and a 6-digit code.
Sign in to answer