Bunmori
API Reference

Endpoints

Available API endpoints

Endpoints

All endpoints require authentication via Bearer token. Base URL: https://bunmori.com/api/public/{domainSlug}

List Collections

GET /collections

Returns all collections in the domain with their schemas and field definitions.

List Items

GET /collections/{collectionSlug}/items

Returns items from a collection. Each item is returned with content for a single language.

Query parameters:

  • language - Language code (defaults to collection's default language)
  • limit - Items per page (max 100)
  • offset - Pagination offset
  • sort - Sort by: itemDate, createdAt, updatedAt, slug
  • order - Sort order: asc or desc

Response format:

{
  "items": [
    {
      "id": "abc123",
      "slug": "my-post",
      "itemDate": "2024-01-15",
      "data": {},
      "language": "en",
      "requestedLanguage": "en",
      "translationExists": true,
      "title": "My Post",
      "translationData": {},
      "createdAt": "2024-01-15T10:00:00Z",
      "updatedAt": "2024-01-15T10:00:00Z"
    }
  ],
  "pagination": { "total": 1, "limit": 100, "offset": 0, "hasMore": false }
}

Translation fallback: If the requested translation doesn't exist, content from the default language is returned with translationExists: false and language set to the actual language returned.

Get Item by ID

GET /collections/{collectionSlug}/items/{itemId}

Returns a single item by its unique ID.

Query parameters:

  • language - Language code (defaults to collection's default language)

Get Item by Slug

GET /collections/{collectionSlug}/items/by-slug/{itemSlug}

Returns a single item by its URL slug.

Query parameters:

  • language - Language code (defaults to collection's default language)

Get Single

GET /singles/{singleSlug}

Returns the single item for a single collection. Singles are collections with only one item (like Homepage, Settings).

Query parameters:

  • language - Language code (defaults to collection's default language)

Response format:

{
  "item": {
    "id": "abc123",
    "slug": "main",
    "itemDate": "2024-01-15",
    "data": {},
    "language": "en",
    "requestedLanguage": "en",
    "translationExists": true,
    "title": "Homepage",
    "translationData": {},
    "createdAt": "2024-01-15T10:00:00Z",
    "updatedAt": "2024-01-15T10:00:00Z"
  },
  "collection": {
    "slug": "homepage",
    "name": "Homepage",
    "fields": [...]
  }
}

List Triggers

GET /triggers

Returns all triggers configured for the domain.

Response format:

{
  "triggers": [
    {
      "id": "abc123",
      "name": "Production Deploy",
      "url": "https://example.com/webhook",
      "method": "POST"
    }
  ]
}

Fire a Trigger

POST /triggers/{triggerId}/fire

Manually fires a trigger and returns the execution result. Requires the write scope.

Response format:

{
  "success": true,
  "status": "SUCCESS",
  "statusCode": 200,
  "durationMs": 150
}

If the trigger fails:

{
  "success": false,
  "status": "FAILED",
  "statusCode": 500,
  "durationMs": 2000,
  "error": "Connection refused"
}

On this page