---
title: "Update Content Library Link"
method: PUT
path: "/v1/content-library"
tags: ["Content Library"]
---

# Update Content Library Link

`PUT /v1/content-library`

## Request

- Base URL: `https://app.aptrinsic.com`
- URL: `https://app.aptrinsic.com/v1/content-library`
- Auth: none declared
- TypeScript: <https://skmtc.dev/gainsight/apis/gainsight-px-rest-api/docs/v1/content-library/put.ts> (a function with typed inputs; its response is checked against the schema)

Update the URL or function payload of a Weblink or JS Function content item in your PX Subscription.

Only content items of type LINK, or FUNC_CALL are supported.

Examples: 

| URI   | Results  |
| ----- | -------- |
| PUT /v1/content-library | Update a Weblink URL: `{ "contentId": "abcd1234", "url": "https://example.com" }` |
| PUT /v1/content-library | Update a JS Function payload: `{ "contentId": "abcd1234", "funcPayload": "{\"key\":\"value\"}" }` |

<b>Important:</b> For Weblink types (LINK), provide `url` in the request body. For JS Function types (FUNC_CALL), provide `funcPayload`. The content type is inferred from the `contentId` — only one field is applied per call.

## Request body

- ContentLibraryLinkUpdateRequest: Request to update the URL or function payload of a Weblink or JS Function content item
  - `contentId` string, required: Content ID of the Weblink or JS Function item to update
  - `funcPayload` string: New function payload JSON for JS Function (FUNC_CALL) content types
  - `url` string: New URL for Weblink content types

## Response `200`

Success

- KCContentSummaryDto
  - `contentId` string
  - `id` string
  - `imageUrl` string
  - `lastModifiedBy` UserView
    - `id` string
    - `name` string
  - `lastModifiedDate` integer

## Other responses

- `400`: Bad request — invalid content type or missing required field
- `401`: Unauthorized or bad API Key
- `404`: Content item not found
- `429`: Rate limit exceeded

---

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