curl --request POST \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/collections \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"folderId": "<string>"
}
'Create a new component 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>"
}
'{
"name": "UI Components",
"folderId": null
}
{
"id": "coll123",
"name": "UI Components",
"folderId": null,
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-20T10:00:00Z"
}
{
"error": {
"code": "COLLECTION_NAME_EXISTS",
"message": "A collection with this name already exists",
"details": {
"name": "UI Components"
}
}
}
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"
}'