List Content Types
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-typesimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-types"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-types', 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-types",
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-types"
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-types")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-types")
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": [
{}
],
"pagination": {
"lastKey": "<string>"
}
}Content Types
List Content Types
Retrieve a list of all content types for a project
GET
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
content-types
List Content Types
curl --request GET \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-typesimport requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-types"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-types', 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-types",
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-types"
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-types")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects/{projectId}/content-types")
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": [
{}
],
"pagination": {
"lastKey": "<string>"
}
}Path Parameters
string
required
Organization ID
string
required
Project ID
Query Parameters
number
default:"20"
Items per page
string
Cursor for pagination (from previous response)
string
Filter by status:
draft, modified, published, unpublished, or deletedstring
Search term to filter by name or description
string
Natural language query for semantic search
string[]
Filter by tags
Response
ContentType[]
Array of content type objects
object
Pagination information
Show properties
Show properties
string
Cursor for next page (omitted if no more results)
Example Response
{
"data": [
{
"id": "ct123",
"name": "Article",
"description": "Standard article content type...",
"status": "published",
"version": 3,
"lastPublishedVersion": 3,
"layoutComponentId": "c123",
"componentIdsAllowList": ["c124", "c125"],
"packageVersion": "1.0.0",
"templateContentIds": ["cont123"],
"permissions": {
"roles": ["editor"],
"users": []
},
"metadata": {
"author": "admin@metabind.ai",
"tags": ["article"]
},
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-20T15:00:00Z"
},
{
"id": "ct124",
"name": "BlogPost",
"description": "Blog post content type...",
"status": "draft",
"version": null,
"lastPublishedVersion": null,
"layoutComponentId": "c130",
"componentIdsAllowList": ["c131", "c132"],
"packageVersion": "1.0.0",
"templateContentIds": [],
"permissions": {
"roles": ["blogger"],
"users": []
},
"metadata": {
"author": "admin@metabind.ai",
"tags": ["blog"]
},
"createdAt": "2024-03-21T10:00:00Z",
"updatedAt": "2024-03-21T10:00:00Z"
}
],
"pagination": {
"lastKey": "eyJwayI6Ik9SR..."
}
}
Code Examples
curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content-types?status=published" \
-H "Authorization: Bearer YOUR_JWT"
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/content-types?status=published',
{
headers: {
'Authorization': 'Bearer YOUR_JWT'
}
}
);
const { data: contentTypes, pagination } = await response.json();
console.log(`Found ${contentTypes.length} content types`);
⌘I