Accounts endpoints

The endpoints in the Accounts group enable you to work with you Gtmhub account. You get information about the current account setting, subscription information, update the settings, confidence levels, notification settings, or change your account domain name.

🔗
get
/accounts/{id}
Gets an account by its ID.
Returns the properties of the account, including name, domain, settings, subscription details
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the account ID.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200accountResponse
401unauthorized

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

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



requests.get(url, headers = headers)
{
    "billingSystem": "string value",
    "confidenceSettings": {
        "confidenceMapping": [
            {
                "color": "#ea80fc",
                "name": "string value",
                "range": {
                    "from": 2,
                    "to": 2
                }
            }
        ],
        "confidenceType": "string value"
    },
    "csManaged": false,
    "dateCreated": "string value",
    "domain": "string value",
    "edition": {
        "features": [
            "string value 1",
            "string value 2"
        ],
        "id": "string",
        "isFree": false,
        "name": "string value",
        "planId": "string value",
        "trialDuration": 2,
        "usersMax": 2,
        "usersMin": 2
    },
    "id": "string value",
    "isActive": false,
    "language": "string value",
    "name": "string value",
    "notifications": {
        "cadence": "string value",
        "cadenceCheckIn": "string value",
        "cadenceReports": "string value",
        "checkinDeadline": {
            "dayOfTheWeek": "Monday",
            "disableConstraint": false,
            "lastReminded": "string value",
            "lastScheduled": "string value",
            "periodStart": "string value",
            "remindAt": {
                "hour": 2,
                "minute": 2
            },
            "reportChannels": {
                "email": false,
                "msTeams": false,
                "slack": false
            }
        },
        "reportOptions": {
            "controlDangerOnGoalConfidence": false,
            "goalConfidenceToUpdateMetricLastUpdated": false,
            "includeOpenSessions": false,
            "includePeopleWithoutObjectives": false,
            "includeSessionsWithoutMetrics": false,
            "includeTeamsWithoutObjectives": false,
            "targetSessionIds": [
                "string"
            ],
            "targetTeamIds": [
                "string"
            ],
            "targetUserIds": [
                "string"
            ]
        },
        "reportsDeadline": {
            "dayOfTheWeek": "Monday",
            "disableConstraint": false,
            "lastReminded": "string value",
            "lastScheduled": "string value",
            "periodStart": "string value",
            "remindAt": {
                "hour": 2,
                "minute": 2
            },
            "reportChannels": {
                "email": false,
                "msTeams": false,
                "slack": false
            }
        },
        "retrospectiveMeeting": {
            "dayOfTheWeek": "Monday",
            "disableConstraint": false,
            "lastReminded": "string value",
            "lastScheduled": "string value",
            "periodStart": "string value",
            "remindAt": {
                "hour": 2,
                "minute": 2
            },
            "reportChannels": {
                "email": false,
                "msTeams": false,
                "slack": false
            }
        },
        "timezone": "string value"
    },
    "ownerId": "string value",
    "settings": "string value",
    "subscriptionId": "string value",
    "subscriptions": [
        {
            "acquisition_mode": "string value",
            "allowCancellation": false,
            "isConverted": false,
            "signedUsersCount": 2,
            "type": "string",
            "usersAllowed": 2,
            "usersCount": 2
        }
    ],
    "trackingProperties": {
        "enableLiveChat": false,
        "ignoreConversion": false,
        "shouldTrack": false
    },
    "trialEnds": "string value",
    "type": 2
}
🔗
post
/accounts/domain
Checks the availability of an account name and domain name.
Use this method to validate whether you can change you account name or domain to the desired ones
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
domainRequestobject
expected in body, sample value:
{
    "accountName": "MyComanyAccount",
    "domain": "mycompany-okrs"
}
Expected response codes

curl -X POST 'https://app.gtmhub.com/api/v1/accounts/domain' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"accountName":"MyComanyAccount","domain":"mycompany-okrs"}'

var body ={ "accountName": "MyComanyAccount", "domain": "mycompany-okrs" };

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

body = { "accountName": "MyComanyAccount", "domain": "mycompany-okrs" };

requests.post(url, data=json.dumps(body), headers = headers)
🔗
put
/accounts/{id}/confidence
Updates the account OKR Methodology -> Confidence level settings.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the account ID.
expected in path, sample value:
5be26318e5274a0007f17f61
confidenceSettingsRequest
*
object
expected in body, sample value:
{
    "confidenceMapping": [
        {
            "color": "#ea80fc",
            "name": "string value",
            "range": {
                "from": 2,
                "to": 2
            }
        }
    ],
    "confidenceType": "string value"
}
Expected response codes
204no content
401unauthorized

curl -X PUT 'https://app.gtmhub.com/api/v1/accounts/{id}/confidence' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"confidenceMapping":[{"color":"#ea80fc","name":"string value","range":{"from":2,"to":2}}],"confidenceType":"string value"}'

