---
updatedAt: 2026-09-30T16:49:22.000Z
agentTools:
  projectIndex: https://developers.localizejs.com/llms.txt
---

# Edit phrase(s)

Edit 1 or more existing source language phrases for a project.

You can <Anchor target="_blank" href="https://localizejs.com/settings/organization/api-keys">create and view your private API Key here</Anchor>.

<HTMLBlock>{`

<div class="param-type-header" style="margin-left: 0px;"><h3>Try it</h3></div>
<div style="margin: 0% 2%;">

<div style="background-color: #fff3cd; border-left: 4px solid #f0ad4e; padding: 12px 16px; margin: 16px 0; border-radius: 4px;">
  <p style="margin: 0;"><strong>⚠️ This uses your production account</strong></p>
  <p style="margin: 8px 0 0;">The <b>Try It</b> feature sends <strong>real API requests directly to your production Localize account</strong>. There is no sandbox, demo, or test environment. Requests are authenticated using your Localize API Key and operate directly on your production data.</p>
</div>

<p>To use the <b>Try It</b> feature:</p>
<ol>
  <li>Enter your <strong>production Localize API Key</strong> in the <b>Header</b> field in the AUTHENTICATION section on the right.</li>
  <li>Fill in all required fields below, and any optional fields as needed.</li>
  <li>Click the <b>Try it</b> button to send the request.</li>
  <li>View the API response and any errors on the right side of the screen.</li>
</ol>

<div style="background-color: #f8d7da; border-left: 4px solid #dc3545; padding: 12px 16px; margin: 16px 0; border-radius: 4px;">
  <p style="margin: 0;"><strong>🚨 Changes are applied to production</strong></p>
  <p style="margin: 8px 0 0;">Any changes made by the API request will affect your <strong>production Localize account</strong>. Use this feature with the same care as you would when making the request from your own application.</p>
</div>

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

</div>
`}</HTMLBlock>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "rest-api",
    "version": "4.0"
  },
  "servers": [
    {
      "url": "https://api.localizejs.com/v2.0",
      "description": "Production Public API",
      "variables": {
        "env": {
          "default": "prod",
          "description": "Environment: production",
          "enum": [
            "prod"
          ]
        },
        "version": {
          "default": "v2",
          "description": "API version"
        }
      }
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "x-bearer-format": "bearer",
        "x-default": "API_TOKEN_HERE"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/projects/{projectKey}/phrases": {
      "put": {
        "summary": "Edit phrase(s)",
        "description": "Edit 1 or more existing source language phrases for a project.",
        "operationId": "edit-phrases",
        "parameters": [
          {
            "name": "projectKey",
            "in": "path",
            "description": "The Project Key (this is NOT the Project ID)",
            "required": true,
            "schema": {
              "type": "string",
              "default": "YOUR_PROJECT_KEY"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "phrases"
                ],
                "properties": {
                  "phrases": {
                    "type": "array",
                    "description": "<p>An array of 1 or more <b>phrase</b> objects to edit (max 500).</p><br><b>Phrase Object Properties:</b><br><dl><dt>phrase</dt><dd>String; The updated phrase in the source language.</dd><dt>id or phraseKey<sup>*</sup></dt><dd>String; REQUIRED; For each phrase you must specify either the phrase ID or the phraseKey of an existing phrase.</dd><dt>state</dt><dd>String; The desired state of the phrase, defaults to \"active\".</dd><dt>context</dt><dd>String; Provides your translators with some context for the phrase.</dd><dt>labels</dt><dd>An array of labels (can include \"auto-approve\").</dd></dl><br>Click the '+' below to add a phrase that you want to edit.",
                    "items": {
                      "properties": {
                        "phrase": {
                          "type": "string",
                          "description": "This is the updated phrase in the source language."
                        },
                        "phraseKey": {
                          "type": "string",
                          "description": "The 'key' of the phrase, often used in mobile app frameworks.<br>Either an ID or a phraseKey is required."
                        },
                        "id": {
                          "type": "string",
                          "description": "The phrase ID of an existing phrase (only used when editing a phrase).<br>Either an ID or a phraseKey is required."
                        },
                        "context": {
                          "type": "string",
                          "description": "Give your translators some context for the phrase."
                        },
                        "labels": {
                          "type": "array",
                          "description": "Add custom or reserved labels to the phrase. Must be an ARRAY of labels to add (as strings NOT objects). One reserved label you can add here is \"auto-approve\" - this will automatically put the phrase into the Published bin.",
                          "default": [],
                          "items": {
                            "type": "string"
                          }
                        },
                        "state": {
                          "type": "string",
                          "description": "The desired \"state\" of the phrase. Possible values are `active`, `pending`, `spam`, `outdated`, `blocked`, and `inactive`. Defaults to `active` if not specified. <br/>- Corresponding bins for the various phrase states:<ul><li>`active` = Published and all In-Progress bins</li><li>`pending` = Needs Approval</li><li>`spam` = Spam</li><li>`outdated` = Deprecated</li><li>`blocked` = Blocked</li><li>`inactive` = Trash</li></ul>",
                          "default": "active"
                        }
                      },
                      "type": "object"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "\"meta\": {\n  \"status\": 200,\n  \"success\": true\n}"
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```