Get account preferences

Read the display language, time zone, and last update time of the authenticated account. The response sets Cache-Control: no-store and does not modify account settings.

GET https://api.moi.matrixorigin.cn/v5/auth/preferences

Before you begin

Prepare a personal access token or service account access token for the current account; see Access credentials. This endpoint reads preferences for the current account directly and does not require a workspace ID.

Request example

Replace $AI_STUDIO_API_KEY with your credential. Authenticate with X-API-Key, Authorization: Bearer, or a browser session; credential types are mutually exclusive in a single request, and X-Workspace-ID is not required.

curl "https://api.moi.matrixorigin.cn/v5/auth/preferences" \
  -H "X-API-Key: $AI_STUDIO_API_KEY"

This endpoint takes no path, query, or request body parameters. It resolves the target account directly from the authenticated identity.

Successful response

Returns HTTP 200 with Cache-Control: no-store. The top-level response object contains only code and data, with no msg field. To modify these settings, call Update account preferences.

{
  "code": "OK",
  "data": {
    "locale": "zh-CN",
    "timezone": "Asia/Shanghai",
    "updated_at": "2026-10-14T08:00:00Z"
  }
}

Field

Type

Description

code

string

Always OK when the request succeeds.

data

object

Preferences for the current account.

data.locale

string

Account display language tag: zh-CN, en-US, fr-FR, es-ES, ar, or id-ID.

data.timezone

string

Account time zone as an IANA time zone name, such as Asia/Shanghai or UTC.

data.updated_at

string

Last preference update timestamp in RFC 3339 format.

Error response

Missing or invalid credentials return HTTP 401 (Unauthorized or unauthenticated). Sending multiple authentication credentials in the same request returns HTTP 400 (ErrMultipleAuthCredentials). When the upstream preference service is unavailable, the endpoint returns HTTP 502 (ErrServiceUnavailable). Error responses contain only code and msg, with no data field.

{
  "code": "Unauthorized",
  "msg": "Unauthorized"
}

Field

Type

Description

code

string

Error code, such as Unauthorized, unauthenticated, ErrMultipleAuthCredentials, or ErrServiceUnavailable.

msg

string

Error message text.

Last updated on