User

User is identified by {user_id}. For the self request, "me" is used for the request user itself in place of {user_id}. A user object in Moxtra provides the following properties:

Name Description Example
id The user ID. UiaduESWsbzFoK9TOldC6zF
email The email address of the user. john.doe@acme.com
first_name The first name of the user. John
last_name The last_name name of the user. Doe
name The full name of the user. John Doe
unique_id The unique_id of the user if the user is created on unique_id instead of email. A3451UX2349
org_id The org_id of the user if the user belongs to an org. PxxF1a57Xz2FtiH96TVtppB
org_plan_code The org default package if the user belongs to an org. prouser
org_status The org status if the user belongs to an org.
  • Trial: GROUP_TRIAL_SUBSCRIPTION
  • Trial Expired: GROUP_EXPIRED_SUBSCRIPTION
  • Paid: GROUP_NORMAL_SUBSCRIPTION
  • Disabled: GROUP_CANCELED_SUBSCRIPTION
GROUP_NORMAL_SUBSCRIPTION
picture_uri Link to picture of the user. https://www.moxtra.com/user/2342
type Type of user.
  • Normal: USER_TYPE_NORMAL
  • SSO: USER_TYPE_SSO
USER_TYPE_NORMAL
timezone TZ database timezone of this user. Please refer to http://en.wikipedia.org/wiki/List_of_tz_database_time_zones. Default is "America/Los_Angeles". Asia/Shanghai
language The user's language. Default is "en". The supported languages are:
  • da - Danish, dansk
  • de - German, Deutsch
  • en - English
  • es - Spanish, español
  • fi - Finnish, suomi
  • fr - French, français
  • id - Indonesian, Bahasa Indonesia
  • it - Italian, italiano
  • ja - Japanese, 日本語(にほんご)
  • ko - Korean, 한국어, 조선어
  • lt - Lithuanian, lietuvių kalba
  • nb - Norwegian Bokmål, Norsk bokmål
  • nl - Dutch, Nederlands, Vlaams
  • nn - Norwegian Nynorsk, Norsk nynorsk
  • no - Norwegian, Norsk
  • pt - Portugese, português
  • ru - Russian, Русский
  • sv - Swedish, svenska
  • th - Thai, ไทย
  • tr - Turkish, Türkçe
  • vi - Vietnamese, Tiếng Việt
  • zh - Chinese Simplified, 中文简体
  • zh-tw - Chinese Traditional, 中文繁體
en
created_time The timestamp, when the user object was created. 1348864985783
updated_time The timestamp, when the user object was updated. 1348864985783

Name Description Example
id The team ID. PRTA3fRhzcxEPit77Dw063F
name The team name John's team
created_time The timestamp, when the team object was created. 1348864985783
updated_time The timestamp, when the team object was updated. 1348864985783

Get User

Get the contents of a user object identified by {user_id}.

GET /{user_id}

Sample Request
GET /me
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "id": "UiaduESWsbzFoK9TOldC6zF",
        "email": "jim@test.com",
        "name": "jim test",
        "first_name": "jim",
        "last_name": "test",
        "unique_id": "",
        "picture_uri": "https://www.moxtra.com/user/2342",
        "type": "USER_TYPE_NORMAL",
        "timezone": "America/Los_Angeles",
        "language": "en",
        "org_id": "PuE0cDUJRkg98FG0FUwJqi4",
        "org_plan_code": "prouser",
        "org_status": "GROUP_NORMAL_SUBSCRIPTION",
        "teams": [
            {
                "id": "PRTA3fRhzcxEPit77Dw063F",
                "name": "John's team",
                "created_time": 1467327047209,
                "updated_time": 1468541973985
            }
        ]
        "created_time": 1348864985783,
        "updated_time": 1348864985783
    }
}

Update User Profile

Update a user identified by {user_id} with input new value(s).

POST /{user_id}

