---
title: "Update a collection. Setting visibility to non-private auto-generates a share token."
method: PATCH
path: "/v1/collections/{collectionId}"
tags: ["Public API v1"]
---

# Update a collection. Setting visibility to non-private auto-generates a share token.

`PATCH /v1/collections/{collectionId}`

## Request

- Base URL: `https://api.mynextadventure.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mynextadventure.cloud/v1/collections/{collectionId}`
- Auth: API key in header `X-API-Key`

## Path parameters

- `collectionId` string, required

## Request body

- UpdateCollectionV1Dto
  - `name` string
  - `description` string
  - `emoji` string
  - `coverImageUrl` string
  - `visibility` 'private' | 'shared' | 'public': Setting to non-private will auto-generate a share token if absent.

## Response `200`

- GoalCollectionV1Dto
  - `id` string, required
  - `userId` string, required
  - `name` string, required
  - `description` string
  - `emoji` string
  - `coverImageUrl` string
  - `goalIds` string[], required
  - `goals` TravelGoalV1Dto[]: Populated on findById / share-token reads.
    - `id` string, required
    - `userId` string, required
    - `name` string, required
    - `description` string
    - `notes` string
    - `location` GoalLocationV1Dto
      - `name` string
      - `formattedAddress` string
      - `coordinates` GoalCoordinatesV1Dto
        - `lat` number, required
        - `lng` number, required
      - `googlePlaceId` string
    - `country` string
    - `region` string
    - `type` 'country' | 'region' | 'city' | 'place' | 'experience', required
    - `status` 'dreaming' | 'planning' | 'visited', required
    - `priority` 'someday' | 'soon' | 'must_do', required
    - `tags` string[]
    - `imageUrl` string
    - `userUploadedImageUrl` string
    - `links` GoalLinkV1Dto[]
      - `url` string, required: URL the link points to.
      - `title` string
      - `description` string
      - `imageUrl` string
    - `bestTimeToVisit` string[]
    - `estimatedBudget` number
    - `currency` string
    - `estimatedDuration` string
    - `linkedTripId` string: Trip id this goal is currently linked to (when status=planning or visited).
    - `linkedTripName` string
    - `visitedDate` string, date-time
    - `collectionIds` string[]
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `visibility` 'private' | 'shared' | 'public', required
  - `shareToken` string: Opaque token for non-private collections; safe to share.
  - `goalCount` number, required
  - `visitedCount` number, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `404`: Collection not found or not owned by caller.

---

[API](https://skmtc.dev/mynextadventure/apis/mynextadventure-public-api.md) · [All operations](https://skmtc.dev/mynextadventure/apis/mynextadventure-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mynextadventure/apis/mynextadventure-public-api/revisions/a246114e73a0?raw)
