Generating an API Key

To use the NeetoCal APIs, you must first generate an API key. Learn how to generate your API key here.

Making authenticated API requests

To authenticate your API requests, include a valid API key in the X-Api-Key header.
curl https://{your-workspace}.neetocal.com/api/external/v1/bookings \
  --header 'X-Api-Key: your-api-key'
  --H "Content-Type: application/json"

Header Format

Include your API key in the X-Api-Key header of every request:
X-Api-Key: your_api_key_here
Generate separate API keys for different workspaces. An API key generated in one workspace will not work in another.

Security best practices

Keep keys secret

Never expose API keys in client-side code, public repositories, or logs.

Use environment variables

Store API keys in environment variables or secure configuration files.

Rotate keys regularly

Periodically generate new API keys and revoke old ones.
API keys provide access to sensitive data. Treat them like passwords and follow security best practices.

Environment Variables

Store your API key as an environment variable:
NEETOCAL_API_KEY=your_api_key_here
NEETOCAL_WORKSPACE=yourworkspace

Error Responses

401 Unauthorized

If your API key is missing, invalid, or expired, you’ll receive a 401 error:
{
  "error": "Could not authenticate, invalid API Key"
}

Common Authentication Issues

Rate Limiting

API requests are subject to rate limiting to ensure fair use. If you exceed the rate limit, you’ll receive a 429 response. If you encounter this error try again after some time.

Next Steps

Make your first request 🚀

Now that you understand authentication, try making your first API request in our quickstart guide.