> For the complete documentation index, see [llms.txt](https://access-hub.gitbook.io/access-hub-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://access-hub.gitbook.io/access-hub-docs/models.md).

# Models

## The HealthResponse object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"HealthResponse":{"type":"object","required":["message","status"],"properties":{"message":{"type":"string"},"status":{"type":"string"}}}}}}
```

## The RegistrationRequest object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"RegistrationRequest":{"type":"object","required":["username","email","password"],"properties":{"username":{"type":"string","minLength":3},"email":{"type":"string","format":"email"},"password":{"type":"string","format":"password","minLength":8,"writeOnly":true},"full_name":{"type":"string","nullable":true,"maxLength":150}}}}}}
```

## The LoginRequest object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"LoginRequest":{"type":"object","required":["identifier","password"],"properties":{"identifier":{"type":"string","description":"Registered username or email address."},"password":{"type":"string","format":"password","writeOnly":true}}}}}}
```

## The PublicUser object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"PublicUser":{"type":"object","required":["id","username","email","is_active","is_suspended"],"properties":{"id":{"type":"integer"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"full_name":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"is_suspended":{"type":"boolean"}}}}}}
```

## The CurrentUser object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"CurrentUser":{"allOf":[{"$ref":"#/components/schemas/PublicUser"},{"type":"object","required":["role"],"properties":{"role":{"type":"string","nullable":true}}}]},"PublicUser":{"type":"object","required":["id","username","email","is_active","is_suspended"],"properties":{"id":{"type":"integer"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"full_name":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"is_suspended":{"type":"boolean"}}}}}}
```

## The TokenPair object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"TokenPair":{"type":"object","required":["access_token","refresh_token","token_type"],"properties":{"access_token":{"type":"string","description":"Short-lived JWT used to authorize API requests."},"refresh_token":{"type":"string","description":"Long-lived JWT used only at the refresh endpoint."},"token_type":{"type":"string"}}}}}}
```

## The AccessTokenResponse object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"AccessTokenResponse":{"type":"object","required":["access_token","token_type"],"properties":{"access_token":{"type":"string","description":"Newly issued short-lived JWT."},"token_type":{"type":"string"}}}}}}
```

## The ProtectedResponse object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"ProtectedResponse":{"type":"object","required":["message","user_id"],"properties":{"message":{"type":"string"},"user_id":{"type":"integer"}}}}}}
```

## The MessageResponse object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"MessageResponse":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}}
```

## The ProfileUpdate object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"ProfileUpdate":{"type":"object","additionalProperties":false,"properties":{"full_name":{"type":"string","nullable":true,"maxLength":150}}}}}}
```

## The UserPage object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"UserPage":{"type":"object","required":["users","page","per_page","total","total_pages"],"properties":{"users":{"type":"array","items":{"$ref":"#/components/schemas/PublicUser"}},"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}},"PublicUser":{"type":"object","required":["id","username","email","is_active","is_suspended"],"properties":{"id":{"type":"integer"},"username":{"type":"string"},"email":{"type":"string","format":"email"},"full_name":{"type":"string","nullable":true},"is_active":{"type":"boolean"},"is_suspended":{"type":"boolean"}}}}}}
```

## The RoleInput object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"RoleInput":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","nullable":true,"maxLength":255}}}}}}
```

## The Role object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"Role":{"allOf":[{"$ref":"#/components/schemas/RoleInput"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}}]},"RoleInput":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","nullable":true,"maxLength":255}}}}}}
```

## The NullableRole object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"NullableRole":{"nullable":true,"allOf":[{"$ref":"#/components/schemas/Role"}]},"Role":{"allOf":[{"$ref":"#/components/schemas/RoleInput"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}}]},"RoleInput":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","nullable":true,"maxLength":255}}}}}}
```

## The PermissionInput object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"PermissionInput":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","nullable":true,"maxLength":255}}}}}}
```

## The Permission object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"Permission":{"allOf":[{"$ref":"#/components/schemas/PermissionInput"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}}]},"PermissionInput":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","nullable":true,"maxLength":255}}}}}}
```

## The RoleAssignment object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"RoleAssignment":{"type":"object","additionalProperties":false,"required":["role_id"],"properties":{"role_id":{"type":"integer","minimum":1}}}}}}
```

## The RoleAssignmentResponse object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"RoleAssignmentResponse":{"type":"object","required":["message","user_id","role"],"properties":{"message":{"type":"string"},"user_id":{"type":"integer"},"role":{"$ref":"#/components/schemas/Role"}}},"Role":{"allOf":[{"$ref":"#/components/schemas/RoleInput"},{"type":"object","required":["id"],"properties":{"id":{"type":"integer"}}}]},"RoleInput":{"type":"object","additionalProperties":false,"required":["name"],"properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","nullable":true,"maxLength":255}}}}}}
```

## The ForgotPasswordRequest object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"ForgotPasswordRequest":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"}}}}}}
```

## The ResetPasswordRequest object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"ResetPasswordRequest":{"type":"object","required":["token","password"],"properties":{"token":{"type":"string","description":"Raw one-time token received in the reset link."},"password":{"type":"string","format":"password","minLength":8,"writeOnly":true}}}}}}
```

## The AuditLog object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"AuditLog":{"type":"object","required":["id","action","status","created_at"],"properties":{"id":{"type":"integer"},"user_id":{"type":"integer","nullable":true},"action":{"type":"string"},"status":{"type":"string"},"ip_address":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}}}}}}
```

## The AuditLogPage object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"AuditLogPage":{"type":"object","required":["events","page","per_page","total","total_pages"],"properties":{"events":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"}},"page":{"type":"integer"},"per_page":{"type":"integer"},"total":{"type":"integer"},"total_pages":{"type":"integer"}}},"AuditLog":{"type":"object","required":["id","action","status","created_at"],"properties":{"id":{"type":"integer"},"user_id":{"type":"integer","nullable":true},"action":{"type":"string"},"status":{"type":"string"},"ip_address":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time"}}}}}}
```

## The Error object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"string"}}}}}}
```

## The JwtError object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"JwtError":{"type":"object","required":["msg"],"properties":{"msg":{"type":"string"}}}}}}
```

## The ValidationErrors object

```json
{"openapi":"3.0.3","info":{"title":"Access Hub API","version":"0.2.0"},"components":{"schemas":{"ValidationErrors":{"type":"object","required":["errors"],"properties":{"errors":{"type":"object","additionalProperties":{"type":"string"}}}}}}}
```


---

# 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://access-hub.gitbook.io/access-hub-docs/models.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.
