Skip to main content

Overview

EazeCustoms uses API key-based authentication for securing all requests. Your API key is a unique identifier that proves your authorization to access the EazeCustoms platform.

Getting Your API Key

  1. Complete the onboarding process
  2. Our team will email you your credentials
  3. Store your API key securely (never commit to version control)

Using Your API Key

Include your API key in the Authorization header of every request:
curl -X GET https://devapi.eazecustoms.com/staging/v1/declarations \
  -H "Authorization: Bearer your_api_key_here"

Best Practices

1. Keep Your Key Secure

  • Store API keys in environment variables, not in code
  • Use .env files for local development (add to .gitignore)
  • Rotate keys regularly in production

2. Environment Variables

# .env file (local development)
EAZECUSTOMS_API_KEY=sk_sandbox_abc123def456

# Never commit this file!

3. Implementation Examples

curl --request GET \
  --url https://devapi.eazecustoms.com/staging/v1/declarations \
  --header 'Authorization: Bearer $EAZECUSTOMS_API_KEY' \
  --header 'Content-Type: application/json'

Key Rotation

Regularly rotate your API keys to maintain security:
  1. Generate a new API key from your dashboard
  2. Update all applications to use the new key
  3. Wait 24 hours to ensure all traffic has switched
  4. Revoke the old key

Troubleshooting

Invalid API Key Error (HTTP 401)

{
  "error": "INVALID_CREDENTIALS",
  "message": "The API key provided is invalid or has expired"
}
Solution: Verify your API key is correct and hasn’t expired. Generate a new one if needed.

Unauthorized Error (HTTP 403)

{
  "error": "UNAUTHORIZED",
  "message": "You do not have permission to access this resource"
}
Solution: Ensure your account has been activated and your API key has the required permissions.

Security Headers

All requests should include:
Authorization: Bearer {api_key}
Content-Type: application/json
User-Agent: YourApp/1.0

Rate Limiting

API keys are subject to rate limits:
  • Sandbox: 100 requests/minute
  • Production: 1000 requests/hour
When you exceed the limit, you’ll receive a 429 response with a Retry-After header.

Support

For authentication issues or to rotate keys, contact our support team at support@eazecustoms.com