> For the complete documentation index, see [llms.txt](https://kitehouse.co.uk/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kitehouse.co.uk/docs/api-reference/auth.md).

# Auth

## GET /users/@me

> Retrieve the user's own profile.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/@me":{"get":{"tags":["Auth"],"description":"Retrieve the user's own profile.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"_id":{"type":"string"},"email":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"photo_url":{"type":"string"},"last_site":{"type":"string"}},"required":["_id","email","first_name","last_name","photo_url"]}}}}}}}}}
```

## POST /users/avatar

> Generate a presigned URL for a user avatar

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/avatar":{"post":{"tags":["Auth"],"description":"Generate a presigned URL for a user avatar","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content_type"],"properties":{"content_type":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string"},"object_id":{"type":"string"}},"required":["url","object_id"]}}}}}}}}}
```

## PUT /users/avatar

> Upload a user avatar

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/avatar":{"put":{"tags":["Auth"],"description":"Upload a user avatar","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["object_id"],"properties":{"object_id":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"raw_url":{"type":"string"},"source_uri":{"type":"string"},"uploaded":{"type":"boolean"},"object_id":{"type":"string"}},"required":["raw_url","source_uri","uploaded","object_id"]}}}}}}}}}
```

## PATCH /users/@me/hint

> Set the last site hint for a user.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/@me/hint":{"patch":{"tags":["Auth"],"description":"Set the last site hint for a user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"site_id":{"type":"string"}},"required":["site_id"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}}}}}}}
```

## POST /users/password-reset/request

> Request a password reset email.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/password-reset/request":{"post":{"tags":["Auth"],"description":"Request a password reset email.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}}}}}}}
```

## POST /users/password-reset/reset

> Reset password using a reset token.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/password-reset/reset":{"post":{"tags":["Auth"],"description":"Reset password using a reset token.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["token","password"],"properties":{"token":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}}}}
```

## POST /users/sessions/

> Login a user.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/sessions/":{"post":{"tags":["Auth"],"description":"Login a user.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"new_password":{"type":"string"}}}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"]}}}}}}}}}
```

## DELETE /users/sessions/

> Logout a user.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/sessions/":{"delete":{"tags":["Auth"],"description":"Logout a user.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}}}}}}}
```

## POST /users/sessions/refresh

> Refresh the access token.

```json
{"openapi":"3.0.3","info":{"title":"Incident Tracker API","version":"1.0.0"},"servers":[{"url":"https://api.kitehouse.co.uk"}],"paths":{"/users/sessions/refresh":{"post":{"tags":["Auth"],"description":"Refresh the access token.","responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"access":{"type":"boolean"}},"required":["access"]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
