API Reference

Authentication

How to authenticate with the AgentAGI API.

API Keys

Generate API keys from the Settings page in your dashboard. Each key has configurable permissions.

Authentication Header

Authorization: Bearer ag_abc123def456ghi789jkl

Example Request

curl https://app.agentagi.dev/api/companies \
 -H "Authorization: Bearer ag_abc123..."

Error Responses

  • 401 Unauthorized — Missing or invalid API key
  • 403 Forbidden — API key lacks required permissions

Best Practices

  • Store keys securely (use environment variables)
  • Rotate keys periodically
  • Use different keys for different applications
  • Revoke unused keys immediately