API Key Format
API keys follow this format:dm_sk_- DealMachine secret key prefixlive_- All keys are live keys (no test environment)- The remaining 32 characters are your unique key
All API keys are live. There is no test/sandbox environment. Be mindful when testing write operations.
Making Authenticated Requests
Include your API key in theAuthorization header using the Bearer scheme:
Request Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Your API key in Bearer format |
Content-Type | Yes* | application/json for request bodies |
X-Request-Id | No | Your own request ID for distributed tracing |
OAuth Access Tokens
The API also supports OAuth 2.0 access tokens for third-party integrations:Security Best Practices
Never expose keys in client-side code
Never expose keys in client-side code
API keys should only be used in server-side code. Never include them in JavaScript that runs in the browser, mobile apps, or any client-facing code.
Use environment variables
Use environment variables
Store your API keys in environment variables, not in your codebase:
Rotate keys if compromised
Rotate keys if compromised
If you suspect a key has been compromised, immediately revoke it in the Developer Settings and create a new one.
Use separate keys per integration
Use separate keys per integration
Create separate API keys for different integrations or environments so you can revoke one without affecting others.
Getting an API Key
CLI Authentication (Recommended)
The easiest way to authenticate is using the DealMachine CLI:~/.dealmachine/config.json.
See the CLI documentation for more details.
From the App
You can also create API keys manually:- Go to Developer Settings
- Click “Create API Key”
- Give it a descriptive name
- Copy the key immediately (it won’t be shown again)
Revoking Keys
To revoke a key:- Go to Developer Settings
- Find the key you want to revoke
- Click “Revoke”