---
title: "Update Segment"
method: POST
path: "/lc.preview.updatesegment"
tags: ["Preview Provider"]
---

# Update Segment

`POST /lc.preview.updatesegment`

This endpoint generates a rendered HTML fragment from a BCM document fragment. The timeout for this request should be 10 seconds.

## Headers

- `X-LC-ExtensionPointVersion` string
- `X-LC-ExtensionId` string
- `X-LC-AppVersion` string
- `TR_ID` string
- `x-lc-signature` string

## Request body

- PreviewProviderUpdateSegmentRequest
  - `previewSessionId` string, required — Unique identifier referencing the session associated with this request.
  - `scope` 'source' | 'target', required — Indicates if the content generated is the source or the target content.
  - `fileInformation` PreviewProviderFileInformation, required
    - `name` string — The name of the file.
    - `sourceLanguage` string — The source language of the file.
    - `targetLanguage` string — The target language of the file.
  - `segments` PreviewProviderFragmentToRender[], required — The Segment Fragments to render.
    - `segmentId` string
    - `fragment` object — This object represents a BCM fragment. The documentation for the BCM fragment can be found here: https://developers.rws.com/languagecloud-api-docs/api/bcm/Sdl.Core.Bcm.BcmModel.Fragment.html

## Response `200`

OK

- PreviewProviderUpdateSegmentResponse
  - `previewSessionId` string, required — Unique ID for this preview session
  - `renderedTranslations` PreviewProviderRenderedTranslation[], required — Rendered HTML fragment
    - `renderedContent` string
    - `segmentId` string
    - `errorCode` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized

## Changes

- **2026-01-27** (v1) `9d9d8922a0ce` — 3 info
  - the endpoint scheme security `LanguageCloudJWSToken` was removed from the API
  - added the new optional `header` request parameter `TR_ID`
  - added the new optional `header` request parameter `x-lc-signature`

[Change history](https://skmtc.dev/rws/apis/app-api/changes/lc.preview.updatesegment/post.md)

---

[API](https://skmtc.dev/rws/apis/app-api.md) · [All operations](https://skmtc.dev/rws/apis/app-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rws/app-api/revisions/a06e1ee1c99b/schema)
