add_to_collection
Add a layer to the user's reusable Collection. Pass ANY element id — a leaf (text., image., …) or a whole group. (a lower-third, logo sting, brand intro). It then appears in the user's Collection (list_collection), where they — and, if this project is in a workspace, every teammate — can drop a self-contained COPY of it into any other project (add_from_collection). Copies are IMMUTABLE: adding copies the whole subtree + its asset bytes, so editing or deleting this source never changes a copy already placed elsewhere. Works on solo projects too (a personal Collection). Give the layer a clear name first (rename_layer / rename_group) — that name is what shows in the Collection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| elementId | Yes | The element id to add — any leaf (text/image/video/shapes.<id>) or a group.<id>. | |
| projectId | Yes | Opaque project id (a v4 UUID, from list_projects/create_project). Selects which existing project this call mutates. |