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_xxxxxxxxxxxxxxxx

Obtaining an API Key

  1. Log in to your Vetigen clinic dashboard
  2. Navigate to Settings → Developer → API Keys
  3. Click Create New API Key
  4. Choose the minimum permissions your integration needs
  5. 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:

PermissionAccess
clinic.patient.viewRead patient records
clinic.calendar.viewRead calendar events
clinic.inventory.viewRead 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

On this page