Brand API quick startBeta

Create an API token with the right scopes and make your first three calls.

Updated Oct 27, 20262 min read

Beta. The Brand API is in beta. Fields can still be added to version 1, and any breaking change will ship as a new version (/api/v2) rather than change v1.

1. Create a token

  1. Open Developers in your workspace and go to API tokens.

  2. Create a token and choose the scopes it needs (see the table below).

  3. Copy the token now. It starts with tk_ and is shown only once. Tarkle stores only a hash of it.

Scope

Allows

brands:read

List and read brands, their files, brand.md and analytics.

brands:write

Update a brand's text, links, color, access, download approval and tracking IDs.

brands:requests

List download and view requests and approve or reject them.

A token created before scopes existed has no scopes and cannot call the Brand API. It keeps working for whatever it was used for before. Create a new token to use the API.

2. Send the token

Send it as a bearer token on every request. Keep it on your server: the API does not allow calls from a browser, and a token in a web page is a leaked token.

export TARKLE_TOKEN="tk_your_token_here"
curl -H "Authorization: Bearer $TARKLE_TOKEN" https://tarkle.com/api/v1/brands

Use your own workspace address instead of tarkle.com if you use a custom domain.

3. Update a brand

{brand} is the brand's id or its slug.

curl -X PATCH \
  -H "Authorization: Bearer $TARKLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"summary":"Business banking for SMEs","download_approval":true}' \
  https://tarkle.com/api/v1/brands/aspire

4. Approve a download request

curl -X POST \
  -H "Authorization: Bearer $TARKLE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"action":"approve"}' \
  https://tarkle.com/api/v1/brands/aspire/requests/REQUEST_ID

Find the request id by listing GET /brands/{brand}/requests?status=pending first.

More in Developers