---
title: "Create TM Segment"
method: POST
path: "/tms/{tmId}/segments"
tags: ["Translation Memory"]
---

# Create TM Segment

`POST /tms/{tmId}/segments`

## Request

- Base URL: `https://api.crowdin.com/api/v2`
- URL: `https://api.crowdin.com/api/v2/tms/{tmId}/segments`
- Auth: none declared
- TypeScript: <https://skmtc.dev/crowdin/apis/crowdin-enterprise-api-v2/docs/tms/:tmId/segments/post.ts> (a function with typed inputs; its response is checked against the schema)

**Required scopes:** `tm` (Read and Write).

Create translation unit with given segments

## Path parameters

- `tmId` integer, required

## Request body

- TmSegmentCreateForm
  - `records` object[], required
    - `languageId` string: Language Identifier. Get via [List Supported Languages](#operation/api.languages.getMany)
    - `text` string: Record text

## Response `201`

TM segment was successfully created

- TmSegmentResource: Base schema of resource container. Container is a wrapper object that contains payload in required `data` property and provides space for adding any other metadata.
  - `data` TmSegment, required
    - `id` integer: Segment Identifier
    - `records` object[]
      - `id` integer: Record Identifier
      - `languageId` string: Language Identifier
      - `text` string: Record text
      - `usageCount` integer: Count usage of segment record
      - `createdBy` integer: Creator User Identifier
      - `updatedBy` integer: Redactor User Identifier
      - `createdAt` string, date-time, nullable: Date in UTC, ISO 8601
      - `updatedAt` string, date-time, nullable: Date in UTC, ISO 8601

## Other responses

- `303`: Such TM segment already exists
- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Tm with specified id was not found
- `405`: Method Not Allowed

---

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