Get Resolved Content
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolvedimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"content": "<string>",
"package": {
"version": "<string>",
"components": {}
},
"dependencies": {}
}
}Content
Get Resolved Content
Get content with all dependencies resolved and ready for rendering
GET
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
content
/
{id}
/
resolved
Get Resolved Content
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolvedimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content/{id}/resolved")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"data": {
"content": "<string>",
"package": {
"version": "<string>",
"components": {}
},
"dependencies": {}
}
}Retrieves everything needed to render a content item, including its compiled code and all resolved package dependencies.
Path Parameters
string
required
Organization ID
string
required
Project ID
string
required
Content ID
Response
object
Resolved content
Show data properties
Show data properties
Example Response
{
"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) => { ... }"
}
}
}
}
}
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.Error Responses
Content Not Found
{
"error": {
"code": "NOT_FOUND",
"message": "Content not found"
}
}
Not Published
Content with no published version returns a 400:{
"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
curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content/cont123/resolved" \
-H "Authorization: Bearer YOUR_JWT"
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(', ')}`);