Skip to main content
POST
/
v1
/
organizations
/
{organizationId}
/
projects
Create Project
curl --request POST \
  --url https://api.example.com/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>"
}
'

Path Parameters

organizationId
string
required
Organization ID

Request Body

name
string
required
Project name
slug
string
required
URL-friendly project identifier (must be unique within organization)
description
string
Project description
settings
object
Project settings
settings.defaultLocale
string
Default content locale
settings.supportedLocales
string[]
Available locales
settings.defaultPlatform
string
Default platform for CMS preview: mobile, tablet, or desktop
settings.supportedPlatforms
string[]
Available platforms for content preview
settings.thumbnailUrl
string
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"
    }
  }
}

Max Projects Reached

{
  "error": {
    "code": "MAX_PROJECTS_REACHED",
    "message": "Organization has reached maximum project limit",
    "details": {
      "maxProjects": 10,
      "currentProjects": 10
    }
  }
}

Code Examples

curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -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"]
    }
  }'