---
title: "Add String"
method: POST
path: "/projects/{projectId}/strings"
tags: ["Source Strings"]
---

# Add String

`POST /projects/{projectId}/strings`

## Request

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

**Required scopes:** `project.source.string` (Read and Write).

## Path parameters

- `projectId` integer, required

## Request body

- union: Add String
  - object
    - `text` string, required: Text for translation
    - `identifier` string, required: Defines unique string identifier
    - `branchId` integer, required: Branch Identifier. Get via [List Branches](#operation/api.projects.branches.getMany)
    - `context` string: Use to provide additional information for better source text understanding
    - `isHidden` boolean: Defines whether to make string unavailable for translation
    - `maxLength` integer: Max. length of translated text (0 – unlimited)
    - `labelIds` integer[]: Label Identifiers. Get via [List Labels](#operation/api.projects.labels.getMany)
  - object
    - `text` object, required: Text for translation
    - `identifier` string, required: Defines unique string identifier. Max. length is 512 characters
    - `branchId` integer, required: Branch Identifier. Get via [List Branches](#operation/api.projects.branches.getMany)
    - `context` string: Use to provide additional information for better source text understanding
    - `isHidden` boolean: Defines whether to make string unavailable for translation
    - `maxLength` integer: Max. length of translated text (0 – unlimited)
    - `labelIds` integer[]: Label Identifiers. Get via [List Labels](#operation/api.projects.labels.getMany)

## Response `201`

String was successfully created

- CrowdinStringBasedStringResource: 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` StringBasedString, required
    - `id` integer
    - `projectId` integer
    - `branchId` integer, nullable
    - `identifier` string
    - `text` union
      - string
      - object
    - `type` string
    - `context` string
    - `maxLength` integer
    - `isHidden` boolean
    - `isDuplicate` boolean
    - `masterStringId` integer, nullable
    - `hasPlurals` boolean: Use fields `type` and `text` instead
    - `isIcu` boolean: Use field `type` instead
    - `labelIds` integer[]
    - `webUrl` string
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable

## Other responses

- `400`: Invalid Request Parameters
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project or file with specified id was not found
- `405`: Method Not Allowed
- `409`: Conflict
- `503`: Service Unavailable

---

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