Create phrase(s)

Create 1 or more new source language phrases for a project

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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.

📘

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>.

You can create and view your private API Key here.

Try it

⚠️ This uses your production account

The Try It feature sends real API requests directly to your production Localize account. There is no sandbox, demo, or test environment. Requests are authenticated using your Localize API Key and operate directly on your production data.

To use the Try It feature:

  1. Enter your production Localize API Key in 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 to send the request.
  4. View the API response and any errors on the right side of the screen.

🚨 Changes are applied to production

Any changes made by the API request will affect your production Localize account. Use this feature with the same care as you would when making the request from your own application.

You can also copy the sample code provided on the right side of the screen and use it as a starting point for making requests from your own application.

Path Params
string
required
Defaults to YOUR_PROJECT_KEY

The Project Key (this is NOT the Project ID)

Body Params
phrases
array of objects
required

An array of new phrases to add. Each new phrase is a phrase object. (max 500 phrases per call)


Phrase Object Properties:
phrase*
String; REQUIRED; Your new phrase in the source language.
phraseKey
String; The unique 'key' of the phrase, often used in mobile app frameworks. (required for phrases in mobile/files projects, but not allowed for Web projects and Glossary entries)
type*
String; REQUIRED; Valid values are "phrase" or "glossary". Defaults to "phrase" if not specified. If set to "glossary", context and labels are ignored.
state*
String; REQUIRED; The desired state of the phrase, defaults to "active".
translations
An array of the translations of the source string for any or all target languages.
context
String; Provides your translators with some context for the phrase.
labels
An optional array of labels (can include "auto-approve").

Click the '+' below to add a new phrase.
phrases*
Response

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json