# in-collection (/catalog/edges/in-collection)

Makes an item a member of a container, such as a collection, an album or a series.



## in-collection [#in-collection]

Says that an item is a member of a container, such as a collection, a series or an album.

**flat:** `true`

| Property | Kind | Description |
| - | - | - |
| `position` | `number` | Where the item comes among the container's members. |

A member lists what it's **In collection**, and a container lists its **Contents**. An item can be in any number of containers, and `position` orders a container's members. [Edges](/build/edges#edge-types) says when to use it and when another edge type fits.

## What it joins [#what-it-joins]

* **The to item plays the `container` role.** [`core.collection`](/catalog/collection), `core.media.album` and `core.media.series` do, and so does a registered type that declares the role or inherits it. An edge to any other type is refused with `400 edge_constraint_violation`.
* **A container is never a member.** An edge from an item whose type plays `container` is refused with `400 edge_constraint_violation` and `details.constraint` `nesting`. Collections are flat.

## In the bin [#in-the-bin]

Either end can go to the bin, or be purged, and the other stays where it is. Binning a collection leaves its members.

## In a folder [#in-a-folder]

The member's file writes the edge as an `in-collection` line.

## Example [#example]

An item placed second in a collection:

```json
{
  "edge_type": "in-collection",
  "from_id": "01a1f139-e0a7-7b2e-9c4d-1f2a3b4c5d6e",
  "to_id": "01a1f139-e0a3-704f-8070-83f64acc3f15",
  "properties": { "position": 2 }
}
```
