Authentication
Dcycle API supports two authentication methods depending on your use case:API Keys
For programmatic integrations and automations
JWT (Tokens)
For web applications acting on behalf of users
API Keys
API Keys are ideal for:- Server-to-server integrations
- Automated scripts
- CI/CD pipelines
- Backend applications
Get an API Key
1
Log in to Dcycle
Go to app.dcycle.io
2
Navigate to API Keys
Organization Settings → API Keys
3
Generate a new key
Click “Generate API Key”
Using your API Key
Include your API Key in theAuthorization header with the Bearer scheme:
Required Headers
When using API Keys, you must include these headers:| Header | Description | Required |
|---|---|---|
Authorization | Bearer token with your API Key | ✅ Yes |
x-organization-id | Your organization UUID | ✅ Yes |
x-user-id | Your user UUID | ✅ Yes |
Content-Type | Content type (for POST/PUT) | Only for POST/PUT |
JWT Tokens
JWT tokens are ideal for:- Web frontend applications
- Mobile applications
- Interactive user interfaces
Get a JWT Token
1
Login with email and password
2
Extract the token from response
3
Use the token in your requests
Include the token in the
Authorization header: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)
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.

