Users endpoints

The Users endpoints enable you to create, retrieve, update and delete users in your Quantive Results account.

DEPRECATED
🔗
get
/accounts/users
Gets all users in the specified Gtmhub account.
This endpoint is deprecated. Use Get Users V2 instead.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
filterstringFilter query in Lucene query syntax. Supports filtering by: email, name, roles. Filter syntax: filter=property:value. To filter by roles, use filter=roles:roleId1,roleId2.
expected in query, sample value:
roles:573dbb61ed915d0005cc2c4d,roles:573dbb61ed915d0005cc2c7f
skipintegerHow many entities to skip when executing a get query. By default skip value is 0. Used when implementing paging
expected in query, sample value:
50
takeintegerThe max number of entities that can be returned by the get query. By default take value is 100. Used when implementing paging
expected in query, sample value:
50
includeShadowedRolesbooleanSpecifies whether or not to include shadowed (e.g. team roles) user roles in the response. If this parameter is set to 'true' all user roles in current account will be fetched. If set to 'false' or not set at all, shadowed roles (like team roles) will be excluded from the result.
expected in query, sample value:
true
Expected response codes
200usersResponse
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/accounts/users?filter=roles:573dbb61ed915d0005cc2c4d,roles:573dbb61ed915d0005cc2c7f&skip=50&take=50&includeShadowedRoles=true' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/accounts/users?filter=roles:573dbb61ed915d0005cc2c4d,roles:573dbb61ed915d0005cc2c7f&skip=50&take=50&includeShadowedRoles=true", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/accounts/users"



