Create phrase(s)

Create 1 or more new source language phrases for a project

Recipes
Create Phrases with a Custom Label
Open Recipe

You can create and view your API Private Key here.

NOTES:

  1. When you create a new phrase, its state is set to active by default.
    1. You can change this by setting the state field.
  2. If the phrase already exists in your Localize dashboard, the endpoint will return success and the existingPhrase field will be set to 1.
  3. For new phrases, the internal phrase IDs will be returned in a successful call.

Try it

To test this endpoint using the Try It feature:

  1. Copy your Localize API Key into the Header field in the AUTHENTICATION section on the right.
  2. Fill in all required fields below, and any optional fields as needed.
  3. Click the Try it button.
  4. View the results and any error returns on the right side of the screen.
  5. Returns: The internal phrase IDs of all phrases that are created will be returned in an array.

Feel free to copy the sample code provided on the right side of the screen into your source code project to get a start on using this endpoint.

Note that using the Try It feature will affect the data in your Localize dashboard!

📘

Max 500

You can create up to the maximum of 500 new phrases in one call.

🚧

Using Variables

If your phrases include variables, you are required to provide a name attribute for the variable, or the phrase won't work properly in your Localize dashboard.

Correct:
Welcome back, <var username>theC00lkid</var>.

Incorrect:
Welcome back, <var>theC00lkid</var>.

Language
Authorization
Header
Click Try It! to start a request and see the response here!