Skip to content
Community forum

GET /api/v1/tenants?status=pending returns nothing

SolvedSupero SupportSupero team asked

Common question, written up by the Supero team.

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.

Link

1 answer

Accepted answer
Accepted 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}.

Supero Platform teamSupero team answered
Link

Your answer

GET /api/v1/tenants?status=pending returns nothing | Supero Community