Deprecated endpoints

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
401unauthorized

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",
                        "id": "string",
                        "manager": "string",
                        "members": [
                            "ID"
                        ],
                        "mentions": {},
                        "modifiedById": "string",
                        "movedExternalMembers": [
                            "ID"
                        ],
                        "name": "string value",
                        "parentId": "string",
                        "picture": "string value",
                        "richTextDescription": "string value",
                        "tags": [
                            {
                                "id": "ID",
                                "isActive": "IsActiveFlag",
                                "name": "string value",
                                "title": "string value"
                            }
                        ]
                    }
                }
            ],
            "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"
                ],
                "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"
                ],
                "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",
                "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
/announcements
This endpoint is deprecated as of March 15, 2022. For more information see [Gtmhub to sunset Announcements functionality](https://gtmhub.com/blog/gtmhub-sunsets-announcements-functionality)
Gets all announcements that match the specified filters Use the ?fields= query string parameter to control the response.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
formattingstringThe formatting used for the comment. By default it is returned as 'mentionsMarkup' and it 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
200announcementsResponse
401unauthorized

curl -X GET 'https://app.gtmhub.com/api/v1/announcements?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/announcements?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/announcements"



requests.get(url, headers = headers)
{
    "items": [
        {
            "announcementTargetId": "string value",
            "announcementType": "string value",
            "author": {
                "accountId": "string value",
                "dateCreated": "string value",
                "email": "string value",
                "firstName": "string value",
                "id": "string value",
                "language": "string value",
                "lastName": "string value",
                "name": "string value",
                "picture": "string value"
            },
            "authorId": "string value",
            "comment": "string value",
            "dateCreated": "string value",
            "id": "string value",
            "notificationStrategy": "string value",
            "notify": [
                "string value 1",
                "string value 2"
            ]
        }
    ],
    "totalCount": 2
}
DEPRECATED
🔗
get
/announcements/{id}
This endpoint is deprecated as of March 15, 2022. For more information see [Gtmhub to sunset Announcements functionality](https://gtmhub.com/blog/gtmhub-sunsets-announcements-functionality)
Gets a single announcement based on the specified id
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringThe ID of the announcement.
expected in path, sample value:
5be26318e5274a0007f17f61
formattingstringThe formatting used for the comment. By default it is returned as 'mentionsMarkup' and it 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
200announcementResponse
401unauthorized

curl -X GET 'https://app.gtmhub.com/api/v1/announcements/{id}?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/announcements/{id}?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/announcements/{id}"



requests.get(url, headers = headers)
{
    "announcementTargetId": "string value",
    "announcementType": "string value",
    "author": {
        "accountId": "string value",
        "dateCreated": "string value",
        "email": "string value",
        "firstName": "string value",
        "id": "string value",
        "language": "string value",
        "lastName": "string value",
        "name": "string value",
        "picture": "string value"
    },
    "authorId": "string value",
    "comment": "string value",
    "dateCreated": "string value",
    "id": "string value",
    "notificationStrategy": "string value",
    "notify": [
        "string value 1",
        "string value 2"
    ]
}
DEPRECATED
🔗
get
/metrics/owner/{ownerId}
Gets metrics (key results) by a specified owner identifier (id).
This method is deprecated. Use GET Key Results with ownerIds filter instead.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
ownerId
*
stringThe unique identifier of the owner (id).
expected in path
formattingstringThe formatting used for the description and custom fields of type text area. By default returned as 'mentionsMarkup' (Ex: "@[Mariya Velikova:[email protected]:602a65efc05575000123291b]"). Use 'plainText' if you need the response to be returned without markdown and special markup (Ex: "@Mariya Velikova").
expected in query, sample value:
string
Expected response codes
200metricsResponse
401unauthorized

curl -X GET 'https://app.gtmhub.com/api/v1/metrics/owner/{ownerId}?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/metrics/owner/{ownerId}?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/metrics/owner/{ownerId}"



requests.get(url, headers = headers)
{
    "items": [
        {
            "actual": 6,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "cascadeType": "absolute_value",
            "critical": 50,
            "description": "My Description",
            "dueDate": "2021-06-30",
            "dynamic": true,
            "fieldName": "count",
            "format": {
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "string value",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "string value",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "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
403forbidden
500internal server error

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)
DEPRECATED
🔗
post
/announcements
This endpoint is deprecated as of March 15, 2022. For more information see [Gtmhub to sunset Announcements functionality](https://gtmhub.com/blog/gtmhub-sunsets-announcements-functionality)
Creates an announcement in the current gtmhub account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
announcement
*
object
expected in body, sample value:
{
    "announcementTargetId": "string value",
    "announcementType": "string value",
    "authorID": "string value",
    "comment": "string value",
    "notificationStrategy": "string value",
    "notify": [
        "string value 1",
        "string value 2"
    ]
}
Expected response codes
201announcementResponse
401unauthorized

curl -X POST 'https://app.gtmhub.com/api/v1/announcements' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"announcementTargetId":"string value","announcementType":"string value","authorID":"string value","comment":"string value","notificationStrategy":"string value","notify":["string value 1","string value 2"]}'

var body ={ "announcementTargetId": "string value", "announcementType": "string value", "authorID": "string value", "comment": "string value", "notificationStrategy": "string value", "notify": [ "string value 1", "string value 2" ] };

var settings = { "url": "https://app.gtmhub.com/api/v1/announcements", "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/announcements"

body = { "announcementTargetId": "string value", "announcementType": "string value", "authorID": "string value", "comment": "string value", "notificationStrategy": "string value", "notify": [ "string value 1", "string value 2" ] };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "announcementTargetId": "string value",
    "announcementType": "string value",
    "author": {
        "accountId": "string value",
        "dateCreated": "string value",
        "email": "string value",
        "firstName": "string value",
        "id": "string value",
        "language": "string value",
        "lastName": "string value",
        "name": "string value",
        "picture": "string value"
    },
    "authorId": "string value",
    "comment": "string value",
    "dateCreated": "string value",
    "id": "string value",
    "notificationStrategy": "string value",
    "notify": [
        "string value 1",
        "string value 2"
    ]
}
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
400bad request
401unauthorized
403forbidden
409conflict
429too many requests
500internal server error

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",
                "id": "string",
                "manager": "string",
                "members": [
                    "string"
                ],
                "mentions": {},
                "modifiedById": "string",
                "movedExternalMembers": [
                    "string"
                ],
                "name": "string value",
                "parentId": "string",
                "picture": "string value",
                "richTextDescription": "string value",
                "tags": [
                    {
                        "id": "string",
                        "isActive": {
                            "IsActive": false
                        },
                        "name": "string value",
                        "title": "string value"
                    }
                ]
            }
        }
    ],
    "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"
        ],
        "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"
        ],
        "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",
        "treeViewOrder": {
            "field": "string value",
            "name": "string value"
        },
        "useDragMode": false,
        "useScrollbars": false,
        "verificationEmailSent": false,
        "whiteboards": {
            "opened": [
                {
                    "id": "string value",
                    "openedAt": "string value",
                    "zoom": 2
                }
            ]
        }
    }
}
DEPRECATED
🔗
put
/goals/{goalId}
Updates an Objective.
This endpoint is deprecated. Use PATCH Objective instead.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
goal
*
objectThe object representing the goal to be updated.
expected in body, sample value:
{
    "attainmentTypeString": "average_children",
    "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]",
    "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.",
    "links": {},
    "name": "Become a market leader",
    "ownerId": "string value",
    "ownerIds": {},
    "parentId": "6184ed271a35460001f26588",
    "private": false,
    "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]",
    "richTextDescription": "

Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.

", "sessionId": "3284gh256a36860111f56578" }
Expected response codes
200goalMetricsLinksResponse
401unauthorized

curl -X PUT 'https://app.gtmhub.com/api/v1/goals/{goalId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"attainmentTypeString":"average_children","customFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","description":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.","links":{},"name":"Become a market leader","ownerId":"string value","ownerIds":{},"parentId":"6184ed271a35460001f26588","private":false,"richTextCustomFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","richTextDescription":"

Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.

","sessionId":"3284gh256a36860111f56578"}'

var body ={ "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "

Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.

", "sessionId": "3284gh256a36860111f56578" };

var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}", "method": "PUT", "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/goals/{goalId}"

body = { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "

Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.

", "sessionId": "3284gh256a36860111f56578" };

requests.put(url, data=json.dumps(body), headers = headers)
{
    "access": {
        "inherits": false,
        "permissions": [
            {
                "grant": {
                    "Subtype": 2
                },
                "principalId": "string",
                "principalKind": "string value"
            }
        ]
    },
    "accountId": "string value",
    "aggregatedAttainment": 2,
    "assignee": {
        "accountId": "string value",
        "avatar": "string value",
        "color": "string value",
        "dynamicValueType": "string value",
        "email": "string value",
        "id": "string value",
        "isActive": false,
        "name": "string value",
        "picture": "string value",
        "tags": [
            {
                "createdBy": "string",
                "dateCreated": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "title": "string value"
            }
        ],
        "type": "string value"
    },
    "assignees": [
        {
            "accountId": "string value",
            "avatar": "string value",
            "color": "string value",
            "dynamicValueType": "string value",
            "email": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "picture": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "type": "string value"
        }
    ],
    "attainment": 2,
    "attainmentTypeString": "string value",
    "childrenAggregatedAttainment": 2,
    "childrenCount": 2,
    "closedStatus": {
        "reason": "string value",
        "status": "string value"
    },
    "createdById": "string value",
    "dateCreated": "string value",
    "dateFrom": "string value",
    "dateTo": "string value",
    "description": "string value",
    "designScore": {
        "policies": [
            {
                "isPassed": false,
                "policy": "string value",
                "score": 2
            }
        ],
        "totalPoints": 2
    },
    "duration": 2,
    "fullAggregatedAttainment": 2,
    "fullSubTreeCount": 2,
    "id": "string value",
    "links": {
        "expanded": {
            "goals": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            {
                                "grant": "Binary",
                                "principalId": "ID",
                                "principalKind": "string value"
                            }
                        ]
                    },
                    "accountId": "string value",
                    "aggregatedAttainment": 2,
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            {
                                "createdBy": "ID",
                                "dateCreated": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "title": "string value"
                            }
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "type": "string value"
                        }
                    ],
                    "attainment": 2,
                    "attainmentTypeString": "string value",
                    "childrenAggregatedAttainment": 2,
                    "childrenCount": 2,
                    "closedStatus": {
                        "reason": "string value",
                        "status": "string value"
                    },
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "description": "string value",
                    "designScore": {
                        "policies": [
                            {
                                "isPassed": false,
                                "policy": "string value",
                                "score": 2
                            }
                        ],
                        "totalPoints": 2
                    },
                    "duration": 2,
                    "fullAggregatedAttainment": 2,
                    "fullSubTreeCount": 2,
                    "id": "string value",
                    "locked": false,
                    "metricsCount": 2,
                    "modifiedById": "string value",
                    "name": "string value",
                    "nonArchivedTasksCount": 2,
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "orderId": 2,
                    "ownerId": "string value",
                    "ownerIds": [
                        "string value 1",
                        "string value 2"
                    ],
                    "parentGoalSessionId": "string value",
                    "parentId": "string value",
                    "parentType": "string value",
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "subTreeCount": 2,
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "tasksCount": 2,
                    "url": "string value",
                    "watchers": [
                        "string value 1",
                        "string value 2"
                    ],
                    "workflow": {
                        "approvedAt": "string value",
                        "reviewers": [
                            "ReviewerResponse"
                        ],
                        "reviewersNeeded": 2,
                        "status": "string value"
                    }
                }
            ],
            "metrics": [
                {
                    "actual": 6,
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            {
                                "createdBy": "ID",
                                "dateCreated": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "title": "string value"
                            }
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "type": "string value"
                        }
                    ],
                    "cascadeType": "absolute_value",
                    "critical": 50,
                    "description": "My Description",
                    "dueDate": "2021-06-30",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalClosedStatus": {
                        "reason": "string value",
                        "status": "string value"
                    },
                    "goalDescription": "My Description",
                    "goalId": "string value",
                    "goalName": "string value",
                    "goalOwnerId": "string value",
                    "goalOwnerIds": {},
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "links": {
                        "expanded": {
                            "goals": [
                                "goalResponse"
                            ],
                            "metrics": [
                                "metricDto"
                            ],
                            "sessions": [
                                "planningSessionResponse"
                            ]
                        }
                    },
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "settings": [
                        {
                            "dynamicValues": [
                                {
                                    "teamId": "ID",
                                    "type": "DynamicValueType"
                                }
                            ],
                            "name": "string value",
                            "value": "string value",
                            "valueDisplayName": "string value"
                        }
                    ],
                    "softDueDate": "2021-06-25",
                    "sourceMetricId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetMetrics": {},
                    "targetOperator": "at_least",
                    "tasksCount": 2,
                    "url": "string value"
                }
            ],
            "sessions": [
                {
                    "accountId": "string value",
                    "cadence": {
                        "ranges": [
                            {
                                "cadenceOrder": 2,
                                "end": "string value",
                                "start": "string value"
                            }
                        ],
                        "totalCadences": 2,
                        "type": "string value"
                    },
                    "cadenceStart": {
                        "dayOfMonth": 2,
                        "periodOfMonth": "string",
                        "weekday": 2
                    },
                    "cadenceTimeZone": "string value",
                    "color": "string value",
                    "currentUserAllowedActions": [
                        "string value 1",
                        "string value 2"
                    ],
                    "demo": false,
                    "dynamicValueType": "string value",
                    "end": "string value",
                    "id": "string value",
                    "inherits": false,
                    "isSelfApproveAllowed": false,
                    "parentId": "string value",
                    "permissions": [
                        {
                            "grant": {
                                "Subtype": 2
                            },
                            "principalId": "string",
                            "principalKind": "string value"
                        }
                    ],
                    "settings": {
                        "assignGoalPermissions": "string value",
                        "assignMetricPermissions": "string value",
                        "goalsPerOwnerLimit": 2,
                        "metricsPerGoalLimit": 2,
                        "multipleOwners": {
                            "disabledForGoals": false,
                            "disabledForMetrics": false
                        },
                        "progressAggregationDisabled": false
                    },
                    "start": "string value",
                    "status": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "title": "string value",
                    "workflow": {
                        "editableKrFields": [
                            "string value 1",
                            "string value 2"
                        ],
                        "editableOkrFields": [
                            "string value 1",
                            "string value 2"
                        ],
                        "reviewers": 2,
                        "target": [
                            "string value 1",
                            "string value 2"
                        ]
                    }
                }
            ]
        }
    },
    "locked": false,
    "metrics": [
        {
            "actual": 6,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "cascadeType": "absolute_value",
            "critical": 50,
            "description": "My Description",
            "dueDate": "2021-06-30",
            "dynamic": true,
            "fieldName": "count",
            "format": {
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "string value",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "string value",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "metricsCount": 2,
    "modifiedById": "string value",
    "name": "string value",
    "nonArchivedTasksCount": 2,
    "numberOfOwners": 2,
    "obfuscated": false,
    "orderId": 2,
    "ownerId": "string value",
    "ownerIds": [
        "string value 1",
        "string value 2"
    ],
    "parentGoalSessionId": "string value",
    "parentId": "string value",
    "parentType": "string value",
    "private": false,
    "richTextDescription": "string value",
    "sessionId": "string value",
    "subTreeCount": 2,
    "tags": [
        {
            "createdBy": "string",
            "dateCreated": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "title": "string value"
        }
    ],
    "tasks": [
        {
            "access": {
                "inherits": false,
                "permissions": [
                    {
                        "grant": {
                            "Subtype": 2
                        },
                        "principalId": "string",
                        "principalKind": "string value"
                    }
                ]
            },
            "accountId": "string value",
            "archived": false,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "createdById": "string value",
            "dateCreated": "string value",
            "dateModified": "string value",
            "description": "string value",
            "dueDate": "string value",
            "externalId": "string value",
            "externalSystem": "string value",
            "id": "string value",
            "lastComment": {
                "createdById": "string value",
                "text": "string value"
            },
            "modifiedById": "string value",
            "name": "string value",
            "ownerId": "string value",
            "parentId": "string value",
            "parentName": "string value",
            "parentType": "string value",
            "priority": 2,
            "richTextDescription": "string value",
            "sessionId": "string value",
            "snapshots": [
                {
                    "id": "string value",
                    "modifiedAt": "string value",
                    "modifiedBy": "string value",
                    "newStatus": "string value",
                    "oldStatus": "string value",
                    "previouslyModifiedAt": "string value"
                }
            ],
            "status": "string value",
            "taskType": "string value"
        }
    ],
    "tasksCount": 2,
    "url": "string value",
    "watchers": [
        "string value 1",
        "string value 2"
    ],
    "workflow": {
        "approvedAt": "string value",
        "reviewers": [
            2
        ],
        "reviewersNeeded": 2,
        "status": "string value"
    }
}
DEPRECATED
🔗
put
/goals/{goalId}/confidence
Updates an existing goal.
This endpoint is deprecated. Confidence is available on a Key Result level. Use PATCH Key Result instead.
Parameters
NameTypeDescription
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
goalConfidence
*
object
expected in body, sample value:
{
    "reason": "string value",
    "value": 2
}
Expected response codes
200goal
401unauthorized

curl -X PUT 'https://app.gtmhub.com/api/v1/goals/{goalId}/confidence' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-d '{"reason":"string value","value":2}'

var body ={ "reason": "string value", "value": 2 };

var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}/confidence", "method": "PUT", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
},
"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/goals/{goalId}/confidence"

