---
title: "Add strings"
method: POST
path: "/strings-api/v2/projects/{projectUid}"
tags: ["Strings"]
---

# Add strings

`POST /strings-api/v2/projects/{projectUid}`

## Request

- Base URL: `https://api.smartling.com`
- URL: `https://api.smartling.com/strings-api/v2/projects/{projectUid}`
- Auth: HTTP bearer

Uploads an array of strings to a Smartling project. A maximum of 100 strings can be created per request. A request with more than 100 items will return an error. Each string has a character limit of 10,000.

Smartling creates a unique hashcode for each string based on the parsed string text and any variant or namespace metadata provided. If you upload a string with the same text, variant and namespace, and therefore the same hashcode, the existing string will be overwritten. This will not change the text of the string, but may update other metadata, such as placeholder and callback values. If the string is currently inactive, overwriting it will reactivate it. Overwritten strings return `"overWritten": "true"` in the response object.

Most uploads will return a `200` response indicating success. If processing the request takes longer than 60 seconds, a `202` response will be returned, including a `processUid` value that can be used to check the progress of the request.

If you set up a POST callback for the string, you can automatically receive the translation for a string as soon as it is complete. See [Callbacks](https://help.smartling.com/hc/en-us/articles/1260805504109) for more details.

## Path parameters

- `projectUid` string, required: Unique identifier of a Smartling project — 9 lowercase alphanumeric characters.

## Request body

- object
  - `strings` object[], required
    - `stringText` string, required: The text of the string you want to create. This is the only required value for a string object.
    - `variant` string: Creates variant metadata for a new string.
    - `callbackUrl` string: If provided a callback request will be sent to this URL when translation for the string is complete. See our callbacks documentation for more details.
    - `callbackMethod` string: With a given callbackUrl, this defines the http method to use. See our callbacks documentation for more details.
    - `instruction` string: Creates an instruction that is displayed to translators in the Smartling Translation Interface.
    - `maxLength` integer: Set the maximum character length recommended for this string and its translations. Not specifying or setting to 'null' implies no maxLength and on update will remove any existing maxLength.
    - `format` string: Sets whether or not the string should be parsed as HTML. Accepted values are 'html', 'plain_text' and 'auto'. If set to auto, Smartling will attempt to detect the presence of HTML tags in the string. "When strings are parsed as HTML, Smartling will automatically ampersand-escape special characters such as angle brackets (<) and quotes (&quot;). For example, if you upload the string _Dave says &quot;hello&quot;_. and set format to HTML, Smartling will return the string with ampersand-escaping: _Dave says &amp;quot;hello&amp;quot;_."
  - `placeholderFormat` string: Specifies a standard placeholder format. Accepted values are none, c, ios, python, java, yaml, qt, resx. See [Placeholders in Resource Files](https://help.smartling.com/hc/en-us/articles/360008143433) for more detail.
  - `placeholderFormatCustom` string: Specifies a custom placeholder with a Java Regular Expression. For example \\[.+?\\] would capture all values surrounded by square brackets as placeholders. See [Placeholders in Resource Files](https://help.smartling.com/hc/en-us/articles/360008143433) for more detail.
  - `namespace` string: Used to generate the unique hashcode for all strings in the request. If you want to have two versions of a string with the same text and variant metadata, you can keep them unique by assigning a different namespace to each string. If not provided, default value is _smartling.strings-api.default.namespace_. A _NULL_ value is permitted.
  - `uri` string: URI path of a source file within a Smartling project.
  - `authorization` object: When provided, simultaneously authorizes the created strings into translation workflows.
    - `localeWorkflows` object[]: Locale and workflow pairs to authorize the strings into.
      - `targetLocaleId` string, required: Locale identifier. Either a 2-letter language code (`en`) or a language-region pair (`en-US`). The language part is always lowercase; the region part is always uppercase.
      - `workflowUid` string, required: Workflow unique identifier — 12 lowercase alphanumeric characters.
    - `translationJobUid` string: Translation job unique identifier — 12 lowercase alphanumeric characters.

## Response `200`

OK

- CreateStringResponse
  - `response` object, required
    - `code` 'SUCCESS', required: Indicates whether the response was successful or what error has occurred.
    - `data` object
      - `items` CreatedString[]
        - `hashcode` string: MD5 hash digest — 32 lowercase hexadecimal characters.
        - `overWritten` string: Identifies whether the string already existed in the system.
        - `parsedStringText` string: The text for this string used to define its uniqueness in the Smartling system. This is after placeholders have been processed and escaping normalization has been applied.
        - `stringText` string: The text for this string
        - `variant` string: String variant
      - `processUid` string: Unique identifier of an async process (UUID v4).
      - `stringCount` number: Total number of strings captured as a result of the request.
      - `totalCount` number
      - `wordCount` number: Total number of words captured as a result of the request.

## Other responses

- `202`: ACCEPTED
- `400`: Provided request parameters are invalid.
- `401`: Provided credentials are not valid.
- `429`: Too many simultaneous API requests.
- `500`: Unexpected error

## Changes

- **2026-10-17** `2cd7a8215799`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smartling/apis/smartling-rest-api-reference/changes/strings-api/v2/projects/:projectUid/post.md)

---

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