Skip to main content
PUT
/
v1
/
organizations
/
{organizationId}
/
projects
/
{projectId}
/
collections
/
{id}
Update 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>"
}
'

Path Parameters

organizationId
string
required
Organization ID
projectId
string
required
Project ID
id
string
required
Collection ID

Request Body

name
string
Updated collection name
folderId
string
New parent folder ID (null for root level)

Example Request

{
  "name": "Updated Name",
  "folderId": "folder456"
}

Response

Returns the updated Collection object.
{
  "id": "coll123",
  "name": "Updated Name",
  "folderId": "folder456",
  "createdAt": "2024-03-20T10:00:00Z",
  "updatedAt": "2024-03-22T10:00:00Z"
}

Error Responses

Collection Not Found

{
  "error": {
    "code": "NOT_FOUND",
    "message": "Collection not found"
  }
}

Invalid Move

{
  "error": {
    "code": "INVALID_COLLECTION_MOVE",
    "message": "Cannot move collection to specified folder",
    "details": {
      "reason": "Would create circular reference"
    }
  }
}

Code Examples

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"
  }'