Authentication

The Treatar API uses API Key authentication.

All requests must include your API key in the request header.

Getting Your API Key

  1. Log in to your Treatar Business account

  2. Navigate to:

Settings → API Keys

  1. Copy the appropriate key for your environment.

Environment
Key Prefix

Production

sk_live

Staging

sk_test

Request Headers

Include the following headers in every request:

Header
Value

Authorization

Bearer YOUR_API_KEY

Content-Type

application/json

Example Request

curl https://api.treatar.com/v1/health \
  -H "Authorization: Bearer sk_live_xxxxxxxxx"

Environments

Environment
Base URL

Production

https://api.treatar.com/v1

Staging

https://sandbox.treatar.com/v1

Security Best Practices

  • Never expose your API keys in frontend applications

  • Store keys securely on your server

  • Use sk_test for development and testing

  • Rotate keys periodically

Last updated