Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.metabind.ai/llms.txt

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

Metabind exposes content through three query surfaces. Each suits a different consumer; all return the same content model.
APIBest for
RESTServer-to-server, bulk operations, simple integrations
GraphQLWeb and mobile clients needing flexible joins and shape selection
Mobile SDKs (iOS, Android)Native apps with offline caching, BindJS rendering
This page is a tour of each surface. Deeper API references live in the REST API and GraphQL API tabs.

REST

Endpoint shape:
GET https://api.metabind.ai/v1/orgs/{org}/projects/{project}/content
GET https://api.metabind.ai/v1/orgs/{org}/projects/{project}/content/{contentId}
GET https://api.metabind.ai/v1/orgs/{org}/projects/{project}/content/search?q=...
Authenticate with a Bearer token:
curl -H "Authorization: Bearer mb_..." \
  "https://api.metabind.ai/v1/orgs/oak-ivory/projects/main/content?contentType=article&limit=10"
REST works well for:
  • Backend services pulling content for SSR.
  • Cron jobs syncing content to other systems.
  • Bulk operations (import/migrate/archive).
For the full REST API, see the REST API tab.

GraphQL

Endpoint:
POST https://api.metabind.ai/v1/orgs/{org}/projects/{project}/graphql
Example query:
query GetArticles {
  contentList(contentType: "article", limit: 10) {
    items {
      id
      title
      body
      heroImage {
        url
        width
        height
      }
      author {
        name
      }
      publishedAt
    }
  }
}
GraphQL is the recommended pathway for:
  • Web apps that need to fetch only the fields they render.
  • Mobile apps that want to batch related queries.
  • Any client where reducing roundtrips matters.
Subscriptions are also supported — see GraphQL: Subscriptions for live content updates.

iOS SDK

import Metabind

let client = Metabind.Client(
  organizationId: "oak-ivory",
  projectId: "main",
  apiKey: "mb_..."
)

let articles = try await client.content.list(
  contentType: "article",
  limit: 10
)

for article in articles {
  // article is a typed model
  print(article.title)
}
The SDK wraps the GraphQL API, adds local caching (Apollo iOS under the hood), and integrates with bindjs-apple for native rendering.

Android SDK

import ai.metabind.Metabind

val client = Metabind.Client(
  organizationId = "oak-ivory",
  projectId = "main",
  apiKey = "mb_..."
)

val articles = client.content.list(
  contentType = "article",
  limit = 10
)

articles.forEach { article ->
  println(article.title)
}
Same shape, Kotlin idioms.

Choosing draft or production

Each query surface accepts a ?preview=true flag (REST) or a preview argument (GraphQL) to query draft content instead of published:
GET .../content?preview=true&contentType=article
query { contentList(contentType: "article", preview: true) { ... } }
Use draft for editor previews and staging environments. Default to published in production.

Caching

Caching is on by default at the CDN edge for published content. Cache keys include the project, content type, query parameters, and locale. Invalidation:
  • Automatic. Publishing or unpublishing an entry invalidates that entry’s cached responses within seconds.
  • Webhook-driven. Custom invalidation triggers from your own systems (rare).
The iOS and Android SDKs add a local cache on top — entries persist between app launches and update via background refresh.

Pagination

Two patterns:
  • Offset/limit. ?limit=10&offset=20 — easy, fine for small collections.
  • Cursor. ?after=<cursor>&limit=10 — recommended for large collections; stable under additions.
GraphQL supports both via Connection types. The SDKs paginate automatically when you iterate over results.

Filtering

REST supports filter parameters per content type. GraphQL exposes typed filter inputs:
query {
  contentList(
    contentType: "article",
    filter: { tag: { in: ["featured", "running"] }, publishedAt: { gte: "2026-01-01" } }
  ) {
    items { id, title }
  }
}
For complex queries, save a search and reuse it via the saved searches API.

Resolved content

Content with references can be returned resolved — references inlined to one or more levels of depth. Avoids round trips for client rendering:
query {
  content(id: "abc-123") {
    title
    author {
      name
      avatar { url }     # joined automatically
    }
  }
}
REST has a /content/resolved endpoint with similar behavior.

When to use which

A few rules of thumb:
  • Native mobile app? Use the iOS/Android SDK. They handle caching, offline, and pair cleanly with BindJS.
  • Web app? Use GraphQL. Flexible queries, single-request data fetching, subscriptions for live updates.
  • Backend service? REST. Simple, well-cached, works with any HTTP client.
  • MCP App? Use a Data Tool that calls REST or GraphQL. The Data Tool pattern abstracts content fetching behind an AI-callable surface.

REST API

Full REST reference.

GraphQL API

Schema, queries, subscriptions.

Mobile SDKs

iOS and Android client libraries.

AI content creation

AI-driven content workflows.