01 Software

REST API

REST API guide for the 01 SOFTWARE platform

REST API

01 SOFTWARE provides a RESTful API for managing your data.

API Endpoints

Base URL

https://api.01.software/api

Authentication

For more details on authentication, see the Authentication Guide.

Collection API

All collections provide standard CRUD endpoints.

GET /api/{collection-slug}

Query Parameters

ParameterTypeDescription
limitnumberItems per page (default: 10)
pagenumberPage number (default: 1)
sortstringSort field (-fieldName: descending)
whereobjectFilter conditions (JSON)
depthnumberRelationship data inclusion depth (default: 0)
selectobjectSelect fields to return (e.g., select[title]=true)
populateobjectPer-collection field selection for populated relationships
joinsobject/falseJoin field control (pagination, sort, disable)

Example

# Get all posts
curl "https://api.01.software/api/posts" \
  -H "Authorization: Bearer $TOKEN"

# Filtering and sorting
curl "https://api.01.software/api/posts?\
limit=20&\
page=1&\
sort=-createdAt&\
where[status][equals]=published" \
  -H "Authorization: Bearer $TOKEN"

# Include relationship data
curl "https://api.01.software/api/posts?depth=2" \
  -H "Authorization: Bearer $TOKEN"

Response

{
  "docs": [
    {
      "id": "post_id",
      "title": "Post Title",
      "slug": "post-title",
      "status": "published",
      "createdAt": "2026-01-07T10:00:00Z",
      "updatedAt": "2026-01-07T10:00:00Z"
    }
  ],
  "totalDocs": 100,
  "limit": 20,
  "totalPages": 5,
  "page": 1,
  "pagingCounter": 1,
  "hasPrevPage": false,
  "hasNextPage": true,
  "prevPage": null,
  "nextPage": 2
}

Count

GET /api/{collection-slug}/count

Returns the number of documents matching the where filter.

{
  "totalDocs": 42
}

Get by ID

GET /api/{collection-slug}/{id}

Example

curl "https://api.01.software/api/posts/post_id" \
  -H "Authorization: Bearer $TOKEN"

Response

{
  "id": "post_id",
  "title": "Post Title",
  "slug": "post-title",
  "status": "published",
  "createdAt": "2026-01-07T10:00:00Z",
  "updatedAt": "2026-01-07T10:00:00Z"
}

Create

POST /api/{collection-slug}

Example

curl -X POST "https://api.01.software/api/posts" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "New Post",
    "slug": "new-post",
    "status": "draft"
  }'

Response

{
  "message": "Post created successfully",
  "doc": {
    "id": "new_post_id",
    "title": "New Post",
    "slug": "new-post",
    "status": "draft",
    "createdAt": "2026-01-07T11:00:00Z",
    "updatedAt": "2026-01-07T11:00:00Z"
  }
}

Update

PATCH /api/{collection-slug}/{id}

Example

curl -X PATCH "https://api.01.software/api/posts/post_id" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "updated-post",
    "status": "published"
  }'

Response

{
  "message": "Post updated successfully",
  "doc": {
    "id": "post_id",
    "title": "Post Title",
    "slug": "updated-post",
    "status": "published",
    "updatedAt": "2026-01-07T12:00:00Z"
  }
}

Delete

DELETE /api/{collection-slug}/{id}

Example

curl -X DELETE "https://api.01.software/api/posts/post_id" \
  -H "Authorization: Bearer $TOKEN"

Response

{
  "id": "post_id",
  "message": "Post deleted successfully"
}

Filtering

For more details on filtering, see the Filtering Guide. It also covers the REST API URL format.

File Uploads

Image Upload

POST /api/images
Content-Type: multipart/form-data

Example

curl -X POST "https://api.01.software/api/images" \
  -H "Authorization: Bearer $TOKEN" \
  -F "file=@/path/to/image.jpg" \
  -F "alt=Image description"

Response

{
  "message": "Image uploaded successfully",
  "doc": {
    "id": "image_id",
    "filename": "image.jpg",
    "mimeType": "image/jpeg",
    "filesize": 102400,
    "width": 1920,
    "height": 1080,
    "url": "https://cdn.01.software/images/image.jpg",
    "createdAt": "2026-01-07T13:00:00Z"
  }
}

Authentication Endpoints

For more details on authentication endpoints (login, logout, token refresh, etc.), see the Authentication Guide.

For error formats and HTTP status codes, see Response Format.

SDK Integration

The REST API can be used more easily through the SDK.

import { createClient } from '@01.software/sdk'

const client = createClient({
  publishableKey: process.env.NEXT_PUBLIC_SOFTWARE_PUBLISHABLE_KEY
})

// Automatic REST API calls
const { data } = await client.from('posts').find({
  where: { status: { equals: 'published' } },
  limit: 20,
  sort: '-createdAt'
})

Next Steps

On this page