requests.get(url, headers = headers)
{
    "items": [
        {
            "accountDomain": "string value",
            "accountId": "string value",
            "accountName": "string value",
            "clientId": "string value",
            "createdById": "string value",
            "dateCreated": "string value",
            "dateInvited": "string value",
            "email": "string value",
            "firstName": "string value",
            "id": "string value",
            "identities": {
                "items": [
                    {
                        "clientId": "string value",
                        "connection": "string value",
                        "isSocial": false,
                        "name": "string value",
                        "provider": "string value"
                    }
                ],
                "totalCount": 2
            },
            "invitedBy": "string value",
            "isActive": false,
            "isPrimary": false,
            "isSSOBased": false,
            "isSwitched": false,
            "language": "string value",
            "lastName": "string value",
            "name": "string value",
            "notificationSettings": {
                "subjectsOptedOut": [
                    "string value 1",
                    "string value 2"
                ]
            },
            "permissions": [
                "string value 1",
                "string value 2"
            ],
            "picture": "string value",
            "pictureInfo": {
                "canEditPicture": false,
                "isActive": false,
                "isPictureEdited": false,
                "isSSOBased": false
            },
            "roles": [
                {
                    "accountId": "string",
                    "description": "string value",
                    "id": "string",
                    "name": "string value",
                    "team": {
                        "ExternalTeamMapping": {
                            "ExternalId": "string value",
                            "ExternalSystem": "string value"
                        },
                        "accountId": "string",
                        "avatar": "string value",
                        "color": "string value",
                        "createdById": "string",
                        "dateCreated": "string value",
                        "description": "string value",
                        "dynamicMetricCount": 2,
                        "id": "string",
                        "manager": "string",
                        "manualMetricCount": 2,
                        "members": [
                            "ID"
                        ],
                        "membersGoalCount": 2,
                        "mentions": {},
                        "modifiedById": "string",
                        "movedExternalMembers": [
                            "ID"
                        ],
                        "name": "string value",
                        "parentId": "string",
                        "picture": "string value",
                        "tags": [
                            {
                                "id": "ID",
                                "isActive": "IsActiveFlag",
                                "name": "string value",
                                "title": "string value"
                            }
                        ],
                        "teamGoalCount": 2
                    }
                }
            ],
            "settings": "string value",
            "subscriptionType": "string value",
            "teamIds": [
                "string value 1",
                "string value 2"
            ],
            "userSettings": {
                "alignmentTreeFilter": {
                    "ownerIds": "string value",
                    "tags": "string value",
                    "teamIds": "string value"
                },
                "alignmentTreeMode": "string value",
                "checklist": {
                    "optOut": false,
                    "showCards": {
                        "inviteTeammate": false,
                        "visitDemoAccount": false,
                        "visitMarketplace": false
                    },
                    "stepsV1": {
                        "createdOkr": false,
                        "invitedTeammate": false,
                        "visitedDemoAccount": false,
                        "visitedMarketplace": false,
                        "watchedVideo": false
                    },
                    "stepsV1Completed": false
                },
                "collapsedEntities": [
                    "string value 1",
                    "string value 2"
                ],
                "customFieldsSettings": {
                    "hideManageOrderBanner": false,
                    "lastUpdated": "string value"
                },
                "dashboardSettings": [
                    {
                        "dashboardId": "string value",
                        "settings": [
                            "DashboardItemSetting"
                        ]
                    }
                ],
                "emailVerified": false,
                "favs": [
                    {
                        "id": "string value",
                        "name": "string value",
                        "type": "string value"
                    }
                ],
                "goalsGrid": [
                    {
                        "field": "string value",
                        "isCustom": false,
                        "label": "string value",
                        "visible": false
                    }
                ],
                "goalsTreeMode": "string value",
                "homeCollapsedItems": {
                    "myOkrs": false,
                    "todo": false
                },
                "homeScreen": "string value",
                "insightTemplateSuggestions": {
                    "dismissed": false,
                    "insightboards": [
                        {
                            "insightboardId": "string value",
                            "linkToMarketplaceDismissed": false,
                            "numberOfSuggestionsToShow": 2
                        }
                    ],
                    "tooltipShown": false
                },
                "insightboardParams": {},
                "kpiVirtualGroups": {
                    "favorites": [
                        "string value 1",
                        "string value 2"
                    ]
                },
                "kpis": {
                    "from": "string value",
                    "groupBy": "string value",
                    "to": "string value"
                },
                "leftNavItems": {
                    "hub": false,
                    "insights": false,
                    "leftNavIsClosed": false,
                    "lists": false,
                    "okrs": false,
                    "people": false,
                    "reports": false
                },
                "listFilters": [
                    "string value 1",
                    "string value 2"
                ],
                "listIds": [
                    "string value 1",
                    "string value 2"
                ],
                "onboardingMetadata": {},
                "profilesSettings": {
                    "employeeProfileSettings": {
                        "processSessionFilter": {
                            "sessionIds": [
                                "string value 1",
                                "string value 2"
                            ]
                        },
                        "progressSessionFilter": {
                            "sessionIds": [
                                "string value 1",
                                "string value 2"
                            ]
                        }
                    }
                },
                "resizableGridColumns": [
                    {
                        "goalProperty": {
                            "propertyName": "string value",
                            "type": "string value",
                            "viewName": "string value"
                        },
                        "metricProperty": {
                            "propertyName": "string value",
                            "type": "string value",
                            "viewName": "string value"
                        },
                        "taskProperty": {
                            "propertyName": "string value",
                            "type": "string value",
                            "viewName": "string value"
                        },
                        "width": 2
                    }
                ],
                "sessionsIds": [
                    {
                        "linkedSessionIds": [
                            "string value 1",
                            "string value 2"
                        ],
                        "parentId": "string value"
                    }
                ],
                "showArchivedSessions": false,
                "snippets": [
                    {
                        "code": "string value",
                        "language": "string value",
                        "name": "string value"
                    }
                ],
                "surveys": {
                    "shown": [
                        "string value 1",
                        "string value 2"
                    ]
                },
                "taskOrder": "string value",
                "taskView": "string value",
                "teamsView": "string value",
                "theme": "string value",
                "treeViewOrder": {
                    "field": "string value",
                    "name": "string value"
                },
                "useDragMode": false,
                "useScrollbars": false,
                "verificationEmailSent": false,
                "whiteboards": {
                    "opened": [
                        {
                            "id": "string value",
                            "openedAt": "string value",
                            "zoom": 2
                        }
                    ]
                }
            }
        }
    ],
    "totalCount": 2
}
🔗
get
/users
Loads all users for a specific account using filter, sort and field projection.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
fields
*
stringSpecifies the list of fields to be returned in the response. For example, to get only the user's email, first and last name use fields=email,firstName,lastName
expected in path, sample value:
email,firstName,lastName
limitintegerThe max number of entities that can be returned by the GET query. By default take value is 100.
expected in query, sample value:
10
formattingstringThe formatting used for the description and custom fields of type text area. By default returned as 'mentionsMarkup'. Ex: "@[John Smith:[email protected]:602a65efc05575000123291b]". Use 'plainText' if you need the response to be returned without markdown and special markup. Ex: "@John Smith"
expected in query, sample value:
plainText
filterstringSpecifies the filter in Mongo syntax. For example, to get a single user by their Id, use filter={"_id":"611fce386400780001b19e1e"}.
expected in query, sample value:
{"_id":"611fce386400780001b19e1e"}
sortstringSpecifies the sort expression. For example, to sort users by their creation date user sort=dateCreated or sort=-dateCreated (to sort in descending order).
expected in query, sample value:
dateCreated
skipstringSpecifies how many items to skip from the beginning of the collection. Use this to implement paging. For example, if you want to get users 5-10 use skip=5&take=5. Always sort your response to ensure that you're paging through the collection in the same order, for example sort=dateCreated&skip=5&take=5.
expected in query, sample value:
5
takestringSpecifies how many items to take from the collection. Use this to implement paging. For example, if you want to get the first 10 users use take=10. Always sort your response to ensure that you're paging through the collection in the same order, for example sort=dateCreated&take=10.
expected in query, sample value:
10
Expected response codes
200usersResponse
401unauthorized
402payment required

curl -X GET 'https://app.gtmhub.com/api/v2/users?limit=10&formatting=plainText&filter={"_id":"611fce386400780001b19e1e"}&sort=dateCreated&skip=5&take=10' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v2/users?limit=10&formatting=plainText&filter={"_id":"611fce386400780001b19e1e"}&sort=dateCreated&skip=5&take=10", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v2/users"



