Back to Documentation
API Documentation
Comprehensive documentation for the CodeAdvocate API.
Getting Started
The CodeAdvocate API allows you to programmatically access and manage your snippets, repositories, teams, and more. All API requests require authentication.
Authentication
API requests can be authenticated using API keys or Bearer tokens. Generate an API key from your API Keys dashboard and include it in the
X-API-Key header.Base URL
All API requests should be made to: /api
Available Endpoints
Snippets
GET /api/snippets - List snippetsPOST /api/snippets - Create snippetGET /api/snippets/[id] - Get snippetPUT /api/snippets/[id] - Update snippetDELETE /api/snippets/[id] - Delete snippetRepositories
GET /api/repositories - List repositoriesPOST /api/repositories - Create repositoryGET /api/repositories/[id] - Get repositoryResponse Format
All API responses are returned in JSON format. Successful responses include the requested data, while errors include an error field with a descriptive message.