---
title: "Update link"
method: POST
path: "/links/update"
tags: ["Links"]
---

# Update link

`POST /links/update`

## Request

- Base URL: `https://api.databuddy.cc`
- URL: `https://api.databuddy.cc/links/update`
- Auth: API key in header `x-api-key`

Updates an existing link. Requires write:links scope.

## Request body

- object
  - `id` string, required
  - `name` string
  - `targetUrl` string, uri
  - `slug` string
  - `folderId` string, nullable
  - `expiresAt` string, date-time, nullable
  - `expiredRedirectUrl` string, uri, nullable
  - `ogTitle` string, nullable
  - `ogDescription` string, nullable
  - `ogImageUrl` string, uri, nullable
  - `ogVideoUrl` string, uri, nullable
  - `iosUrl` string, uri, nullable
  - `androidUrl` string, uri, nullable
  - `externalId` string, nullable
  - `sourceType` string, nullable
  - `sourceId` string, nullable
  - `sourceOwnerId` string, nullable
  - `targetDomain` string, nullable
  - `deepLinkApp` 'instagram' | 'tiktok' | 'youtube' | 'x' | 'spotify' | 'linkedin' | 'facebook' | 'whatsapp' | 'telegram', nullable

## Response `200`

OK

- object
  - `id` string, required
  - `organizationId` string, required
  - `createdBy` string, nullable, required
  - `folderId` string, nullable, required
  - `slug` string, required
  - `name` string, required
  - `targetUrl` string, required
  - `targetDomain` string, nullable, required
  - `sourceType` string, nullable, required
  - `sourceId` string, nullable, required
  - `sourceOwnerId` string, nullable, required
  - `expiresAt` string, date-time, nullable, required
  - `expiredRedirectUrl` string, nullable, required
  - `ogTitle` string, nullable, required
  - `ogDescription` string, nullable, required
  - `ogImageUrl` string, nullable, required
  - `ogVideoUrl` string, nullable, required
  - `iosUrl` string, nullable, required
  - `androidUrl` string, nullable, required
  - `externalId` string, nullable, required
  - `deepLinkApp` string, nullable, required
  - `deletedAt` string, date-time, nullable, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: 400
- `401`: 401
- `402`: 402
- `403`: 403
- `404`: 404
- `409`: 409
- `429`: 429
- `500`: 500
- `503`: 503

---

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