body = { "reason": "string value", "value": 2 };

requests.put(url, data=json.dumps(body), headers = headers)
{
    "accountId": "string",
    "aggregatedAttainment": 2,
    "attainment": 2,
    "attainmentType": 2,
    "calculationStatus": 2,
    "childrenAggregatedAttainment": 2,
    "childrenCount": 2,
    "childrenKRAttainment": 2,
    "closedStatus": {
        "Reason": "string value",
        "Status": 2
    },
    "createdById": "string",
    "dateCreated": "string value",
    "dateFrom": "string value",
    "dateTo": "string value",
    "deletedAt": "string value",
    "deletedById": "string",
    "deletionReason": 2,
    "description": "string value",
    "designScore": {
        "policies": [
            {
                "passed": false,
                "policy": "string value",
                "score": 2
            }
        ],
        "totalPoints": 2
    },
    "duration": 2,
    "fullAggregatedAttainment": 2,
    "fullSubTreeCount": 2,
    "id": "string",
    "inherits": false,
    "isDeleted": false,
    "lastCalculated": "string value",
    "links": {
        "expanded": {
            "goals": [
                {
                    "accountId": "string",
                    "aggregatedAttainment": 2,
                    "attainment": 2,
                    "attainmentType": 2,
                    "calculationStatus": 2,
                    "childrenAggregatedAttainment": 2,
                    "childrenCount": 2,
                    "childrenKRAttainment": 2,
                    "closedStatus": {
                        "Reason": "string value",
                        "Status": 2
                    },
                    "createdById": "string",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "deletedAt": "string value",
                    "deletedById": "string",
                    "deletionReason": 2,
                    "description": "string value",
                    "designScore": {
                        "policies": [
                            {
                                "passed": false,
                                "policy": "string value",
                                "score": 2
                            }
                        ],
                        "totalPoints": 2
                    },
                    "duration": 2,
                    "fullAggregatedAttainment": 2,
                    "fullSubTreeCount": 2,
                    "id": "string",
                    "inherits": false,
                    "isDeleted": false,
                    "lastCalculated": "string value",
                    "links": {
                        "expanded": {
                            "goals": [
                                "goal"
                            ],
                            "metrics": [
                                "Metric"
                            ],
                            "sessions": [
                                "planningSession"
                            ]
                        }
                    },
                    "mentions": {},
                    "metricsAttainment": 2,
                    "metricsCount": 2,
                    "modifiedById": "string",
                    "name": "string value",
                    "nonArchivedTasksCount": 2,
                    "orderId": 2,
                    "ownerIds": [
                        "string"
                    ],
                    "owner_permissions": {
                        "deny": {
                            "Subtype": 2
                        },
                        "grant": {
                            "Subtype": 2
                        }
                    },
                    "parent": {
                        "goalId": "string",
                        "metricGoalId": "string",
                        "metricId": "string",
                        "sessionId": "string"
                    },
                    "permissions": [
                        {
                            "grant": {
                                "Subtype": 2
                            },
                            "principalId": "string",
                            "principalKind": "string value"
                        }
                    ],
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string",
                    "subTreeCount": 2,
                    "tags": [
                        {
                            "id": "string",
                            "isActive": {
                                "IsActive": false
                            },
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "tasksCount": 2,
                    "watchers": [
                        "string"
                    ],
                    "workflow": {
                        "ApprovedAt": "string value",
                        "Reviewers": [
                            "Reviewer"
                        ],
                        "ReviewersNeeded": 2,
                        "Status": 2
                    }
                }
            ],
            "metrics": [
                {
                    "actual": 2,
                    "attainment": 2,
                    "cascadeType": "string value",
                    "childrenCount": 2,
                    "confidence": {
                        "date": "string value",
                        "gif": {
                            "id": "string value",
                            "searchQuery": "string value"
                        },
                        "reason": "string value",
                        "userId": "string",
                        "value": 2
                    },
                    "createdById": "string",
                    "critical": 2,
                    "dateCreated": "string value",
                    "deletedAt": "string value",
                    "deletedById": "string",
                    "deletionReason": 2,
                    "description": "string value",
                    "dueDate": "string value",
                    "fieldName": "string value",
                    "format": {
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalId": "string",
                    "id": "string",
                    "inherits": false,
                    "initialValue": 2,
                    "insightName": "string value",
                    "isDeleted": false,
                    "lastReminded": "string value",
                    "lastSnapshotAt": "string value",
                    "latestSnapshotAt": "string value",
                    "limitedAttainment": false,
                    "links": {
                        "expanded": {
                            "goals": [
                                "goal"
                            ],
                            "metrics": [
                                "Metric"
                            ],
                            "sessions": [
                                "planningSession"
                            ]
                        }
                    },
                    "manualType": "string value",
                    "mentions": {},
                    "modifiedById": "string",
                    "name": "string value",
                    "nonArchivedTasksCount": 2,
                    "objectId": "string",
                    "orderId": 2,
                    "ownerIds": [
                        "string"
                    ],
                    "owner_permissions": {
                        "deny": {
                            "Subtype": 2
                        },
                        "grant": {
                            "Subtype": 2
                        }
                    },
                    "parent": {
                        "private": false
                    },
                    "permissions": [
                        {
                            "grant": {
                                "Subtype": 2
                            },
                            "principalId": "string",
                            "principalKind": "string value"
                        }
                    ],
                    "reminderSchedule": {
                        "active": false,
                        "day": "string value",
                        "email": "string value",
                        "type": "string value"
                    },
                    "richTextDescription": "string value",
                    "settings": [
                        {
                            "dynamicValues": [
                                "DashboardDynamicValue"
                            ],
                            "name": "string value",
                            "value": "string value",
                            "valueDisplayName": "string value"
                        }
                    ],
                    "snapshots": [
                        {
                            "_id": "ID",
                            "comment": "string value",
                            "confidenceValue": 2,
                            "createdAt": "string value",
                            "date": "string value",
                            "gif": "Gif",
                            "mentions": "Mentions",
                            "modifiedBy": "ID",
                            "richTextComment": "string value",
                            "sourceInfo": "SnapshotSourceInfo",
                            "value": 2
                        }
                    ],
                    "softDueDate": "string value",
                    "sourceMetricId": "string",
                    "target": 2,
                    "targetMetrics": [
                        "string"
                    ],
                    "targetOperator": "string value",
                    "tasksCount": 2
                }
            ],
            "sessions": [
                {
                    "accountId": "string",
                    "cadence": 2,
                    "cadenceStart": {
                        "dayOfMonth": 2,
                        "periodOfMonth": "string",
                        "weekday": 2
                    },
                    "cadenceTimeZone": "string value",
                    "color": "string value",
                    "createdById": "string",
                    "deletedAt": "string value",
                    "deletedById": "string",
                    "deletionReason": 2,
                    "demo": false,
                    "end": "string value",
                    "id": "string",
                    "inherits": false,
                    "isDeleted": false,
                    "isSelfApproveAllowed": false,
                    "modifiedById": "string",
                    "owner_permissions": {
                        "deny": {
                            "Subtype": 2
                        },
                        "grant": {
                            "Subtype": 2
                        }
                    },
                    "parentId": "string",
                    "permissions": [
                        {
                            "grant": {
                                "Subtype": 2
                            },
                            "principalId": "string",
                            "principalKind": "string value"
                        }
                    ],
                    "settings": {
                        "AssignGoalPermissions": 2,
                        "AssignMetricPermissions": 2,
                        "GoalsPerOwnerLimit": 2,
                        "MetricsPerGoalLimit": 2,
                        "MultipleOwners": {
                            "disabledForGoals": false,
                            "disabledForMetrics": false
                        },
                        "ProgressAggregationDisabled": false
                    },
                    "start": "string value",
                    "status": "string value",
                    "tags": [
                        {
                            "id": "string",
                            "isActive": {
                                "IsActive": false
                            },
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "title": "string value",
                    "workflow": {
                        "editableKrFields": [
                            "string value 1",
                            "string value 2"
                        ],
                        "editableOkrFields": [
                            "string value 1",
                            "string value 2"
                        ],
                        "reviewers": 2,
                        "target": 2
                    }
                }
            ]
        }
    },
    "mentions": {},
    "metricsAttainment": 2,
    "metricsCount": 2,
    "modifiedById": "string",
    "name": "string value",
    "nonArchivedTasksCount": 2,
    "orderId": 2,
    "ownerIds": [
        "string"
    ],
    "owner_permissions": {
        "deny": {
            "Subtype": 2
        },
        "grant": {
            "Subtype": 2
        }
    },
    "parent": {
        "goalId": "string",
        "metricGoalId": "string",
        "metricId": "string",
        "sessionId": "string"
    },
    "permissions": [
        {
            "grant": {
                "Subtype": 2
            },
            "principalId": "string",
            "principalKind": "string value"
        }
    ],
    "private": false,
    "richTextDescription": "string value",
    "sessionId": "string",
    "subTreeCount": 2,
    "tags": [
        {
            "id": "string",
            "isActive": {
                "IsActive": false
            },
            "name": "string value",
            "title": "string value"
        }
    ],
    "tasksCount": 2,
    "watchers": [
        "string"
    ],
    "workflow": {
        "ApprovedAt": "string value",
        "Reviewers": [
            {
                "Response": 2,
                "UserId": "string"
            }
        ],
        "ReviewersNeeded": 2,
        "Status": 2
    }
}
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
200ok
400bad request
404not found
500internal server error

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)
DEPRECATED
🔗
patch
/announcements/{id}
This endpoint is deprecated as of March 15, 2022. For more information see [Gtmhub to sunset Announcements functionality](https://gtmhub.com/blog/gtmhub-sunsets-announcements-functionality)
Updates the specified announcement.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringThe ID of the announcement.
expected in path, sample value:
5be26318e5274a0007f17f61
announcement
*
object
expected in body, sample value:
{
    "comment": "string value"
}
Expected response codes
200announcementResponse
401unauthorized

curl -X PATCH 'https://app.gtmhub.com/api/v1/announcements/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"comment":"string value"}'

var body ={ "comment": "string value" };

var settings = { "url": "https://app.gtmhub.com/api/v1/announcements/{id}", "method": "PATCH", "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/announcements/{id}"

body = { "comment": "string value" };

requests.patch(url, data=json.dumps(body), headers = headers)
{
    "announcementTargetId": "string value",
    "announcementType": "string value",
    "author": {
        "accountId": "string value",
        "dateCreated": "string value",
        "email": "string value",
        "firstName": "string value",
        "id": "string value",
        "language": "string value",
        "lastName": "string value",
        "name": "string value",
        "picture": "string value"
    },
    "authorId": "string value",
    "comment": "string value",
    "dateCreated": "string value",
    "id": "string value",
    "notificationStrategy": "string value",
    "notify": [
        "string value 1",
        "string value 2"
    ]
}
DEPRECATED
🔗
delete
/announcements/{id}
This endpoint is deprecated as of March 15, 2022. For more information see [Gtmhub to sunset Announcements functionality](https://gtmhub.com/blog/gtmhub-sunsets-announcements-functionality)
Deletes an announcement based on the provided id.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringThe ID of the announcement.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
204no content
401unauthorized

curl -X DELETE 'https://app.gtmhub.com/api/v1/announcements/{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/announcements/{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/announcements/{id}"



requests.delete(url, headers = headers)
DEPRECATED
🔗
delete
/announcements/{id}/react
This endpoint is deprecated as of March 15, 2022. For more information see [Gtmhub to sunset Announcements functionality](https://gtmhub.com/blog/gtmhub-sunsets-announcements-functionality)
Deletes a reaction from an announcement.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringThe ID of the announcement.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200announcementResponse
401unauthorized

curl -X DELETE 'https://app.gtmhub.com/api/v1/announcements/{id}/react' \ -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/announcements/{id}/react", "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/announcements/{id}/react"



requests.delete(url, headers = headers)
{
    "announcementTargetId": "string value",
    "announcementType": "string value",
    "author": {
        "accountId": "string value",
        "dateCreated": "string value",
        "email": "string value",
        "firstName": "string value",
        "id": "string value",
        "language": "string value",
        "lastName": "string value",
        "name": "string value",
        "picture": "string value"
    },
    "authorId": "string value",
    "comment": "string value",
    "dateCreated": "string value",
    "id": "string value",
    "notificationStrategy": "string value",
    "notify": [
        "string value 1",
        "string value 2"
    ]
}