Skip to main content
The API key flow gives an agent long-lived access without sharing the user’s Encrata password.

When to use it

  • Your agent needs long-lived access to Encrata’s lookup APIs.
  • You want each agent or service to use a separately named key.
  • You need to disable or delete one agent’s access without affecting other integrations.

How it works

  1. The user creates an API key in the dashboard.
  2. The user provides the key to the agent through a secure configuration channel.
  3. The agent sends the key as a Bearer credential on each request.
Never ask a user for their Encrata password.

Step 1: Create a key

Sign in to the Encrata dashboard, open API Keys, and click Create API key. Copy the key and give it to the agent. If you already have a valid API key, you can create another one programmatically:
The returned key uses the format enc_ followed by 32 hexadecimal characters.

Step 2: Configure the agent

Store the key in an environment variable such as ENCRATA_API_KEY, or in a secret manager. Never write it to logs, chat transcripts, URLs, or version control.

Step 3: Verify the key

Before running a batch, confirm the key works. This call is free.
A 200 means the key is valid. credits_remaining is the account balance.

Step 4: Make API calls

Send the key as a Bearer token on every request. Never put it in a query string.

Key facts

Credential lifecycle

Security considerations

  • Store keys in an environment variable or secret manager.
  • Create a separately named key for each agent.
  • Set a credit limit to cap the key’s spend.
  • Permanently delete a compromised key with DELETE /api/account/keys?id={id}&permanent=true.