Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cocobase.buzz/llms.txt

Use this file to discover all available pages before exploring further.

API Reference

The Cocobase REST API allows you to interact with your database using standard HTTP requests.

Base URL

https://api.cocobase.cc

Authentication

All API requests require authentication using your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY

Request Format

  • All request bodies should be JSON
  • Set Content-Type: application/json header

Response Format

All responses are JSON with the following structure: Success Response:
{
  "success": true,
  "data": { ... }
}
Error Response:
{
  "success": false,
  "error": {
    "code": "ERROR_CODE",
    "message": "Human readable message"
  }
}

HTTP Status Codes

CodeDescription
200Success
201Created
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Insufficient permissions
404Not Found - Resource doesn’t exist
429Too Many Requests - Rate limited
500Internal Server Error

Rate Limits

  • Standard: 100 requests per minute
  • Pro: 1000 requests per minute
  • Enterprise: Custom limits
Rate limit headers are included in responses:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1640000000

Pagination

List endpoints support pagination with these parameters:
ParameterTypeDescription
limitnumberMax items to return (default: 20, max: 100)
offsetnumberNumber of items to skip

Quick Examples

Create a Document

curl -X POST https://api.cocobase.cc/collections/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Hello World", "content": "My first post"}'

List Documents

curl https://api.cocobase.cc/collections/posts?limit=10 \
  -H "Authorization: Bearer YOUR_API_KEY"

Get a Document

curl https://api.cocobase.cc/collections/posts/DOC_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

API Sections

Collections API

CRUD operations for documents

Auth API

User authentication endpoints

Storage API

File upload and download

Realtime API

Real-time subscriptions