requests.get(url, headers = headers)
{
    "items": [
        {
            "accountDomain": "string value",
            "accountId": "string value",
            "accountName": "string value",
            "clientId": "string value",
            "createdById": "string value",
            "dateCreated": "string value",
            "dateInvited": "string value",
            "email": "string value",
            "firstName": "string value",
            "id": "string value",
            "identities": {
                "items": [
                    {
                        "clientId": "string value",
                        "connection": "string value",
                        "isSocial": false,
                        "name": "string value",
                        "provider": "string value"
                    }
                ],
                "totalCount": 2
            },
            "invitedBy": "string value",
            "isActive": false,
            "isPrimary": false,
            "isSSOBased": false,
            "isSwitched": false,
            "language": "string value",
            "lastName": "string value",
            "name": "string value",
            "notificationSettings": {
                "subjectsOptedOut": [
                    "string value 1",
                    "string value 2"
                ]
            },
            "permissions": [
                "string value 1",
                "string value 2"
            ],
            "picture": "string value",
            "pictureInfo": {
                "canEditPicture": false,
                "isActive": false,
                "isPictureEdited": false,
                "isSSOBased": false
            },
            "roles": [
                {
                    "accountId": "string",
                    "description": "string value",
                    "id": "string",
                    "name": "string value",
                    "team": {
                        "ExternalTeamMapping": {
                            "ExternalId": "string value",
                            "ExternalSystem": "string value"
                        },
                        "accountId": "string",
                        "avatar": "string value",
                        "color": "string value",
                        "createdById": "string",
                        "dateCreated": "string value",
                        "description": "string value",
                        "dynamicMetricCount": 2,
                        "id": "string",
                        "manager": "string",
                        "manualMetricCount": 2,
                        "members": [
                            "ID"
                        ],
                        "membersGoalCount": 2,
                        "mentions": {},
                        "modifiedById": "string",
                        "movedExternalMembers": [
                            "ID"
                        ],
                        "name": "string value",
                        "parentId": "string",
                        "picture": "string value",
                        "tags": [
                            {
                                "id": "ID",
                                "isActive": "IsActiveFlag",
                                "name": "string value",
                                "title": "string value"
                            }
                        ],
                        "teamGoalCount": 2
                    }
                }
            ],
            "settings": "string value",
            "subscriptionType": "string value",
            "teamIds": [
                "string value 1",
                "string value 2"
            ],
            "userSettings": {
                "alignmentTreeFilter": {
                    "ownerIds": "string value",
                    "tags": "string value",
                    "teamIds": "string value"
                },
                "alignmentTreeMode": "string value",
                "checklist": {
                    "optOut": false,
                    "showCards": {
                        "inviteTeammate": false,
                        "visitDemoAccount": false,
                        "visitMarketplace": false
                    },
                    "stepsV1": {
                        "createdOkr": false,
                        "invitedTeammate": false,
                        "visitedDemoAccount": false,
                        "visitedMarketplace": false,
                        "watchedVideo": false
                    },
                    "stepsV1Completed": false
                },
                "collapsedEntities": [
                    "string value 1",
                    "string value 2"
                ],
                "customFieldsSettings": {
                    "hideManageOrderBanner": false,
                    "lastUpdated": "string value"
                },
                "dashboardSettings": [
                    {
                        "dashboardId": "string value",
                        "settings": [
                            "DashboardItemSetting"
                        ]
                    }
                ],
                "emailVerified": false,
                "favs": [
                    {
                        "id": "string value",
                        "name": "string value",
                        "type": "string value"
                    }
                ],
                "goalsGrid": [
                    {
                        "field": "string value",
                        "isCustom": false,
                        "label": "string value",
                        "visible": false
                    }
                ],
                "goalsTreeMode": "string value",
                "homeCollapsedItems": {
                    "myOkrs": false,
                    "todo": false
                },
                "homeScreen": "string value",
                "insightTemplateSuggestions": {
                    "dismissed": false,
                    "insightboards": [
                        {
                            "insightboardId": "string value",
                            "linkToMarketplaceDismissed": false,
                            "numberOfSuggestionsToShow": 2
                        }
                    ],
                    "tooltipShown": false
                },
                "insightboardParams": {},
                "kpiVirtualGroups": {
                    "favorites": [
                        "string value 1",
                        "string value 2"
                    ]
                },
                "kpis": {
                    "from": "string value",
                    "groupBy": "string value",
                    "to": "string value"
                },
                "leftNavItems": {
                    "hub": false,
                    "insights": false,
                    "leftNavIsClosed": false,
                    "lists": false,
                    "okrs": false,
                    "people": false,
                    "reports": false
                },
                "listFilters": [
                    "string value 1",
                    "string value 2"
                ],
                "listIds": [
                    "string value 1",
                    "string value 2"
                ],
                "onboardingMetadata": {},
                "profilesSettings": {
                    "employeeProfileSettings": {
                        "processSessionFilter": {
                            "sessionIds": [
                                "string value 1",
                                "string value 2"
                            ]
                        },
                        "progressSessionFilter": {
                            "sessionIds": [
                                "string value 1",
                                "string value 2"
                            ]
                        }
                    }
                },
                "resizableGridColumns": [
                    {
                        "goalProperty": {
                            "propertyName": "string value",
                            "type": "string value",
                            "viewName": "string value"
                        },
                        "metricProperty": {
                            "propertyName": "string value",
                            "type": "string value",
                            "viewName": "string value"
                        },
                        "taskProperty": {
                            "propertyName": "string value",
                            "type": "string value",
                            "viewName": "string value"
                        },
                        "width": 2
                    }
                ],
                "sessionsIds": [
                    {
                        "linkedSessionIds": [
                            "string value 1",
                            "string value 2"
                        ],
                        "parentId": "string value"
                    }
                ],
                "showArchivedSessions": false,
                "snippets": [
                    {
                        "code": "string value",
                        "language": "string value",
                        "name": "string value"
                    }
                ],
                "surveys": {
                    "shown": [
                        "string value 1",
                        "string value 2"
                    ]
                },
                "taskOrder": "string value",
                "taskView": "string value",
                "teamsView": "string value",
                "theme": "string value",
                "treeViewOrder": {
                    "field": "string value",
                    "name": "string value"
                },
                "useDragMode": false,
                "useScrollbars": false,
                "verificationEmailSent": false,
                "whiteboards": {
                    "opened": [
                        {
                            "id": "string value",
                            "openedAt": "string value",
                            "zoom": 2
                        }
                    ]
                }
            }
        }
    ],
    "totalCount": 2
}
DEPRECATED
🔗
get
/users/password/{clientId}/policy
Gets the password policy for the current authenticated user
Parameters
NameTypeDescription
Expected response codes
200string message returned by the service

