Skip to main content

Generating an API Key

To use the NeetoDesk 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}.neetodesk.com/api/v1/public/tickets \
  --header 'X-Api-Key: your-api-key' \
  --header "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
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:
NEETODESK_API_KEY=your-api-key
NEETODESK_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

Problem: API key is missing or invalid.
Solution: Verify your API key is correct and hasn’t been revoked/expired.
Problem: Subdomain is left as the default value (spinkart) or incorrect.
Solution: Verify your subdomain name is properly added in the request URL.

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.
I