var body ={ "confidenceMapping": [ { "color": "#ea80fc", "name": "string value", "range": { "from": 2, "to": 2 } } ], "confidenceType": "string value" };

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

body = { "confidenceMapping": [ { "color": "#ea80fc", "name": "string value", "range": { "from": 2, "to": 2 } } ], "confidenceType": "string value" };

requests.put(url, data=json.dumps(body), headers = headers)
🔗
put
/accounts/{id}/notifications
Updates the account notification settings.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the account ID.
expected in path, sample value:
5be26318e5274a0007f17f61
settings
*
object
expected in body, sample value:
{
    "cadence": "BiWeekly",
    "cadenceCheckIn": "string value",
    "cadenceReports": "string value",
    "checkinDeadline": {
        "dayOfTheWeek": "string value",
        "disableConstraint": false,
        "periodStart": "string value",
        "remindAt": {
            "hour": 2,
            "minute": 2
        },
        "reportChannels": {
            "email": false,
            "msTeams": false,
            "slack": false
        }
    },
    "reportOptions": {
        "controlDangerOnGoalConfidence": false,
        "goalConfidenceToUpdateMetricLastUpdated": false,
        "includeOpenSessions": false,
        "includePeopleWithoutObjectives": false,
        "includeSessionsWithoutMetrics": false,
        "includeTeamsWithoutObjectives": false,
        "targetSessionIds": [
            "string"
        ],
        "targetTeamIds": [
            "string"
        ],
        "targetUserIds": [
            "string"
        ]
    },
    "reportsDeadline": {
        "dayOfTheWeek": "string value",
        "disableConstraint": false,
        "periodStart": "string value",
        "remindAt": {
            "hour": 2,
            "minute": 2
        },
        "reportChannels": {
            "email": false,
            "msTeams": false,
            "slack": false
        }
    },
    "retrospectiveMeeting": {
        "dayOfTheWeek": "string value",
        "disableConstraint": false,
        "periodStart": "string value",
        "remindAt": {
            "hour": 2,
            "minute": 2
        },
        "reportChannels": {
            "email": false,
            "msTeams": false,
            "slack": false
        }
    },
    "timezone": "string value"
}
Expected response codes
401unauthorized

curl -X PUT 'https://app.gtmhub.com/api/v1/accounts/{id}/notifications' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"cadence":"BiWeekly","cadenceCheckIn":"string value","cadenceReports":"string value","checkinDeadline":{"dayOfTheWeek":"string value","disableConstraint":false,"periodStart":"string value","remindAt":{"hour":2,"minute":2},"reportChannels":{"email":false,"msTeams":false,"slack":false}},"reportOptions":{"controlDangerOnGoalConfidence":false,"goalConfidenceToUpdateMetricLastUpdated":false,"includeOpenSessions":false,"includePeopleWithoutObjectives":false,"includeSessionsWithoutMetrics":false,"includeTeamsWithoutObjectives":false,"targetSessionIds":["string"],"targetTeamIds":["string"],"targetUserIds":["string"]},"reportsDeadline":{"dayOfTheWeek":"string value","disableConstraint":false,"periodStart":"string value","remindAt":{"hour":2,"minute":2},"reportChannels":{"email":false,"msTeams":false,"slack":false}},"retrospectiveMeeting":{"dayOfTheWeek":"string value","disableConstraint":false,"periodStart":"string value","remindAt":{"hour":2,"minute":2},"reportChannels":{"email":false,"msTeams":false,"slack":false}},"timezone":"string value"}'

var body ={ "cadence": "BiWeekly", "cadenceCheckIn": "string value", "cadenceReports": "string value", "checkinDeadline": { "dayOfTheWeek": "string value", "disableConstraint": false, "periodStart": "string value", "remindAt": { "hour": 2, "minute": 2 }, "reportChannels": { "email": false, "msTeams": false, "slack": false } }, "reportOptions": { "controlDangerOnGoalConfidence": false, "goalConfidenceToUpdateMetricLastUpdated": false, "includeOpenSessions": false, "includePeopleWithoutObjectives": false, "includeSessionsWithoutMetrics": false, "includeTeamsWithoutObjectives": false, "targetSessionIds": [ "string" ], "targetTeamIds": [ "string" ], "targetUserIds": [ "string" ] }, "reportsDeadline": { "dayOfTheWeek": "string value", "disableConstraint": false, "periodStart": "string value", "remindAt": { "hour": 2, "minute": 2 }, "reportChannels": { "email": false, "msTeams": false, "slack": false } }, "retrospectiveMeeting": { "dayOfTheWeek": "string value", "disableConstraint": false, "periodStart": "string value", "remindAt": { "hour": 2, "minute": 2 }, "reportChannels": { "email": false, "msTeams": false, "slack": false } }, "timezone": "string value" };

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

