Get Started
Authentication
Learn how to authenticate with the Vetigen API using API keys.
Authentication
Vetigen uses API keys for public API authentication. All public API requests must include a valid key in the X-API-Key header.
API Key Format
X-API-Key: sk_live_xxxxxxxxxxxxxxxxObtaining an API Key
- Log in to your Vetigen clinic dashboard
- Navigate to Settings → Developer → API Keys
- Click Create New API Key
- Choose the minimum permissions your integration needs
- Copy and store the key securely — it is only shown once
Request Example
curl https://api.vetigen.com/api/v1/patients \
-H "X-API-Key: sk_live_YOUR_KEY" \
-H "Content-Type: application/json"Permissions
API keys are permission-scoped. Public integrations currently use these read permissions:
| Permission | Access |
|---|---|
clinic.patient.view | Read patient records |
clinic.calendar.view | Read calendar events |
clinic.inventory.view | Read inventory items |
Error Responses
401 Unauthorized
{
"success": false,
"error": {
"code": "AUTH.UNAUTHORIZED",
"message": "Authentication required.",
"severity": "error"
}
}403 Forbidden
{
"success": false,
"error": {
"code": "AUTH.FORBIDDEN",
"message": "Insufficient permissions.",
"severity": "error"
}
}Best Practices
- Never expose API keys in client-side code or public repositories
- Use environment variables to store keys in your application
- Rotate keys regularly — you can create multiple keys and revoke old ones
- Use minimum required permissions — principle of least privilege
- Monitor usage in the Vetigen dashboard under Settings → API Keys