UI Apps and Gtmhub REST API

When you build a UI App the recommended approach is to use the Gtmhub SDk available methods. The SDK is built on top of the Gtmhub REST API, provides an easy syntax for getting stuff done and handles automatically the mandatory authorization and gtmhub-accountId headers, that you must pass if you are working with the REST API.

Using the REST API

If you need to work with a Gtmhub API that's not included in the SDK yet, you must use the available REST API endpoints. NOTE When you use the Gtmhub REST API in your UI App you must take care of passing the mandatory authorization and gtmhub-accountId headers for each API call you make.

"Authorization": `Bearer ${token}`,
"gtmhub-accountId": `${accountId}`