Announcements endpoints

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

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)
{}
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
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

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

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

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

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

requests.post(url, data=json.dumps(body), headers = headers)
{}
DEPRECATED
🔗
post
/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)
Creates a reaction to 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
reaction
*
expected in body
Expected response codes
200announcementResponse
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

curl -X POST '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' \
-d '{"reaction":undefined}'

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

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

body = undefined;

requests.post(url, data=json.dumps(body), 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
*
expected in body
Expected response codes
200announcementResponse
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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

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

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

requests.patch(url, data=json.dumps(body), headers = headers)
{}
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
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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

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)
{}