Is AI recommending you? Ask Contentstack Canoe for free
Is AI recommending your brand? Find out with Contentstack Canoe for free
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Contentstack for Developers
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • The Forrester Wave™: Digital Experience Platforms, Q4 2025
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Lytics API
  4. User

User

markdownView as Markdown

Manage user accounts, roles, and passwords.

Get users

GEThttps://api.lytics.io/v2/user

Get a list of all users for the account

Hide Parameters

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Sample Response
Status|200 OK
12345678910111213141516171819202122232425262728293031323334353637383940414243444546
{
  "_meta": {},
  "data": [
    {
      "accounts": [
        {
          "account_id": "string",
          "aid": 0,
          "auth0_connections": [
            "string"
          ],
          "created": "2019-08-24T14:15:22Z",
          "expiration": "2019-08-24T14:15:22Z",
          "granted_by": "string",
          "login_method_allowed": true,
          "name": "string",
          "reason": "string",
          "roles": [
            "string"
          ],
          "updated": "2019-08-24T14:15:22Z"
        }
      ],
      "aid": 0,
      "auth_type": "password",
      "authtoken": "string",
      "authy_id": "string",
      "cellphone": "string",
      "cookie": "string",
      "country_code": "string",
      "created": "2019-08-24T14:15:22Z",
      "email": "string",
      "email_verified": "2019-08-24T14:15:22Z",
      "has_2fa_session": true,
      "id": "string",
      "last_logon": "2019-08-24T14:15:22Z",
      "last_pwd_change": "2019-08-24T14:15:22Z",
      "name": "string",
      "needs_2fa": true,
      "organization_id": "string",
      "updated": "2019-08-24T14:15:22Z"
    }
  ],
  "request_id": "string",
  "status": 0
}

Reset password

POSThttps://api.lytics.io/v2/user/me/passwordreset

Get user

GEThttps://api.lytics.io/v2/user/{id}

Delete user

DELETEhttps://api.lytics.io/v2/user/{id}

Remove a user's access to the account. If the user has no remaining account roles after removal, the user record is deleted entirely.

Hide Parameters

URL Parameters

idrequiredstring

User ID or email address

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Sample Response
Status|204 No Content
1
No Content

Update user roles

POSThttps://api.lytics.io/v2/user/{id}/roles

Update a user's password

Sample Request
1234
{
  "oldpassword": "string",
  "password": "string"
}
Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041424344
{
  "_meta": {},
  "data": {
    "accounts": [
      {
        "account_id": "string",
        "aid": 0,
        "auth0_connections": [
          "string"
        ],
        "created": "2019-08-24T14:15:22Z",
        "expiration": "2019-08-24T14:15:22Z",
        "granted_by": "string",
        "login_method_allowed": true,
        "name": "string",
        "reason": "string",
        "roles": [
          "string"
        ],
        "updated": "2019-08-24T14:15:22Z"
      }
    ],
    "aid": 0,
    "auth_type": "password",
    "authtoken": "string",
    "authy_id": "string",
    "cellphone": "string",
    "cookie": "string",
    "country_code": "string",
    "created": "2019-08-24T14:15:22Z",
    "email": "string",
    "email_verified": "2019-08-24T14:15:22Z",
    "has_2fa_session": true,
    "id": "string",
    "last_logon": "2019-08-24T14:15:22Z",
    "last_pwd_change": "2019-08-24T14:15:22Z",
    "name": "string",
    "needs_2fa": true,
    "organization_id": "string",
    "updated": "2019-08-24T14:15:22Z"
  },
  "request_id": "string",
  "status": 0
}

Get a user by ID, email address, or the special value me (returns the authenticated user).

Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041424344
{
  "_meta": {},
  "data": {
    "accounts": [
      {
        "account_id": "string",
        "aid": 0,
        "auth0_connections": [
          "string"
        ],
        "created": "2019-08-24T14:15:22Z",
        "expiration": "2019-08-24T14:15:22Z",
        "granted_by": "string",
        "login_method_allowed": true,
        "name": "string",
        "reason": "string",
        "roles": [
          "string"
        ],
        "updated": "2019-08-24T14:15:22Z"
      }
    ],
    "aid": 0,
    "auth_type": "password",
    "authtoken": "string",
    "authy_id": "string",
    "cellphone": "string",
    "cookie": "string",
    "country_code": "string",
    "created": "2019-08-24T14:15:22Z",
    "email": "string",
    "email_verified": "2019-08-24T14:15:22Z",
    "has_2fa_session": true,
    "id": "string",
    "last_logon": "2019-08-24T14:15:22Z",
    "last_pwd_change": "2019-08-24T14:15:22Z",
    "name": "string",
    "needs_2fa": true,
    "organization_id": "string",
    "updated": "2019-08-24T14:15:22Z"
  },
  "request_id": "string",
  "status": 0
}

Replace all account roles for a user with the provided list. The body is a bare JSON array of role names, not an object, and it replaces every role the user has on the account, e.g. ["admin","auth_alerts"].

Sample Response
Status|200 OK
1234567891011121314151617181920212223242526272829303132333435363738394041424344
{
  "_meta": {},
  "data": {
    "accounts": [
      {
        "account_id": "string",
        "aid": 0,
        "auth0_connections": [
          "string"
        ],
        "created": "2019-08-24T14:15:22Z",
        "expiration": "2019-08-24T14:15:22Z",
        "granted_by": "string",
        "login_method_allowed": true,
        "name": "string",
        "reason": "string",
        "roles": [
          "string"
        ],
        "updated": "2019-08-24T14:15:22Z"
      }
    ],
    "aid": 0,
    "auth_type": "password",
    "authtoken": "string",
    "authy_id": "string",
    "cellphone": "string",
    "cookie": "string",
    "country_code": "string",
    "created": "2019-08-24T14:15:22Z",
    "email": "string",
    "email_verified": "2019-08-24T14:15:22Z",
    "has_2fa_session": true,
    "id": "string",
    "last_logon": "2019-08-24T14:15:22Z",
    "last_pwd_change": "2019-08-24T14:15:22Z",
    "name": "string",
    "needs_2fa": true,
    "organization_id": "string",
    "updated": "2019-08-24T14:15:22Z"
  },
  "request_id": "string",
  "status": 0
}
Hide Parameters

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring

Body Parameters

oldpasswordoptionalstring
passwordoptionalstring
Hide Parameters

URL Parameters

idrequiredstring

User ID, email address, or 'me'

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

include_expired_accountsoptionalstring

Include accounts whose access has expired. Defaults to false.

Headers

Authorizationoptionalstring

Hide Parameters

URL Parameters

idrequiredstring

User ID or email address

Query Parameters

account_idoptionalstring

The account ID. Defaults to the user's default account.

Headers

Authorizationoptionalstring