Authentication
Dcycle supports multiple authentication methods depending on how you’re integrating:API Keys
For REST API and programmatic integrations
CLI Login
For command-line tool access
MCP Setup
For AI assistant integrations
API Key Authentication
API Keys are the primary method for authenticating with the Dcycle REST API.When to Use API Keys
- Server-to-server integrations
- Automated scripts and CI/CD pipelines
- Backend applications
- Any programmatic access
Get an API Key
Log in to Dcycle
Go to app.dcycle.io
User Attribution & Accountability
This means:- ✅ All records created via your API key are linked to your user account
- ✅ Audit logs will show you as the creator of the data
- ✅ This ensures proper data governance and traceability
- ✅ You are responsible for the data uploaded using your API keys
Using your API Key
Include your API Key in requests using the appropriate format for your API version:- New API (Recommended)
- Legacy API
Required Headers
- New API (Recommended)
- Legacy API
Simpler authentication - Only 2 required headers:
| Header | Description | Required |
|---|---|---|
x-api-key | Your API Key | ✅ Yes |
x-organization-id | Your organization UUID | ✅ Yes |
Content-Type | Content type (for POST/PUT) | Only for POST/PUT |
No
x-user-id needed! Operations are automatically attributed to the user who created the API key.CLI Authentication
Early Access - The Dcycle CLI is currently available for enterprise customers.
Contact us to learn more about access.
dc command) supports two authentication methods: interactive login and environment variables.
Interactive Login
The simplest way to authenticate:Environment Variables
For automated scripts and CI/CD pipelines, use environment variables:Configuration File
The CLI stores configuration in~/.dcycle/config.yaml:
MCP Authentication
Coming Soon - The Dcycle MCP Server is in private beta.
Contact us for early access.
Claude Desktop Configuration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json):
Claude Code Configuration
For Claude Code, add to~/.claude/settings.json:
JWT Tokens (Web Applications)
JWT tokens are ideal for web and mobile applications acting on behalf of users.Get a JWT Token
Token Expiration
JWT tokens expire after 1 hour. When a token expires, you’ll get a401 Unauthorized error. You’ll need to log in again to get a new token.
Security Best Practices
Never expose your API Key
Never expose your API Key
- ❌ DON’T save API Keys in source code
- ❌ DON’T commit them to Git/GitHub
- ❌ DON’T share them via email or Slack
- ✅ DO use environment variables
- ✅ DO use secret managers (AWS Secrets Manager, etc.)
Always use HTTPS
Always use HTTPS
All API requests must use HTTPS. HTTP requests will be rejected.
Rotate your API Keys regularly
Rotate your API Keys regularly
- Generate new API Keys every 3-6 months
- Delete old API Keys immediately after migration
- Use different API Keys for different environments (dev, staging, prod)
Environment-specific credentials
Environment-specific credentials
Use separate credentials for each environment:For CI/CD, store secrets in your pipeline’s secret management (GitHub Secrets, GitLab CI Variables, etc.).
API Key Management
List your API Keys
You can view all your active API Keys at: app.dcycle.io/settings/apiRevoke an API Key
If an API Key has been compromised or you no longer need it:- Go to Organization Settings → API Keys
- Find the API Key in the list
- Click “Revoke”
Troubleshooting
Error 401: Unauthorized
Possible causes:- Invalid or revoked API Key
- Expired JWT token
- Incorrect
Authorizationheader format - Organization doesn’t have API enabled
Error 403: Forbidden
Possible causes:- User doesn’t belong to the specified organization
- Missing
x-organization-idheader - Organization doesn’t have permissions for that resource
x-organization-id corresponds to your organization.

