Skip to main content

What are API Keys?

API keys authenticate requests to your Granite endpoints. Without a valid key, requests are rejected.

Creating an API Key

1

Go to API Management

Navigate to API Management in the sidebar
2

Click Create Key

In the API Keys section, click + Create Key
3

Name Your Key

Give it a descriptive name:
  • “Production Backend”
  • “CI/CD Pipeline”
  • “Partner Integration”
4

Copy Immediately

Important: Copy the key now. It’s only shown once!
Store your API key securely. If you lose it, you’ll need to create a new one.

Using API Keys

Include the key in the X-Granite-API-Key header:

Managing Keys

View Keys

In API Management, you see:
  • Key name
  • Creation date
  • Last used date
  • Partial key (last 4 characters)

Revoke Keys

To revoke a compromised or unused key:
  1. Find the key in the list
  2. Click the trash icon
  3. Confirm revocation
Revocation is immediate. Any systems using the key will fail.

Best Practices

Create distinct keys for:
  • Production
  • Staging
  • CI/CD
  • Each partner integration
If one is compromised, only revoke that one.
Every 90 days:
  1. Create a new key
  2. Update your systems
  3. Revoke the old key
Use environment variables or secret managers:
Check Analytics for unexpected patterns that might indicate a leak.

Error Responses

Example error:

Security

API keys are:
  • Encrypted at rest
  • Hashed for storage (we don’t store the plaintext)
  • Scoped to your organization
  • Logged on every use

SDK Usage

Using the TypeScript SDK:

Next Steps

Create Endpoints

Make your automation callable

Invoke Automations

Call your endpoints