Documentation / Developer / Lytics APIs

User

Info about Users of Lytics that have access to your account.

  • Lytics users are unique across accounts

  • They get invited to have access to your account

User List

/api/user

Get a list of all users for an account.

GET

User List

/api/user

Get list of Admin Users

Response 200

Headers

Content-Type: application/json

Body

{
    "data": [
        {
            "account_id": "fake46b7afad96f3a4e4b41cee40ecd6", 
            "created": "2014-08-04T21:18:20.124Z",
            "updated": "2014-08-04T21:18:20.124Z",
            "email": "[email protected]", 
            "id": "120642b03a2d54551e637f56cbf61b73", 
            "name": "Bill Jenkins", 
            "accounts":[
                {
                    "aid":122,
                    "account_id":"fake46b7afad96f3a4e4b41cee40ecd6",
                    "granted_by":"500418690088145",
                    "roles": ["api", "segments", "admin"],
                    "created": "2014-08-04T21:18:20.124Z",
                    "updated": "2014-08-04T21:18:20.124Z"
                }
            ]
        }
    ]
}

User

/api/user/{userid}

Get Single User

Parameters
useridstring (required)
Ex: bob_at_gmail.com
id, or email of user
GET

User Fetch

/api/user/{userid}

Get A single Admin User

Response 200

Headers

Content-Type: application/json

Body

{
    "data": {
        "account_id": "fake46b7afad96f3a4e4b41cee40ecd6", 
        "created": "2014-08-04T21:18:20.124Z",
        "updated": "2014-08-04T21:18:20.124Z",
        "email": "[email protected]", 
        "id": "120642b03a2d54551e637f56cbf61b73", 
        "name": "Bill Jenkins", 
        "accounts":[
            {
                "aid":122,
                "account_id":"fake46b7afad96f3a4e4b41cee40ecd6",
                "granted_by":"500418690088145",
                "roles": ["api", "segments", "admin"],
                "created": "2014-08-04T21:18:20.124Z",
                "updated": "2014-08-04T21:18:20.124Z"
            }
        ]
    }
}
POST

User Create

/api/user{?suppress}

Create or 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.

# Create/Invite new user for current LIOKEY account
curl -v -XPOST "https://api.lytics.io/api/user?access_token=$LIOKEY"  \
  -H 'Content-type: application/json' \
  -d '{
    "email" : "[email protected]"
    , "name":"aaron"
    , "roles": ["api","admin","segments"]
}'
Parameters
suppressbool (optional)
Default: false
default = false, supress email invite

Request

Headers

Content-Type: application/json
Authorization: {API Token}

Body

{
    "name": "Bob",
    "email": "[email protected]"
}

Response 201

Headers

Content-Type: application/json

Body

{
    "data": {
        "account_id": "fake46b7afad96f3a4e4b41cee40ecd6", 
        "created": "2014-08-04T21:18:20.124Z",
        "updated": "2014-08-04T21:18:20.124Z",
        "email": "[email protected]", 
        "id": "120642b03a2d54551e637f56cbf61b73", 
        "name": "Bill Jenkins", 
        "accounts":[
            {
                "aid":122,
                "account_id":"fake46b7afad96f3a4e4b41cee40ecd6",
                "granted_by":"500418690088145",
                "roles": ["api", "segments", "admin"],
                "created": "2014-08-04T21:18:20.124Z",
                "updated": "2014-08-04T21:18:20.124Z"
            }
        ]
    }
}
PUT

User Update

/api/user/{userid}

Update An Lytics Admin User

Request

Headers

Content-Type: application/json
Authorization: {API Token}

Body

{
    "roles": ["api","admin","segments"]
}

Response 200

Headers

Content-Type: application/json

Body

{
    "data": {
        "account_id": "fake46b7afad96f3a4e4b41cee40ecd6", 
        "created": "2014-08-04T21:18:20.124Z",
        "updated": "2014-08-04T21:18:20.124Z",
        "email": "[email protected]", 
        "id": "120642b03a2d54551e637f56cbf61b73", 
        "name": "Bill Jenkins", 
        "accounts":[
            {
                "aid":122,
                "account_id":"fake46b7afad96f3a4e4b41cee40ecd6",
                "granted_by":"500418690088145",
                "roles": ["api", "segments", "admin"],
                "created": "2014-08-04T21:18:20.124Z",
                "updated": "2014-08-04T21:18:20.124Z"
            }
        ]
    }
}