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
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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)
{}
🔗
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
domainRequest
expected in body
Expected response codes
200ok
400bad request
409conflict
500internal server error

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 '{"domainRequest":undefined}'

var body ='{"domainRequest":undefined}'

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 = undefined;

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
*
expected in body
Expected response codes
204no content
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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 '{"confidenceSettingsRequest":undefined}'

var body ='{"confidenceSettingsRequest":undefined}'

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 = undefined;

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
*
expected in body
Expected response codes
200ok
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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 '{"settings":undefined}'

var body ='{"settings":undefined}'

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 = undefined;

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
*
expected in body
Expected response codes
200accountResponse
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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 '{"accountRequest":undefined}'

var body ='{"accountRequest":undefined}'

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 = undefined;

requests.patch(url, data=json.dumps(body), headers = headers)
{}