curl -X GET 'https://app.gtmhub.com/api/v1/users/password/{clientId}/policy' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/password/{clientId}/policy", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/password/{clientId}/policy"



requests.get(url, headers = headers)
🔗
get
/users/{userId}
Gets a single user by provided user ID.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
userId
*
stringSpecifies the user unique identifier (id).
expected in path
formattingstringThe formatting used for the custom fields of type text area. By default they are returned as 'mentionsMarkup' and they can contain markdown and special markup for mentioned people. Use 'plainText' if you want the response without markdown and special markup.
expected in query, sample value:
string
Expected response codes
200userResponse

curl -X GET 'https://app.gtmhub.com/api/v1/users/{userId}?formatting=string' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}?formatting=string", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}"



requests.get(url, headers = headers)
{
    "accountDomain": "string value",
    "accountId": "string value",
    "accountName": "string value",
    "clientId": "string value",
    "createdById": "string value",
    "dateCreated": "string value",
    "dateInvited": "string value",
    "email": "string value",
    "firstName": "string value",
    "id": "string value",
    "identities": {
        "items": [
            {
                "clientId": "string value",
                "connection": "string value",
                "isSocial": false,
                "name": "string value",
                "provider": "string value"
            }
        ],
        "totalCount": 2
    },
    "invitedBy": "string value",
    "isActive": false,
    "isPrimary": false,
    "isSSOBased": false,
    "isSwitched": false,
    "language": "string value",
    "lastName": "string value",
    "name": "string value",
    "notificationSettings": {
        "subjectsOptedOut": [
            "string value 1",
            "string value 2"
        ]
    },
    "permissions": [
        "string value 1",
        "string value 2"
    ],
    "picture": "string value",
    "pictureInfo": {
        "canEditPicture": false,
        "isActive": false,
        "isPictureEdited": false,
        "isSSOBased": false
    },
    "roles": [
        {
            "accountId": "string",
            "description": "string value",
            "id": "string",
            "name": "string value",
            "team": {
                "ExternalTeamMapping": {
                    "ExternalId": "string value",
                    "ExternalSystem": "string value"
                },
                "accountId": "string",
                "avatar": "string value",
                "color": "string value",
                "createdById": "string",
                "dateCreated": "string value",
                "description": "string value",
                "dynamicMetricCount": 2,
                "id": "string",
                "manager": "string",
                "manualMetricCount": 2,
                "members": [
                    "string"
                ],
                "membersGoalCount": 2,
                "mentions": {},
                "modifiedById": "string",
                "movedExternalMembers": [
                    "string"
                ],
                "name": "string value",
                "parentId": "string",
                "picture": "string value",
                "tags": [
                    {
                        "id": "string",
                        "isActive": {
                            "IsActive": false
                        },
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "teamGoalCount": 2
            }
        }
    ],
    "settings": "string value",
    "subscriptionType": "string value",
    "teamIds": [
        "string value 1",
        "string value 2"
    ],
    "userSettings": {
        "alignmentTreeFilter": {
            "ownerIds": "string value",
            "tags": "string value",
            "teamIds": "string value"
        },
        "alignmentTreeMode": "string value",
        "checklist": {
            "optOut": false,
            "showCards": {
                "inviteTeammate": false,
                "visitDemoAccount": false,
                "visitMarketplace": false
            },
            "stepsV1": {
                "createdOkr": false,
                "invitedTeammate": false,
                "visitedDemoAccount": false,
                "visitedMarketplace": false,
                "watchedVideo": false
            },
            "stepsV1Completed": false
        },
        "collapsedEntities": [
            "string value 1",
            "string value 2"
        ],
        "customFieldsSettings": {
            "hideManageOrderBanner": false,
            "lastUpdated": "string value"
        },
        "dashboardSettings": [
            {
                "dashboardId": "string value",
                "settings": [
                    {
                        "dynamicValues": [
                            "DashboardDynamicValue"
                        ],
                        "name": "string value",
                        "value": "string value",
                        "valueDisplayName": "string value",
                        "valueDisplayNameAsArray": [
                            "string value 1",
                            "string value 2"
                        ]
                    }
                ]
            }
        ],
        "emailVerified": false,
        "favs": [
            {
                "id": "string value",
                "name": "string value",
                "type": "string value"
            }
        ],
        "goalsGrid": [
            {
                "field": "string value",
                "isCustom": false,
                "label": "string value",
                "visible": false
            }
        ],
        "goalsTreeMode": "string value",
        "homeCollapsedItems": {
            "myOkrs": false,
            "todo": false
        },
        "homeScreen": "string value",
        "insightTemplateSuggestions": {
            "dismissed": false,
            "insightboards": [
                {
                    "insightboardId": "string value",
                    "linkToMarketplaceDismissed": false,
                    "numberOfSuggestionsToShow": 2
                }
            ],
            "tooltipShown": false
        },
        "insightboardParams": {},
        "kpiVirtualGroups": {
            "favorites": [
                "string value 1",
                "string value 2"
            ]
        },
        "kpis": {
            "from": "string value",
            "groupBy": "string value",
            "to": "string value"
        },
        "leftNavItems": {
            "hub": false,
            "insights": false,
            "leftNavIsClosed": false,
            "lists": false,
            "okrs": false,
            "people": false,
            "reports": false
        },
        "listFilters": [
            "string value 1",
            "string value 2"
        ],
        "listIds": [
            "string value 1",
            "string value 2"
        ],
        "onboardingMetadata": {},
        "profilesSettings": {
            "employeeProfileSettings": {
                "processSessionFilter": {
                    "sessionIds": [
                        "string value 1",
                        "string value 2"
                    ]
                },
                "progressSessionFilter": {
                    "sessionIds": [
                        "string value 1",
                        "string value 2"
                    ]
                }
            }
        },
        "resizableGridColumns": [
            {
                "goalProperty": {
                    "propertyName": "string value",
                    "type": "string value",
                    "viewName": "string value"
                },
                "metricProperty": {
                    "propertyName": "string value",
                    "type": "string value",
                    "viewName": "string value"
                },
                "taskProperty": {
                    "propertyName": "string value",
                    "type": "string value",
                    "viewName": "string value"
                },
                "width": 2
            }
        ],
        "sessionsIds": [
            {
                "linkedSessionIds": [
                    "string value 1",
                    "string value 2"
                ],
                "parentId": "string value"
            }
        ],
        "showArchivedSessions": false,
        "snippets": [
            {
                "code": "string value",
                "language": "string value",
                "name": "string value"
            }
        ],
        "surveys": {
            "shown": [
                "string value 1",
                "string value 2"
            ]
        },
        "taskOrder": "string value",
        "taskView": "string value",
        "teamsView": "string value",
        "theme": "string value",
        "treeViewOrder": {
            "field": "string value",
            "name": "string value"
        },
        "useDragMode": false,
        "useScrollbars": false,
        "verificationEmailSent": false,
        "whiteboards": {
            "opened": [
                {
                    "id": "string value",
                    "openedAt": "string value",
                    "zoom": 2
                }
            ]
        }
    }
}
🔗
get
/users/{userId}/managers
Gets all manager id's for teams that user belongs to where the user is not the manager of the team.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
userId
*
stringSpecifies the user unique identifier (id).
expected in path
Expected response codes
200userManagersResponse

curl -X GET 'https://app.gtmhub.com/api/v1/users/{userId}/managers' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}/managers", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}/managers"



requests.get(url, headers = headers)
{
    "count": 2,
    "managers": [
        "6137904697f8520001e18ff3",
        "607db83f2a004000014k16a4"
    ]
}
DEPRECATED
🔗
post
/users
Creates a new user. You must have the correct permissions to create a new user.
This endpoint is deprecated as of 30/05/2022. Use POST Users instead.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringInternal use only. Specifies additional parameters in the request header.
expected in header
skipEmailbooleanSkip sending email invitation.
expected in query
user
*
objectThe object representing a user.
expected in body, sample value:
{
    "email": "[email protected]",
    "firstName": "John",
    "language": "English",
    "lastName": "Doe",
    "userName": "[email protected]"
}
Expected response codes
201userResponse
401unauthorized
429too many requests

curl -X POST 'https://app.gtmhub.com/api/v1/users?skipEmail=undefined' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '{"email":"[email protected]","firstName":"John","language":"English","lastName":"Doe","userName":"[email protected]"}'

var body ={ "email": "[email protected]", "firstName": "John", "language": "English", "lastName": "Doe", "userName": "[email protected]" };

var settings = { "url": "https://app.gtmhub.com/api/v1/users?skipEmail=undefined", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users"

body = { "email": "[email protected]", "firstName": "John", "language": "English", "lastName": "Doe", "userName": "[email protected]" };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "accountDomain": "string value",
    "accountId": "string value",
    "accountName": "string value",
    "clientId": "string value",
    "createdById": "string value",
    "dateCreated": "string value",
    "dateInvited": "string value",
    "email": "string value",
    "firstName": "string value",
    "id": "string value",
    "identities": {
        "items": [
            {
                "clientId": "string value",
                "connection": "string value",
                "isSocial": false,
                "name": "string value",
                "provider": "string value"
            }
        ],
        "totalCount": 2
    },
    "invitedBy": "string value",
    "isActive": false,
    "isPrimary": false,
    "isSSOBased": false,
    "isSwitched": false,
    "language": "string value",
    "lastName": "string value",
    "name": "string value",
    "notificationSettings": {
        "subjectsOptedOut": [
            "string value 1",
            "string value 2"
        ]
    },
    "permissions": [
        "string value 1",
        "string value 2"
    ],
    "picture": "string value",
    "pictureInfo": {
        "canEditPicture": false,
        "isActive": false,
        "isPictureEdited": false,
        "isSSOBased": false
    },
    "roles": [
        {
            "accountId": "string",
            "description": "string value",
            "id": "string",
            "name": "string value",
            "team": {
                "ExternalTeamMapping": {
                    "ExternalId": "string value",
                    "ExternalSystem": "string value"
                },
                "accountId": "string",
                "avatar": "string value",
                "color": "string value",
                "createdById": "string",
                "dateCreated": "string value",
                "description": "string value",
                "dynamicMetricCount": 2,
                "id": "string",
                "manager": "string",
                "manualMetricCount": 2,
                "members": [
                    "string"
                ],
                "membersGoalCount": 2,
                "mentions": {},
                "modifiedById": "string",
                "movedExternalMembers": [
                    "string"
                ],
                "name": "string value",
                "parentId": "string",
                "picture": "string value",
                "tags": [
                    {
                        "id": "string",
                        "isActive": {
                            "IsActive": false
                        },
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "teamGoalCount": 2
            }
        }
    ],
    "settings": "string value",
    "subscriptionType": "string value",
    "teamIds": [
        "string value 1",
        "string value 2"
    ],
    "userSettings": {
        "alignmentTreeFilter": {
            "ownerIds": "string value",
            "tags": "string value",
            "teamIds": "string value"
        },
        "alignmentTreeMode": "string value",
        "checklist": {
            "optOut": false,
            "showCards": {
                "inviteTeammate": false,
                "visitDemoAccount": false,
                "visitMarketplace": false
            },
            "stepsV1": {
                "createdOkr": false,
                "invitedTeammate": false,
                "visitedDemoAccount": false,
                "visitedMarketplace": false,
                "watchedVideo": false
            },
            "stepsV1Completed": false
        },
        "collapsedEntities": [
            "string value 1",
            "string value 2"
        ],
        "customFieldsSettings": {
            "hideManageOrderBanner": false,
            "lastUpdated": "string value"
        },
        "dashboardSettings": [
            {
                "dashboardId": "string value",
                "settings": [
                    {
                        "dynamicValues": [
                            "DashboardDynamicValue"
                        ],
                        "name": "string value",
                        "value": "string value",
                        "valueDisplayName": "string value",
                        "valueDisplayNameAsArray": [
                            "string value 1",
                            "string value 2"
                        ]
                    }
                ]
            }
        ],
        "emailVerified": false,
        "favs": [
            {
                "id": "string value",
                "name": "string value",
                "type": "string value"
            }
        ],
        "goalsGrid": [
            {
                "field": "string value",
                "isCustom": false,
                "label": "string value",
                "visible": false
            }
        ],
        "goalsTreeMode": "string value",
        "homeCollapsedItems": {
            "myOkrs": false,
            "todo": false
        },
        "homeScreen": "string value",
        "insightTemplateSuggestions": {
            "dismissed": false,
            "insightboards": [
                {
                    "insightboardId": "string value",
                    "linkToMarketplaceDismissed": false,
                    "numberOfSuggestionsToShow": 2
                }
            ],
            "tooltipShown": false
        },
        "insightboardParams": {},
        "kpiVirtualGroups": {
            "favorites": [
                "string value 1",
                "string value 2"
            ]
        },
        "kpis": {
            "from": "string value",
            "groupBy": "string value",
            "to": "string value"
        },
        "leftNavItems": {
            "hub": false,
            "insights": false,
            "leftNavIsClosed": false,
            "lists": false,
            "okrs": false,
            "people": false,
            "reports": false
        },
        "listFilters": [
            "string value 1",
            "string value 2"
        ],
        "listIds": [
            "string value 1",
            "string value 2"
        ],
        "onboardingMetadata": {},
        "profilesSettings": {
            "employeeProfileSettings": {
                "processSessionFilter": {
                    "sessionIds": [
                        "string value 1",
                        "string value 2"
                    ]
                },
                "progressSessionFilter": {
                    "sessionIds": [
                        "string value 1",
                        "string value 2"
                    ]
                }
            }
        },
        "resizableGridColumns": [
            {
                "goalProperty": {
                    "propertyName": "string value",
                    "type": "string value",
                    "viewName": "string value"
                },
                "metricProperty": {
                    "propertyName": "string value",
                    "type": "string value",
                    "viewName": "string value"
                },
                "taskProperty": {
                    "propertyName": "string value",
                    "type": "string value",
                    "viewName": "string value"
                },
                "width": 2
            }
        ],
        "sessionsIds": [
            {
                "linkedSessionIds": [
                    "string value 1",
                    "string value 2"
                ],
                "parentId": "string value"
            }
        ],
        "showArchivedSessions": false,
        "snippets": [
            {
                "code": "string value",
                "language": "string value",
                "name": "string value"
            }
        ],
        "surveys": {
            "shown": [
                "string value 1",
                "string value 2"
            ]
        },
        "taskOrder": "string value",
        "taskView": "string value",
        "teamsView": "string value",
        "theme": "string value",
        "treeViewOrder": {
            "field": "string value",
            "name": "string value"
        },
        "useDragMode": false,
        "useScrollbars": false,
        "verificationEmailSent": false,
        "whiteboards": {
            "opened": [
                {
                    "id": "string value",
                    "openedAt": "string value",
                    "zoom": 2
                }
            ]
        }
    }
}
🔗
post
/users/activate
Bulk activate of the provided users.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringInternal use only. Specifies additional parameters in the request header.
expected in header
usersIds
*
An array of selected users to invited in batch.
expected in body, sample value:
["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]
Expected response codes
200BulkUpdateUsersActivationStatusResponse

curl -X POST 'https://app.gtmhub.com/api/v1/users/activate' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]'

var body ='["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]'

var settings = { "url": "https://app.gtmhub.com/api/v1/users/activate", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/activate"

body = ["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"];

requests.post(url, data=json.dumps(body), headers = headers)
{
    "hasFailures": false,
    "items": [
        {
            "isSuccessful": false,
            "userId": "string value"
        }
    ]
}
🔗
post
/users/deactivate
Bulk deactivate of the provided users.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringInternal use only. Specifies additional parameters in the request header.
expected in header
usersIds
*
An array of selected users to invited in batch.
expected in body, sample value:
["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]
Expected response codes
200BulkUpdateUsersActivationStatusResponse

curl -X POST 'https://app.gtmhub.com/api/v1/users/deactivate' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]'

var body ='["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]'

var settings = { "url": "https://app.gtmhub.com/api/v1/users/deactivate", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/deactivate"

body = ["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"];

requests.post(url, data=json.dumps(body), headers = headers)
{
    "hasFailures": false,
    "items": [
        {
            "isSuccessful": false,
            "userId": "string value"
        }
    ]
}
🔗
post
/users/delete
Bulk delete of the provided users.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringInternal use only. Specifies additional parameters in the request header.
expected in header
userIDs
*
An array of selected users to be deleted in batch.
expected in body, sample value:
["6169fc51cfe8soer8548f4b0f", "6169fc53cfe80388888f4b1d"]
Expected response codes
200usersBulkDeleteResponse

curl -X POST 'https://app.gtmhub.com/api/v1/users/delete' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '["6169fc51cfe8soer8548f4b0f", "6169fc53cfe80388888f4b1d"]'

var body ='["6169fc51cfe8soer8548f4b0f", "6169fc53cfe80388888f4b1d"]'

var settings = { "url": "https://app.gtmhub.com/api/v1/users/delete", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/delete"

body = ["6169fc51cfe8soer8548f4b0f", "6169fc53cfe80388888f4b1d"];

requests.post(url, data=json.dumps(body), headers = headers)
{
    "hasFailures": false,
    "items": [
        {
            "isSuccessful": false,
            "userId": "string value"
        }
    ]
}
🔗
post
/users/invitations
Sends invitation emails to selected users.
Helpful if you invited users to your account and chose to not send invitation emails.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
usersIds
*
An array of selected users to invited in batch.
expected in body, sample value:
["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]
Expected response codes
204no content
401unauthorized
402payment required

curl -X POST 'https://app.gtmhub.com/api/v1/users/invitations' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]'

var body ='["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"]'

var settings = { "url": "https://app.gtmhub.com/api/v1/users/invitations", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/invitations"

body = ["6154ad124654jdk901e43c15", "6166f85e4a38b89301380b13"];

requests.post(url, data=json.dumps(body), headers = headers)
🔗
post
/users/roles
Bulk update to change roles for current users.
Supports multiple roles and multiples users to be updated simultaneously.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
bulkUpdateUserRoles
*
objectThe object representing a bulk request to update user roles.
expected in body, sample value:
{
    "roleIds": [
        "573d93d9ed915d00052e321d, 5d970316e65bc40001a51df2"
    ],
    "userIds": [
        "607db83f2a004000014aax45",
        "60abdcc666fde50001321s23s"
    ]
}
Expected response codes
200bulkUpdateUsersRolesResponse

curl -X POST 'https://app.gtmhub.com/api/v1/users/roles' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"roleIds":["573d93d9ed915d00052e321d, 5d970316e65bc40001a51df2"],"userIds":["607db83f2a004000014aax45","60abdcc666fde50001321s23s"]}'

var body ={ "roleIds": [ "573d93d9ed915d00052e321d, 5d970316e65bc40001a51df2" ], "userIds": [ "607db83f2a004000014aax45", "60abdcc666fde50001321s23s" ] };

var settings = { "url": "https://app.gtmhub.com/api/v1/users/roles", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/roles"

body = { "roleIds": [ "573d93d9ed915d00052e321d, 5d970316e65bc40001a51df2" ], "userIds": [ "607db83f2a004000014aax45", "60abdcc666fde50001321s23s" ] };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "hasFailures": false,
    "items": [
        {
            "failedAddings": [
                {
                    "reason": "string value",
                    "roleId": "string value"
                }
            ],
            "failedRemoves": [
                {
                    "reason": "string value",
                    "roleId": "string value"
                }
            ],
            "userId": "string value"
        }
    ],
    "updatedUsersCount": 2
}
🔗
post
/users/{userId}/roles
Assigns a single role to a user.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringInternal use only. Specifies additional parameters in the request header.
expected in header
userId
*
stringSpecifies the user unique identifier (id).
expected in path
userRoleRequest
*
objectRelation between a user and a role.
expected in body, sample value:
{
    "roleId": "5d970316e65bc40001a51d13"
}
Expected response codes
404not found

curl -X POST 'https://app.gtmhub.com/api/v1/users/{userId}/roles' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '{"roleId":"5d970316e65bc40001a51d13"}'

var body ={ "roleId": "5d970316e65bc40001a51d13" };

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}/roles", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}/roles"

body = { "roleId": "5d970316e65bc40001a51d13" };

requests.post(url, data=json.dumps(body), headers = headers)
🔗
post
/users/{userId}/send-change-password-email
This handler is used to prepare to send the reset password link.
Parameters
NameTypeDescription
Expected response codes
401unauthorized

curl -X POST 'https://app.gtmhub.com/api/v1/users/{userId}/send-change-password-email' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}/send-change-password-email", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}/send-change-password-email"



requests.post(url, headers = headers)
DEPRECATED
🔗
put
/users/settings
Updates the user's personal settings.
This endpoint is deprecated. Use PUT Users instead.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringInternal use only. Specifies additional parameters in the request header.
expected in header
Expected response codes

curl -X PUT 'https://app.gtmhub.com/api/v1/users/settings' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/settings", "method": "PUT", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/settings"



requests.put(url, headers = headers)
🔗
put
/users/{userId}
Updates the user's personal language settings.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringInternal use only. Specifies additional parameters in the request header.
expected in header
userId
*
stringSpecifies the user unique identifier (id).
expected in path
userSettingsRequest
*
object
expected in body, sample value:
{
    "language": "english",
    "notificationSettings": {
        "subjectsOptedOut": [
            "string value 1",
            "string value 2"
        ]
    }
}
Expected response codes

curl -X PUT 'https://app.gtmhub.com/api/v1/users/{userId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '{"language":"english","notificationSettings":{"subjectsOptedOut":["string value 1","string value 2"]}}'

var body ={ "language": "english", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] } };

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}", "method": "PUT", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}"

body = { "language": "english", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] } };

