API key credentials
An API key has two parts that are always sent together:| Credential | Header | Description |
|---|---|---|
| Client ID | x-metal-client-id | Public identifier for the key. |
| Secret key | x-metal-api-key | Secret value that authenticates the request. |
Create a key in the app
Create your first API key from the Metal app. You need an admin role to manage keys.Create a key
In the API Keys card, click Create API Key, enter a descriptive Name (for example, “Production sync”), and click Create.

Manage keys with the API
Once you have a key, you can manage keys programmatically with the API keys endpoints:GET /v1/keys— list every key in your organization. Secrets are never returned again, only metadata such asnameandkeyLastFour.POST /v1/keys— create a new key with aname. The response includes the one-time secretkey.DELETE /v1/keys/{key}— revoke a key immediately. Revoked keys stop working within a short cache window.
Best practices
Use separate keys per integration
Create a distinct key for each integration or environment so you can rotate or revoke them independently.
Rotate regularly
Create a new key, deploy it, then delete the old one to rotate without downtime.
Store secrets securely
Keep keys in a secret manager or environment variables — never in source control.
Scope by purpose
Name keys after the integration that uses them so you can audit and revoke precisely.
Errors
If credentials are missing or invalid, the API responds with401 Unauthorized:

