action flat_create_collection { label: "Create a new collection" description: "This method will create a new collection and add it to your `root` collection.\n" provider: flat method: POST path: "/collections" encoding: json input: { type: "object" required: ["privacy", "title"] properties: { privacy: { type: "string" description: "The collection main privacy mode.\n- `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users.\n" enum: ["private"] } title: { type: "string" description: "The title of the collection" } } } output: { type: "object" description: "Collection of scores" properties: { app: { type: "string" description: "If this directory is dedicated to an app, the unique idenfier of this app" } capabilities: { type: "object" description: "Capabilities the current user has on this collection. Each capability corresponds to a fine-grained action that a user may take." properties: { canAddScores: { type: "boolean" description: "Whether the current user can add scores to the collection\n\nIf this collection has the `type` `trash`, this property will be set to `false`. Use `DELETE /v2/scores/{score}` to trash a score.\n" } canDelete: { type: "boolean" description: "Whether the current user can delete the collection\n" } canDeleteScores: { type: "boolean" description: "Whether the current user can delete scores from the collection\n\nIf this collection has the `type` `trash`, this property will be set to `false`. Use `POST /v2/scores/{score}/untrash` to restore a score.\n" } canEdit: { type: "boolean" description: "Whether the current user can modify the metadata for the collection\n" } canShare: { type: "boolean" description: "Whether the current user can modify the sharing settings for the collection\n" } } } collaborators: { type: "array" description: "The list of the collaborators of the collection" items: { description: "A collaborator of a score. The `userEmail` and `group` are only available if the requesting user is a collaborator of the related score (in this case these permissions will eventualy not be listed and exposed publicly).\n" type: "object" } } collections: { type: "array" description: "The List of parent collections, which includes all the collections this score is included. Please note that you might not have access to all of them." items: { type: "string" } } creationDate: { type: "string" format: "date-time" description: "The date when the collection was created" } htmlUrl: { type: "string" format: "url" description: "The url where the collection can be viewed in a web browser" } id: { type: "string" description: "Unique identifier of the collection" } privacy: { type: "string" description: "The collection main privacy mode.\n- `private`: The collection is private and can be only accessed, modified and administred by specified collaborators users.\n" enum: ["private"] } rights: { type: "object" description: "The rights of the current user on a score or collection" properties: { aclAdmin: { type: "boolean" description: "`True` if the current user can manage the current document (i.e. share, delete)\n\nIf this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection.\n" } aclRead: { type: "boolean" description: "`True` if the current user can read the current document\n" } aclWrite: { type: "boolean" description: "`True` if the current user can modify the current document.\n\nIf this is a right of a Collection, the capabilities of the associated user can be lower than this permission, check out the `capabilities` property as the end-user to have the complete possibilities with the collection.\n" } isCollaborator: { type: "boolean" description: "`True` if the current user is a collaborator of the current document (direct or via group).\n" } } } sharingKey: { type: "string" description: "The private sharing key of the collection (available when the `privacy` mode is set to `privateLink`)" } title: { type: "string" description: "The title of the collection" } type: { type: "string" description: "Type of the collection.\nThe type will influence the capabilitied available on the collections and how this collection is/can be populated.\n" enum: ["root", "regular", "sharedWithMe", "sharedWithGroup", "trash"] } user: { description: "Public User details summary" type: "object" } } } }