> 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/cms/user.md).

# User

User information endpoints

## Get current user information

> Returns information about the currently authenticated user including profile data,\
> preferences, and selected address.

```json
{"openapi":"3.1.0","info":{"title":"CMS API - Content Management & Pages","version":"1.0.0"},"tags":[{"name":"User","description":"User information endpoints"}],"servers":[{"description":"Default commerce site","url":"https://{commerce_url}","variables":{"commerce_url":{"default":"sandbox.akinon.com","description":"Commerce storefront hostname"}}}],"paths":{"/current_user/":{"get":{"tags":["User"],"operationId":"getCurrentUser","summary":"Get current user information","description":"Returns information about the currently authenticated user including profile data,\npreferences, and selected address.","parameters":[{"$ref":"#/components/parameters/CookieHeader"}],"responses":{"200":{"description":"User information retrieved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUser"}}}},"401":{"$ref":"#/components/responses/UnauthorizedResponse"}}}}},"components":{"parameters":{"CookieHeader":{"name":"X-Cookie","in":"header","description":"Use X-Cookie header instead of Cookie header in \"try out\" section.\nUse Cookie header while testing in postman or other tools.\nSome commerce applications may support 'sesionid' instead of 'osessionid'.","required":true,"schema":{"type":"string"}}},"schemas":{"CurrentUser":{"type":"object","description":"Information about the currently authenticated user. Contains profile data (name, email, phone),\npreferences (email/SMS/call permissions), segment information (price list, stock list, currency),\nselected delivery address, and authentication status. Requires authenticated session cookie.","required":["pk"],"properties":{"pk":{"type":"integer"},"first_name":{"type":"string"},"last_name":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"email_allowed":{"type":"boolean"},"sms_allowed":{"type":"boolean"},"call_allowed":{"type":"boolean"},"attributes":{"type":"object","description":"Additional user attributes","additionalProperties":true},"hashed_email":{"type":"string","description":"MD5 hash of the email address"},"date_joined":{"type":"string","format":"date-time"},"last_login":{"type":"string","format":"date-time"},"gender":{"type":"string","enum":["M","F","O"]},"date_of_birth":{"type":"string","format":"date"},"is_email_verified":{"type":"boolean","description":"Whether the user's email is verified"},"is_social_networks_connected":{"type":"boolean","description":"Whether the user has connected social accounts"},"segment":{"type":"object","description":"User's current segment information","properties":{"pk":{"type":"integer"},"price_list":{"type":"integer"},"stock_list":{"type":"integer"},"currency":{"type":"string"}}},"client_type":{"type":"string","description":"Client type identifier"},"selected_address":{"type":"object","description":"Currently selected delivery address","properties":{"pk":{"type":"integer"},"address_line_1":{"type":"string"},"address_line_2":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}}}}},"ErrorResponse":{"type":"object","description":"Standard error response format for API errors. Contains error detail message and optional error code.\nUsed for authentication errors and other API-level error responses.","required":["detail"],"properties":{"detail":{"type":"string","description":"Human-readable error message"},"code":{"type":"string","description":"Optional error code for programmatic error handling"}}}},"responses":{"UnauthorizedResponse":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}
```


---

# 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://apidocs.akinon.com/commerce-openapis/cms/user.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.