JSON Parameters
Name Type Description
first_name String The first name of the user.
last_name String The last_name name of the user.
timezone String Optional: This user's timezone based on TZ string in the tz database. For example, America/Los_Angeles, Asia/Shanghai.
language String Optional: This user's language. Default is "en". The supported languages are:
  • da - Danish, dansk
  • de - German, Deutsch
  • en - English
  • es - Spanish, español
  • fi - Finnish, suomi
  • fr - French, français
  • id - Indonesian, Bahasa Indonesia
  • it - Italian, italiano
  • ja - Japanese, 日本語(にほんご)
  • ko - Korean, 한국어, 조선어
  • lt - Lithuanian, lietuvių kalba
  • nb - Norwegian Bokmål, Norsk bokmål
  • nl - Dutch, Nederlands, Vlaams
  • nn - Norwegian Nynorsk, Norsk nynorsk
  • no - Norwegian, Norsk
  • pt - Portugese, português
  • ru - Russian, Русский
  • sv - Swedish, svenska
  • th - Thai, ไทย
  • tr - Turkish, Türkçe
  • vi - Vietnamese, Tiếng Việt
  • zh - Chinese Simplified, 中文简体
  • zh-tw - Chinese Traditional, 中文繁體
Sample Request
POST /me
{
    "first_name": "Hazel",
    "last_name": "Nutt"
}
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Upload User Profile Picture

Upload a user's profile picture identified by {user_id} via multipart/form-data.

POST /{user_id}/picture

Form-data Parameters
Name Type Description
file file Profile photo, encoded as form data.

Sample Request
POST /me/picture
...
Content-Type: multipart/form-data; boundary=---------------------------9051914041544843365972754266
Content-Length: 384

-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="avatar.jpg"
Content-Type: image/jpg

Content of avatar.jpg
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "revision": 168,
        "updated_time": 1348864985783
    }
}

Get User Profile Picture

Get a user's profile picture identified by {user_id}.

GET /{user_id}/picture

Sample Request
GET /me/picture
Sample Response
#Profile Picture

Delete User Profile Picture

Delete a user's profile picture identified by {user_id}.

DELETE /{user_id}/picture

Sample Request
DELETE /me/picture
Sample Response
{
    "code": "RESPONSE_SUCCESS"
}

Get User's Timeline

Get a user's timeline for all activities in Moxtra identified by {user_id}. The feed result is in Activity Stream format, which follows the JSON specification. Schemas can be found at: JSON Schema and Activity Base Schema.

GET /{user_id}/timeline

URL Parameters
Name Type Description
filter String Optional: "unreadfeeds" - return only feeds that have not been read
sort String Optional: "time" - return feeds in descending order on feed timestamp

