Guide

Quick start

Create a project, model your data, get an API key and make your first request. It takes about five minutes and no backend code.

Overview

CodeFreeAPI allows you to create production-ready REST APIs without writing any backend code. You define your data models through a visual interface, and we automatically generate all the CRUD endpoints for you.

What You'll Build

  • A complete REST API with GET, POST, PUT, DELETE endpoints
  • Automatic API documentation (Swagger/OpenAPI)
  • Secure API key authentication
  • Pagination and related-record population
1

Create an Account

First, you'll need to create a free account on CodeFreeAPI. This gives you access to the dashboard where you'll manage your APIs.

  1. 1.Visit the registration page
  2. 2.Enter your email and create a password
  3. 3.Verify your email address (check your inbox)
  4. 4.Log in to access your dashboard
2

Create a Project

Projects help you organize your APIs. Each project can contain multiple entities (data models) and has its own API keys.

  1. 1.From your dashboard, click "New Project"
  2. 2.Enter a project name (e.g., "My Blog API")
  3. 3.A unique slug will be auto-generated (e.g., "my-blog-api")
  4. 4.Optionally add a description
  5. 5.Click "Create Project"
3

Define Your Entity

Entities represent your data models. For example, if you're building a blog, you might create a "Posts" entity. Each entity will get its own set of CRUD endpoints.

  1. 1.Open your project from the dashboard
  2. 2.Click "New Entity"
  3. 3.Enter a display name (e.g., "Posts")
  4. 4.The API endpoint name will be auto-generated (e.g., "posts")
  5. 5.Add an optional description
  6. 6.Click "Create Entity"
4

Add Fields

Fields define the structure of your data. Each field has a type (string, number, boolean, etc.) and can be marked as required or unique.

Example: Blog Post Fields

titlestring
Required
contenttext
Required
publishedboolean

Supported Field Types

• string
• text
• number
• boolean
• date
• datetime
• email
• url
• json
• file
• relation
5

Generate API Key

API keys authenticate your requests. Each project can have multiple API keys. Important: Copy your API key immediately - it's only shown once!

  1. 1.Go to your project's "API Keys" tab
  2. 2.Click "New API Key"
  3. 3.Give it a name (e.g., "Production Key")
  4. 4.Copy the key immediately - you won't be able to see it again!
  5. 5.Store it securely (environment variables, secrets manager, etc.)

Security Best Practices

  • • Never commit API keys to version control
  • • Use environment variables in your applications
  • • Rotate keys regularly for production applications
  • • Use different keys for development and production
6

Test Your API

Now you're ready to use your API! Here are some examples using curl. ReplaceYOUR_API_KEY andYOUR_PROJECT_SLUG with your actual values. Your API is accessible via subdomain: https://YOUR_PROJECT_SLUG.codefreeapi.com

Create a Record (POST)

curl -X POST https://YOUR_PROJECT_SLUG.codefreeapi.com/api/v1/posts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "My First Post",
    "content": "This is the content of my first blog post!",
    "published": true
  }'

List Records (GET)

curl https://YOUR_PROJECT_SLUG.codefreeapi.com/api/v1/posts \
  -H "X-API-Key: YOUR_API_KEY"

Get Single Record (GET)

curl https://YOUR_PROJECT_SLUG.codefreeapi.com/api/v1/posts/RECORD_ID \
  -H "X-API-Key: YOUR_API_KEY"

Update Record (PUT)

curl -X PUT https://YOUR_PROJECT_SLUG.codefreeapi.com/api/v1/posts/RECORD_ID \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Updated Title"
  }'

Delete Record (DELETE)

curl -X DELETE https://YOUR_PROJECT_SLUG.codefreeapi.com/api/v1/posts/RECORD_ID \
  -H "X-API-Key: YOUR_API_KEY"

Many records at once

Up to 100 per request, with the same access rules as single records. Creating is all or nothing: if one record is invalid, none are created and the answer lists the problems by position. Deleting skips ids that don't exist or aren't the caller's (owner rule) and returns the ids it deleted. To load a spreadsheet, use Import on the entity's data page in the dashboard.

curl -X POST https://YOUR_PROJECT_SLUG.codefreeapi.com/api/v1/posts/bulk \
  -H "X-API-Key: YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{ "records": [ { "title": "One" }, { "title": "Two" } ] }'

curl -X DELETE "https://YOUR_PROJECT_SLUG.codefreeapi.com/api/v1/posts?id[in]=ID1,ID2" \
  -H "X-API-Key: YOUR_API_KEY"