curl --request PUT \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/collections/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"folderId": "<string>"
}
'Update an existing collection
curl --request PUT \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/collections/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"folderId": "<string>"
}
'{
"name": "Updated Name",
"folderId": "folder456"
}
{
"id": "coll123",
"name": "Updated Name",
"folderId": "folder456",
"createdAt": "2024-03-20T10:00:00Z",
"updatedAt": "2024-03-22T10:00:00Z"
}
{
"error": {
"code": "NOT_FOUND",
"message": "Collection not found"
}
}
{
"error": {
"code": "INVALID_COLLECTION_MOVE",
"message": "Cannot move collection to specified folder",
"details": {
"reason": "Would create circular reference"
}
}
}
curl -X PUT "https://api.metabind.ai/v1/organizations/org123/projects/proj456/collections/coll123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Name"
}'