Skip to content

Update tenant

Request to update an existing tenant:

PUT /api/v2/tenants/<tenant-id>.json

The request body contains the attributes of the tenant object to change. Attributes that are not included keep their values, including the attributes inside a fieldset.

For example:

{
    "tenant": {
        "name": "New Tenant Name",
        "fieldset_rate_limits": {
            "api_requests": {"per_minute": 200, "per_day": 10000}
        }
    }
}

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

Response Description
200 OK The tenant has been successfully updated. The response body contains the complete tenant object after the update
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 edit tenants
404 Not Found Tenant with such ID does not exist, or it is outside the access scope of the API user