# Update Shortlink

PUT /api/v2/projects/{projectId}/shortlinks/{shortlinkId}

Updates a short link's destination, domain, or path. Omitted fields stay as they are. A new domain has to be verified and have short links turned on.

## Request

- projectId: string, path, required — ID of the project that owns the short link.
- shortlinkId: string, path, required — ID of the short link to update.
- changes: object, required — Fields to change. Omitted fields stay as they are.
  - destinationURL: string — URL visitors are sent to. Omit to leave unchanged.
  - domainId: string — ID of the domain that hosts the short link.
  - shortLinkDomain: string — Hostname of the short link, for example go.example.com.
  - shortLinkPath: string — Path on that hostname, without a leading slash.

## Response

- 200: Successful response
  - createdAt: string, required
  - destinationURL: string, required — URL visitors are sent to when they open the short link.
  - domainId: string, required
  - id: string, required
  - projectId: string, required
  - shortLinkDomain: string, required
  - shortLinkPath: string, required
  - updatedAt: string, required
- 400: Invalid input data
- 401: Authorization not provided
- 403: Insufficient access
- 404: Not found
- 500: Internal server error
