github.com/phrase/openapi@v0.0.0-20240514140800-49e8a106740e/intro.md (about) 1 Phrase Strings is a translation management platform for software projects. You can collaborate on language file translation with your team or order translations through our platform. The API allows you to import locale files, download locale files, tag keys or interact in other ways with the localization data stored in Phrase Strings for your account. 2 3 ## API Endpoints 4 5 ### EU data center 6 ``` 7 https://api.phrase.com/v2/ 8 ``` 9 10 ### US data center 11 12 ``` 13 https://api.us.app.phrase.com/v2 14 ``` 15 16 The API is only accessible via HTTPS and the current version is <code>v2</code>, which results in a base URL like: <code>https://api.phrase.com/v2/</code> depending on the datacenter. 17 18 19 ## Usage 20 21 [curl](http://curl.haxx.se/) is used primarily to send requests to Phrase Strings in the examples. On most you'll find a second variant using the [Phrase Strings API v2 client](https://phrase.com/cli/) that might be more convenient to handle. For further information check its [documentation](https://support.phrase.com/hc/en-us/articles/5808300599068). 22 23 ## Use of HTTP Verbs 24 25 Phrase Strings API v2 tries to use the appropriate HTTP verb for accessing each endpoint according to REST specification where possible: 26 27 <div class="table-responsive"> 28 <table class="basic-table"> 29 <thead> 30 <tr class="basic-table__row basic-table__row--header"> 31 <th class="basic-table__cell basic-table__cell--header">Verb</th> 32 <th class="basic-table__cell basic-table__cell--header">Description</th> 33 </tr> 34 </thead> 35 <tbody> 36 <tr> 37 <td class="basic-table__cell">GET</td> 38 <td class="basic-table__cell">Retrieve one or multiple resources</td> 39 </tr> 40 <tr> 41 <td class="basic-table__cell">POST</td> 42 <td class="basic-table__cell">Create a resource</td> 43 </tr> 44 <tr> 45 <td class="basic-table__cell">PUT</td> 46 <td class="basic-table__cell">Update a resource</td> 47 </tr> 48 <tr> 49 <td class="basic-table__cell">PATCH</td> 50 <td class="basic-table__cell">Update a resource (partially)</td> 51 </tr> 52 <tr> 53 <td class="basic-table__cell">DELETE</td> 54 <td class="basic-table__cell">Delete a resource</td> 55 </tr> 56 </tbody> 57 </table> 58 </div> 59 60 61 ## Identification via User-Agent 62 63 You must include the User-Agent header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary (e.g. to warn you about Rate-Limiting or badly formed requests). Examples of excellent User-Agent headers: 64 65 ``` 66 User-Agent: Example Mobile App (example@phrase.com) 67 User-Agent: ACME Inc Python Client (http://example.com/contact) 68 ``` 69 70 If you don't send this header, you will receive a response with 400 Bad Request. 71 72 73 ## Lists 74 75 When you request a list of resources, the API will typically only return an array of resources including their most important attributes. For a detailed representation of the resource you should request its detailed representation. 76 77 Lists are usually [paginated](#pagination). 78 79 80 ## Parameters 81 82 Many endpoints support additional parameters, e.g. for pagination. When passing them in a GET request you can send them as HTTP query string parameters: 83 84 ``` 85 $ curl -u EMAIL_OR_ACCESS_TOKEN "https://api.phrase.com/v2/projects?page=2" 86 ``` 87 88 When performing a POST, PUT, PATCH or DELETE request, we recommend sending parameters that are not already included in the URL, as JSON body: 89 90 ``` 91 $ curl -H 'Content-Type: application/json' -d '{"name":"My new project"}' -u EMAIL_OR_ACCESS_TOKEN https://api.phrase.com/v2/projects 92 ``` 93 94 Encoding parameters as JSON means better support for types (boolean, integer) and usually better readability. Don't forget to set the correct Content-Type for your request. 95 96 *The Content-Type header is omitted in some of the following examples for better readbility.* 97 98 99 ## Errors 100 101 102 ### Request Errors 103 104 If a request contains invalid JSON or is missing a required parameter (besides resource attributes), the status `400 Bad Request` is returned: 105 106 ``` 107 { 108 "message": "JSON could not be parsed" 109 } 110 ``` 111 112 113 ### Validation Errors 114 115 When the validation for a resource fails, the status `422 Unprocessable Entity` is returned, along with information on the affected fields: 116 117 ``` 118 { 119 "message": "Validation Failed", 120 "errors": [ 121 { 122 "resource": "Project", 123 "field": "name", 124 "message": "can't be blank" 125 } 126 ] 127 } 128 ``` 129 130 131 ## Date Format 132 133 Times and dates are returned and expected in [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) date format: 134 135 ``` 136 YYYY-MM-DDTHH:MM:SSZ 137 ``` 138 139 Instead of 'Z' for UTC time zone you can specify your time zone's locale offset using the following notation: 140 141 ``` 142 YYYY-MM-DDTHH:MM:SS±hh:mm 143 ``` 144 145 Example for CET (1 hour behind UTC): 146 147 ``` 148 2015-03-31T13:00+01:00 149 ``` 150 151 Please note that in HTTP headers, we will use the appropriate recommended date formats instead of ISO 8601. 152 153 154 ## Authentication 155 156 There are two different ways to authenticate when performing API requests: 157 158 * E-Mail and password 159 * Oauth Access Token 160 161 162 ### E-Mail and password 163 164 To get started easily, you can use HTTP Basic authentication with your email and password: 165 166 ``` 167 $ curl -u username:password "https://api.phrase.com/v2/projects" 168 ``` 169 170 171 ### OAuth via Access Tokens 172 173 You can create and manage access tokens in your [profile settings](https://app.phrase.com/settings/oauth_access_tokens) in Translation Center or via the [Authorizations API](#tag--Authorizations). 174 175 Simply pass the access token as the username of your request: 176 177 ``` 178 $ curl -u ACCESS_TOKEN: "https://api.phrase.com/v2/projects" 179 ``` 180 181 or send the access token via the `Authorization` header field: 182 183 ``` 184 $ curl -H "Authorization: token ACCESS_TOKEN" https://api.phrase.com/v2/projects 185 ``` 186 187 #### Send via parameter 188 189 As JSONP (and other) requests cannot send HTTP Basic Auth credentials, a special query parameter `access_token` can be used: 190 191 ``` 192 curl "https://api.phrase.com/v2/projects?access_token=ACCESS_TOKEN" 193 ``` 194 195 You should only use this transport method if sending the authentication via header or Basic authentication is not possible. 196 197 ### Two-Factor-Authentication 198 199 Users with Two-Factor-Authentication enabled have to send a valid token along their request with certain authentication methods (such as Basic authentication). The necessity of a Two-Factor-Authentication token is indicated by the `X-PhraseApp-OTP: required; :MFA-type` header in the response. The `:MFA-type`field indicates the source of the token, e.g. `app` (refers to your Authenticator application): 200 201 ``` 202 X-PhraseApp-OTP: required; app 203 ``` 204 205 To provide a Two-Factor-Authentication token you can simply send it in the header of the request: 206 207 ``` 208 curl -H "X-PhraseApp-OTP: MFA-TOKEN" -u EMAIL https://api.phrase.com/v2/projects 209 ``` 210 211 Since Two-Factor-Authentication tokens usually expire quickly, we recommend using an alternative authentication method such as OAuth access tokens. 212 213 ### Multiple Accounts 214 215 Some endpoints require the account ID to be specified if the authenticated user is a member of multiple accounts. You can find the eight-digit account ID inside <a href="https://app.phrase.com/" target="_blank">Translation Center</a> by switching to the desired account and then visiting the account details page. If required, you can specify the account just like a normal parameter within the request. 216 217 ## Pagination 218 219 Endpoints that return a list or resources will usually return paginated results and include 25 items by default. To access further pages, use the `page` parameter: 220 221 ``` 222 $ curl -u EMAIL_OR_ACCESS_TOKEN "https://api.phrase.com/v2/projects?page=2" 223 ``` 224 225 Some endpoints also allow a custom page size by using the `per_page` parameter: 226 227 ``` 228 $ curl -u EMAIL_OR_ACCESS_TOKEN "https://api.phrase.com/v2/projects?page=2&per_page=50" 229 ``` 230 231 Unless specified otherwise in the description of the respective endpoint, `per_page` allows you to specify a page size up to 100 items. 232 233 234 ## Link-Headers 235 236 We provide you with pagination URLs in the [Link Header field](http://tools.ietf.org/html/rfc5988). Make use of this information to avoid building pagination URLs yourself. 237 238 ``` 239 Link: <https://api.phrase.com/v2/projects?page=1>; rel="first", <https://api.phrase.com/v2/projects?page=3>; rel="prev", <https://api.phrase.com/v2/projects?page=5>; rel="next", <https://api.phrase.com/v2/projects?page=9>; rel="last" 240 ``` 241 242 Possible `rel` values are: 243 244 <div class="table-responsive"> 245 <table class="basic-table"> 246 <thead> 247 <tr class="basic-table__row basic-table__row--header"> 248 <th class="basic-table__cell basic-table__cell--header">Value</th> 249 <th class="basic-table__cell basic-table__cell--header">Description</th> 250 </tr> 251 </thead> 252 <tbody> 253 <tr> 254 <td class="basic-table__cell">next</td> 255 <td class="basic-table__cell">URL of the next page of results</td> 256 </tr> 257 <tr> 258 <td class="basic-table__cell">last</td> 259 <td class="basic-table__cell">URL of the last page of results</td> 260 </tr> 261 <tr> 262 <td class="basic-table__cell">first</td> 263 <td class="basic-table__cell">URL of the first page of results</td> 264 </tr> 265 <tr> 266 <td class="basic-table__cell">prev</td> 267 <td class="basic-table__cell">URL of the previous page of results</td> 268 </tr> 269 </tbody> 270 </table> 271 </div> 272 273 ## Rate Limiting 274 275 All API endpoints are subject to rate limiting to ensure good performance for all customers. The rate limit is calculated per user: 276 277 * 1000 requests per 5 minutes 278 * 4 concurrent (parallel) requests 279 280 For your convenience we send information on the current rate limit within the response headers: 281 282 <div class="table-responsive"> 283 <table class="basic-table"> 284 <thead> 285 <tr class="basic-table__row basic-table__row--header"> 286 <th class="basic-table__cell basic-table__cell--header">Header</th> 287 <th class="basic-table__cell basic-table__cell--header">Description</th> 288 </tr> 289 </thead> 290 <tbody> 291 <tr> 292 <td class="basic-table__cell" style="white-space: nowrap;"><code>X-Rate-Limit-Limit</code></td> 293 <td class="basic-table__cell">Number of max requests allowed in the current time period</td> 294 </tr> 295 <tr> 296 <td class="basic-table__cell" style="white-space: nowrap;"><code>X-Rate-Limit-Remaining</code></td> 297 <td class="basic-table__cell">Number of remaining requests in the current time period</td> 298 </tr> 299 <tr> 300 <td class="basic-table__cell" style="white-space: nowrap;"><code>X-Rate-Limit-Reset</code></td> 301 <td class="basic-table__cell">Timestamp of end of current time period as UNIX timestamp</td> 302 </tr> 303 </tbody> 304 </table> 305 </div> 306 307 If you should run into the rate limit, you will receive the HTTP status code `429: Too many requests`. 308 309 If you should need higher rate limits, [contact us](https://phrase.com/contact). 310 311 312 ## Conditional GET requests / HTTP Caching 313 314 <div class="alert alert-info"><p><i>Note: Conditional GET requests are currently only supported for <a href="#locales_download">locales#download</a> and <a href="#translations_index">translations#index</a></i></p></div> 315 316 We will return an ETag or Last-Modified header with most GET requests. When you request a resource we recommend to store this value and submit them on subsequent requests as `If-Modified-Since` and `If-None-Match` headers. If the resource has not changed in the meantime, we will return the status `304 Not Modified` instead of rendering and returning the resource again. In most cases this is less time-consuming and makes your application/integration faster. 317 318 Please note that all conditional requests that return a response with status 304 don't count against your rate limits. 319 320 ``` 321 $ curl -i -u EMAIL_OR_ACCESS_TOKEN "https://api.phrase.com/v2/projects/1234abcd1234abcdefefabcd1234efab/locales/en/download" 322 HTTP/1.1 200 OK 323 ETag: "abcd1234abcdefefabcd1234efab1234" 324 Last-Modified: Wed, 28 Jan 2015 15:31:30 UTC 325 Status: 200 OK 326 327 $ curl -i -u EMAIL_OR_ACCESS_TOKEN "https://api.phrase.com/v2/projects/1234abcd1234abcdefefabcd1234efab/locales/en/download" -H 'If-None-Match: "abcd1234abcdefefabcd1234efab1234"' 328 HTTP/1.1 304 Not Modified 329 ETag: "abcd1234abcdefefabcd1234efab1234" 330 Last-Modified: Wed, 28 Jan 2015 15:31:30 UTC 331 Status: 304 Not Modified 332 333 $ curl -i -u EMAIL_OR_ACCESS_TOKEN "https://api.phrase.com/v2/projects/1234abcd1234abcdefefabcd1234efab/locales/en/download" -H "If-Modified-Since: Wed, 28 Jan 2015 15:31:30 UTC" 334 HTTP/1.1 304 Not Modified 335 Last-Modified: Wed, 28 Jan 2015 15:31:30 UTC 336 Status: 304 Not Modified 337 ``` 338 339 340 ## JSONP 341 342 The Phrase Strings API supports [JSONP](http://en.wikipedia.org/wiki/JSONP) for all GET requests in order to deal with cross-domain request issues. Just send a `?callback` parameter along with the request to specify the Javascript function name to be called with the response content: 343 344 ``` 345 $ curl "https://api.phrase.com/v2/projects?callback=myFunction" 346 ``` 347 348 The response will include the normal output for that endpoint, along with a `meta` section including header data: 349 350 ``` 351 myFunction({ 352 { 353 "meta": { 354 "status": 200, 355 ... 356 }, 357 "data": [ 358 { 359 "id": "1234abcd1234abc1234abcd1234abc" 360 ... 361 } 362 ] 363 } 364 }); 365 ``` 366 367 To authenticate a JSONP request, you can send a valid [access token](#overview--oauth-via-access-tokens) as the `?access_token` parameter along the request: 368 369 ``` 370 $ curl "https://api.phrase.com/v2/projects?callback=myFunction&access_token=ACCESS-TOKEN" 371 ``` 372 373 <div class="section resource"> 374 375 <div id="examples" class="resource__section resource__section--head" data-target="page.section"> 376 377 <div class="resource__copy"> 378 379 ## Usage examples 380 381 Learn how to work more efficiently with Phrase Strings API v2 with these 382 workflow-oriented examples. 383 384 </div> 385 386 </div> 387 388 <div id="examples_excluded_translations" class="resource__section" data-target="page.section"> 389 390 <div class="resource__copy"> 391 392 ### Find excluded translations with a certain content 393 394 GET /v2/projects/:project_id/translations 395 396 List excluded translations for the given project which start with the 397 term `PhraseApp`. 398 399 #### Parameters 400 401 <div class="table-responsive"> 402 403 <table> 404 <colgroup> 405 <col style="width: 33%" /> 406 <col style="width: 33%" /> 407 <col style="width: 33%" /> 408 </colgroup> 409 <thead> 410 <tr class="header"> 411 <th>Name</th> 412 <th>Type</th> 413 <th>Description</th> 414 </tr> 415 </thead> 416 <tbody> 417 <tr class="odd"> 418 <td><code>sort</code><br /> 419 <span class="small">optional</span></td> 420 <td><code>string</code></td> 421 <td>Sort criteria. Can be one of: key_name, created_at, updated_at.<br /> 422 Default: key_name</td> 423 </tr> 424 <tr class="even"> 425 <td><code>order</code><br /> 426 <span class="small">optional</span></td> 427 <td><code>string</code></td> 428 <td>Order direction. Can be one of: asc, desc.<br /> 429 Default: asc</td> 430 </tr> 431 <tr class="odd"> 432 <td><code>q</code><br /> 433 <span class="small">optional</span></td> 434 <td><code>string</code></td> 435 <td>Specify a query to find translations by content (including wildcards).<br /> 436 <i>Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).</i> 437 <br /> 438 The following qualifiers are supported in the query:<br /> 439 440 <ul> 441 <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> 442 <li><code>tags:XYZ</code> for tags on the translation</li> 443 <li><code>unverified:{true|false}</code> for verification status</li> 444 <li><code>reviewed:{true|false}</code> for reviewed status</li> 445 <li><code>excluded:{true|false}</code> for exclusion status</li> 446 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 447 </ul> 448 Find more examples <a href="#overview--usage-examples">here</a>.</td> 449 </tr> 450 </tbody> 451 </table> 452 453 </div> 454 455 </div> 456 457 <div class="resource__code"> 458 459 #### Example Request 460 461 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 462 463 ``` language-bash 464 curl "https://api.phrase.com/v2/projects/:project_id/translations?sort=updated_at&order=desc&q=PhraseApp*%20excluded:true" \ 465 -u USERNAME_OR_ACCESS_TOKEN 466 ``` 467 468 </div> 469 470 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 471 472 ``` language-bash 473 phrase translations list \ 474 --project_id <project_id> \ 475 --sort updated_at \ 476 --order desc \ 477 --query 'PhraseApp* excluded:true' \ 478 --access_token <token> 479 ``` 480 481 </div> 482 483 484 </div> 485 486 </div> 487 488 <div id="examples_unverified_translations" class="resource__section" data-target="page.section"> 489 490 <div class="resource__copy"> 491 492 ### Find unverified translations with a certain content 493 494 GET /v2/projects/:project_id/translations 495 496 List unverified translations for the given project which start with the 497 term `PhraseApp` and are not verified. 498 499 #### Parameters 500 501 <div class="table-responsive"> 502 503 <table> 504 <colgroup> 505 <col style="width: 33%" /> 506 <col style="width: 33%" /> 507 <col style="width: 33%" /> 508 </colgroup> 509 <thead> 510 <tr class="header"> 511 <th>Name</th> 512 <th>Type</th> 513 <th>Description</th> 514 </tr> 515 </thead> 516 <tbody> 517 <tr class="odd"> 518 <td><code>sort</code><br /> 519 <span class="small">optional</span></td> 520 <td><code>string</code></td> 521 <td>Sort criteria. Can be one of: key_name, created_at, updated_at.<br /> 522 Default: key_name</td> 523 </tr> 524 <tr class="even"> 525 <td><code>order</code><br /> 526 <span class="small">optional</span></td> 527 <td><code>string</code></td> 528 <td>Order direction. Can be one of: asc, desc.<br /> 529 Default: asc</td> 530 </tr> 531 <tr class="odd"> 532 <td><code>q</code><br /> 533 <span class="small">optional</span></td> 534 <td><code>string</code></td> 535 <td>Specify a query to find translations by content (including wildcards).<br /> 536 <br><i>Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).</i> 537 <br /> 538 The following qualifiers are supported in the query:<br /> 539 540 <ul> 541 <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> 542 <li><code>tags:XYZ</code> for tags on the translation</li> 543 <li><code>unverified:{true|false}</code> for verification status</li> 544 <li><code>reviewed:{true|false}</code> for reviewed status</li> 545 <li><code>excluded:{true|false}</code> for exclusion status</li> 546 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 547 </ul> 548 Find more examples <a href="#overview--usage-examples">here</a>.</td> 549 </tr> 550 </tbody> 551 </table> 552 553 </div> 554 555 </div> 556 557 <div class="resource__code"> 558 559 #### Example Request 560 561 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 562 563 ``` language-bash 564 curl "https://api.phrase.com/v2/projects/:project_id/translations?sort=updated_at&order=desc&q=PhraseApp*%20unverified:true" \ 565 -u USERNAME_OR_ACCESS_TOKEN 566 ``` 567 568 </div> 569 570 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 571 572 ``` language-bash 573 phrase translations list \ 574 --project_id <project_id> \ 575 --sort updated_at \ 576 --order desc \ 577 --query 'PhraseApp* unverified:true' \ 578 --access_token <token> 579 ``` 580 581 </div> 582 583 </div> 584 585 </div> 586 587 <div id="examples_verify_translations" class="resource__section" data-target="page.section"> 588 589 <div class="resource__copy"> 590 591 ### Verify translations selected by query 592 593 PATCH /v2/projects/:project_id/translations/verify 594 595 Verify all translations that are matching the query `my dog`. 596 597 #### Parameters 598 599 <div class="table-responsive"> 600 601 <table> 602 <colgroup> 603 <col style="width: 33%" /> 604 <col style="width: 33%" /> 605 <col style="width: 33%" /> 606 </colgroup> 607 <thead> 608 <tr class="header"> 609 <th>Name</th> 610 <th>Type</th> 611 <th>Description</th> 612 </tr> 613 </thead> 614 <tbody> 615 <tr class="odd"> 616 <td><code>q</code><br /> 617 <span class="small">optional</span></td> 618 <td><code>string</code></td> 619 <td>Specify a query to find translations by content (including wildcards).<br /> 620 <br><i>Note: Search is limited to 10000 results and may not include recently updated data (depending on the project size).</i> 621 <br /> 622 The following qualifiers are supported in the query:<br /> 623 624 <ul> 625 <li><code>id:translation_id,...</code> for queries on a comma-separated list of ids</li> 626 <li><code>tags:XYZ</code> for tags on the translation</li> 627 <li><code>unverified:{true|false}</code> for verification status</li> 628 <li><code>reviewed:{true|false}</code> for reviewed status</li> 629 <li><code>excluded:{true|false}</code> for exclusion status</li> 630 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 631 </ul> 632 Find more examples <a href="#overview--usage-examples">here</a>.</td> 633 </tr> 634 <tr class="even"> 635 <td><code>sort</code><br /> 636 <span class="small">optional</span></td> 637 <td><code>string</code></td> 638 <td>Sort criteria. Can be one of: key_name, created_at, updated_at.<br /> 639 Default: key_name</td> 640 </tr> 641 <tr class="odd"> 642 <td><code>order</code><br /> 643 <span class="small">optional</span></td> 644 <td><code>string</code></td> 645 <td>Order direction. Can be one of: asc, desc.<br /> 646 Default: asc</td> 647 </tr> 648 </tbody> 649 </table> 650 651 </div> 652 653 </div> 654 655 <div class="resource__code"> 656 657 #### Example Request 658 659 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 660 661 ``` language-bash 662 curl "https://api.phrase.com/v2/projects/:project_id/translations/verify" \ 663 -u USERNAME_OR_ACCESS_TOKEN \ 664 -X PATCH \ 665 -d '{"q":"my dog unverified:true","sort":"updated_at","order":"desc"}' \ 666 -H 'Content-Type: application/json' 667 ``` 668 669 </div> 670 671 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 672 673 ``` language-bash 674 phrase translations verify \ 675 --project_id <project_id> \ 676 --data '{"query":""my dog unverified:true"", "sort":"updated_at", "order":"desc"}' \ 677 --access_token <token> 678 ``` 679 680 </div> 681 682 </div> 683 684 </div> 685 686 <div id="examples_updated_keys" class="resource__section" data-target="page.section"> 687 688 <div class="resource__copy"> 689 690 ### Find recently updated keys 691 692 GET /v2/projects/:project_id/keys 693 694 Find updated keys with with the `updated_at` qualifier like 695 `updated_at:>=2013-02-21T00:00:00Z`. This example returns keys that have 696 been updated on or after 2013-02-21. 697 698 #### Parameters 699 700 <div class="table-responsive"> 701 702 <table> 703 <colgroup> 704 <col style="width: 33%" /> 705 <col style="width: 33%" /> 706 <col style="width: 33%" /> 707 </colgroup> 708 <thead> 709 <tr class="header"> 710 <th>Name</th> 711 <th>Type</th> 712 <th>Description</th> 713 </tr> 714 </thead> 715 <tbody> 716 <tr class="odd"> 717 <td><code>sort</code><br /> 718 <span class="small">optional</span></td> 719 <td><code>string</code></td> 720 <td>Sort by field. Can be one of: name, created_at, updated_at.<br /> 721 Default: name</td> 722 </tr> 723 <tr class="even"> 724 <td><code>order</code><br /> 725 <span class="small">optional</span></td> 726 <td><code>string</code></td> 727 <td>Order direction. Can be one of: asc, desc.<br /> 728 Default: asc</td> 729 </tr> 730 <tr class="odd"> 731 <td><code>q</code><br /> 732 <span class="small">optional</span></td> 733 <td><code>string</code></td> 734 <td>Specify a query to do broad search for keys by name (including wildcards).<br /> 735 <br /> 736 The following qualifiers are also supported in the search term:<br /> 737 738 <ul> 739 <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> 740 <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> 741 <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> 742 <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> 743 <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> 744 <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> 745 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 746 <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> 747 </ul> 748 Find more examples <a href="#overview--usage-examples">here</a>.</td> 749 </tr> 750 <tr class="even"> 751 <td><code>locale_id</code></td> 752 <td></td> 753 <td></td> 754 </tr> 755 </tbody> 756 </table> 757 758 </div> 759 760 </div> 761 762 <div class="resource__code"> 763 764 #### Example Request 765 766 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 767 768 ``` language-bash 769 curl "https://api.phrase.com/v2/projects/:project_id/keys?sort=updated_at&order=desc&q=updated_at:%3E=2013-02-21T00:00:00Z&locale_id=abcd1234abcd1234abcd1234abcd1234" \ 770 -u USERNAME_OR_ACCESS_TOKEN 771 ``` 772 773 </div> 774 775 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 776 777 ``` language-bash 778 phrase keys list \ 779 --project_id <project_id> \ 780 --sort updated_at \ 781 --order desc \ 782 --query "updated_at:>=2013-02-21T00:00:00Z" \ 783 --locale_id abcd1234abcd1234abcd1234abcd1234 \ 784 --access_token <token> 785 ``` 786 787 </div> 788 789 </div> 790 791 </div> 792 793 <div id="examples_tagged_keys" class="resource__section" data-target="page.section"> 794 795 <div class="resource__copy"> 796 797 ### Find keys with a certain tag 798 799 GET /v2/projects/:project_id/keys 800 801 Keys with certain tags can be filtered with the qualifier `tags:`. 802 803 #### Parameters 804 805 <div class="table-responsive"> 806 807 <table> 808 <colgroup> 809 <col style="width: 33%" /> 810 <col style="width: 33%" /> 811 <col style="width: 33%" /> 812 </colgroup> 813 <thead> 814 <tr class="header"> 815 <th>Name</th> 816 <th>Type</th> 817 <th>Description</th> 818 </tr> 819 </thead> 820 <tbody> 821 <tr class="odd"> 822 <td><code>q</code><br /> 823 <span class="small">optional</span></td> 824 <td><code>string</code></td> 825 <td>Specify a query to do broad search for keys by name (including wildcards).<br /> 826 <br /> 827 The following qualifiers are also supported in the search term:<br /> 828 829 <ul> 830 <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> 831 <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> 832 <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> 833 <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> 834 <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> 835 <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> 836 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 837 <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> 838 </ul> 839 Find more examples <a href="#overview--usage-examples">here</a>.</td> 840 </tr> 841 </tbody> 842 </table> 843 844 </div> 845 846 </div> 847 848 <div class="resource__code"> 849 850 #### Example Request 851 852 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 853 854 ``` language-bash 855 curl "https://api.phrase.com/v2/projects/:project_id/keys?q=tags:admin" \ 856 -u USERNAME_OR_ACCESS_TOKEN 857 ``` 858 859 </div> 860 861 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 862 863 ``` language-bash 864 phrase keys list \ 865 --project_id <project_id> \ 866 --query "tags:admin" \ 867 --access_token <token> 868 ``` 869 870 </div> 871 872 </div> 873 874 </div> 875 876 <div id="examples_tag" class="resource__section" data-target="page.section"> 877 878 <div class="resource__copy"> 879 880 ### Add tags to collection of keys 881 882 PATCH /v2/projects/:project_id/keys/tag 883 884 Add the tags `landing-page` and `release-1.2` to all keys that start 885 with `dog` and are translated in the locale 886 `abcd1234abcd1234abcd1234abcd1234`. 887 888 #### Parameters 889 890 <div class="table-responsive"> 891 892 <table> 893 <colgroup> 894 <col style="width: 33%" /> 895 <col style="width: 33%" /> 896 <col style="width: 33%" /> 897 </colgroup> 898 <thead> 899 <tr class="header"> 900 <th>Name</th> 901 <th>Type</th> 902 <th>Description</th> 903 </tr> 904 </thead> 905 <tbody> 906 <tr class="odd"> 907 <td><code>q</code><br /> 908 <span class="small">optional</span></td> 909 <td><code>string</code></td> 910 <td>Specify a query to do broad search for keys by name (including wildcards).<br /> 911 <br /> 912 The following qualifiers are also supported in the search term:<br /> 913 914 <ul> 915 <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> 916 <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> 917 <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> 918 <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> 919 <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> 920 <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> 921 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 922 <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> 923 </ul> 924 Find more examples <a href="#overview--usage-examples">here</a>.</td> 925 </tr> 926 <tr class="even"> 927 <td><code>tags</code></td> 928 <td><code>string</code></td> 929 <td>Tag or comma-separated list of tags to add to the matching collection of keys</td> 930 </tr> 931 <tr class="odd"> 932 <td><code>locale_id</code><br /> 933 <span class="small">optional</span></td> 934 <td><code>id</code></td> 935 <td>Locale used to determine the translation state of a key when filtering for untranslated or translated keys.</td> 936 </tr> 937 </tbody> 938 </table> 939 940 </div> 941 942 </div> 943 944 <div class="resource__code"> 945 946 #### Example Request 947 948 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 949 950 ``` language-bash 951 curl "https://api.phrase.com/v2/projects/:project_id/keys/tag" \ 952 -u USERNAME_OR_ACCESS_TOKEN \ 953 -X PATCH \ 954 -d '{"q":"dog* translated:true","tags":"landing-page,release-1.2","locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \ 955 -H 'Content-Type: application/json' 956 ``` 957 958 </div> 959 960 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 961 962 ``` language-bash 963 phrase keys tag \ 964 --project_id <project_id> \ 965 --data '{"query":"'dog* translated:true'", "tags":"landing-page,release-1.2", "locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \ 966 --access_token <token> 967 ``` 968 969 </div> 970 971 </div> 972 973 </div> 974 975 <div id="examples_untag" class="resource__section" data-target="page.section"> 976 977 <div class="resource__copy"> 978 979 ### Remove tags from collection of keys 980 981 PATCH /v2/projects/:project_id/keys/untag 982 983 Remove the tags `landing-page` and `release-1.2` from all keys that 984 start with `dog` and are translated in the locale 985 `abcd1234abcd1234abcd1234abcd1234`. 986 987 #### Parameters 988 989 <div class="table-responsive"> 990 991 <table> 992 <colgroup> 993 <col style="width: 33%" /> 994 <col style="width: 33%" /> 995 <col style="width: 33%" /> 996 </colgroup> 997 <thead> 998 <tr class="header"> 999 <th>Name</th> 1000 <th>Type</th> 1001 <th>Description</th> 1002 </tr> 1003 </thead> 1004 <tbody> 1005 <tr class="odd"> 1006 <td><code>q</code><br /> 1007 <span class="small">optional</span></td> 1008 <td><code>string</code></td> 1009 <td>Specify a query to do broad search for keys by name (including wildcards).<br /> 1010 <br /> 1011 The following qualifiers are also supported in the search term:<br /> 1012 1013 <ul> 1014 <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> 1015 <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> 1016 <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> 1017 <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> 1018 <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> 1019 <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> 1020 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 1021 <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> 1022 </ul> 1023 Find more examples <a href="#overview--usage-examples">here</a>.</td> 1024 </tr> 1025 <tr class="even"> 1026 <td><code>tags</code></td> 1027 <td><code>string</code></td> 1028 <td>Tag or comma-separated list of tags to remove from the matching collection of keys</td> 1029 </tr> 1030 <tr class="odd"> 1031 <td><code>locale_id</code><br /> 1032 <span class="small">optional</span></td> 1033 <td><code>id</code></td> 1034 <td>Locale used to determine the translation state of a key when filtering for untranslated or translated keys.</td> 1035 </tr> 1036 </tbody> 1037 </table> 1038 1039 </div> 1040 1041 </div> 1042 1043 <div class="resource__code"> 1044 1045 #### Example Request 1046 1047 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 1048 1049 ``` language-bash 1050 curl "https://api.phrase.com/v2/projects/:project_id/keys/untag" \ 1051 -u USERNAME_OR_ACCESS_TOKEN \ 1052 -X PATCH \ 1053 -d '{"q":"dog* translated:true","tags":"landing-page,release-1.2","locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \ 1054 -H 'Content-Type: application/json' 1055 ``` 1056 1057 </div> 1058 1059 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 1060 1061 ``` language-bash 1062 phrase keys untag \ 1063 --project_id <project_id> \ 1064 --data '{"query":"'dog* translated:true'", "tags":"landing-page,release-1.2", "locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \ 1065 --access_token <token> 1066 ``` 1067 1068 </div> 1069 1070 </div> 1071 1072 </div> 1073 1074 <div id="examples_broad_match" class="resource__section" data-target="page.section"> 1075 1076 <div class="resource__copy"> 1077 1078 ### Find keys with broad text match 1079 1080 GET /v2/projects/:project_id/keys 1081 1082 Example query `my dog` 1083 1084 #### Parameters 1085 1086 <div class="table-responsive"> 1087 1088 <table> 1089 <colgroup> 1090 <col style="width: 33%" /> 1091 <col style="width: 33%" /> 1092 <col style="width: 33%" /> 1093 </colgroup> 1094 <thead> 1095 <tr class="header"> 1096 <th>Name</th> 1097 <th>Type</th> 1098 <th>Description</th> 1099 </tr> 1100 </thead> 1101 <tbody> 1102 <tr class="odd"> 1103 <td><code>q</code><br /> 1104 <span class="small">optional</span></td> 1105 <td><code>string</code></td> 1106 <td>Specify a query to do broad search for keys by name (including wildcards).<br /> 1107 <br /> 1108 The following qualifiers are also supported in the search term:<br /> 1109 1110 <ul> 1111 <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> 1112 <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> 1113 <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> 1114 <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> 1115 <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> 1116 <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> 1117 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 1118 <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> 1119 </ul> 1120 Find more examples <a href="#overview--usage-examples">here</a>.</td> 1121 </tr> 1122 </tbody> 1123 </table> 1124 1125 </div> 1126 1127 #### Matches 1128 1129 <span class="result-match">**My dog** is lazy 1130 </span> <span class="result-match">**my dog** is lazy 1131 </span> <span class="result-match">angry **dog** in **my** house</span> 1132 1133 </div> 1134 1135 <div class="resource__code"> 1136 1137 #### Example Request 1138 1139 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 1140 1141 ``` language-bash 1142 curl "https://api.phrase.com/v2/projects/:project_id/keys?q=my%20dog" \ 1143 -u USERNAME_OR_ACCESS_TOKEN 1144 ``` 1145 1146 </div> 1147 1148 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 1149 1150 ``` language-bash 1151 phrase keys list \ 1152 --project_id <project_id> \ 1153 --query "my dog" \ 1154 --access_token <token> 1155 ``` 1156 1157 </div> 1158 1159 </div> 1160 1161 </div> 1162 1163 <div id="examples_exact_match" class="resource__section" data-target="page.section"> 1164 1165 <div class="resource__copy"> 1166 1167 ### Find keys with exact text match 1168 1169 GET /v2/projects/:project_id/keys 1170 1171 Example query `"my dog is lazy"` (note backslashes before any whitespace 1172 character in the example query) 1173 1174 #### Parameters 1175 1176 <div class="table-responsive"> 1177 1178 <table> 1179 <colgroup> 1180 <col style="width: 33%" /> 1181 <col style="width: 33%" /> 1182 <col style="width: 33%" /> 1183 </colgroup> 1184 <thead> 1185 <tr class="header"> 1186 <th>Name</th> 1187 <th>Type</th> 1188 <th>Description</th> 1189 </tr> 1190 </thead> 1191 <tbody> 1192 <tr class="odd"> 1193 <td><code>q</code><br /> 1194 <span class="small">optional</span></td> 1195 <td><code>string</code></td> 1196 <td>Specify a query to do broad search for keys by name (including wildcards).<br /> 1197 <br /> 1198 The following qualifiers are also supported in the search term:<br /> 1199 1200 <ul> 1201 <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> 1202 <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> 1203 <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> 1204 <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> 1205 <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> 1206 <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> 1207 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 1208 <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> 1209 </ul> 1210 Find more examples <a href="#overview--usage-examples">here</a>.</td> 1211 </tr> 1212 </tbody> 1213 </table> 1214 1215 </div> 1216 1217 #### Matches 1218 1219 ~~My dog is lazy~~ 1220 <span class="result-match">**my dog is lazy** 1221 </span> ~~angry dog in my house~~ 1222 1223 </div> 1224 1225 <div class="resource__code"> 1226 1227 #### Example Request 1228 1229 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 1230 1231 ``` language-bash 1232 curl "https://api.phrase.com/v2/projects/:project_id/keys?q=name:my%5C%20dog%5C%20is%5C%20lazy" \ 1233 -u USERNAME_OR_ACCESS_TOKEN 1234 ``` 1235 1236 </div> 1237 1238 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 1239 1240 ``` language-bash 1241 phrase keys list \ 1242 --project_id <project_id> \ 1243 --query "name:my\ dog\ is\ lazy" \ 1244 --access_token <token> 1245 ``` 1246 1247 </div> 1248 1249 </div> 1250 1251 </div> 1252 1253 <div id="examples_wildcard_match" class="resource__section" data-target="page.section"> 1254 1255 <div class="resource__copy"> 1256 1257 ### Find keys with wildcard character matching 1258 1259 GET /v2/projects/:project_id/keys 1260 1261 Example query `*dog is*` 1262 1263 #### Parameters 1264 1265 <div class="table-responsive"> 1266 1267 <table> 1268 <colgroup> 1269 <col style="width: 33%" /> 1270 <col style="width: 33%" /> 1271 <col style="width: 33%" /> 1272 </colgroup> 1273 <thead> 1274 <tr class="header"> 1275 <th>Name</th> 1276 <th>Type</th> 1277 <th>Description</th> 1278 </tr> 1279 </thead> 1280 <tbody> 1281 <tr class="odd"> 1282 <td><code>q</code><br /> 1283 <span class="small">optional</span></td> 1284 <td><code>string</code></td> 1285 <td>Specify a query to do broad search for keys by name (including wildcards).<br /> 1286 <br /> 1287 The following qualifiers are also supported in the search term:<br /> 1288 1289 <ul> 1290 <li><code>ids:key_id,...</code> for queries on a comma-separated list of ids</li> 1291 <li><code>name:key_name,...</code> for text queries on a comma-seperated list of exact key names - spaces, commas, and colons need to be escaped with double backslashes</li> 1292 <li><code>tags:tag_name,...</code> to filter for keys with certain comma-seperated list of tags</li> 1293 <li><code>uploads:upload_id,...</code> to filter for keys with certain comma-seperated list of uploads</li> 1294 <li><code>job:{true|false}</code> to filter for keys mentioned in an active job</li> 1295 <li><code>translated:{true|false}</code> for translation status (also requires <code>locale_id</code> to be specified)</li> 1296 <li><code>updated_at:{>=|<=}2013-02-21T00:00:00Z</code> for date range queries</li> 1297 <li><code>unmentioned_in_upload:upload_id</code> to filter keys unmentioned within upload</li> 1298 </ul> 1299 Find more examples <a href="#overview--usage-examples">here</a>.</td> 1300 </tr> 1301 </tbody> 1302 </table> 1303 1304 </div> 1305 1306 #### Matches 1307 1308 <span class="result-match">My **dog is** lazy 1309 </span> <span class="result-match">my **dog is** lazy 1310 </span> ~~angry dog in my house~~ 1311 1312 </div> 1313 1314 <div class="resource__code"> 1315 1316 #### Example Request 1317 1318 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 1319 1320 ``` language-bash 1321 curl "https://api.phrase.com/v2/projects/:project_id/keys?q=*dog%20is*" \ 1322 -u USERNAME_OR_ACCESS_TOKEN 1323 ``` 1324 1325 </div> 1326 1327 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 1328 1329 ``` language-bash 1330 phrase keys list \ 1331 --project_id <project_id> \ 1332 --query '*dog is*' \ 1333 --access_token <token> 1334 ``` 1335 1336 </div> 1337 1338 </div> 1339 1340 </div> 1341 1342 <div id="examples_xlsx_upload" class="resource__section" data-target="page.section"> 1343 1344 <div class="resource__copy"> 1345 1346 ### Upload an Excel file with several translations 1347 1348 POST /v2/projects/:project_id/uploads 1349 1350 Suppose you have an excel file where the 'A' column contains the key 1351 names, the 'B' column contains English translations, the 'C' column 1352 contains German translations and the 'D' column contains comments. 1353 Furthermore, the actual content starts in the second row, since the 1354 first row is reserved for a header. You can upload this file and import 1355 all translations at once\! 1356 1357 #### Parameters 1358 1359 <div class="table-responsive"> 1360 1361 | Name | Type | Description | 1362 | ----------------------------------- | -------- | ----------------------------------------------------------- | 1363 | `file` | `file` | File to be imported | 1364 | `file_format` | `string` | File format. Auto-detected when possible and not specified. | 1365 | `locale_mapping[en]` | `string` | Name of the column containing translations for locale en. | 1366 | `locale_mapping[de]` | `string` | Name of the column containing translations for locale de. | 1367 | `format_options[comment_column]` | `string` | Name of the column containing descriptions for keys. | 1368 | `format_options[tag_column]` | `string` | Name of the column containing tags for keys. | 1369 | `format_options[key_name_column]` | `string` | Name of the column containing the names of the keys. | 1370 | `format_options[first_content_row]` | `string` | Name of the first row containing actual translations. | 1371 1372 </div> 1373 1374 </div> 1375 1376 <div class="resource__code"> 1377 1378 #### Example Request 1379 1380 <div class="code-section" data-target="technology-switch.example" data-technology="curl"> 1381 1382 ``` language-bash 1383 curl "https://api.phrase.com/v2/projects/:project_id/uploads" \ 1384 -u USERNAME_OR_ACCESS_TOKEN \ 1385 -X POST \ 1386 -F file=@/path/to/my/file.xlsx \ 1387 -F file_format=xlsx \ 1388 -F locale_mapping[en]=B \ 1389 -F locale_mapping[de]=C \ 1390 -F format_options[comment_column]=D \ 1391 -F format_options[tag_column]=E \ 1392 -F format_options[key_name_column]=A \ 1393 -F format_options[first_content_row]=2 1394 ``` 1395 1396 </div> 1397 1398 <div class="code-section hidden" data-target="technology-switch.example" data-technology="cli v2"> 1399 1400 ``` language-bash 1401 phrase uploads create \ 1402 --project_id <project_id> \ 1403 --file /path/to/my/file.xlsx \ 1404 --file_format xlsx \ 1405 --locale_id abcd1234cdef1234abcd1234cdef1234 \ 1406 --tags awesome-feature,needs-proofreading \ 1407 --locale_mapping '{"en": "B", "de": "C"}' \ 1408 --format_options '{"comment_column": "D", "tag_column": "E", "key_name_column": "A", "first_content_row": "2"}' \ 1409 --access_token <token> 1410 ``` 1411 1412 </div> 1413 1414 </div> 1415 1416 </div> 1417 1418 </div>