Sample Request
GET /me/timeline
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "feeds": [
            {
                "object": {
                    "id": "128",
                    "content": "<p>Hello</p>",
                    "content_text": "Hello",
                    "objectType": "comment",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "target": {
                    "id": "6",
                    "type": "PAGE_TYPE_IMAGE",
                    "url": "https://www.moxtra.com/Be0pVl0vaYeI5RKtLRqnfM9/6",
                    "objectType": "page",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "actor": {
                    "id": "Utkj3YC5BxRHCCaq9widP67",				
                    "image": "https://www.moxtra.com/board/Be0pVl0vaYeI5RKtLRqnfM9/user/2/15763",
                    "displayName": "John Wess",
                    "objectType": "person",
                    "unique_id": "",
                    "email": "johnw@test.com",
                    "updated": "2017-01-27T22:23:42Z",
                    "published": "2016-05-22T21:21:36Z"
                },
                "generator": {
                    "id": "Be0pVl0vaYeI5RKtLRqnfM9"
                },                
                "published": "2016-08-16T01:46:07Z",
                "verb": "post",
                "id": 370
            },
            {
                "object": {
                    "objectType": "annotation",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "target": {
                    "id": "40",
                    "type": "PAGE_TYPE_IMAGE",
                    "url": "https://www.moxtra.com/BRTaH8slmbPAY4odz0RbBIF/40",
                    "objectType": "page",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "actor": {
                    "id": "Utkj3YC5BxRHCCaq9widP67",				
                    "image": "https://www.moxtra.com/board/Be0pVl0vaYeI5RKtLRqnfM9/user/2/15763",
                    "displayName": "John Wess",
                    "objectType": "person",
                    "unique_id": "",
                    "email": "johnw@test.com",
                    "updated": "2017-01-27T22:23:42Z",
                    "published": "2016-05-22T21:21:36Z"
                },
                "generator": {
                    "id": "BRTaH8slmbPAY4odz0RbBIF"
                },                
                "published": "2016-08-16T01:46:07Z",
                "verb": "update",
                "id": 386
            },
            {
                "object": null,
                "target": {
                    "id": "Bj0GDAOoP48Cllc9wlGK3vE",
                    "displayName": "Crystal",
                    "url": "https://www.moxtra.com/Bj0GDAOoP48Cllc9wlGK3vE",
                    "image": "https://www.moxtra.com/images/binder/default_cover.png",
                    "objectType": "binder",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "actor": {
                    "id": "Utkj3YC5BxRHCCaq9widP67",				
                    "image": "https://www.moxtra.com/board/Be0pVl0vaYeI5RKtLRqnfM9/user/2/15763",
                    "displayName": "John Wess",
                    "objectType": "person",
                    "unique_id": "",
                    "email": "johnw@test.com",
                    "updated": "2017-01-27T22:23:42Z",
                    "published": "2016-05-22T21:21:36Z"
                },
                "generator": {
                    "id": "Bj0GDAOoP48Cllc9wlGK3vE"
                },                
                "published": "2016-08-16T01:46:07Z",
                "verb": "join",
                "id": 478
            }
        ]
    }
}

Get User's Unread Feeds

Get the number of a user's unread feeds identified by {user_id}.

GET /{user_id}/unreadfeeds

Sample Request
GET /me/unreadfeeds
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
      "unread_feeds": 3
    }
}

Get User's Todos

Get all the incompleted todos assigned to the user identified by {user_id}.

GET /{user_id}/todos

Sample Request
GET /me/todos
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "binders": [
            {
                "binder_id": "B34gq491gkjFjbmXYW5xQkC",
                "count": 2,
                "todos": [
                    {
                        "id": 266,
                        "name": "Project X",
                        "creator_id": "Utkj3YC5BxRHCCaq9widP67",
                        "creator_name": "John Doe",
                        "due_time": 1398495600000,
                        "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
                        "assignee_name": "Smith Fun",
                        "reminder_time": 1398296662605,
                        "comments": "Need to add budgets",
                        "completed": false,
                        "description": "",						
                        "updated_time": 1414713251918,
                        "created_time": 1414713251914
                    },
                    {
                        "id": 274,
                        "name": "Project Y",
                        "creator_id": "Utkj3YC5BxRHCCaq9widP67",
                        "creator_name": "John Doe",
                        "due_time": 0,
                        "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
                        "assignee_name": "Smith Fun",
                        "reminder_time": 0,
                        "comments": "",
                        "completed": false,
                        "description": "",
                        "updated_time": 1414715708597,
                        "created_time": 1414715708593
                    }
                ]
            },
            {
                "binder_id": "By0mC8O3r0EI0UXSMWshOw5",
                "count": 1,
                "todos": [
                    {
                        "id": 27,
                        "name": "Training Class",
                        "creator_id": "UiaduESWsbzFoK9TOldC6zF",
                        "creator_name": "jim test",
                        "due_time": 1471917343566,
                        "assignee_id": "Ua9hIj1Bi33F3bxq5yQ4gCH",
                        "assignee_name": "Smith Fun",
                        "reminder_time": 0,
                        "comments": "",
                        "completed": false,
                        "description": "",
                        "updated_time": 1414798605588,
                        "created_time": 1414798605577
                    }
                ]
            }
        ]
    }
}

Get User's Mentions

Get all the messages for the user identified by {user_id}.

GET /{user_id}/mentions

