Clatter LabsHelp Center

How do I store my Account ID and key as environment variables?

How-toUpdated

The docs and Console code examples read two environment variables:

export CLATTER_API_KEY="clsk_..."          # Console › API keys
export CLATTER_ACCOUNT_ID="CL-XXXXXXXX"    # Console Home or account menu

Then requests look like this:

curl https://api.agent.clatterlabs.xyz/v1/account \
  -H "Authorization: Bearer $CLATTER_API_KEY" \
  -H "X-Clatter-Account: $CLATTER_ACCOUNT_ID"

Tips#

  • On Windows PowerShell use $env:CLATTER_API_KEY = "clsk_...".
  • For a server or CI job, put both values in its secret settings instead of in your code.
  • Never commit a .env file with a real key to a repository. Add it to .gitignore.
  • When the Console shows a new key, its snippet already fills in your Account ID for you.

Good to know#

  • Your Account ID is permanent; it doesn't change if you change your name or email.
  • A missing or wrong Account ID answers 401 missing_account_id or 401 account_mismatch.

Learn more#

Still need help?#

We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Related articles

Still need help?

Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.

Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyz
For deleting your whole account or the data of one service.