Codefluss Logo

API Reference

Complete technical documentation for the CODEFLUSS REST API.

Introduction

The CODEFLUSS API allows you to programmatically manage projects, pages, and design elements. The API follows REST principles and uses JSON for request and response bodies.

All API endpoints require authentication via API keys, which you can create in your account settings.

Base URL

All API requests are sent to the following base URL:

https://api.codefluss.com/v1

For staging environments, use https://api.staging.codefluss.dev/v1.

Authentication

The API uses Bearer Token Authentication. Add your API key in the Authorization header:

Authorization: Bearer your_api_key_here

Creating an API Key

Navigate to Settings → API Keys in your CODEFLUSS Dashboard to create a new API key. Keep the key secure – it will only be shown once.

Response Format

All successful responses follow this format:

{ "success": true, "data": { // Response data }, "meta": { "requestId": "req_abc123", "timestamp": "2026-01-22T12:00:00Z" } }

Pagination

List endpoints support pagination with cursor-based navigation:

{ "data": [...], "pagination": { "hasMore": true, "nextCursor": "cursor_xyz789", "total": 42 } }

Error Handling

Errors are returned with appropriate HTTP status codes and a structured body:

{ "success": false, "error": { "code": "VALIDATION_ERROR", "message": "Invalid project name", "details": { "field": "name", "reason": "Name must be at least 3 characters" } } }

HTTP Status Codes

  • 200 – Successful request
  • 201 – Resource successfully created
  • 400 – Invalid request (validation error)
  • 401 – Not authenticated
  • 403 – Not authorized
  • 404 – Resource not found
  • 429 – Rate limit exceeded
  • 500 – Server error

Example Request

Here's a complete example for retrieving all projects:

curl -X GET "https://api.codefluss.com/v1/projects" \ -H "Authorization: Bearer your_api_key" \ -H "Content-Type: application/json"

Response

{ "success": true, "data": [ { "id": "proj_abc123", "name": "My Website", "slug": "my-website", "status": "published", "createdAt": "2026-01-15T10:30:00Z", "updatedAt": "2026-01-22T14:45:00Z" } ], "pagination": { "hasMore": false, "total": 1 } }

For more endpoints and parameters, navigate to the corresponding sections in the left sidebar.