Skip to main content
GET
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
components
List Components
curl --request GET \
  --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/components
{
  "data": [
    {}
  ],
  "pagination": {
    "page": 123,
    "limit": 123,
    "total": 123,
    "pages": 123
  }
}

Query Parameters

page
number
default:"1"
Page number
limit
number
default:"20"
Items per page (max: 100)
status
string
Filter by status: draft, modified, published, or deleted
type
string
Filter by component type: view or layout
collectionId
string
Filter by collection (null for root collection)
Search term for name and description
tags
string[]
Filter by tags
recursive
boolean
default:"false"
Include items from all collections
includeAssets
boolean
default:"false"
Include component assets inline in the response

Response

data
Component[]
Array of component objects
pagination
object

Example Response

{
  "data": [
    {
      "id": "c123",
      "name": "ArticleLayout",
      "title": "Article Layout",
      "description": "Standard article layout...",
      "type": "layout",
      "status": "published",
      "version": 3,
      "lastPublishedVersion": 3,
      "content": "...",
      "compiled": "...",
      "schema": {...},
      "createdAt": "2024-03-20T10:00:00Z",
      "updatedAt": "2024-03-21T14:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 20,
    "total": 42,
    "pages": 3
  }
}

Response with Assets

When includeAssets=true:
{
  "data": [
    {
      "id": "c123",
      "name": "ArticleLayout",
      "type": "layout",
      "status": "published",
      "assets": [
        {
          "id": "asset123",
          "name": "hero-image.jpg",
          "type": "image/jpeg",
          "url": "https://cdn.metabind.ai/.../hero-image.jpg",
          "size": 2048576,
          "status": "active",
          "metadata": {
            "width": 1920,
            "height": 1080
          }
        }
      ],
      "createdAt": "2024-03-20T10:00:00Z",
      "updatedAt": "2024-03-21T14:30:00Z"
    }
  ],
  "pagination": {...}
}
When includeAssets=true, only the first 100 assets per component are included. Use the List Component Assets endpoint for full pagination.

Code Examples

curl -X GET "https://api.metabind.ai/v1/organizations/org123/projects/proj456/components?status=published&type=layout" \
  -H "Authorization: Bearer YOUR_API_KEY"