# Create your tenant {#top}

**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

| Name | In | Required | Description |
|---|---|---|---|
| `organisation_name` | body | yes | Your organisation's name, as you want it shown |
| `tenant_id` | body | no | The 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

```sh
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

```json
{
  "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

| Code | HTTP | What it means |
|---|---|---|
| [`invalid_parameter`](/api/errors#invalid_parameter) | 400 | A 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_refused`](/api/errors#tenant_refused) | 400 | This 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_taken`](/api/errors#tenant_taken) | 409 | This tenant ID is already taken. Choose a different ID. |
| [`already_onboarded`](/api/errors#already_onboarded) | 409 | Your profile already belongs to a tenant, and in this version a profile belongs to one tenant. Open your dashboard to work in it. |
| [`unauthenticated`](/api/errors#unauthenticated) | 401 | Your request has no credential, or one that Tarsana does not recognise. Sign in with `login`, or send a valid access token. |
| [`forbidden`](/api/errors#forbidden) | 403 | Your role does not allow this operation. The response names the roles that do; ask for a credential with one of them. |
| [`sign_in_not_configured`](/api/errors#sign_in_not_configured) | 503 | Signing in with an email link is not available on this Tarsana deployment. Contact Tarsana support. |
| [`rate_limited`](/api/errors#rate_limited) | 429 | You sent too many requests in a short time. Wait for the number of seconds in `retry_after_seconds`, then try again. |
| [`surface_fault`](/api/errors#surface_fault) | 500 | Something went wrong on our side. Try again later, and contact Tarsana support if it keeps happening. |
