Skip to main content
GET
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
components
/
{id}
Get Component
curl --request GET \
  --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/components/{id}

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID
id
string
required
Component ID

Response

Returns the Component object.
{
  "id": "c123",
  "name": "ProductCard",
  "title": "Product Card",
  "description": "Product display card with image, title, and pricing.",
  "type": "view",
  "status": "published",
  "version": 2,
  "lastPublishedVersion": 2,
  "collectionId": "coll123",
  "content": "const metadata = () => ({...});\nconst properties = () => ({...});\nconst body = (props: ComponentProps) => {...};",
  "compiled": "const metadata = () => ({...});\nconst properties = () => ({...});\nconst body = (props) => {...};",
  "schema": {
    "type": "object",
    "properties": {
      "title": { "type": "string", "description": "Product name" },
      "price": { "type": "number", "minimum": 0 }
    },
    "required": ["title", "price"]
  },
  "metadata": {
    "author": "[email protected]",
    "tags": ["product", "card"],
    "packageVersions": ["1.0.0", "1.1.0"]
  },
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-21T14:30:00Z"
}

Error Responses

Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Component not found",
    "details": {
      "resourceType": "component",
      "resourceId": "c123"
    }
  }
}

Code Examples

curl -X GET "https://api.metabind.ai/v1/organizations/org123/projects/proj456/components/c123" \
  -H "Authorization: Bearer YOUR_API_KEY"