# Tenants

## GET /tenants

> List all tenants.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/tenants":{"get":{"tags":["Tenants"],"description":"List all tenants.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"name":{"type":"string"},"photo_url_template":{"type":"string"},"site_count":{"type":"number"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}}}}}}}
```

## POST /tenants

> Create a tenant.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/tenants":{"post":{"tags":["Tenants"],"description":"Create a tenant.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"photo_url_template":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response"}}}}}}
```

## GET /tenants/{tenantId}

> Retrieve a single tenant.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/tenants/{tenantId}":{"get":{"tags":["Tenants"],"description":"Retrieve a single tenant.","parameters":[{"schema":{"type":"string"},"in":"path","name":"tenantId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```

## PATCH /tenants/{tenantId}

> Update a tenant.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/tenants/{tenantId}":{"patch":{"tags":["Tenants"],"description":"Update a tenant.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"photo_url_template":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"tenantId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```

## POST /tenants/{tenantId}/sites/{siteId}

> Assign a site to a tenant.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/tenants/{tenantId}/sites/{siteId}":{"post":{"tags":["Tenants"],"description":"Assign a site to a tenant.","parameters":[{"schema":{"type":"string"},"in":"path","name":"tenantId","required":true},{"schema":{"type":"string"},"in":"path","name":"siteId","required":true}],"responses":{"200":{"description":"Default Response"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kitehouse.co.uk/docs/api-reference/tenants.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
