> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/api-reference/identity-and-access-management-iam/directory-ui-states.md).

# Directory UI States

Operations related to Directory UI States for managing user interface state and preferences within the platform.

## GET /user/{user\_id}/ui\_states

> Search UI States of the user

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory UI States","description":"Operations related to Directory UI States for managing user interface state and preferences within the platform."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/user/{user_id}/ui_states":{"get":{"operationId":"findUIStates","parameters":[{"explode":false,"schema":{"type":"string"},"required":true,"name":"user_id","in":"path","description":"User ID","style":"simple"}],"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"first_result":{"type":"integer"},"max_results":{"type":"integer"},"status":{"type":"string","enum":["ok"]},"total":{"type":"integer"},"count":{"type":"integer"},"data":{"type":"array","items":{"$ref":"#/components/schemas/UiStateResource"}}},"required":["count","data","first_result","max_results","status","total"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Search UI States of the user","tags":["Directory UI States"]}}},"components":{"schemas":{"UiStateResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"user_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"state":{"type":"string","readOnly":false}},"required":["id","organisation_id","state","user_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## GET /user/{user\_id}/ui\_state/{id}

> Search UI State by Id

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory UI States","description":"Operations related to Directory UI States for managing user interface state and preferences within the platform."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/user/{user_id}/ui_state/{id}":{"get":{"description":"","tags":["Directory UI States"],"responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UiStateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"operationId":"findUIState","summary":"Search UI State by Id","parameters":[{"schema":{"type":"string"},"description":"User ID","required":true,"style":"simple","name":"user_id","in":"path","explode":false},{"explode":false,"schema":{"type":"string"},"required":true,"in":"path","description":"UiState ID","style":"simple","name":"id"}]}}},"components":{"schemas":{"UiStateResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"user_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"state":{"type":"string","readOnly":false}},"required":["id","organisation_id","state","user_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## POST /user/{user\_id}/ui\_state/{id}

> Create new UI State

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory UI States","description":"Operations related to Directory UI States for managing user interface state and preferences within the platform."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/user/{user_id}/ui_state/{id}":{"post":{"requestBody":{"description":"The UI State to create","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiStateResource"}}},"required":true},"description":"","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UiStateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"summary":"Create new UI State","parameters":[{"schema":{"type":"string"},"style":"simple","explode":false,"description":"User ID","required":true,"in":"path","name":"user_id"},{"explode":false,"schema":{"type":"string"},"in":"path","description":"UiState ID","style":"simple","required":true,"name":"id"}],"tags":["Directory UI States"],"operationId":"createNewUIState"}}},"components":{"schemas":{"UiStateResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"user_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"state":{"type":"string","readOnly":false}},"required":["id","organisation_id","state","user_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## PUT /user/{user\_id}/ui\_state/{id}

> Update UI State

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory UI States","description":"Operations related to Directory UI States for managing user interface state and preferences within the platform."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/user/{user_id}/ui_state/{id}":{"put":{"tags":["Directory UI States"],"parameters":[{"required":true,"style":"simple","explode":false,"description":"User ID","name":"user_id","schema":{"type":"string"},"in":"path"},{"description":"UiState ID","name":"id","in":"path","required":true,"style":"simple","schema":{"type":"string"},"explode":false}],"description":"","summary":"Update UI State","responses":{"200":{"description":"Success !","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]},"data":{"$ref":"#/components/schemas/UiStateResource"}},"required":["data","status"]}}}},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"requestBody":{"description":"The UI State to update","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UiStateResource"}}},"required":true},"operationId":"updateUIState"}}},"components":{"schemas":{"UiStateResource":{"type":"object","properties":{"id":{"type":"string","readOnly":true},"user_id":{"type":"string","readOnly":false},"organisation_id":{"type":"string","readOnly":false},"state":{"type":"string","readOnly":false}},"required":["id","organisation_id","state","user_id"]},"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}},"responses":{"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}}}}
```

## DELETE /user/{user\_id}/ui\_state/{id}

> Delete UI State of the user

```json
{"openapi":"3.1.1","info":{"title":"mediarithmics openapi API","version":"1.0.0"},"tags":[{"name":"Directory UI States","description":"Operations related to Directory UI States for managing user interface state and preferences within the platform."}],"servers":[{"url":"http://api.mediarithmics.local/v1","description":"Development server"},{"url":"https://api.mediarithmics.com/v1","description":"Production server"}],"paths":{"/user/{user_id}/ui_state/{id}":{"delete":{"parameters":[{"name":"user_id","explode":false,"style":"simple","required":true,"in":"path","description":"User ID","schema":{"type":"string"}},{"in":"path","required":true,"style":"simple","schema":{"type":"string"},"description":"UiState ID","explode":false,"name":"id"}],"operationId":"deleteUIStates","summary":"Delete UI State of the user","tags":["Directory UI States"],"responses":{"200":{"$ref":"#/components/responses/simple"},"400":{"$ref":"#/components/responses/error"},"401":{"$ref":"#/components/responses/error"},"403":{"$ref":"#/components/responses/error"},"404":{"$ref":"#/components/responses/error"},"500":{"$ref":"#/components/responses/error"},"503":{"$ref":"#/components/responses/error"}},"description":""}}},"components":{"responses":{"simple":{"description":"Success response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}},"required":["status"]}}}},"error":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/errorResponse"}}}}},"schemas":{"errorResponse":{"type":"object","properties":{"status":{"type":"string","enum":["error"]},"error_code":{"type":"string","enum":["AUTHENTICATION_ERROR","AUTHORIZATION_ERROR","BAD_REQUEST_DATA","BAD_REQUEST_FORMAT","CONSTRAINT_VIOLATION_EXCEPTION","EMAIL_ALREADY_EXISTS","MAC_ERROR","RESOURCE_NOT_FOUND","SERVICE_UNAVAILABLE","TOKEN_ERROR"]},"error_id":{"type":"string"},"error":{"type":"string"}},"required":["error","error_code","error_id","status"]}}}}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/api-reference/identity-and-access-management-iam/directory-ui-states.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
