---
title: "Add Labels to Bookmarks"
method: POST
path: "/v1/labels/add"
tags: ["Labels"]
---

# Add Labels to Bookmarks

`POST /v1/labels/add`

## Request

- Base URL: `https://api.linkedmash.com`
- URL: `https://api.linkedmash.com/v1/labels/add`
- Auth: one of:
  - OAuth 2 (client credentials, token URL `https://api.linkedmash.com/auth/oauth/token`, scopes: `library:write`)
  - HTTP bearer
  - API key in header `linkedmash-api-key`

Add one or more labels to user bookmarks.

POST /v1/labels/add attaches a label to one or many saved posts in a single call. Identify the label either by label_id (from GET /v1/labels) or by label_name, and pass post_ids as an array — or a single id, which is accepted for convenience and treated as an array of one.

This is the bulk primitive behind every classification workflow: fetch a filtered page from /v1/bookmarks, decide a label, and write it back in one request rather than one call per post.

## Request body

- object
  - `post_ids` union, required: IDs of the posts to label.
    - string[]
    - string
  - `label_id` string: ID of the label to add.
  - `label_name` string: Name of the label to add (if creating a new one).

## Response `200`

Successful response.

- object
  - `status` boolean, required
  - `data` object, required
    - `success` boolean, required
  - `message` string, required

## Other responses

- `401`: Unauthorized. The Authorization header is missing or the key is not a valid LinkedMash API key. Create or rotate keys on the API page in your LinkedMash settings.
- `402`: Payment Required. Code SUBSCRIPTION_REQUIRED — labelling requires an active subscription.
- `500`: Server Error. Something failed on our side. The body carries message "Failed to add labels to bookmarks". Retry once; if it persists the request is not the problem.

---

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