Create Project
curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"settings": {},
"settings.defaultLocale": "<string>",
"settings.supportedLocales": [
"<string>"
],
"settings.defaultPlatform": "<string>",
"settings.supportedPlatforms": [
"<string>"
],
"settings.thumbnailUrl": "<string>"
}
'import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"settings": {},
"settings.defaultLocale": "<string>",
"settings.supportedLocales": ["<string>"],
"settings.defaultPlatform": "<string>",
"settings.supportedPlatforms": ["<string>"],
"settings.thumbnailUrl": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
settings: {},
'settings.defaultLocale': '<string>',
'settings.supportedLocales': ['<string>'],
'settings.defaultPlatform': '<string>',
'settings.supportedPlatforms': ['<string>'],
'settings.thumbnailUrl': '<string>'
})
};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'settings' => [
],
'settings.defaultLocale' => '<string>',
'settings.supportedLocales' => [
'<string>'
],
'settings.defaultPlatform' => '<string>',
'settings.supportedPlatforms' => [
'<string>'
],
'settings.thumbnailUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/app/v1/organizations/{organizationId}/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {},\n \"settings.defaultLocale\": \"<string>\",\n \"settings.supportedLocales\": [\n \"<string>\"\n ],\n \"settings.defaultPlatform\": \"<string>\",\n \"settings.supportedPlatforms\": [\n \"<string>\"\n ],\n \"settings.thumbnailUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/app/v1/organizations/{organizationId}/projects")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {},\n \"settings.defaultLocale\": \"<string>\",\n \"settings.supportedLocales\": [\n \"<string>\"\n ],\n \"settings.defaultPlatform\": \"<string>\",\n \"settings.supportedPlatforms\": [\n \"<string>\"\n ],\n \"settings.thumbnailUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {},\n \"settings.defaultLocale\": \"<string>\",\n \"settings.supportedLocales\": [\n \"<string>\"\n ],\n \"settings.defaultPlatform\": \"<string>\",\n \"settings.supportedPlatforms\": [\n \"<string>\"\n ],\n \"settings.thumbnailUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyProjects
Create Project
Create a new project
POST
/
app
/
v1
/
organizations
/
{organizationId}
/
projects
Create Project
curl --request POST \
--url https://api.example.com/app/v1/organizations/{organizationId}/projects \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"settings": {},
"settings.defaultLocale": "<string>",
"settings.supportedLocales": [
"<string>"
],
"settings.defaultPlatform": "<string>",
"settings.supportedPlatforms": [
"<string>"
],
"settings.thumbnailUrl": "<string>"
}
'import requests
url = "https://api.example.com/app/v1/organizations/{organizationId}/projects"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"settings": {},
"settings.defaultLocale": "<string>",
"settings.supportedLocales": ["<string>"],
"settings.defaultPlatform": "<string>",
"settings.supportedPlatforms": ["<string>"],
"settings.thumbnailUrl": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
settings: {},
'settings.defaultLocale': '<string>',
'settings.supportedLocales': ['<string>'],
'settings.defaultPlatform': '<string>',
'settings.supportedPlatforms': ['<string>'],
'settings.thumbnailUrl': '<string>'
})
};
fetch('https://api.example.com/app/v1/organizations/{organizationId}/projects', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'settings' => [
],
'settings.defaultLocale' => '<string>',
'settings.supportedLocales' => [
'<string>'
],
'settings.defaultPlatform' => '<string>',
'settings.supportedPlatforms' => [
'<string>'
],
'settings.thumbnailUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/app/v1/organizations/{organizationId}/projects"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {},\n \"settings.defaultLocale\": \"<string>\",\n \"settings.supportedLocales\": [\n \"<string>\"\n ],\n \"settings.defaultPlatform\": \"<string>\",\n \"settings.supportedPlatforms\": [\n \"<string>\"\n ],\n \"settings.thumbnailUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/app/v1/organizations/{organizationId}/projects")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {},\n \"settings.defaultLocale\": \"<string>\",\n \"settings.supportedLocales\": [\n \"<string>\"\n ],\n \"settings.defaultPlatform\": \"<string>\",\n \"settings.supportedPlatforms\": [\n \"<string>\"\n ],\n \"settings.thumbnailUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/app/v1/organizations/{organizationId}/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"settings\": {},\n \"settings.defaultLocale\": \"<string>\",\n \"settings.supportedLocales\": [\n \"<string>\"\n ],\n \"settings.defaultPlatform\": \"<string>\",\n \"settings.supportedPlatforms\": [\n \"<string>\"\n ],\n \"settings.thumbnailUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyPath Parameters
Organization ID
Request Body
Project name
URL-friendly project identifier (must be unique within organization)
Project description
Project settings
Default content locale
Available locales
Default platform for CMS preview:
mobile, tablet, or desktopAvailable platforms for content preview
Project thumbnail image URL
Example Request
{
"name": "Product Documentation",
"slug": "product-docs",
"description": "Documentation site for products",
"settings": {
"defaultLocale": "en-US",
"supportedLocales": ["en-US", "es-ES"],
"defaultPlatform": "desktop",
"supportedPlatforms": ["desktop", "mobile", "tablet"],
"thumbnailUrl": "https://cdn.acme.com/thumbnails/product-docs.png"
}
}
Response
Returns the created Project object.{
"id": "proj789",
"organizationId": "org123",
"name": "Product Documentation",
"slug": "product-docs",
"description": "Documentation site for products",
"status": "active",
"environment": "development",
"settings": {
"defaultLocale": "en-US",
"supportedLocales": ["en-US", "es-ES"],
"defaultPlatform": "desktop",
"supportedPlatforms": ["desktop", "mobile", "tablet"],
"thumbnailUrl": "https://cdn.acme.com/thumbnails/product-docs.png"
},
"dependencies": [],
"permissions": {
"public": false
},
"metadata": {
"createdBy": "user123"
},
"createdAt": "2024-03-22T10:00:00Z",
"updatedAt": "2024-03-22T10:00:00Z"
}
Error Responses
Slug Already Exists
{
"error": {
"code": "SLUG_ALREADY_EXISTS",
"message": "A project with this slug already exists",
"details": {
"slug": "product-docs"
}
}
}
Code Examples
curl -X POST "https://api.metabind.ai/app/v1/organizations/org123/projects" \
-H "Authorization: Bearer YOUR_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Product Documentation",
"slug": "product-docs",
"description": "Documentation site for products",
"settings": {
"defaultLocale": "en-US",
"supportedLocales": ["en-US", "es-ES"]
}
}'
const response = await fetch(
'https://api.metabind.ai/app/v1/organizations/org123/projects',
{
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_JWT',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Product Documentation',
slug: 'product-docs',
description: 'Documentation site for products',
settings: {
defaultLocale: 'en-US',
supportedLocales: ['en-US', 'es-ES']
}
})
}
);
const project = await response.json();
console.log(`Created project: ${project.id}`);
struct CreateProjectRequest: Encodable {
let name: String
let slug: String
let description: String
let settings: ProjectSettings
}
let request = CreateProjectRequest(
name: "Product Documentation",
slug: "product-docs",
description: "Documentation site for products",
settings: ProjectSettings(defaultLocale: "en-US")
)
// Make POST request with encoded body
val response = client.post("https://api.metabind.ai/app/v1/organizations/org123/projects") {
header("Authorization", "Bearer YOUR_JWT")
contentType(ContentType.Application.Json)
setBody(CreateProjectRequest(
name = "Product Documentation",
slug = "product-docs",
description = "Documentation site for products"
))
}
⌘I