Authentication

The Hatrio API uses Platform Keys to authenticate requests. These keys provide a secure way to access your account programmatically without sharing your primary login credentials.

Bearer Token

Authentication is handled via the Authorization HTTP header. You must provide your Platform Key as a Bearer token.

Authorization: Bearer YOUR_PLATFORM_KEY

Example Request

curl -X GET https://api.hatrio.ai/api/v1/brand/dna \
  -H "Authorization: Bearer hat_live_..."

Managing Keys

You can create, rotate, and revoke keys from the Dashboard.

  • Security: Keys are hashed using SHA-256 before being stored in our database.
  • Rotation: We recommend rotating your keys every 90 days or immediately if you suspect a leak.
  • Prefix: All live production keys are prefixed with hat_live_.

Warning: Your Platform Key carries full administrative privileges for your website platforms. Never share it in public repositories or client-side code.