Treefort’s API allows you to automate any task that can be accomplished through the admin dashboard. This is a developer tool and requires technical skill to setup.
Endpoints
API endpoint: https://api.treefortsystems.com/v1
OAuth token endpoint: https://auth.treefortsystems.com/oauth2/token
Documentation
Headers
Send the following headers along with every API request.
X-Treefort-Version
Our API is versioned by date, with the latest date reflecting the latest iteration of the API. The list of available versions is shown on the API version page. We will do our best to continue support for older versions of the API, but please stick as close to the latest available version as you can.
X-Treefort-Tenant
This is a static value that is unique to your Treefort account. We will send this value to you.
Authentication
🚧 API access is invite only. Please reach out to us for API credentials.
Use the OAuth Client Credentials grant to authenticate your calls to the API. This is a standardized, two-step process:
Send your client ID and client secret along with the scope
target-entity:de24cc4d-765c-4649-bc41-925bc5d9eee0
to the OAuth token endpoint to fetch an access token.curl -X POST \
-u "<client_id>:<client_secret>" \
"https://auth.treefortsystems.com/oauth2/token?grant_type=client_credentials&scope=target-entity%3Ade24cc4d-765c-4649-bc41-925bc5d9eee0"Send this access token to the API in the Authorization header (prefixed with “Bearer“) to authenticate your calls.
curl -H "Authorization: Bearer <access_token>" \
-H "X-Treefort-Tenant: <your_tenant_id>" \
-H "X-Treefort-Version: <api_version>" \
"https://api.treefortsystems.com/v1"
Permissions
Our API endpoints are locked behind fairly granular permissions via OAuth scopes. Expand the “Authorizations” section at the top of the documentation page for an endpoint to see the required scopes (e.g. content:read
or entitlements:write
). We currently enable these scopes for your API client on a case-by-case basis. If you’d like access to a particular scope, just ask us.
When exchanging your client credentials for an access token you must request the scope target-entity:de24cc4d-765c-4649-bc41-925bc5d9eee0
. This will generate an access token that contains all of the API scopes that your client has access to.
Fair use
We hope that our API allows you to accomplish more than ever with Treefort, but we do ask that you use this resource responsibly. Our goal is to maintain a reliable and efficient service for everyone. To help us achieve this, please be mindful of your usage and avoid excessive API calls. If we detect that your usage causes an undue burden on the system we may need to restrict your access. We appreciate your cooperation in helping us provide a stable service.