Skip to content

Create tenant

Request to create a new tenant:

POST /api/v2/tenants.json

The request body contains the tenant object. name is required. Attributes that are not included take their default values.

For example:

{
    "tenant": {
        "name": "Acme",
        "timezone": "Europe/London",
        "fieldset_licensing": {
            "recording_seats": 50,
            "evaluation_seats": 10
        }
    }
}

The role of the API user needs the Create action of the Tenants permission, which is available to roles with the System, All Tenants, or Selected Tenants access scope.

Response contains HTTP status code as shown in the following table.

Response Description
201 Created

The tenant has been successfully created. The Location header and the response body contain the URL of the new tenant:

HTTP/1.1 201 Created
Location: /api/v2/tenants/e011c408-f288-11e4-9b73-e03f497dbdff.json

{"url": "/api/v2/tenants/e011c408-f288-11e4-9b73-e03f497dbdff.json"} | | 400 Bad Request |

The request cannot be completed because the supplied JSON object has invalid data.

The response contains a detailed description of the error, like:

{"error": "InvalidRecord", "explanation": "Record Validation errors", "details": {"name": "Tenant with such name exists already"}}
| | 403 Forbidden | The request cannot be completed because API user has no permission to create tenants |