---
title: "Create or update multiple links"
method: POST
path: "/api/v1/links"
tags: ["Links"]
---

# Create or update multiple links

`POST /api/v1/links`

Create or update up to 1000 links in one request. The body is a JSON array where each item uses the same schema as `POST /api/v1/link` — include `id` to update, omit it to create, and provide `workspace_id` per item (required for API-key auth; ignored for OAuth, whose token is scoped to a single workspace). Returns one result per item and responds 200 even if some items fail — inspect each item's `status`.

## Request body

- object[] — A JSON array of up to 1000 link objects to create or update.
  - `block_bots` boolean — block_bots
  - `body_tags` string — body_tags
  - `cloaking` boolean — cloaking
  - `deleted` boolean — deleted
  - `domain` string — domain
  - `enabled` boolean — enabled
  - `fb_pixel_id` string — fb_pixel_id
  - `forward_params` boolean — forward_params
  - `ga4_tag_id` string — ga4_tag_id
  - `gtm_id` string — gtm_id
  - `head_tags` string — head_tags
  - `hide_referrer` boolean — hide_referrer
  - `id` integer — Link ID. Required to update an existing link
  - `linkify_words` string — linkify_words
  - `name` string — name
  - `note` string — note
  - `og_description` string — og_description
  - `og_image` string — og_image
  - `og_title` string — og_title
  - `replacements` string — replacements
  - `rules` object[]
    - `matches` string
    - `percentage` string
    - `rule_url` string
    - `url` string
    - `what` string
  - `slug` string — slug
  - `spam` boolean — spam
  - `tiktok_pixel_id` string — tiktok_pixel_id
  - `url` string, uri — URL. Required to create a new link.
  - `utm_campaign` string — utm_campaign
  - `utm_content` string — utm_content
  - `utm_medium` string — utm_medium
  - `utm_source` string — utm_source
  - `utm_term` string — utm_term
  - `workspace_id` integer — Workspace ID

## Response `200`

Results

- object[] — One result per submitted link, in request order.
  - `error` object — Error detail (present when status is error)
  - `index` integer — 0-based position in the request array
  - `link` object — The created or updated link (present when status is success)
  - `status` 'success' | 'error'

## Other responses

- `400` — Error

---

[API](https://skmtc.net/linklyhq/apis/linkly-url-shortener-api.md) · [All operations](https://skmtc.net/linklyhq/apis/linkly-url-shortener-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/linklyhq/linkly-url-shortener-api/revisions/351c1f004617/schema)
