# Change a collection

`POST` `https://streetartcities.com/api/collections/{collectionId}`

Only the fields you send change, so renaming or sharing a collection keeps its artworks.

## Path parameters

- **collectionId** `string` — required

## Request body

- **collectionId** `string` · uuid · pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
  Only for creating: the id to give the new collection
- **name** `string`
- **public** `boolean`
  Whether others can see the collection
- **artworks** `array Artwork[]`
  Replaces all artworks in the collection
  - _Array of Artwork_
    - **id** `string` · min length: 1 — required
      The artwork's (marker's) id
    - **thumbnail** `string` · uri
      A link to a small image of it

## Requirements

Needs an [access token](/authentication/tokens/). When using OAuth, the token needs the [`collections:write`](/authentication/scopes/) scope.

## Responses

### `200` The collection

- **id** `string` — required
- **createdBy** `string` — required
  The id of the person it belongs to
- **name** `string`
- **artworks** `array Artwork[]` — required
  - _Array of Artwork_
    - **id** `string` · min length: 1 — required
      The artwork's (marker's) id
    - **thumbnail** `string` · uri
      A link to a small image of it
- **publicToken** `string`
  Set when the collection is public
- **createdAt** `string`
- **updatedAt** `string`

### `400` Invalid request

- **error** `object` — required
  - **message** `string` — required
  - **details** `array any[]`

### `401` Not logged in, or not your collection

- **error** `object` — required
  - **message** `string` — required
  - **details** `array any[]`

### `403` The app doesn't have the scope for this

- **error** `object` — required
  - **message** `string` — required
  - **details** `array any[]`

### `404` Not found

- **error** `object` — required
  - **message** `string` — required
  - **details** `array any[]`