Sample Request
GET /me/mentions
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "feeds": [
            {
                "object": {
                    "id": "128",
                    "content": "<p>Hello</p>",
                    "content_text": "Hello",
                    "objectType": "comment",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "target": {
                    "id": "6",
                    "type": "PAGE_TYPE_IMAGE",
                    "url": "https://www.moxtra.com/Be0pVl0vaYeI5RKtLRqnfM9/6",
                    "objectType": "page",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "actor": {
                    "id": "Utkj3YC5BxRHCCaq9widP67",				
                    "image": "https://www.moxtra.com/board/Be0pVl0vaYeI5RKtLRqnfM9/user/2/15763",
                    "displayName": "John Wess",
                    "objectType": "person",
                    "unique_id": "",
                    "email": "johnw@test.com",
                    "updated": "2017-01-27T22:23:42Z",
                    "published": "2016-05-22T21:21:36Z"
                },
                "generator": {
                    "id": "Be0pVl0vaYeI5RKtLRqnfM9"
                },                
                "published": "2016-08-16T01:46:07Z",
                "verb": "post",
                "id": 370
            },
            {
                "object": {
                    "id": "362",
                    "objectType": "comment",
                    "content": "<p>Schedule a meet</p>",
                    "content_text": "Schedule a meet",
                    "updated": "2016-11-15T02:00:25Z",
                    "published": "2016-11-15T02:00:25Z"
                },
                "target": {
                    "id": "BGxGMkCub9LJMTQmBJpt9OI",
                    "url": "https://www.moxtra.com/BGxGMkCub9LJMTQmBJpt9OI",
                    "image": "https://www.moxtra.com/service/themes/images/default/default_binder_cover.png",
                    "objectType": "binder",
                    "displayName": "Meeting",
                    "updated": "2016-11-15T02:00:25Z",
                    "published": "2014-08-07T22:37:51Z"
                },
                "actor": {
                    "objectType": "event",
                    "displayName": "Moxtra Scheduling",
                    "updated": "2016-11-15T02:00:25Z",
                    "published": "2016-11-15T02:00:25Z"
                },
                "generator": {
                    "id": "BGxGMkCub9LJMTQmBJpt9OI"
                },                
                "published": "2016-11-15T02:00:25Z",
                "verb": "post",
                "id": 563
            }
        ]
    }
}

Get User's Favorites

Get user's favorites identified by {user_id}.

GET /{user_id}/favorites

Sample Request
GET /me/favorites
Sample Response
{
    "code": "RESPONSE_SUCCESS",
    "data": {
        "feeds": [
            {
                "object": {
                    "id": "128",
                    "content": "<p>Hello</p>",
                    "content_text": "Hello",
                    "objectType": "comment",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "target": {
                    "id": "6",
                    "type": "PAGE_TYPE_IMAGE",
                    "url": "https://www.moxtra.com/Be0pVl0vaYeI5RKtLRqnfM9/6",
                    "objectType": "page",
                    "updated": "2016-08-16T01:46:07Z",
                    "published": "2016-08-16T01:46:07Z"
                },
                "actor": {
                    "id": "Utkj3YC5BxRHCCaq9widP67",				
                    "image": "https://www.moxtra.com/board/Be0pVl0vaYeI5RKtLRqnfM9/user/2/15763",
                    "displayName": "John Wess",
                    "objectType": "person",
                    "unique_id": "",
                    "email": "johnw@test.com",
                    "updated": "2017-01-27T22:23:42Z",
                    "published": "2016-05-22T21:21:36Z"
                },
                "generator": {
                    "id": "Be0pVl0vaYeI5RKtLRqnfM9"
                },                
                "published": "2016-08-16T01:46:07Z",
                "verb": "post",
                "id": 370
            },
            {
                "object": {
                    "objectType": "annotation",
                    "updated": "2016-11-15T02:00:25Z",
                    "published": "2016-11-15T02:00:25Z"
                },
                "target": {
                    "id": "228",
                    "url": "https://www.moxtra.com/BGxGMkCub9LJMTQmBJpt9OI/228",
                    "objectType": "page",
                    "type": "PAGE_TYPE_WHITEBOARD",
                    "updated": "2017-01-27T22:23:42Z",
                    "published": "2017-01-27T22:23:42Z"
                },
                "actor": {
                    "id": "Utkj3YC5BxRHCCaq9widP67",				
                    "image": "https://www.moxtra.com/board/Be0pVl0vaYeI5RKtLRqnfM9/user/2/15763",
                    "displayName": "John Wess",
                    "objectType": "person",
                    "unique_id": "",
                    "email": "johnw@test.com",
                    "updated": "2017-01-27T22:23:42Z",
                    "published": "2016-05-22T21:21:36Z"
                },
                "generator": {
                    "id": "BGxGMkCub9LJMTQmBJpt9OI"
                },                
                "published": "2016-11-15T02:00:25Z",
                "verb": "post",
                "id": 563
            }
        ]
    }
}