Skip to main content
POST
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
collections
Create Collection
curl --request POST \
  --url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/collections \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "folderId": "<string>"
}
'

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID

Request Body

name
string
required
Collection display name
folderId
string
Parent folder ID (null for root level)

Example Request

{
  "name": "UI Components",
  "folderId": null
}

Response

Returns the created Collection object.
{
  "id": "coll123",
  "name": "UI Components",
  "folderId": null,
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-20T10:00:00Z"
}

Error Responses

Name Already Exists

{
  "error": {
    "code": "COLLECTION_NAME_EXISTS",
    "message": "A collection with this name already exists",
    "details": {
      "name": "UI Components"
    }
  }
}

Code Examples

curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/collections" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "UI Components"
  }'