PATCH /api/account-center

Update the account center settings with the provided settings.

application/json

Body Required

  • enabled boolean

    Enable or disable the account API.

  • fields object

    The fields settings for the account API.

    Hide fields attributes Show fields attributes object
    • name string

      Values are Off, ReadOnly, or Edit.

    • avatar string

      Values are Off, ReadOnly, or Edit.

    • profile string

      Values are Off, ReadOnly, or Edit.

    • email string

      Values are Off, ReadOnly, or Edit.

    • phone string

      Values are Off, ReadOnly, or Edit.

    • password string

      Values are Off, ReadOnly, or Edit.

    • username string

      Values are Off, ReadOnly, or Edit.

    • social string

      Values are Off, ReadOnly, or Edit.

    • customData string

      Values are Off, ReadOnly, or Edit.

    • mfa string

      Values are Off, ReadOnly, or Edit.

    • session string

      Values are Off, ReadOnly, or Edit.

  • webauthnRelatedOrigins array[string]

    The allowed domains for webauthn.

  • deleteAccountUrl object | null

    The custom endpoint URL for account deletion.

  • customCss string | null
  • profileFields array[object] | null

    Ordered list of custom profile fields to show in the prebuilt account center. Each entry references an existing field by name in the custom profile fields catalog.

    Hide profileFields attribute Show profileFields attribute object
    • name string Required

Responses

  • 200 application/json

    Updated account center settings.

    Hide response attributes Show response attributes object
    • tenantId string Required

      Maximum length is 21.

    • id string Required

      Minimum length is 1, maximum length is 21.

    • enabled boolean Required
    • fields object Required
      Hide fields attributes Show fields attributes object
      • name string

        Values are Off, ReadOnly, or Edit.

      • avatar string

        Values are Off, ReadOnly, or Edit.

      • profile string

        Values are Off, ReadOnly, or Edit.

      • email string

        Values are Off, ReadOnly, or Edit.

      • phone string

        Values are Off, ReadOnly, or Edit.

      • password string

        Values are Off, ReadOnly, or Edit.

      • username string

        Values are Off, ReadOnly, or Edit.

      • social string

        Values are Off, ReadOnly, or Edit.

      • customData string

        Values are Off, ReadOnly, or Edit.

      • mfa string

        Values are Off, ReadOnly, or Edit.

      • session string

        Values are Off, ReadOnly, or Edit.

    • webauthnRelatedOrigins array[string] Required
    • deleteAccountUrl string | null Required

      Maximum length is 2048.

    • customCss string | null Required
    • profileFields array[object] | null Required
      Hide profileFields attribute Show profileFields attribute object
      • name string Required
  • 400

    Bad Request

  • 401

    Unauthorized

  • 403

    Forbidden

PATCH /api/account-center
curl \
 --request PATCH 'https://[tenant_id].logto.app/api/account-center' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"enabled":true,"fields":{"name":"Off","avatar":"Off","profile":"Off","email":"Off","phone":"Off","password":"Off","username":"Off","social":"Off","customData":"Off","mfa":"Off","session":"Off"},"webauthnRelatedOrigins":["string"],"deleteAccountUrl":{},"customCss":"string","profileFields":[{"name":"string"}]}'
Request examples
{
  "enabled": true,
  "fields": {
    "name": "Off",
    "avatar": "Off",
    "profile": "Off",
    "email": "Off",
    "phone": "Off",
    "password": "Off",
    "username": "Off",
    "social": "Off",
    "customData": "Off",
    "mfa": "Off",
    "session": "Off"
  },
  "webauthnRelatedOrigins": [
    "string"
  ],
  "deleteAccountUrl": {},
  "customCss": "string",
  "profileFields": [
    {
      "name": "string"
    }
  ]
}
Response examples (200)
{
  "tenantId": "string",
  "id": "string",
  "enabled": true,
  "fields": {
    "name": "Off",
    "avatar": "Off",
    "profile": "Off",
    "email": "Off",
    "phone": "Off",
    "password": "Off",
    "username": "Off",
    "social": "Off",
    "customData": "Off",
    "mfa": "Off",
    "session": "Off"
  },
  "webauthnRelatedOrigins": [
    "string"
  ],
  "deleteAccountUrl": "string",
  "customCss": "string",
  "profileFields": [
    {
      "name": "string"
    }
  ]
}