# Create a tenant

Source: https://www.jawsdeploy.net/rest-api/tenants-create | Section: Tenants

Add a new tenant to a workspace.

`POST /api/tenant`

Adds a tenant - one customer or site your projects are deployed to.

Tenants are part of the Professional plan and above. Every active (not archived) tenant in the organization counts towards the plan limit, across all workspaces. On a plan without tenants, or when the limit is reached, the request is refused with `409`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `workspaceId` | body | string | yes | ID of the workspace. |
| `name` | body | string | yes | Tenant name, unique in the workspace. Up to 200 characters. |
| `description` | body | string | no | Optional description. Up to 2000 characters. |
| `tagIds` | body | array<string> | no | IDs of workspace tags to put on the tenant, from [List tags](https://www.jawsdeploy.net/rest-api/tags-list). |

## Errors

| Status | Meaning |
|---|---|
| 400 | Invalid `workspaceId`, a validation failure, or a tag that is not in this workspace. |
| 401 | Missing or invalid Basic auth credentials, or the service account lacks permission to manage tenants in this workspace. |
| 409 | Your plan has no free tenant slot. The error code is `2002` and the message says what your plan allows. |

Example request:

```
POST /api/tenant HTTP/1.1
Authorization: Basic <base64(serviceAccountId:apiKey)>
Content-Type: application/json

{
  "workspaceId": "ws_abc",
  "name": "Acme",
  "description": "Acme production site",
  "tagIds": ["tag_eu"]
}
```

Example response:

```
{ "tenantId": "tnt_acme" }
```

