> For the complete documentation index, see [llms.txt](https://apidocs.akinon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.akinon.com/commerce-openapis/admin/user-field-history/list-user-field-history.md). Agents can also search and read this documentation through its [MCP server](https://apidocs.akinon.com/~gitbook/mcp).

# List user field history

Returns a paginated list of user permission field change records. Each record captures a single field change — the field name, its new value, the source of the change, and when it happened.

Tracked fields: `email_allowed`, `sms_allowed`, `call_allowed`, `whatsapp_allowed`.

Results are ordered by `created_date` descending by default (most recent first). Use `?sort=created_date` for ascending or `?sort=-created_date` for descending.

```json
{"openapi":"3.1.0","info":{"title":"Admin API","version":"1.0.0"},"tags":[{"name":"User Field History","description":"Administrative endpoint for reading **user field change history** — a read-only audit log that records when and why a user's permission fields changed.\n\n## Tracked Fields\n\n| Field | Description |\n|-------|-------------|\n| `email_allowed` | Whether the user has opted in to email communication. |\n| `sms_allowed` | Whether the user has opted in to SMS communication. |\n| `call_allowed` | Whether the user has opted in to phone call communication. |\n| `whatsapp_allowed` | Whether the user has opted in to WhatsApp communication. |\n\n## Change Sources\n\n| Source | Description |\n|--------|-------------|\n| `user` | Changed by the user through the storefront profile page. |\n| `iys` | Updated by the IYS subscription webhook. |\n| `crm` | Updated by a CRM integration. |\n| `kvkk` | Updated by the KVKK consent gateway or unsubscription endpoint. |\n| `admin` | Updated through the admin API. |\n| `hook` | Updated by a generic subscription service webhook. |\n\n## Filtering & Ordering\n\nFilter by `user_id`, `field_name`, or `source`. Results are ordered by `created_date` descending by default; pass `?sort=created_date` to reverse."}],"servers":[{"description":"Omnitron Remote Proxy (external access — recommended)","url":"https://{omnitron_url}/api/v1/remote/{channel_id}","variables":{"omnitron_url":{"default":"sandbox.akinon.com","description":"Omnitron server URL (e.g., {omnitron.akinon.com})"},"channel_id":{"default":"1","description":"The channel identifier the remote request is routed through"}}},{"description":"Commerce API Server (internal / direct access only)","url":"https://{commerce_url}/api/v1","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Internal commerce server URL, reachable only from within the Omnitron network"}}}],"security":[{"tokenAuth":[]}],"components":{"securitySchemes":{"tokenAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"Token credential sent in the Authorization header, in the form: `Token <your-token>`. Requires a staff (admin) account."}},"parameters":{"page":{"name":"page","in":"query","required":false,"description":"The page number to return.","schema":{"type":"integer","default":1}},"limit":{"name":"limit","in":"query","required":false,"description":"The number of items to return per page.","schema":{"type":"integer","default":10}},"sort":{"name":"sort","in":"query","required":false,"description":"Orders the results by one or more fields. Separate multiple fields with commas. Prefix a field with a hyphen (`-`) for descending order.","schema":{"type":"string"}}},"schemas":{"UserChangeSource":{"type":"string","description":"The source that triggered the permission field change.","enum":["user","iys","crm","kvkk","admin","hook"]},"PaginatedUserFieldHistoryList":{"type":"object","description":"A paginated list of user field history records.","properties":{"count":{"type":"integer","description":"Total number of records matching the request."},"next":{"type":["string","null"],"format":"uri","description":"URL of the next page, or `null` if this is the last page."},"previous":{"type":["string","null"],"format":"uri","description":"URL of the previous page, or `null` if this is the first page."},"results":{"type":"array","description":"The records on the current page.","items":{"$ref":"#/components/schemas/UserFieldHistory"}}}},"UserFieldHistory":{"type":"object","description":"A single user permission field change record.","properties":{"id":{"type":"integer","description":"Unique identifier of the record.","readOnly":true},"user":{"type":"integer","description":"The identifier of the user whose field changed."},"field_name":{"type":"string","description":"The name of the field that changed (e.g. `email_allowed`, `sms_allowed`, `call_allowed`, `whatsapp_allowed`)."},"value":{"type":["string","null"],"description":"The new value of the field as a string (`\"True\"`, `\"False\"`, or `null`)."},"source":{"$ref":"#/components/schemas/UserChangeSource"},"created_date":{"type":"string","format":"date-time","description":"When the change was recorded.","readOnly":true}}},"Error":{"type":"object","description":"An error response.","properties":{"detail":{"type":"string","description":"A human-readable description of the error."}},"additionalProperties":true}},"responses":{"Unauthorized":{"description":"Authentication credentials were not provided or are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The authenticated user does not have administrator privileges.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/users/field-history/":{"get":{"tags":["User Field History"],"operationId":"listUserFieldHistory","summary":"List user field history","description":"Returns a paginated list of user permission field change records. Each record captures a single field change — the field name, its new value, the source of the change, and when it happened.\n\nTracked fields: `email_allowed`, `sms_allowed`, `call_allowed`, `whatsapp_allowed`.\n\nResults are ordered by `created_date` descending by default (most recent first). Use `?sort=created_date` for ascending or `?sort=-created_date` for descending.","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/sort"},{"name":"user_id","in":"query","required":false,"description":"Filter by the exact user identifier.","schema":{"type":"integer"}},{"name":"field_name","in":"query","required":false,"description":"Filter by the exact field name (e.g. `email_allowed`, `sms_allowed`).","schema":{"type":"string"}},{"name":"source","in":"query","required":false,"description":"Filter by the source of the change.","schema":{"$ref":"#/components/schemas/UserChangeSource"}}],"responses":{"200":{"description":"A paginated list of user field history records.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUserFieldHistoryList"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"}}}}}}
```


---

# 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://apidocs.akinon.com/commerce-openapis/admin/user-field-history/list-user-field-history.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.
