# Create Collection
> Source: /api-reference/members/collections/create-collection
> Create a new collection for organizing favorites
> Endpoint: POST /members/me/collections

## Overview [#overview]

Creates a new collection for the authenticated member. Collections allow members to organize their favorited properties into groups like "Honeymoon Destinations", "Business Travel", or "Weekend Getaways".

## Authentication [#authentication]

Requires a valid Clerk JWT token in the Authorization header.

## Request Body [#request-body]

<ParamField body="name" type="string" required>
  Collection name (max 255 characters)
</ParamField>

<ParamField body="notes" type="string">
  Optional notes or description for the collection
</ParamField>

<RequestExample>

```bash cURL
curl -X POST "http://localhost:3000/v1/members/me/collections" \
  -H "Authorization: Bearer YOUR_CLERK_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Honeymoon Destinations",
    "notes": "Romantic properties for our upcoming honeymoon trip"
  }'
```

```typescript TypeScript
const response = await fetch('http://localhost:3000/v1/members/me/collections', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_CLERK_JWT',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: "Honeymoon Destinations",
    notes: "Romantic properties for our upcoming honeymoon trip"
  })
});

const collection = await response.json();
```

</RequestExample>

## Response [#response]

<ResponseField name="id" type="number" required>
  Unique collection ID
</ResponseField>

<ResponseField name="externalId" type="string" required>
  External identifier for the collection
</ResponseField>

<ResponseField name="name" type="string" required>
  Display name of the collection
</ResponseField>

<ResponseField name="notes" type="string">
  Optional notes or description for the collection
</ResponseField>

<ResponseField name="isSystem" type="boolean" required>
  Whether this is a system-managed collection (always false for user-created)
</ResponseField>

<ResponseField name="itemCount" type="number" required>
  Number of properties in this collection (starts at 0)
</ResponseField>

<ResponseField name="items" type="array" required>
  Properties in the collection (empty for new collections)
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  ISO 8601 timestamp when collection was created
</ResponseField>

<ResponseField name="updatedAt" type="string" required>
  ISO 8601 timestamp when collection was last updated
</ResponseField>

<ResponseExample>

```json 201 Response - Success
{
  "id": 5,
  "externalId": "coll_789xyz",
  "name": "Honeymoon Destinations",
  "notes": "Romantic properties for our upcoming honeymoon trip",
  "isSystem": false,
  "itemCount": 0,
  "items": [],
  "createdAt": "2024-04-20T15:30:00Z",
  "updatedAt": "2024-04-20T15:30:00Z"
}
```

```json 400 Response - Validation Error
{
  "statusCode": 400,
  "message": [
    "name must be shorter than or equal to 255 characters",
    "name should not be empty"
  ]
}
```

</ResponseExample>

## Collection Naming [#collection-naming]

### Requirements [#requirements]
- **Length**: Must be 255 characters or less
- **Required**: Name cannot be empty
- **Uniqueness**: Names don't need to be unique per member

### Best Practices [#best-practices]
- **Descriptive**: Use clear, descriptive names
- **Organized**: Consider themes like "Business Travel", "Family Vacations"
- **Personal**: Make them meaningful to your travel planning

## Collection Limits [#collection-limits]

While there's no hard limit on the number of collections a member can create, consider:
- **Practical Limits**: Too many collections can become difficult to manage
- **Performance**: Very large numbers may impact load times
- **User Experience**: Focus on meaningful organization

## Next Steps [#next-steps]

After creating a collection, you can:
1. **Add Favorites**: Use [Add Favorite](/api-reference/members/collections/add-favorite) to add properties

## Related Endpoints [#related-endpoints]

- [Get Collections](/api-reference/members/collections/get-collections) - List all collections
- [Add Favorite](/api-reference/members/collections/add-favorite) - Add properties to collections
