> ## 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 Resolved Content

> Get content with all dependencies resolved and ready for rendering

Retrieves everything needed to render a content item, including its compiled code and all resolved package dependencies.

## 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>
  Content ID
</ParamField>

## Response

<ResponseField name="data" type="object">
  Resolved content

  <Expandable title="data properties">
    <ResponseField name="content" type="string">
      The compiled BindJS code for this content, ready for execution
    </ResponseField>

    <ResponseField name="package" type="object">
      The main package containing the components used by this content

      <Expandable title="properties">
        <ResponseField name="version" type="string">Package version</ResponseField>
        <ResponseField name="components" type="object">Map of component names to compiled JavaScript code</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="dependencies" type="object">
      Map of dependency identifiers to their resolved content
    </ResponseField>
  </Expandable>
</ResponseField>

### Example Response

```json theme={null}
{
  "data": {
    "content": "const body = () => { const props = {title: 'Getting Started', subtitle: 'Your complete guide', heroImage: 'asset124', author: 'Jane Doe', components: [...]}; return ArticleLayout(props); }",
    "package": {
      "version": "1.0.0",
      "components": {
        "ArticleLayout": "const body = (props, children) => { return VStack([Header(props), ...children]); }",
        "ArticleParagraph": "const body = (props) => { return Text(props.text); }",
        "ArticleHeading": "const body = (props) => { return Text(props.text).font(.headline); }",
        "ArticleImage": "const body = (props) => { return Image(props.image); }"
      }
    },
    "dependencies": {
      "shared-ui@2.0.0": {
        "components": {
          "Button": "const body = (props, children) => { ... }",
          "Card": "const body = (props, children) => { ... }"
        }
      }
    }
  }
}
```

<Note>
  When accessed with API keys, returns the latest published version. For optimization scenarios where packages are cached locally, use the standard `/content/{id}` endpoint to fetch just the content with the `compiled` field.
</Note>

## Error Responses

### Content Not Found

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

### Not Published

Content with no published version returns a 400:

```json theme={null}
{
  "error": {
    "code": "CONTENT_NOT_PUBLISHED",
    "message": "Content cont123 exists but has no published version. Publish the content before resolving.",
    "details": {
      "contentId": "cont123",
      "status": "draft"
    }
  }
}
```

## Code Examples

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

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

  const { data: resolved } = await response.json();

  console.log(`Content ready to render`);
  console.log(`Package version: ${resolved.package.version}`);
  console.log(`Components: ${Object.keys(resolved.package.components).join(', ')}`);
  console.log(`Dependencies: ${Object.keys(resolved.dependencies ?? {}).join(', ')}`);
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.