API Reference
Integrate with the Collections Manager API
All API requests require a valid Bearer token in the Authorization header. Obtain a token by calling the login endpoint.
curl -X GET https://collections.local/api/collections \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"
All API endpoints listed below are prefixed with this base URL. Ensure your requests target the correct environment.
https://collections.local/api
Returns a paginated list of collections accessible to the authenticated user. Supports query parameters for filtering, sorting, and pagination.
Creates a new collection. Requires a JSON body with name (required), description, and type fields. Returns the newly created collection object.
Returns the full details of a single collection by its ID, including metadata, item count, member count, and hierarchy information.
Updates an existing collection. Send a JSON body with the fields to update. Only the fields provided will be modified (partial update supported).
Permanently deletes a collection and all its associated data. This action cannot be undone. Requires Admin role on the collection.
Returns a paginated list of all items in the specified collection. Supports search, filtering, and sorting parameters.
Adds a new item to the specified collection. Requires a JSON body with item details including name and optional metadata fields.
Removes an item from the specified collection. The item itself is not deleted if it belongs to other collections.
Returns all members of the specified collection, including their roles and join dates.
Invites a user to the collection. Requires user_id and role (viewer, editor, or admin) in the request body.
Updates a member's role within the collection. Send a JSON body with the new role value. Requires Admin permissions.
Removes a member from the collection. The user loses all access to the collection immediately. Requires Admin permissions.
Upload an Excel file to create or update collections and items in bulk. Send the file as multipart/form-data. Returns a job ID for tracking progress.
Downloads an Excel template file pre-formatted with the correct headers and example data for bulk uploads.
Authenticates a user with email and password. Returns a Bearer token and user profile on success.
Invalidates the current session and Bearer token. The token can no longer be used for authenticated requests after logout.
Returns the profile of the currently authenticated user, including display name, email, role, and account metadata.