API Overview
The SellerCockpit API provides programmatic access to your CRM data, enabling you to build custom integrations with automation platforms like n8n, Zapier, and Make.com, or create your own applications.
API Basics
Base URL
All API requests are made to your Supabase project URL:
https://{project-ref}.supabase.co/functions/v1/api-v1-{resource}Replace {project-ref} with your actual Supabase project reference and {resource} with the specific endpoint (e.g., contacts, organizations, deals).
Example:
https://abcdefghijklmno.supabase.co/functions/v1/api-v1-contactsVersioning
The API is currently at version 1 (v1). All endpoints include the version in the URL path: /api-v1-{resource}.
We maintain backward compatibility within major versions. If breaking changes are required, we’ll release a new major version (e.g., v2) and provide migration guidance.
Request Format
- Protocol: HTTPS only
- Content-Type:
application/jsonfor request bodies - Accept:
application/jsonfor responses - Character Encoding: UTF-8
Response Format
All API responses return JSON with a consistent structure:
Success Response (Single Resource)
{ "data": { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Acme Corp", "email": "contact@acme.com", "created_at": "2024-01-15T10:30:00Z" }}Success Response (Multiple Resources)
{ "data": [ { "id": "550e8400-e29b-41d4-a716-446655440000", "name": "Acme Corp" }, { "id": "660e8400-e29b-41d4-a716-446655440001", "name": "Beta Inc" } ], "pagination": { "total": 150, "limit": 50, "cursor": "eyJpZCI6ImFiYy...", "next_cursor": "eyJpZCI6ImRlZi...", "has_more": true }}Error Response
{ "error": { "code": "VALIDATION_ERROR", "message": "Invalid email format", "details": [ { "field": "email", "message": "Must be a valid email address", "code": "INVALID_FORMAT" } ] }}HTTP Status Codes
The API uses standard HTTP status codes:
| Status Code | Meaning |
|---|---|
200 | Success - Request completed successfully |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid request format or parameters |
401 | Unauthorized - Missing or invalid API key |
403 | Forbidden - API key lacks required permissions |
404 | Not Found - Resource doesn’t exist |
409 | Conflict - Resource already exists or conflict detected |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Something went wrong on our end |
503 | Service Unavailable - Temporary service disruption |
Error Codes
In addition to HTTP status codes, error responses include a specific error code:
Authentication Errors
UNAUTHORIZED- No API key providedINVALID_API_KEY- API key format is invalid or key doesn’t existAPI_KEY_REVOKED- API key has been revokedAPI_KEY_EXPIRED- API key has expiredINSUFFICIENT_PERMISSIONS- API key lacks required scope
Rate Limiting Errors
RATE_LIMIT_EXCEEDED- Per-minute rate limit exceededDAILY_LIMIT_EXCEEDED- Daily request limit exceeded
Validation Errors
VALIDATION_ERROR- Request validation failedINVALID_REQUEST- Malformed requestMISSING_REQUIRED_FIELD- Required field is missing
Resource Errors
NOT_FOUND- Resource not foundALREADY_EXISTS- Resource with identifier already existsCONFLICT- Operation conflicts with current state
Server Errors
INTERNAL_ERROR- Unexpected server errorSERVICE_UNAVAILABLE- Service temporarily unavailable
Plan Limit Errors
FEATURE_NOT_ENABLED- Feature not available on current planPLAN_LIMIT_EXCEEDED- Plan resource limit exceeded
CORS Support
The API supports Cross-Origin Resource Sharing (CORS) for browser-based requests:
- Access-Control-Allow-Origin:
*(all origins) - Access-Control-Allow-Methods:
GET,POST,PATCH,DELETE,OPTIONS - Access-Control-Allow-Headers:
authorization,x-client-info,apikey,content-type - Access-Control-Max-Age:
86400(24 hours)
Rate Limiting
All API requests are subject to rate limiting to ensure fair usage. See the Rate Limits page for details on limits and handling rate limit errors.
Authentication
API authentication uses API keys with scope-based permissions. See the Authentication page for details on creating and using API keys.
Pagination
List endpoints support both cursor-based and offset-based pagination. See the Pagination page for details on paginating through large result sets.
Getting Help
- Documentation: Browse our API endpoint documentation
- Support: Contact support@sellercockpit.com
- Status: Check service status at status.sellercockpit.com