post https://api.localizejs.com/v2.0/projects//phrases
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:
- When you create a new phrase, its state is set to
active
by default.- You can change this by setting the
state
field.
- You can change this by setting the
- If the phrase already exists in your Localize dashboard, the endpoint will return
success
and theexistingPhrase
field will be set to1
. - 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:
- Copy your Localize API Key into the Header field in the AUTHENTICATION section on the right.
- Fill in all required fields below, and any optional fields as needed.
- Click the Try it button.
- View the results and any error returns on the right side of the screen.
- 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>.