Skip to navigation

API: Credentials

Programmatic access — early access

The

tieback

API is available to selected workspaces during early access. Contact

tieback

to enable it for your workspace.

What It Does

An API key (a Client ID and Client Secret, created in Settings → API Credentials) is swapped for an access token. The token is sent as a bearer token on every other call. This is the OAuth 2.0 client credentials flow.

All calls go to https://api.tieback.io. API keys work only there; every other tieback address refuses them.

Who It’s For

Developers connecting a server-side system (an ERP, a PIM, a store) to tieback.


POST /v1/oauth/token

What it does

Checks the key and returns an access token that lasts up to 1 hour. Ask for a new token when it expires; there is no refresh token.

Request

Send the key with HTTP Basic authentication and a form body.

curl -X POST https://api.tieback.io/v1/oauth/token \
-u "$TIEBACK_CLIENT_ID:$TIEBACK_CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials"

The Client ID and Client Secret can also be sent as client_id and client_secret form fields instead of Basic authentication. Use 1 method, not both, and send each field once.

Response (example)

{
"access_token": "tbk_at_…",
"token_type": "Bearer",
"expires_in": 3600,
"scope": "read_products import_products"
}

scope lists the key’s permissions: read_products, and import_products when the key can import.

Errors

Errors use the OAuth format: {"error": "…", "error_description": "…"}.

StatuserrorMeaning
400invalid_requestThe body is not a form body of up to 4 KB.
400unsupported_grant_typeUse grant_type=client_credentials.
401invalid_clientThe Client ID or Client Secret is wrong, or the key is revoked or expired.
403access_deniedThe workspace is not active.
429slow_downToo many failed attempts, too many tokens this hour, or the monthly allowance is used. See Retry-After.
503temporarily_unavailableTry again shortly.

GET /v1/me

What it does

Returns the workspace, key and permissions the token belongs to, with the current rate limit and usage. Use it to check a token works.

Request

curl https://api.tieback.io/v1/me \
-H "Authorization: Bearer $TIEBACK_ACCESS_TOKEN"

Response (example)

{
"workspace": { "id": "b1a2c3d4-…", "name": "Example Brand" },
"key": { "id": "c1a2c3d4-…", "name": "ERP Sync - Production" },
"permissions": ["read_products"],
"rate_limit": { "per_minute": 60, "per_hour": 1000, "remaining_this_minute": 59 },
"usage": {
"calls_this_period": 1250,
"monthly_allowance": 50000,
"period_start": "2026-11-01T00:00:00Z"
}
}

Errors

Errors use application/problem+json. A missing, expired or revoked token gets 401 with WWW-Authenticate: Bearer error="invalid_token". Too many calls get 429 with Retry-After.


POST /v1/oauth/revoke

What it does

Ends an access token before it expires. Send the key that owns the token. The reply is always 200, whether or not the token existed (RFC 7009).

Request

curl -X POST https://api.tieback.io/v1/oauth/revoke \
-u "$TIEBACK_CLIENT_ID:$TIEBACK_CLIENT_SECRET" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "token=$TIEBACK_ACCESS_TOKEN"

Limits & Notes

  • Rate limits: 60 calls a minute and 1,000 an hour per key, and 180 a minute and 3,000 an hour per workspace. Calls that pass the limits carry RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset.
  • Tokens: up to 12 tokens per key per hour. Reuse a token until it expires.
  • Monthly allowance: calls count against the workspace’s plan allowance. In /v1/me, monthly_allowance is null when the plan has no monthly limit.
  • Request size: bodies over 64 KB are refused with 413.
  • Failed sign-ins: repeated failures from one address are blocked for a while.
  • Revoking or rotating a key in Settings → API Credentials ends its tokens at once.
  • Every reply carries X-Request-Id. Quote it when contacting support.
  • Server-side only: the API sends no CORS headers. Never call it from a browser or mobile app.

FAQ

How long does a token last? Up to 1 hour, as given by expires_in. Ask for a new one when it runs out.

Can I use my tieback sign-in instead of an API key? No. api.tieback.io accepts only access tokens from an API key.

Can an API key sign in to the tieback app? No. A key works only at api.tieback.io.