Tarsana docsDashboardMenu

Create your tenant

Change · POST /v1/tenants · MCP tool create-tenant

Creates your tenant with you as its owner, together with its organisation and its signing keys. Send your organisation's name; the tenant ID is made from it unless you send one. A tenant ID cannot be changed later, and in this version a profile belongs to one tenant. The answer contains a new session that includes your tenant: use it from now on, because the session you sent is ended. You need to be signed in with a session.

Roles that can call it: viewer, builder, deployer.

Parameters

NameInRequiredDescription
organisation_namebodyyesYour organisation's name, as you want it shown
tenant_idbodynoThe tenant ID you want: lower-case letters, digits, dots, dashes and underscores, up to 64 characters. Leave it out to use the one made from your organisation's name

Returns

A JSON object with these keys: tenant, organisation_name, membership_role, organisation, organisation_keyid, tenant_keyid, session, login, scopes, tenants, expires_at, guarantee, caller_authenticated.

Example request

curl -X POST https://api.tarsana.io/v1/tenants \
  -H "X-Tarsana-Session: $SESSION" \
  -H "Content-Type: application/json" \
  --data '{"organisation_name": "Acme", "tenant_id": "acme"}'

Example response

{
  "tenant": "acme",
  "organisation_name": "Acme",
  "membership_role": "owner",
  "organisation": "acme",
  "organisation_keyid": "52f4abfbd90c302b88a5e4d5c064359be50df2a216f0d65b2fa20126acd08648",
  "tenant_keyid": "b83885e535fd96136c6225f3faaf71c09ca752830e955da293769cfba0554bda",
  "session": "YOUR-SESSION",
  "login": "you@example.com",
  "scopes": [
    "operate",
    "read",
    "submit"
  ],
  "tenants": [
    "acme"
  ],
  "expires_at": "2026-10-05T03:15:39Z",
  "guarantee": "namespaces are separated, callers are not authenticated",
  "caller_authenticated": false
}

Errors

CodeHTTPWhat it means
invalid_parameter400A value in your request does not have the expected format, for example a submission ID that is not a spec hash. Check the value against the field's description and try again.
tenant_refused400This tenant ID is not allowed or not in the expected format, or your spec names a different tenant in metadata.tenant. The message says what to change; an ID is made of lower-case letters, digits, dots, dashes and underscores.
tenant_taken409This tenant ID is already taken. Choose a different ID.
already_onboarded409Your profile already belongs to a tenant, and in this version a profile belongs to one tenant. Open your dashboard to work in it.
unauthenticated401Your request has no credential, or one that Tarsana does not recognise. Sign in with login, or send a valid access token.
forbidden403Your role does not allow this operation. The response names the roles that do; ask for a credential with one of them.
sign_in_not_configured503Signing in with an email link is not available on this Tarsana deployment. Contact Tarsana support.
rate_limited429You sent too many requests in a short time. Wait for the number of seconds in retry_after_seconds, then try again.
surface_fault500Something went wrong on our side. Try again later, and contact Tarsana support if it keeps happening.

View this page as Markdown