Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.sellfern.com/llms.txt

Use this file to discover all available pages before exploring further.

All Sellfern API requests require a bearer token in the Authorization header. Tokens are created in the Sellfern UI and are scoped to specific capabilities — a token only grants access to the endpoints its scopes permit.

Creating an API token

1

Open API Tokens settings

Log in to Sellfern, then navigate to Settings → API Tokens.
2

Create a token

Click Create Token, enter a descriptive name, and select the scopes your integration needs. See the Scopes reference for the full list.
3

Copy the token value

After saving, Sellfern displays the full sk_live_... token value once. Copy it immediately and store it somewhere secure — you cannot retrieve it again.
The token secret is shown only once at creation. If you lose it, you must delete the token and create a new one.

Using the token

Pass the token in the Authorization header on every request:
Authorization: Bearer sk_live_YOUR_TOKEN_HERE
Full curl example:
curl -X GET "https://api.sellfern.com/api/v2/orders" \
  -H "Authorization: Bearer sk_live_YOUR_TOKEN_HERE" \
  -H "Accept: application/json"

Error codes

HTTP statusCodeMeaning
401unauthorizedToken is missing, invalid, or has been revoked.
403missing_scopeToken is valid but lacks the required scope for this endpoint.

Token security tips

  • Use environment variables — never hardcode a token in source code or commit it to version control.
  • One token per integration — create a separate token for each service or script so you can revoke individual access without disrupting others.
  • Scope minimally — only grant the scopes the integration actually needs. A read-only analytics bot does not need orders:write.
  • Rotate periodically — revoke and replace tokens on a regular schedule, or immediately if you suspect a token has been exposed.