X-API-Key header:
Prerequisites
Before you create an API key, confirm that:- Your plan includes M2M API access
- Your account role is allowed to manage API keys
- You can access the API Access page in the dashboard
Where to create the key
Create API keys from the dashboard:- Product path: API Access
- Open API Access
- Enter a descriptive key name
- Optionally set an expiry date
- Create the key
- Copy the plaintext key immediately
- Store it in your secret manager or server configuration
One-time copy pattern
In practice, API keys are commonly shown once at creation time. Plan for that by:- Storing the key immediately
- Tagging it with environment and owner information
- Recording when it should be rotated
prod-order-botstaging-crm-syncdev-support-prototype
Minimum request headers
For JSON requests:X-API-Key and let your HTTP client set the multipart boundary automatically.
Connectivity check
Use a low-risk read request as your first connectivity test. Example withcurl:
- The key is valid
- The key belongs to the expected tenant
- Your application can reach the API successfully
JavaScript example
Python example
Key storage rules
Recommended storage locations:- Secret manager
- CI/CD protected variables
- Server environment variables
- Encrypted deployment configuration
- Browser code
- Mobile app bundles
- Public repositories
- Shared screenshots or plain-text team notes
Rotation strategy
Rotate keys on a schedule and after any incident that could expose them. Recommended rotation sequence:- Create a new key
- Deploy the new key to the target environment
- Run a connectivity check and smoke test
- Confirm production traffic uses the new key
- Revoke the old key
Revocation strategy
Revoke a key immediately when:- The owning integration is retired
- The key was shared incorrectly
- You suspect exposure
- Environment ownership changed
Common authentication failures
401 Unauthorized
Typical causes:
- Missing
X-API-Keyheader - Wrong key value
- Expired or revoked key
403 Forbidden
Typical causes:
- Plan does not include the requested capability
- The key is valid, but the operation is not permitted
404 Not Found
Typical causes:
- Wrong tenant ID
- Wrong site ID
- Resource does not belong to the authenticated scope
429 Too Many Requests
Typical causes:
- Burst traffic above allowed limits
Production checklist
- Separate keys per environment
- Separate keys per integration when practical
- Server-side storage only
- Rotation schedule documented
- Connectivity test automated
- Revocation process documented
- Auth failures monitored in logs and alerts