All posts
Tenancy· 4 min

One tenant, one spelling

Why DevSewa refuses “Acme-EU” instead of quietly turning it into “acme_eu”.

Every product in DevSewa keys data on the tenant: users live in a collection named after it, mail is attributed to it, the vault derives per-user namespaces from it. That makes the tenant name the single most important string in the platform, and the one it is easiest to get subtly wrong.

The tempting design is to normalise. Lowercase everything, replace punctuation with underscores, move on. The trouble is that normalisation is not injective: Acme-EU, acme.eu and ACME_EU all fold to the same slug, and if a caller ever sent the unfolded form to a system that did not fold, you would have two customers where you meant one.

So DevSewa does the boring thing. A tenant has exactly one spelling — lowercase letters, digits, single underscores — and anything else is rejected with a 400 that names the spelling to use. The console suggests a slug from your display name and lets you edit it, but it will not save a variant.

POST /v1/applications
{ "display_name": "Acme EU", "tenant": "Acme-EU", "environment": "test" }

→ 400 { "detail": "tenant_not_canonical: use \"acme_eu\"" }

Once created, the slug is permanent. Renaming would orphan data in engines DevSewa cannot reach into. A tenant move is a migration with a human in the loop, not a text field.

Give your application a backend it does not have to run.

Create an account, register a test application and exchange your first ticket in under ten minutes.