requests.put(url, data=json.dumps(body), headers = headers)
🔗
patch
/users/{userId}
Updates the users first and last name.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
userId
*
stringSpecifies the user unique identifier (id).
expected in path
Expected response codes
403forbidden
404not found

curl -X PATCH 'https://app.gtmhub.com/api/v1/users/{userId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}", "method": "PATCH", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}"



requests.patch(url, headers = headers)
🔗
patch
/users/{userId}/info
Updates the users first and last name.
Parameters
NameTypeDescription
userId
*
stringSpecifies the user unique identifier (id).
expected in path
Expected response codes

curl -X PATCH 'https://app.gtmhub.com/api/v1/users/{userId}/info' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}/info", "method": "PATCH", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}/info"



requests.patch(url, headers = headers)
🔗
delete
/accounts/user/{id}
Deletes a user with the specified id.
This operation deletes the user from the database irreversibly.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringThe ID of the user.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200ok
400bad request
401unauthorized
402payment required
403forbidden
409conflict
500internal server error

curl -X DELETE 'https://app.gtmhub.com/api/v1/accounts/user/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/accounts/user/{id}", "method": "DELETE", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/accounts/user/{id}"



requests.delete(url, headers = headers)
🔗
delete
/users/{userId}/roles/{roleId}
Deletes selected role from selected user.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
userId
*
stringSpecifies the user unique identifier (id).
expected in path
roleId
*
stringSpecifies the unique role identifier (roleId).
expected in path
Expected response codes
404not found

curl -X DELETE 'https://app.gtmhub.com/api/v1/users/{userId}/roles/{roleId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}/roles/{roleId}", "method": "DELETE", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}/roles/{roleId}"



requests.delete(url, headers = headers)
🔗
delete
/users/{userId}/roles?ids={roleIds}
Deletes selected roles from selected user.
Parameters
NameTypeDescription
Expected response codes

curl -X DELETE 'https://app.gtmhub.com/api/v1/users/{userId}/roles?ids={roleIds}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.gtmhub.com/api/v1/users/{userId}/roles?ids={roleIds}", "method": "DELETE", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/users/{userId}/roles?ids={roleIds}"



requests.delete(url, headers = headers)