---
title: "User"
description: "<p>Info about Administrative Lytics account users</p><p>* Lytics users are unique across accounts</p><p>* They get *invited* to have access to your account</p>"
url: "https://www.contentstack.com/docs/developers/apis/lytics-api/v1/user"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-11-05"
---

# User

Info about Administrative Lytics account users

\* Lytics users are unique across accounts

\* They get \*invited\* to have access to your account

## User Fetch

### User Fetch

**GET** `/api/user/{userid}`

Get a single admin user

#### URL Parameters

- **userid** (required)

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": {
    "account_id": "4f7b175bdba058fc092357a6",
    "aid": 122,
    "created": "2014-08-04T21:18:20.124Z",
    "updated": "2014-08-04T21:18:20.124Z",
    "email": "bill.jenkins@lytics.io",
    "id": "120642b03a2d54551e637f56cbf61b73",
    "name": "Bill Jenkins",
    "accounts": [
      {
        "aid": 122,
        "account_id": "4f7b175bdba058fc092357a6",
        "granted_by": "500418690088145",
        "roles": [
          "api",
          "segments",
          "admin"
        ],
        "created": "2014-08-04T21:18:20.124Z",
        "updated": "2014-08-04T21:18:20.124Z"
      }
    ]
  }
}
```

## User Update

### User Update

**PUT** `/api/user/{userid}`

Update An \*\*Lytics Admin User\*\*

#### URL Parameters

- **userid** (required)

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": {
    "account_id": "4f7b175bdba058fc092357a6",
    "aid": 122,
    "created": "2014-08-04T21:18:20.124Z",
    "updated": "2014-08-04T21:18:20.124Z",
    "email": "bill.jenkins@lytics.io",
    "id": "120642b03a2d54551e637f56cbf61b73",
    "name": "Bill Jenkins",
    "accounts": [
      {
        "aid": 122,
        "account_id": "4f7b175bdba058fc092357a6",
        "granted_by": "500418690088145",
        "roles": [
          "api",
          "segments",
          "admin"
        ],
        "created": "2014-08-04T21:18:20.124Z",
        "updated": "2014-08-04T21:18:20.124Z"
      }
    ]
  }
}
```

## User List

### User List

**GET** `/api/user`

Get a list of all administrative users for an account and their roles.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": [
    {
      "account_id": "4f7b175bdba058fc092357a6",
      "aid": 122,
      "created": "2014-08-04T21:18:20.124Z",
      "updated": "2014-08-04T21:18:20.124Z",
      "email": "bill.jenkins@lytics.io",
      "id": "120642b03a2d54551e637f56cbf61b73",
      "name": "Bill Jenkins",
      "accounts": [
        {
          "aid": 122,
          "account_id": "4f7b175bdba058fc092357a6",
          "granted_by": "500418690088145",
          "roles": [
            "api",
            "segments",
            "admin"
          ],
          "created": "2014-08-04T21:18:20.124Z",
          "updated": "2014-08-04T21:18:20.124Z"
        }
      ]
    }
  ]
}
```

## User Create

### User Create

**POST** `/api/user`

Create/Invite A \*\*Lytics Admin User\*\* this will either create

a new user if that email is new, or invite user to have access to

current account.

\`\`sh

\# Create/Invite new user for current LIOKEY account

\# with suppression to not send welcome email

curl -v -XPOST "https://api.lytics.io/api/user?suppress=true" \\

\-H 'Content-type: application/json' \\

\-H "Authorization: $LIOKEY" \\

\-d '{

"email" : "fakeuser2@lytics.io"

, "password":"aNotSoGoodPassword%^"

, "name":"aaron"

, "roles": \["api","admin"\]

}'

\`\`

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.
- **suppress** (optional)
  default = false, supress email invite

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": {
    "account_id": "4f7b175bdba058fc092357a6",
    "aid": 122,
    "created": "2014-08-04T21:18:20.124Z",
    "updated": "2014-08-04T21:18:20.124Z",
    "email": "bill.jenkins@lytics.io",
    "id": "120642b03a2d54551e637f56cbf61b73",
    "name": "Bill Jenkins",
    "accounts": [
      {
        "aid": 122,
        "account_id": "4f7b175bdba058fc092357a6",
        "granted_by": "500418690088145",
        "roles": [
          "api",
          "segments",
          "admin"
        ],
        "created": "2014-08-04T21:18:20.124Z",
        "updated": "2014-08-04T21:18:20.124Z"
      }
    ]
  }
}
```

## User SetPassword

### User SetPassword

**POST** `/api/user/{userid}/setpassword`

#### URL Parameters

- **userid** (required)
  userid, or email

#### Query Parameters

- **account_id** (optional)
  Your Lytics account ID.

#### Headers

- **Authorization** (optional)

#### Sample Response

```json
{
  "data": {
    "account_id": "4f7b175bdba058fc092357a6",
    "aid": 122,
    "created": "2014-08-04T21:18:20.124Z",
    "updated": "2014-08-04T21:18:20.124Z",
    "email": "bill.jenkins@lytics.io",
    "id": "120642b03a2d54551e637f56cbf61b73",
    "name": "Bill Jenkins",
    "accounts": [
      {
        "aid": 122,
        "account_id": "4f7b175bdba058fc092357a6",
        "granted_by": "500418690088145",
        "roles": [
          "api",
          "segments",
          "admin"
        ],
        "created": "2014-08-04T21:18:20.124Z",
        "updated": "2014-08-04T21:18:20.124Z"
      }
    ]
  }
}
```