> ## 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.

# Get Component

> Retrieve a single component by ID

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

<ParamField path="id" type="string" required>
  Component ID
</ParamField>

## Response

Returns the Component object.

```json theme={null}
{
  "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": "jane.doe@metabind.ai",
    "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

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Component c123 was not found"
  }
}
```

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/components/c123',
    {
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  const component = await response.json();
  ```
</CodeGroup>