body = { "cadence": "BiWeekly", "cadenceCheckIn": "string value", "cadenceReports": "string value", "checkinDeadline": { "dayOfTheWeek": "string value", "disableConstraint": false, "periodStart": "string value", "remindAt": { "hour": 2, "minute": 2 }, "reportChannels": { "email": false, "msTeams": false, "slack": false } }, "reportOptions": { "controlDangerOnGoalConfidence": false, "goalConfidenceToUpdateMetricLastUpdated": false, "includeOpenSessions": false, "includePeopleWithoutObjectives": false, "includeSessionsWithoutMetrics": false, "includeTeamsWithoutObjectives": false, "targetSessionIds": [ "string" ], "targetTeamIds": [ "string" ], "targetUserIds": [ "string" ] }, "reportsDeadline": { "dayOfTheWeek": "string value", "disableConstraint": false, "periodStart": "string value", "remindAt": { "hour": 2, "minute": 2 }, "reportChannels": { "email": false, "msTeams": false, "slack": false } }, "retrospectiveMeeting": { "dayOfTheWeek": "string value", "disableConstraint": false, "periodStart": "string value", "remindAt": { "hour": 2, "minute": 2 }, "reportChannels": { "email": false, "msTeams": false, "slack": false } }, "timezone": "string value" };

requests.put(url, data=json.dumps(body), headers = headers)
🔗
patch
/accounts/{id}
Updates the specified account (by ID) with the specified settings.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the account ID.
expected in path, sample value:
5be26318e5274a0007f17f61
accountRequest
*
object
expected in body, sample value:
{
    "accountName": "MyAccount",
    "domain": "myaccount",
    "language": "string value",
    "settings": "string value"
}
Expected response codes
200accountResponse
401unauthorized

curl -X PATCH 'https://app.gtmhub.com/api/v1/accounts/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"accountName":"MyAccount","domain":"myaccount","language":"string value","settings":"string value"}'

var body ={ "accountName": "MyAccount", "domain": "myaccount", "language": "string value", "settings": "string value" };

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

body = { "accountName": "MyAccount", "domain": "myaccount", "language": "string value", "settings": "string value" };

requests.patch(url, data=json.dumps(body), headers = headers)
{
    "billingSystem": "string value",
    "confidenceSettings": {
        "confidenceMapping": [
            {
                "color": "#ea80fc",
                "name": "string value",
                "range": {
                    "from": 2,
                    "to": 2
                }
            }
        ],
        "confidenceType": "string value"
    },
    "csManaged": false,
    "dateCreated": "string value",
    "domain": "string value",
    "edition": {
        "features": [
            "string value 1",
            "string value 2"
        ],
        "id": "string",
        "isFree": false,
        "name": "string value",
        "planId": "string value",
        "trialDuration": 2,
        "usersMax": 2,
        "usersMin": 2
    },
    "id": "string value",
    "isActive": false,
    "language": "string value",
    "name": "string value",
    "notifications": {
        "cadence": "string value",
        "cadenceCheckIn": "string value",
        "cadenceReports": "string value",
        "checkinDeadline": {
            "dayOfTheWeek": "Monday",
            "disableConstraint": false,
            "lastReminded": "string value",
            "lastScheduled": "string value",
            "periodStart": "string value",
            "remindAt": {
                "hour": 2,
                "minute": 2
            },
            "reportChannels": {
                "email": false,
                "msTeams": false,
                "slack": false
            }
        },
        "reportOptions": {
            "controlDangerOnGoalConfidence": false,
            "goalConfidenceToUpdateMetricLastUpdated": false,
            "includeOpenSessions": false,
            "includePeopleWithoutObjectives": false,
            "includeSessionsWithoutMetrics": false,
            "includeTeamsWithoutObjectives": false,
            "targetSessionIds": [
                "string"
            ],
            "targetTeamIds": [
                "string"
            ],
            "targetUserIds": [
                "string"
            ]
        },
        "reportsDeadline": {
            "dayOfTheWeek": "Monday",
            "disableConstraint": false,
            "lastReminded": "string value",
            "lastScheduled": "string value",
            "periodStart": "string value",
            "remindAt": {
                "hour": 2,
                "minute": 2
            },
            "reportChannels": {
                "email": false,
                "msTeams": false,
                "slack": false
            }
        },
        "retrospectiveMeeting": {
            "dayOfTheWeek": "Monday",
            "disableConstraint": false,
            "lastReminded": "string value",
            "lastScheduled": "string value",
            "periodStart": "string value",
            "remindAt": {
                "hour": 2,
                "minute": 2
            },
            "reportChannels": {
                "email": false,
                "msTeams": false,
                "slack": false
            }
        },
        "timezone": "string value"
    },
    "ownerId": "string value",
    "settings": "string value",
    "subscriptionId": "string value",
    "subscriptions": [
        {
            "acquisition_mode": "string value",
            "allowCancellation": false,
            "isConverted": false,
            "signedUsersCount": 2,
            "type": "string",
            "usersAllowed": 2,
            "usersCount": 2
        }
    ],
    "trackingProperties": {
        "enableLiveChat": false,
        "ignoreConversion": false,
        "shouldTrack": false
    },
    "trialEnds": "string value",
    "type": 2
}