openapi: 3.0.3
info:
title: Phrase Strings API Reference
version: 2.0.0
description: 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.
contact:
name: Phrase Support
url: https://developers.phrase.com/api/
email: support@phrase.com
x-logo:
url: https://developers.phrase.com/images/phrase-logo.svg
backgroundColor: '#03eab3'
altText: Phrase Strings
termsOfService: https://phrase.com/terms/
license:
name: MIT
url: https://choosealicense.com/licenses/mit/
servers:
- url: https://api.phrase.com/v2
description: EU production server
- url: https://api.us.app.phrase.com/v2
description: US production server
security:
- Token: []
- Basic: []
tags:
- name: Accounts
- name: Authorizations
description: |
The endpoints provided by the Authorizations API are **only accessible via Basic authentication with email and password**.
When creating a new authorization, the new access token for this authorization will be returned in the immediate response but not later, due to security reasons. When accessing authorizations later, you will only see the last eight chars of the token in plain text (`token_last_eight`) and the SHA256 digest of the token for reference (`hashed_token`).
For instructions on how authorization in general works, see our [Auth Guide](#overview--authentication).
### Scopes
When creating or updating an OAuth authorization, you can define a list of scopes to limit the access that can be performed by that authorization.
#### Available Scopes
read |
Read projects, locales, keys, translations, orders |
write |
Write projects, locales, keys, translations but not orders |
orders.create |
Create and confirm orders |
team.manage |
Manage invitations and members |
- name: Blacklisted Keys
- name: Branches
description: |
### Branch creation
Branches will be created asynchronously. State of branch creation is returned as state.
#### Available States
initialized |
Data received. |
processing |
Branch is currently creating. |
success |
Branch was created successfully |
error |
Branch creation failed. |
- name: Comments
- name: Comment Reactions
- name: Comment Replies
- name: Custom Metadata
- name: Distributions
- name: Documents
- name: Figma Attachments
- name: Formats
- name: Glossaries
- name: Glossary Terms
- name: Glossary Term Translations
- name: ICU
- name: Invitations
description: |
With the invitation endpoint you can [manage and invite users](https://support.phrase.com/hc/en-us/articles/5709742418716) to Phrase Strings via API. A user can have the role Manager, Developer or Translator each with its own access rights. Developers and translators need resources like projects and locales assigned in order to access them.
- name: Job Annotations
description: |
The job annotations endpoints allow you to create, update and delete annotations for jobs and job locales. Annotations are used to add metadata to a job or job locale.
- name: Job Comments
- name: Job Locales
- name: Job Template Locales
- name: Job Templates
- name: Jobs
- name: Keys
- name: Linked Keys
- name: Locales
- name: Locale Downloads
- name: Members
description: |
With the members endpoints you can do basic [team and user management](https://support.phrase.com/hc/en-us/articles/5709742418716) via API. A user can have the role Manager, Developer or Translator each with its own access rights. Developers and translators need resources like projects and locales assigned in order to access them.
- name: Notifications
- name: Notification Groups
- name: Orders
description: |
### List of categories [TextMaster]
When ordering translations from TextMaster, you need to specify a category ID along with your order. See this list for information on the category ID and their equivalent description.
| C001 | Agriculture |
| C002 | Aerospace |
| C003 | Animals/Pets/Plants |
| C004 | Arts/Culture/Literature |
| C005 | Automotive/Transportation |
| C006 | Computers/Technology/Software |
| C007 | Telecom |
| C008 | Real Estate/Construction/Building |
| C009 | Consumer Goods |
| C010 | Education |
| C011 | Entertainment |
| C012 | Ecology/Environment |
| C013 | Health/Biotechnology/Pharma |
| C014 | Internet |
| C015 | Policy/Government/Public |
| C016 | Publishing/Media/Communication |
| C017 | Religion |
| C018 | Food/Beverages |
| C019 | Retail |
| C020 | Fashion/Luxury/Textiles |
| C021 | Travel/Tourism |
| C022 | Natural Resources/Energy |
| C023 | Banking/Financial Services/Insurance |
| C024 | Legal Affairs/Tax/Law |
| C025 | Raw Materials/Industrial Goods |
| C026 | Lifestyle/Leisure/Hobbies |
| C027 | Sports |
| C028 | Home/Family/Friends/Children |
| C029 | Economy/Financial Markets |
| C030 | Science |
| C031 | Human Resources/Employment |
| C032 | Adult (Pornography, Violence, etc.) |
- name: Organization Job Template Locales
- name: Organization Job Templates
- name: Projects
- name: Quality
- name: Releases
- name: Release Triggers
- name: Repo Syncs
description: |
The Repo Syncs API allows you to synchronize your Phrase projects with your code repositories.
You can import translations from your repository to Phrase and export translations from Phrase to your repository.
- name: Repo Sync Events
- name: Reports
- name: Search
- name: Screenshot Markers
- name: Screenshots
- name: Spaces
- name: Style guides
- name: Tags
- name: Teams
- name: Translations
- name: Uploads
description: |
### Formats
We support all common localization file formats. For a detailed overview, see our [Format Guide](https://support.phrase.com/hc/en-us/sections/6111343326364).
### Processing
Uploads will be processed asynchronously and thus the data might not be imported yet although the upload is completed. Therefore we recommend to evaluate the returned state field for information on the import progress.
#### Available States
initialized |
Data received. |
waiting_for_preview |
Upload is waiting for preview to be finished. |
waiting |
Upload is waiting for processing. |
processing |
Upload is being processed, data is currently imported. |
success |
Upload is complete and all data is imported. |
error |
Upload or import process failed. |
- name: Users
- name: Variables
- name: Versions / History
- name: Webhooks
- name: Webhook Deliveries
paths:
/icu/skeleton:
post:
summary: Build ICU skeletons
description: Returns ICU skeletons for multiple locale codes based on a source content.
operationId: icu/skeleton
tags:
- ICU
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/skeleton'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/icu/skeleton" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"content":"{number, plural, one {One} other {%{n}}}","locale_codes":["en"],"zero_form_enabled": true}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase icu skeleton \
--data '{"content":"{number, plural, one {One} other {%{n}}}","locale_codes":["en"],"zero_form_enabled": true}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: icu/skeleton/parameters
properties:
content:
description: Source content
type: string
example: '{number, plural, one {One} other {%{n}}}'
locale_codes:
description: Locale codes
type: array
items:
type: string
example: en
example:
- en
keep_content:
description: Keep the content and add missing plural forms for each locale
type: boolean
example: null
zero_form_enabled:
description: Indicates whether the zero form should be included or excluded in the returned skeletons
type: boolean
example: null
cldr_version:
description: |-
Strings supports two CLDR variants, when it comes to pluralization rules. \
You can choose which one you want to use when constructing the skeletons. Possible values \
are `legacy` and `cldr_41`. Default value is `legacy`.
type: string
example: cldr_41
x-cli-version: '2.9'
/formats:
get:
summary: List formats
description: Get a handy list of all localization file formats supported in Phrase.
operationId: formats/list
tags:
- Formats
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/format'
'400':
$ref: '#/components/responses/400'
x-code-samples:
- lang: Curl
source: curl "https://api.phrase.com/v2/formats"
- lang: CLI v2
source: |-
phrase formats list \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/documents:
get:
summary: List documents
description: List all documents the current user has access to.
operationId: documents/list
tags:
- Documents
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/project_id'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/document'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/documents?project_id=asdf" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase documents list \
--project_id \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/documents/{id}:
delete:
summary: Delete document
description: Delete an existing document.
operationId: document/delete
tags:
- Documents
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
$ref: '#/components/responses/200'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/documents/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase documents delete \
--project_id \
--id \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/report:
get:
summary: Get Project Report
description: Get report of a single project.
operationId: report/show
tags:
- Reports
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/project_report'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/report?branch=my-feature-branch" \
-X GET \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase report show \
--project_id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.13'
/projects/{project_id}/report/locales:
get:
summary: List Locale Reports
description: List all locale reports for the given project
operationId: report/locales/list
tags:
- Reports
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/locale_codes'
- $ref: '#/components/parameters/tag'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/locale_report'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/report/locales?locale_codes[]=de&locale_codes[]=en&branch=my-feature-branch" \
-X GET \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase report locales list \
--project_id \
--branch my-feature-branch \
--locale_codes de \
--access_token
x-cli-version: '2.13'
/projects/{project_id}/figma_attachments:
get:
summary: List Figma attachments
description: List all Figma attachments for the given project
operationId: figma_attachments/list
tags:
- Figma attachments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/figma_attachment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/figma_attachments?branch=my-feature-branch" \
-X GET \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase figma_attachments list \
--project_id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.13'
post:
summary: Create a Figma attachment
description: Create a new Figma attachment.
operationId: figma_attachment/create
tags:
- Figma attachments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/figma_attachment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/figma_attachments" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-F branch=my-feature-branch \
-F url=https://figma.com/file/xxxxx/sample \
- lang: CLI v2
source: |-
phrase figma_attachment create \
--project_id \
--data '{"branch":"my-feature-branch", "url":"https://figma.com/file/xxxxx/sample"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: figma_attachment/create/parameters
required:
- url
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
url:
description: Figma file url
type: string
example: https://figma.com/file/xxxxx/sample
x-cli-version: '2.13'
/projects/{project_id}/figma_attachments/{id}:
get:
summary: Get a single Figma attachment
description: Get details on a single Figma attachment for a given project.
operationId: figma_attachment/show
tags:
- Figma attachments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/figma_attachment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/figma_attachments/:id?branch=my-feature-branch" \
-X GET \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase figma_attachment show \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.13'
patch:
summary: Update a Figma attachment
description: Update an existing Figma attachment.
operationId: figma_attachment/update
tags:
- Figma attachments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/figma_attachment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/figma_attachments/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-F branch=my-feature-branch \
-F url=https://figma.com/file/xxxxx/sample \
- lang: CLI v2
source: |-
phrase figma_attachment update \
--project_id \
--id \
--data '{"branch":"my-feature-branch", "url":"https://figma.com/file/xxxxx/sample" }' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: figma_attachment/update/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
url:
description: Figma file url
type: string
example: https://figma.com/file/xxxxx/sample
x-cli-version: '2.13'
delete:
summary: Delete a Figma attachment
description: Delete an existing Figma attachment.
operationId: figma_attachment/delete
tags:
- Figma attachments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/figma_attachments/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase figma_attachment delete \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.13'
/projects/{project_id}/figma_attachments/{figma_attachment_id}/keys:
post:
summary: Attach the Figma attachment to a key
description: Attach the Figma attachment to a key
operationId: figma_attachment/attach_to_key
tags:
- Key's Figma attachments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/figma_attachment_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/figma_attachments/:figma_attachment_id/keys" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-F branch=my-feature-branch \
-F id=key_id \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase figma_attachment attach_to_key \
--project_id \
--figma_attachment_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.13'
/projects/{project_id}/figma_attachments/{figma_attachment_id}/keys/{id}:
delete:
summary: Detach the Figma attachment from a key
description: Detach the Figma attachment from a key
operationId: figma_attachment/detach_from_key
tags:
- Key's Figma attachments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/figma_attachment_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/figma_attachments/:figma_attachment_id/keys/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-F branch=my-feature-branch \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase figma_attachment detach_from_key \
--project_id \
--figma_attachment_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.13'
/projects/{project_id}/styleguides:
get:
summary: List style guides
description: List all styleguides for the given project.
operationId: styleguides/list
tags:
- Style guides
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/styleguide'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/styleguides" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase styleguides list \
--project_id \
--access_token
x-cli-version: '2.5'
post:
summary: Create a style guide
description: Create a new style guide.
operationId: styleguide/create
tags:
- Style guides
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/styleguide_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/styleguides" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"title":"Web application style guide","audience":"customer-facing","target_audience":"teenager","grammatical_person":"first_person_singular","vocabulary_type":"technical","business":"We are a travel site that helps customers find the best hotels and flights.","company_branding":"ACME Inc. should never be translated.","formatting":"Never use capital letters","glossary_terms":"Apartment, cabin, loft","grammar_consistency":","literal_translation":"Neutral","overall_tone":"Tone should be fun and light","samples":"http://www.myexample.com/my/document/path/to/samples.pdf"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase styleguides create \
--project_id \
--data '{"title": "Web application style guide", "audience":"customer-facing", "target_audience":"teenager", "grammatical_person":"first_person_singular", "vocabulary_type":"technical", "business": "We are a travel site that helps customers find the best hotels and flights.", "company_branding": "ACME Inc. should never be translated.", "formatting": "Never use capital letters", "glossary_terms": "Apartment, cabin, loft", "grammar_consistency":", "literal_translation":"Neutral", "overall_tone": "Tone should be fun and light", "samples": "http://www.myexample.com/my/document/path/to/samples.pdf"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: styleguide/create/parameters
required:
- title
properties:
title:
description: Style guide title
type: string
example: Web application style guide
audience:
description: Audience description
type: string
example: customer-facing
target_audience:
description: 'Can be one of: not_specified, children, teenager, young_adults, adults, old_adults.'
type: string
example: teenager
grammatical_person:
description: 'Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural.'
type: string
example: first_person_singular
vocabulary_type:
description: 'Can be one of: not_specified, popular, technical, fictional.'
type: string
example: technical
business:
description: Description of the business
type: string
example: We are a travel site that helps customers find the best hotels and flights.
company_branding:
description: Company branding to remain consistent.
type: string
example: ACME Inc. should never be translated.
formatting:
description: Formatting requirements and character limitations.
type: string
example: Never use capital letters
glossary_terms:
description: List of terms and/or phrases that need to be translated consistently.
type: string
example: Apartment, cabin, loft
grammar_consistency:
description: Formal or informal pronouns, consistent conjugation, grammatical gender
type: string
example: ''
literal_translation:
description: 'Can be one of: Cultural/Conversational, Literal, Neutral.'
type: string
example: Neutral
overall_tone:
description: Tone requirement descriptions
type: string
example: Tone should be fun and light
samples:
description: Provide links to sample product pages, FAQ pages, etc. to give the translator a point of reference. You can also provide past translations. Even snippets or short paragraphs are helpful for maintaining consistency.
type: string
example: http://www.myexample.com/my/document/path/to/samples.pdf
x-cli-version: '2.5'
/projects/{project_id}/styleguides/{id}:
get:
summary: Get a single style guide
description: Get details on a single style guide.
operationId: styleguide/show
tags:
- Style guides
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/styleguide_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/styleguides/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase styleguides show \
--project_id \
--id \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a style guide
description: Update an existing style guide.
operationId: styleguide/update
tags:
- Style guides
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/styleguide_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/styleguides/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"title":"Web application style guide","audience":"customer-facing","target_audience":"teenager","grammatical_person":"first_person_singular","vocabulary_type":"technical","business":"We are a travel site that helps customers find the best hotels and flights.","company_branding":"ACME Inc. should never be translated.","formatting":"Never use capital letters","glossary_terms":"Apartment, cabin, loft","grammar_consistency":","literal_translation":"Neutral","overall_tone":"Tone should be fun and light","samples":"http://www.myexample.com/my/document/path/to/samples.pdf"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase styleguides update \
--project_id \
--id \
--data '{"title": "Web application style guide", "audience":"customer-facing", "target_audience":"teenager", "grammatical_person":"first_person_singular", "vocabulary_type":"technical", "business": "We are a travel site that helps customers find the best hotels and flights.", "company_branding": "ACME Inc. should never be translated.", "formatting": "Never use capital letters", "glossary_terms": "Apartment, cabin, loft", "grammar_consistency":", "literal_translation":"Neutral", "overall_tone": "Tone should be fun and light", "samples": "http://www.myexample.com/my/document/path/to/samples.pdf"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: styleguide/update/parameters
properties:
title:
description: Style guide title
type: string
example: Web application style guide
audience:
description: Audience description
type: string
example: customer-facing
target_audience:
description: 'Can be one of: not_specified, children, teenager, young_adults, adults, old_adults.'
type: string
example: teenager
grammatical_person:
description: 'Can be one of: not_specified, first_person_singular, second_person_singular, third_person_singular_masculine, third_person_singular_feminine, third_person_singular_neuter, first_person_plural, second_person_plural, third_person_plural.'
type: string
example: first_person_singular
vocabulary_type:
description: 'Can be one of: not_specified, popular, technical, fictional.'
type: string
example: technical
business:
description: Description of the business
type: string
example: We are a travel site that helps customers find the best hotels and flights.
company_branding:
description: Company branding to remain consistent.
type: string
example: ACME Inc. should never be translated.
formatting:
description: Formatting requirements and character limitations.
type: string
example: Never use capital letters
glossary_terms:
description: List of terms and/or phrases that need to be translated consistently.
type: string
example: Apartment, cabin, loft
grammar_consistency:
description: Formal or informal pronouns, consistent conjugation, grammatical gender
type: string
example: ''
literal_translation:
description: 'Can be one of: Cultural/Conversational, Literal, Neutral.'
type: string
example: Neutral
overall_tone:
description: Tone requirement descriptions
type: string
example: Tone should be fun and light
samples:
description: Provide links to sample product pages, FAQ pages, etc. to give the translator a point of reference. You can also provide past translations. Even snippets or short paragraphs are helpful for maintaining consistency.
type: string
example: http://www.myexample.com/my/document/path/to/samples.pdf
x-cli-version: '2.5'
delete:
summary: Delete a style guide
description: Delete an existing style guide.
operationId: styleguide/delete
tags:
- Style guides
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/styleguides/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE
- lang: CLI v2
source: |-
phrase styleguides delete \
--project_id \
--id \
--access_token
x-cli-version: '2.5'
/accounts/{account_id}/custom_metadata/properties:
get:
summary: List properties
description: |
List all custom metadata properties for an account.
This endpoint is only available to accounts with advanced plans or above.
operationId: custom_metadata_properties/list
tags:
- Custom Metadata
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/custom_metadata_data_type'
- description: id of project that the properties belong to
example: abcd1234cdef1234abcd1234cdef1234
name: project_id
in: query
schema:
type: string
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- description: query to find a property by name
example: character_name
name: q
in: query
schema:
type: string
- description: 'Sort criteria. Can be one of: name, data_type, created_at.'
example: updated_at
name: sort
in: query
schema:
type: string
- description: 'Order direction. Can be one of: asc, desc.'
example: desc
name: order
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/custom_metadata_property'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/properties?data_type=boolean&project_id=1&page=1&per_page=10&sort=created_at&order=desc" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase custom_metadata_properties list \
--account_id \
--data_type boolean \
--project_id 1 \
--page 1 \
--per_page 10 \
--sort created_at \
--order desc \
--access_token
x-cli-version: '2.9'
post:
summary: Create a property
description: Create a new custom metadata property.
operationId: custom_metadata_property/create
tags:
- Custom Metadata
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
requestBody:
required: true
content:
application/json:
schema:
required:
- name
- data_type
type: object
title: custom_metadata_properties/create/parameters
properties:
name:
description: name of the property
example: Fruit
type: string
data_type:
$ref: '#/components/schemas/data_type'
project_ids:
description: ids of projects that the property belongs to
type: array
example:
- abcd1234cdef1234abcd1234cdef1234
- abcd1234cdef1234abcd1234cdef4321
items:
type: string
description:
description: description of property
example: A healthy snack for all ages
type: string
value_options:
description: value options of property (only applies to single or multi select properties)
example:
- Apple
- Banana
- Coconut
type: array
items:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/custom_metadata_property'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'422':
$ref: '#/components/responses/422'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/properties" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"name":"Fruit","data_type":"multi_select","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase custom_metadata_properties create \
--account_id \
--data '{"name":"Fruit","data_type":"multi_select","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \
--access_token
x-cli-version: '2.9'
/accounts/{account_id}/custom_metadata/properties/{id}:
get:
summary: Get a single property
description: Get details of a single custom property.
operationId: custom_metadata_property/show
tags:
- Custom Metadata
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/custom_metadata_property'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/properties/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase custom_metadata_properties show \
--account_id \
--id \
--access_token
x-cli-version: '2.9'
patch:
summary: Update a property
description: Update an existing custom metadata property.
operationId: custom_metadata_property/update
tags:
- Custom Metadata
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
requestBody:
required: true
content:
application/json:
schema:
type: object
title: custom_metadata_properties/update/parameters
properties:
name:
description: name of the property
example: Fruit
type: string
project_ids:
description: ids of projects that the property belongs to
type: array
example:
- abcd1234cdef1234abcd1234cdef1234
- abcd1234cdef1234abcd1234cdef4321
items:
type: string
description:
description: description of property
example: A healthy snack for all ages
type: string
value_options:
description: value options of property (only applies to single or multi select properties)
example:
- Apple
- Banana
- Coconut
type: array
items:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/custom_metadata_property'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/properties/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"name":"Fruit","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase custom_metadata_properties update \
--account_id \
--id \
--data '{"name":"Fruit","description":"A healthy snack for all ages","project_ids":["1","2","3"],"value_options":["apple","banana","coconut"]}' \
--access_token
x-cli-version: '2.9'
delete:
summary: Destroy property
description: |
Destroy a custom metadata property of an account.
This endpoint is only available to accounts with advanced plans or above.
operationId: custom_metadata_properties/delete
tags:
- Custom Metadata
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/custom_metadata/properties/:id" \
-u USERNAME_OR_ACCESS_TOKEN
-X DELETE
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase custom_metadata_properties delete \
--account_id \
--id \
--access_token
x-cli-version: '2.9'
/accounts/{account_id}/invitations:
get:
summary: List invitations
description: List invitations for an account. It will also list the accessible resources like projects and locales the invited user has access to. In case nothing is shown the default access from the role is used. Access token scope must include `team.manage`.
operationId: invitations/list
tags:
- Invitations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/invitation'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/invitations" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase invitations list \
--account_id \
--access_token
x-cli-version: '2.5'
post:
summary: Create a new invitation
description: Invite a person to an account. Developers and translators need `project_ids` and `locale_ids` assigned to access them. Access token scope must include `team.manage`.
operationId: invitation/create
tags:
- Invitations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/invitation'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'422':
$ref: '#/components/responses/422'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/invitations" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"email":"example@mail.com","role":"Developer","project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235","locale_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235","space_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],"team_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],"default_locale_codes":["de","en"],"permissions":{"create_upload":true,"review_translations":true}}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase invitations create \
--account_id \
--data '{"email":"example@mail.com", "role":"Developer", "project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235", "locale_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235", "space_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],"team_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"], "default_locale_codes":["de","en"], "permissions":"{"create_upload"=>true, "review_translations"=>true}"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: invitation/create/parameters
required:
- email
- role
properties:
email:
description: The email of the invited user. The `email` can not be updated once created. Create a new invitation for each unique email.
type: string
example: example@mail.com
role:
description: Invitiation role, can be any of Manager, Developer, Translator.
type: string
example: Developer
project_ids:
description: List of project ids the invited user has access to.
type: string
example: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235
locale_ids:
description: List of locale ids the invited user has access to.
type: string
example: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235
space_ids:
description: List of spaces the user is assigned to.
type: array
items:
type: string
example:
- abcd1234abcd1234abcd1234
- abcd1234abcd1234abcd1235
team_ids:
description: List of teams the user is assigned to.
type: array
items:
type: string
example:
- abcd1234abcd1234abcd1234
- abcd1234abcd1234abcd1235
default_locale_codes:
description: List of default locales for the user.
type: array
items:
type: string
example:
- en
- de
permissions:
description: Additional permissions depending on invitation role. Available permissions are `create_upload` and `review_translations`
type: object
additionalProperties:
type: string
example:
create_upload: true
review_translations: true
x-cli-version: '2.5'
/accounts/{account_id}/invitations/{id}:
get:
summary: Get a single invitation
description: Get details on a single invitation. Access token scope must include `team.manage`.
operationId: invitation/show
tags:
- Invitations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/invitation'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/invitations/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase invitations show \
--account_id \
--id \
--access_token
x-cli-version: '2.5'
patch:
summary: Update an invitation
description: Update an existing invitation (must not be accepted yet). The `email` cannot be updated. Developers and translators need `project_ids` and `locale_ids` assigned to access them. Access token scope must include `team.manage`.
operationId: invitation/update
tags:
- Invitations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/invitation'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/invitations/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"role":"Invitiation role","project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235","locale_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235","space_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],"team_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],"default_locale_codes":["de","en"],"permissions":{"create_upload":true}}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase invitations update \
--account_id \
--id \
--data '{"role": "Invitiation role", "project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235", "locale_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235", "space_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"],"team_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"], "default_locale_codes":["de","en"], "permissions":"{"create_upload"=>true}"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: invitation/update/parameters
properties:
role:
description: Invitiation role, can be any of Manager, Developer, Translator
type: string
example: Invitiation role
project_ids:
description: List of project ids the invited user has access to
type: string
example: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235
locale_ids:
description: List of locale ids the invited user has access to
type: string
example: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235
space_ids:
description: List of spaces the user is assigned to.
type: array
items:
type: string
example:
- abcd1234abcd1234abcd1234
- abcd1234abcd1234abcd1235
team_ids:
description: List of teams the user is assigned to.
type: array
items:
type: string
example:
- abcd1234abcd1234abcd1234
- abcd1234abcd1234abcd1235
default_locale_codes:
description: List of default locales for the user.
type: array
items:
type: string
example:
- en
- de
permissions:
description: Additional permissions depending on invitation role.
type: object
additionalProperties:
type: string
example:
create_upload: true
x-cli-version: '2.5'
delete:
summary: Delete an invitation
description: Delete an existing invitation (must not be accepted yet). Access token scope must include `team.manage`.
operationId: invitation/delete
tags:
- Invitations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/invitations/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE
- lang: CLI v2
source: |-
phrase invitations delete \
--account_id \
--id \
--access_token
x-cli-version: '2.5'
/accounts/{account_id}/invitations/{id}/resend:
post:
summary: Resend an invitation
description: Resend the invitation email (must not be accepted yet). Access token scope must include `team.manage`.
operationId: invitation/resend
tags:
- Invitations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/invitation'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/invitations/:id/resend" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST
- lang: CLI v2
source: |-
phrase invitations resend \
--account_id \
--id \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/invitations/{id}:
patch:
summary: Update a member's invitation access
description: Update member's settings in the invitations. Access token scope must include `team.manage`.
operationId: invitation/update_settings
tags:
- Invitations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/invitation'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'401':
$ref: '#/components/responses/401'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/invitations/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"project_role":"Developer","locale_ids":["fff565db236400772368235db2c6117e","fff565db236400772368235db2c6117f"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase invitations update_settings \
--project_id \
--id \
--data '{"project_role":"Developer","locale_ids":["fff565db236400772368235db2c6117e","fff565db236400772368235db2c6117f"]}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: invitation/update_settings/parameters
properties:
project_role:
description: Member role, can be any of of Manager, Developer, Translator
type: string
example: Developer
locale_ids:
description: List of locale ids the user has access to.
type: array
items:
type: string
example:
- abcd1234abcd1234abcd1234
- abcd1234abcd1234abcd1235
x-cli-version: '2.5'
/projects/{project_id}/screenshots/{id}/markers:
get:
summary: List screenshot markers
description: List all screenshot markers for the given project.
operationId: screenshot_markers/list
tags:
- Screenshot Markers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/screenshot_marker'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/screenshots/:id/markers?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase screenshot_markers list \
--project_id \
--branch my-feature-branch \
--id \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/screenshots/{screenshot_id}/markers/{id}:
get:
summary: Get a single screenshot marker
description: Get details on a single screenshot marker for a given project.
operationId: screenshot_marker/show
tags:
- Screenshot Markers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/screenshot_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/screenshot_marker'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/screenshots/:screenshot_id/markers/:id?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase screenshot_markers show \
--project_id \
--screenshot_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/screenshots/{screenshot_id}/markers:
post:
summary: Create a screenshot marker
description: Create a new screenshot marker.
operationId: screenshot_marker/create
tags:
- Screenshot Markers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/screenshot_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/screenshot_marker'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/screenshots/:screenshot_id/markers" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch", "key_id":"abcd1234abcd1234abcd1234abcd1234","presentation":"{ \"x\": 100, \"y\": 100, \"w\": 100, \"h\": 100 }"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase screenshot_markers create \
--project_id \
--screenshot_id \
--data '{"branch":"my-feature-branch", "key_id":"abcd1234abcd1234abcd1234abcd1234", "presentation": "{ "x": 100, "y": 100, "w": 100, "h": 100 }"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: screenshot_marker/create/parameters
required:
- key_id
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
key_id:
description: Specify the Key ID which should be highlighted on the specified screenshot. The Key must belong to the project.
type: string
example: abcd1234abcd1234abcd1234abcd1234
presentation:
description: |
Presentation details of the screenshot marker in JSON format.
Each Screenshot Marker is represented as a rectangular shaped highlight box with the name of the specified Key attached. You can specify the marker position on the screenshot (`x`-axis and `y`-axis in pixels) from the top left corner of the screenshot and the dimensions of the marker itself (`w` and `h` in pixels).
type: string
example: '{ "x": 100, "y": 100, "w": 100, "h": 100 }'
x-cli-version: '2.5'
patch:
summary: Update a screenshot marker
description: Update an existing screenshot marker.
operationId: screenshot_marker/update
tags:
- Screenshot Markers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/screenshot_id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/screenshot_marker'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/screenshots/:screenshot_id/markers" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"branch":"my-feature-branch", "key_id":"abcd1234abcd1234abcd1234abcd1234","presentation":"{ \"x\": 100, \"y\": 100, \"w\": 100, \"h\": 100 }"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase screenshot_markers update \
--project_id \
--screenshot_id \
--data '{"branch":"my-feature-branch", "key_id":"abcd1234abcd1234abcd1234abcd1234", "presentation": "{ "x": 100, "y": 100, "w": 100, "h": 100 }"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: screenshot_marker/update/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
key_id:
description: Specify the Key ID which should be highlighted on the specified screenshot. The Key must belong to the project.
type: string
example: abcd1234abcd1234abcd1234abcd1234
presentation:
description: |
Presentation details of the screenshot marker in JSON format.
Each Screenshot Marker is represented as a rectangular shaped highlight box with the name of the specified Key attached. You can specify the marker position on the screenshot (`x`-axis and `y`-axis in pixels) from the top left corner of the screenshot and the dimensions of the marker itself (`w` and `h` in pixels).
type: string
example: '{ "x": 100, "y": 100, "w": 100, "h": 100 }'
x-cli-version: '2.5'
delete:
summary: Delete a screenshot marker
description: Delete an existing screenshot marker.
operationId: screenshot_marker/delete
tags:
- Screenshot Markers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/screenshot_id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/screenshots/:screenshot_id/markers" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase screenshot_markers delete \
--project_id \
--screenshot_id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
/accounts/{id}/locales:
get:
summary: List locales used in account
description: List all locales unique by locale code used across all projects within an account.
operationId: account/locales
tags:
- Locales
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/account_locale'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:id/locales" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase accounts locales \
--id \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/locales:
get:
summary: List locales
description: List all locales for the given project.
operationId: locales/list
tags:
- Locales
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- description: Sort locales. Valid options are "name_asc", "name_desc", "default_asc", "default_desc".
example: null
name: sort_by
in: query
schema:
type: string
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/locale'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase locales list \
--project_id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
post:
summary: Create a locale
description: Create a new locale.
operationId: locale/create
tags:
- Locales
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/locale_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch","name":"de","code":"de-DE","source_locale_id":"abcd1234abcd1234abcd1234abcd1234", "fallback_locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase locales create \
--project_id \
--data '{"branch":"my-feature-branch", "name":"de", "code":"de-DE", "source_locale_id":"abcd1234abcd1234abcd1234abcd1234", "fallback_locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: locale/create/parameters
required:
- name
- code
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
name:
description: Locale name
type: string
example: de
code:
description: Locale ISO code
type: string
example: de-DE
default:
description: Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
type: boolean
example: null
main:
description: Indicates whether locale is a main locale. Main locales are part of the [Verification System](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
type: boolean
example: null
rtl:
description: Indicates whether locale is a RTL (Right-to-Left) locale.
type: boolean
example: null
source_locale_id:
description: Source locale. Can be the name or id of the locale. Preferred is id.
type: string
example: abcd1234abcd1234abcd1234abcd1234
fallback_locale_id:
description: Fallback locale for empty translations. Can be a locale name or id.
type: string
example: abcd1234abcd1234abcd1234abcd1234
unverify_new_translations:
description: Indicates that new translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
type: boolean
example: null
unverify_updated_translations:
description: Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
type: boolean
example: null
autotranslate:
description: If set, translations for this locale will be fetched automatically, right after creation.
type: boolean
example: null
x-cli-version: '2.5'
/projects/{project_id}/locales/{id}:
get:
summary: Get a single locale
description: Get details on a single locale for a given project.
operationId: locale/show
tags:
- Locales
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/locale_id_as_id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/locale_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:id?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase locales show \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a locale
description: Update an existing locale.
operationId: locale/update
tags:
- Locales
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/locale_id_as_id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/locale_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"branch":"my-feature-branch","name":"de","code":"de-DE","source_locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase locales update \
--project_id \
--id \
--data '{"branch":"my-feature-branch", "name":"de", "code":"de-DE", "source_locale_id":"abcd1234abcd1234abcd1234abcd1234"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: locale/update/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
name:
description: Locale name
type: string
example: de
code:
description: Locale ISO code
type: string
example: de-DE
default:
description: Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.
type: boolean
example: null
main:
description: Indicates whether locale is a main locale. Main locales are part of the [Verification System](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
type: boolean
example: null
rtl:
description: Indicates whether locale is a RTL (Right-to-Left) locale.
type: boolean
example: null
source_locale_id:
description: Source locale. Can be the name or id of the locale. Preferred is id.
type: string
example: abcd1234abcd1234abcd1234abcd1234
fallback_locale_id:
description: Fallback locale for empty translations. Can be a locale name or id.
type: string
example: abcd1234abcd1234abcd1234abcd1234
unverify_new_translations:
description: Indicates that new translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
type: boolean
example: null
unverify_updated_translations:
description: Indicates that updated translations for this locale should be marked as unverified. Part of the [Advanced Workflows](https://support.phrase.com/hc/en-us/articles/5784094755484) feature.
type: boolean
example: null
autotranslate:
description: If set, translations for this locale will be fetched automatically, right after creation.
type: boolean
example: null
x-cli-version: '2.5'
delete:
summary: Delete a locale
description: Delete an existing locale.
operationId: locale/delete
tags:
- Locales
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/locale_id_as_id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase locales delete \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/locales/{id}/download:
get:
summary: Download a locale
description: Download a locale in a specific file format.
operationId: locale/download
tags:
- Locales
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/If-Modified-Since'
- $ref: '#/components/parameters/If-None-Match'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/locale_id_as_id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
- description: File format name. See the [format guide](https://support.phrase.com/hc/en-us/sections/6111343326364) for all supported file formats.
example: yml
name: file_format
in: query
schema:
type: string
- description: Limit results to keys tagged with a list of comma separated tag names.
example: feature1,feature2
name: tags
in: query
schema:
type: string
- description: Limit download to tagged keys. This parameter is deprecated. Please use the "tags" parameter instead
example: feature
deprecated: true
name: tag
in: query
schema:
type: string
- description: Indicates whether keys without translations should be included in the output as well.
example: null
name: include_empty_translations
in: query
schema:
type: boolean
- description: Indicates whether zero forms should be included when empty in pluralized keys.
example: null
name: exclude_empty_zero_forms
in: query
schema:
type: boolean
- description: Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
example: null
name: include_translated_keys
in: query
schema:
type: boolean
- description: Indicates whether [NOTRANSLATE] tags should be kept.
example: null
name: keep_notranslate_tags
in: query
schema:
type: boolean
- description: This option is obsolete. Projects that were created on or after Nov 29th 2019 or that did not contain emoji by then will not require this flag any longer since emoji are now supported natively.
example: null
deprecated: true
name: convert_emoji
in: query
schema:
type: boolean
- description: 'Additional formatting and render options. See the [format guide](https://support.phrase.com/hc/en-us/sections/6111343326364) for a list of options available for each format. Specify format options like this: `...&format_options[foo]=bar`'
example: null
name: format_options
in: query
schema:
type: object
properties: {}
style: deepObject
explode: true
- description: Enforces a specific encoding on the file contents. Valid options are "UTF-8", "UTF-16" and "ISO-8859-1".
example: null
name: encoding
in: query
schema:
type: string
- description: Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with `include_unverified_translations`.
example: null
deprecated: true
name: skip_unverified_translations
in: query
schema:
type: boolean
- description: if set to false unverified translations are excluded
example: null
name: include_unverified_translations
in: query
schema:
type: boolean
- description: If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
example: null
name: use_last_reviewed_version
in: query
schema:
type: boolean
- name: fallback_locale_id
description: |
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
Provide the ID of the locale that should be used as the fallback.
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
in: query
schema:
type: string
example: null
- name: use_locale_fallback
description: |
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id).
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
in: query
schema:
type: boolean
example: true
- description: Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
example: null
name: source_locale_id
in: query
schema:
type: string
- description: 'Download all translation keys, and remove the specified prefix where possible. Warning: this may create duplicate key names if other keys share the same name after the prefix is removed.'
example: prefix_
name: translation_key_prefix
in: query
schema:
type: string
- description: Only download translation keys containing the specified prefix, and remove the prefix from the generated file.
example: null
name: filter_by_prefix
in: query
schema:
type: boolean
- name: custom_metadata_filters
in: query
description: |
Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
schema:
type: object
properties: {}
style: deepObject
explode: true
- name: locale_ids
description: Locale IDs or locale names
in: query
schema:
type: array
items:
type: string
example:
- de
- en
- name: updated_since
description: |
Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`).
in: query
schema:
type: string
example: '2023-01-01T00:00:00Z'
responses:
'200':
description: OK
content:
'*':
schema:
type: string
format: binary
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:id/download?branch=my-feature-branch&file_format=yml&tags=feature1,feature2&tag=feature&custom_metadata_filters[tone]=friendly" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase locales download \
--project_id \
--id \
--branch my-feature-branch \
--file_format yml \
--tags feature1,feature2 \
--tag feature \
--access_token
x-cli-version: 2.6.4
/projects/{project_id}/locales/{locale_id}/downloads:
post:
summary: Initiate async download of a locale
description: Prepare a locale for download in a specific file format.
operationId: locale_download/create
tags:
- Locale Downloads
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/If-Modified-Since'
- $ref: '#/components/parameters/If-None-Match'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/locale_id'
requestBody:
required: true
content:
application/json:
schema:
type: object
title: locale_download/create/parameters
required:
- file_format
properties:
file_format:
description: File format name. See the [format guide](https://support.phrase.com/hc/en-us/sections/6111343326364) for all supported file formats.
type: string
example: yml
branch:
description: specify the branch to use
type: string
example: my-feature-branch
tags:
description: Limit results to keys tagged with a list of comma separated tag names.
type: string
example: feature1,feature2
include_empty_translations:
description: Indicates whether keys without translations should be included in the output as well.
example: true
type: boolean
exclude_empty_zero_forms:
description: Indicates whether zero forms should be included when empty in pluralized keys.
example: true
type: boolean
include_translated_keys:
description: Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.
example: true
type: boolean
keep_notranslate_tags:
description: Indicates whether [NOTRANSLATE] tags should be kept.
type: boolean
example: true
format_options:
description: |
Additional formatting and render options. See the [format guide](https://support.phrase.com/hc/en-us/sections/6111343326364)
for a list of options available for each format. Pass format options as a JSON object with key-value pairs corresponding
to the option name and value. For example, to include comments in a Gettext file, pass `{"include_comments": true}`.
example:
format_options:
foo: bar
type: object
properties: {}
encoding:
description: Enforces a specific encoding on the file contents. Valid options are "UTF-8", "UTF-16" and "ISO-8859-1".
example: UTF-8
type: string
include_unverified_translations:
description: if set to false unverified translations are excluded
example: true
type: boolean
use_last_reviewed_version:
description: If set to true the last reviewed version of a translation is used. This is only available if the review workflow is enabled for the project.
type: boolean
example: null
locale_ids:
description: Locale IDs or locale names
type: array
items:
type: string
example:
- de
- en
fallback_locale_id:
description: |
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
Provide the ID of the locale that should be used as the fallback.
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `use_locale_fallback`.
type: string
example: abcd1234abcd1234abcd1234abcd1234
use_locale_fallback:
description: |
If a key has no translation in the locale being downloaded, the translation in the fallback locale will be used.
Fallback locale is defined in [locale's settings](/en/api/strings/locales/update-a-locale#body-fallback-locale-id).
Requires `include_empty_translations` to be set to `true`. Mutually exclusive with `fallback_locale_id`.
type: boolean
example: false
source_locale_id:
description: Provides the source language of a corresponding job as the source language of the generated locale file. This parameter will be ignored unless used in combination with a `tag` parameter indicating a specific job.
example: abcd1234abcd1234abcd1234abcd1234
type: string
custom_metadata_filters:
description: |
Custom metadata filters. Provide the name of the metadata field and the value to filter by. Only keys with matching metadata will be included in the download.
type: object
properties: {}
updated_since:
description: |
Only include translations and keys that have been updated since the given date. The date must be in ISO 8601 format (e.g., `2023-01-01T00:00:00Z`).
type: string
example: '2023-01-01T00:00:00Z'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/locale_download'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch","file_format":"yml","tags":"feature1,feature","custom_metadata_filters":{"tone":"friendly"}}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase locale_downloads create \
--project_id \
--locale_id \
--branch my-feature-branch \
--file_format yml \
--tags feature1,feature2 \
--access_token
x-cli-version: 2.29.0
/projects/{project_id}/locales/{locale_id}/downloads/{id}:
get:
summary: Show status of an async locale download
description: Show status of already started async locale download. If the download is finished, the download link will be returned.
operationId: locale_download/show
tags:
- Locale Downloads
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/If-Modified-Since'
- $ref: '#/components/parameters/If-None-Match'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/locale_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/locale_download'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/locales/:locale_id/downloads/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase locale_downloads show \
--project_id \
--locale_id \
--id
--access_token
x-cli-version: 2.29.0
/accounts/{account_id}/distributions:
get:
summary: List distributions
description: List all distributions for the given account.
operationId: distributions/list
tags:
- Distributions
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/distribution_preview'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase distributions list \
--account_id \
--access_token
x-cli-version: '2.5'
post:
summary: Create a distribution
description: Create a new distribution.
operationId: distribution/create
tags:
- Distributions
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/distribution'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"name":"My Android Distribution","project_id":"abcd1234abcd1234abcd1234","platforms":["android","ios"],"locale_ids":["fff565db236400772368235db2c6117e,abcd1234cdef1234abcd1234cdef1234"],"format_options":"{xml:{enclose_in_cdata:'1'}}","fallback_to_non_regional_locale":true,"fallback_to_default_locale":true,"use_last_reviewed_version":true}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase distributions create \
--account_id \
--data '{"name": "My Android Distribution", "project_id":"abcd1234abcd1234abcd1234", "platforms": "android,ios", "locale_ids":["fff565db236400772368235db2c6117e,abcd1234cdef1234abcd1234cdef1234"], "format_options": "{xml:{enclose_in_cdata:'1'}}", "fallback_to_non_regional_locale":true, "fallback_to_default_locale":true, "use_last_reviewed_version":true}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: distribution/create/parameters
required:
- name
- project_id
properties:
name:
description: Name of the distribution
type: string
example: My Android Distribution
project_id:
description: Project id the distribution should be assigned to.
type: string
example: abcd1234abcd1234abcd1234
platforms:
description: |-
List of platforms the distribution should support.
Valid values are:
* `android`
* `ios`
* `flutter`
* `i18next`
* `rails`
type: array
items:
type: string
example:
- android
- ios
locale_ids:
description: List of locale ids that will be part of distribution releases
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
- fff565db236400772368235db2c6117e
format_options:
description: |
Additional formatting and render options. Only `enclose_in_cdata` is available for platform `android`.
type: object
additionalProperties:
type: string
example: '{xml:{enclose_in_cdata:''1''}}'
fallback_locales_enabled:
description: Use fallback locale if there is no translation in the current locale.
type: boolean
example: true
fallback_to_non_regional_locale:
description: Indicates whether to fallback to non regional locale when locale can not be found
type: boolean
example: true
fallback_to_default_locale:
description: Indicates whether to fallback to projects default locale when locale can not be found
type: boolean
example: true
use_last_reviewed_version:
description: Use last reviewed instead of latest translation in a project
type: boolean
example: true
x-cli-version: '2.5'
/accounts/{account_id}/distributions/{id}:
get:
summary: Get a single distribution
description: Get details on a single distribution.
operationId: distribution/show
tags:
- Distributions
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/distribution'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase distributions show \
--account_id \
--id \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a distribution
description: Update an existing distribution.
operationId: distribution/update
tags:
- Distributions
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/distribution'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"name":"My Android Distribution","project_id":"abcd1234abcd1234abcd1234","platforms":["android","ios"],"locale_ids":["fff565db236400772368235db2c6117e,abcd1234cdef1234abcd1234cdef1234"],"format_options":"{xml:{enclose_in_cdata:'1'}}","fallback_to_non_regional_locale":true,"fallback_to_default_locale":true,"use_last_reviewed_version":true}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase distributions update \
--account_id \
--id \
--data '{"name": "My Android Distribution", "project_id":"abcd1234abcd1234abcd1234", "platforms": "android,ios", "locale_ids": "fff565db236400772368235db2c6117e,abcd1234cdef1234abcd1234cdef1234", "format_options": "{xml:{enclose_in_cdata:'1'}}", "fallback_to_non_regional_locale":true, "fallback_to_default_locale":true, "use_last_reviewed_version":true}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: distribution/update/parameters
properties:
name:
description: Name of the distribution
type: string
example: My Android Distribution
project_id:
description: Project id the distribution should be assigned to.
type: string
example: abcd1234abcd1234abcd1234
platforms:
description: List of platforms the distribution should support.
type: array
items:
type: string
example:
- android
- ios
locale_ids:
description: List of locale ids that will be part of distribution releases
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
- fff565db236400772368235db2c6117e
format_options:
description: |
Additional formatting and render options. Only `enclose_in_cdata` is available for platform `android`.
type: object
additionalProperties:
type: string
example: '{xml:{enclose_in_cdata:''1''}}'
fallback_locales_enabled:
description: Use fallback locale if there is no translation in the current locale.
type: boolean
example: true
fallback_to_non_regional_locale:
description: Indicates whether to fallback to non regional locale when locale can not be found
type: boolean
example: true
fallback_to_default_locale:
description: Indicates whether to fallback to projects default locale when locale can not be found
type: boolean
example: true
use_last_reviewed_version:
description: Use last reviewed instead of latest translation in a project
type: boolean
example: true
x-cli-version: '2.5'
delete:
summary: Delete a distribution
description: Delete an existing distribution.
operationId: distribution/delete
tags:
- Distributions
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE
- lang: CLI v2
source: |-
phrase distributions delete \
--account_id \
--id \
--access_token
x-cli-version: '2.5'
/accounts/{account_id}/distributions/{distribution_id}/releases:
get:
summary: List releases
description: List all releases for the given distribution.
operationId: releases/list
tags:
- Releases
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/release_preview'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/releases" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase releases list \
--account_id \
--distribution_id \
--access_token
x-cli-version: '2.5'
post:
summary: Create a release
description: Create a new release.
operationId: release/create
tags:
- Releases
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/release'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/releases" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"description":"My first Release","platforms":["android","ios"],"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase releases create \
--account_id \
--distribution_id \
--data '{"description": "My first Release", "platforms": ["android", "ios"], "branch":"my-feature-branch"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: release/create/parameters
properties:
description:
description: Description of the release
type: string
example: My first Release
platforms:
description: List of platforms the release should support.
type: array
items:
type: string
example:
- android
- ios
locale_ids:
description: List of locale ids that will be included in the release. If empty, distribution locales will be used
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
- fff565db236400772368235db2c6117e
tags:
description: Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided
type: array
items:
type: string
example:
- android
- feature1
app_min_version:
description: Minimum version of the app that the release supports in semver format
type: string
example: 2.5.0
app_max_version:
description: Maximum version of the app that the release supports in semver format
type: string
example: 3.0.0
branch:
description: Branch used for release
type: string
example: my-feature-branch
x-cli-version: '2.8'
/accounts/{account_id}/distributions/{distribution_id}/releases/{id}:
get:
summary: Get a single release
description: Get details on a single release.
operationId: release/show
tags:
- Releases
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/release'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/releases/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase releases show \
--account_id \
--distribution_id \
--id \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a release
description: Update an existing release.
operationId: release/update
tags:
- Releases
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/release'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/releases/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"description":"My first Release","platforms":["android","ios"],"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase releases update \
--account_id \
--distribution_id \
--id \
--data '{"description": "My first Release", "platforms": "android,ios", "branch":"my-feature-branch"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: release/update/parameters
properties:
description:
description: Description of the release
type: string
example: My first Release
platforms:
description: List of platforms the release should support.
type: array
items:
type: string
example:
- android
- ios
app_min_version:
description: Minimum version of the app that the release supports in semver format
type: string
example: 2.5.0
app_max_version:
description: Maximum version of the app that the release supports in semver format
type: string
example: 3.0.0
branch:
description: Branch used for release
type: string
example: my-feature-branch
x-cli-version: '2.5'
delete:
summary: Delete a release
description: Delete an existing release.
operationId: release/delete
tags:
- Releases
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/releases/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE
- lang: CLI v2
source: |-
phrase releases delete \
--account_id \
--distribution_id \
--id \
--access_token
x-cli-version: '2.5'
/accounts/{account_id}/distributions/{distribution_id}/releases/{id}/publish:
post:
summary: Publish a release
description: Publish a release for production.
operationId: release/publish
tags:
- Releases
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/release'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/releases/:id/publish" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST
- lang: CLI v2
source: |-
phrase releases publish \
--account_id \
--distribution_id \
--id \
--access_token
x-cli-version: '2.5'
/accounts/{account_id}/distributions/{distribution_id}/release_triggers:
get:
summary: List release triggers
description: |
List all release triggers for the given distribution.
Note: Currently only one release trigger can exist per distribution.
operationId: release_triggers/list
tags:
- Release Triggers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/release_trigger'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/release_triggers" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase release_triggers list \
--account_id \
--distribution_id \
--access_token
x-cli-version: '2.28'
post:
summary: Create a release trigger
description: Create a new recurring release. New releases will be published automatically, based on the cron schedule provided. Currently, only one release trigger can exist per distribution.
operationId: release_triggers/create
tags:
- Release Triggers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
requestBody:
required: true
content:
application/json:
schema:
type: object
title: release/create/parameters
properties:
cron_schedule:
description: Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron
type: string
example: 15 18 * * 1,3
time_zone:
description: Time zone for the scheduler
type: string
example: Europe/Berlin
locale_ids:
description: List of locale ids that will be included in the release.
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
- fff565db236400772368235db2c6117e
tags:
description: Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided
type: array
items:
type: string
example:
- android
- feature1
branch:
description: Branch used for release
type: string
example: my-feature-branch
app_min_version:
description: The created releases will be available only for apps with version greater or equal to this value
type: string
example: 1.0.0
app_max_version:
description: The created releases will be available only for apps with version less or equal to this value
type: string
example: 2.0.0
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/release_trigger'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/release_triggers" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"cron_schedule":"15 18 * * 1,3","time_zone":"Europe/Berlin","locale_ids":["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"],"tags":["android","feature1"],"branch":"my-feature-branch","app_min_version":"1.0.0","app_max_version":"2.0.0"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase release_triggers create \
--account_id \
--distribution_id \
--data '{"cron_schedule":"15 18 * * 1,3","time_zone":"Europe/Berlin","locale_ids":["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"],"tags":["android","feature1"],"branch":"my-feature-branch","app_min_version":"1.0.0","app_max_version":"2.0.0"}' \
--access_token
x-cli-version: '2.28'
/accounts/{account_id}/distributions/{distribution_id}/release_triggers/{id}:
get:
summary: Get a single release trigger
description: Get details of a single release trigger.
operationId: release_triggers/show
tags:
- Release Triggers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/release_trigger'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/release_triggers/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase release_triggers show \
--account_id \
--distribution_id \
--id \
--access_token
x-cli-version: '2.28'
patch:
summary: Update a release trigger
description: Update a recurring release.
operationId: release_triggers/update
tags:
- Release Triggers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/id'
requestBody:
required: true
content:
application/json:
schema:
type: object
title: release/update/parameters
properties:
cron_schedule:
description: Cron schedule for the scheduler. Read more about the format of this field at https://en.wikipedia.org/wiki/Cron
type: string
example: 15 18 * * 1,3
time_zone:
description: Time zone for the scheduler
type: string
example: Europe/Berlin
locale_ids:
description: List of locale ids that will be included in the release.
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
- fff565db236400772368235db2c6117e
tags:
description: Only include tagged keys in the release. For a key to be included it must be tagged with all tags provided
type: array
items:
type: string
example:
- android
- feature1
branch:
description: Branch used for release
type: string
example: my-feature-branch
app_min_version:
description: The created releases will be available only for apps with version greater or equal to this value
type: string
example: 1.0.0
app_max_version:
description: The created releases will be available only for apps with version less or equal to this value
type: string
example: 2.0.0
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/release_trigger'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/release_triggers/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"cron_schedule":"15 18 * * 1,3","time_zone":"Europe/Berlin","locale_ids":["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"],"tags":["android","feature1"],"branch":"my-feature-branch","app_min_version":"1.0.0","app_max_version":"2.0.0"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase release_triggers update \
--account_id \
--distribution_id \
--id \
--data '{"cron_schedule":"15 18 * * 1,3","time_zone":"Europe/Berlin","locale_ids":["abcd1234cdef1234abcd1234cdef1234","fff565db236400772368235db2c6117e"],"tags":["android","feature1"],"branch":"my-feature-branch","app_min_version":"1.0.0","app_max_version":"2.0.0"}' \
--access_token
x-cli-version: '2.28'
delete:
summary: Delete a single release trigger
description: Delete a single release trigger.
operationId: release_triggers/destroy
tags:
- Release Triggers
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/distribution_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/distributions/:distribution_id/release_triggers/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE
- lang: CLI v2
source: |-
phrase release_triggers delete \
--account_id \
--distribution_id \
--id \
--access_token
x-cli-version: '2.28'
/projects/{project_id}/jobs:
get:
summary: List jobs
description: List all jobs for the given project.
operationId: jobs/list
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/branch'
- $ref: '#/components/parameters/job_owner'
- $ref: '#/components/parameters/job_assignee'
- $ref: '#/components/parameters/job_state'
- $ref: '#/components/parameters/job_updated_since'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/job'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs?branch=my-feature-branch&owned_by=abcd1234cdef1234abcd1234cdef1234&assigned_to=abcd1234cdef1234abcd1234cdef1234&state=completed" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase jobs list \
--project_id \
--branch my-feature-branch \
--owned_by abcd1234cdef1234abcd1234cdef1234 \
--assigned_to abcd1234cdef1234abcd1234cdef1234 \
--state completed \
--access_token
x-cli-version: '2.5'
post:
summary: Create a job
description: Create a new job.
operationId: job/create
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/job_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch","name":"de","briefing":"de-DE","due_date":"2017-08-15","ticket_url":"https://example.atlassian.net/browse/FOO","tags":["myUploadTag"],"translation_key_ids":["abcd1234cdef1234abcd1234cdef1234"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs create \
--project_id \
--data '{"branch":"my-feature-branch", "name":"de", "briefing":"de-DE", "due_date":"2017-08-15", "ticket_url":"https://example.atlassian.net/browse/FOO", "tags": ["myUploadTag"], "translation_key_ids": ["abcd1234cdef1234abcd1234cdef1234"]}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/create/parameters
required:
- name
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
name:
description: Job name
type: string
example: de
source_locale_id:
description: The API id of the source language
type: string
example: abcd1234cdef1234abcd1234cdef1234
briefing:
description: Briefing for the translators
type: string
example: de-DE
due_date:
description: Date the job should be finished
type: string
format: date-time
example: '2017-08-15'
nullable: true
ticket_url:
description: URL to a ticket for this job (e.g. Jira, Trello)
type: string
example: https://example.atlassian.net/browse/FOO
tags:
description: tags of keys that should be included within the job
type: array
items:
type: string
example:
- myUploadTag
translation_key_ids:
description: ids of keys that should be included within the job
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
target_locale_ids:
description: List of target locales for the job. Mutually exclusive with `job_template_id`.
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
job_template_id:
description: id of a job template you would like to model the created job after. Any manually added parameters will take preference over template attributes. Mutually exclusive with `target_locale_ids`.
type: string
example: abcd1234cdef1234abcd1234cdef1234
autotranslate:
description: Automatically translate the job using machine translation.
type: boolean
example: true
x-cli-version: '2.5'
/accounts/{account_id}/jobs:
get:
summary: List account jobs
description: List all jobs for the given account.
operationId: jobs/by_account
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- $ref: '#/components/parameters/job_owner'
- $ref: '#/components/parameters/job_assignee'
- $ref: '#/components/parameters/job_state'
- $ref: '#/components/parameters/job_updated_since'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/job'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/jobs?owned_by=abcd1234cdef1234abcd1234cdef1234&assigned_to=abcd1234cdef1234abcd1234cdef1234&state=completed" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase jobs by_account \
--account_id \
--owned_by abcd1234cdef1234abcd1234cdef1234 \
--assigned_to abcd1234cdef1234abcd1234cdef1234 \
--state completed \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/jobs/{id}:
get:
summary: Get a single job
description: Get details on a single job for a given project.
operationId: job/show
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- $ref: '#/components/parameters/branch'
- $ref: '#/components/parameters/include_annotations'
- $ref: '#/components/parameters/omit_translation_keys'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase jobs show \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a job
description: Update an existing job.
operationId: job/update
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"branch":"my-feature-branch","name":"de","briefing":"de-DE","due_date":"2017-08-15","ticket_url":"https://example.atlassian.net/browse/FOO"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs update \
--project_id \
--id \
--data '{"branch":"my-feature-branch", "name":"de", "briefing":"de-DE", "due_date":"2017-08-15", "ticket_url":"https://example.atlassian.net/browse/FOO"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/update/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
name:
description: Job name
type: string
example: de
briefing:
description: Briefing for the translators
type: string
example: de-DE
due_date:
description: Date the job should be finished
type: string
format: date-time
example: '2017-08-15'
nullable: true
ticket_url:
description: URL to a ticket for this job (e.g. Jira, Trello)
type: string
example: https://example.atlassian.net/browse/FOO
target_locale_ids:
description: List of target locales for the job.
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
autotranslate:
description: Automatically translate the job using machine translation
type: boolean
example: true
x-cli-version: '2.5'
delete:
summary: Delete a job
description: Delete an existing job.
operationId: job/delete
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs delete \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/jobs/{id}/start:
post:
summary: Start a job
description: Starts an existing job in state draft.
operationId: job/start
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/start" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs start \
--project_id \
--id \
--data '{"branch":"my-feature-branch"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/start/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
x-cli-version: '2.5'
/projects/{project_id}/jobs/{id}/complete:
post:
summary: Complete a job
description: Mark a job as completed.
operationId: job/complete
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/complete" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs complete \
--project_id \
--id \
--data '{"branch":"my-feature-branch"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/complete/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
x-cli-version: '2.5'
/projects/{project_id}/jobs/{id}/reopen:
post:
summary: Reopen a job
description: Mark a job as uncompleted.
operationId: job/reopen
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/reopen" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs reopen \
--project_id \
--id \
--data '{"branch":"my-feature-branch"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/reopen/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
x-cli-version: '2.5'
/projects/{project_id}/jobs/{id}/lock:
post:
summary: Lock a job
description: If you are the job owner, you may lock a job using this API request.
operationId: job/lock
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/lock" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch"' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs lock \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/jobs/{id}/unlock:
post:
summary: Unlock a job
description: If you are the job owner, you may unlock a locked job using this API request.
operationId: job/unlock
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/unlock" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch"' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs unlock \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
/projects/{project_id}/jobs/{id}/keys:
post:
summary: Add keys to job
description: Add multiple keys to a existing job.
operationId: job/keys/create
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/keys" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch","translation_key_ids":["abcd1234cdef1234abcd1234cdef1234"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs keys_create \
--project_id \
--id \
--data '{"branch":"my-feature-branch", "translation_key_ids": "abcd1234cdef1234abcd1234cdef1234"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/keys/create/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
translation_key_ids:
description: ids of keys that should added to the job
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
x-cli-version: '2.5'
delete:
summary: Remove keys from job
description: Remove multiple keys from existing job.
operationId: job/keys/delete
tags:
- Jobs
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/jobs/:id/keys" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-d '{"branch":"my-feature-branch","translation_key_ids":["abcd1234cdef1234abcd1234cdef1234"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase jobs keys_delete \
--project_id \
--id \
--branch my-feature-branch \
--data '{"branch": "my-feature-branch", "translation_key_ids": ["abcd1234cdef1234abcd1234cdef1234"]}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job/keys/delete/parameters
required:
- translation_key_ids
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
translation_key_ids:
description: ids of keys that should be deleted from the job
type: array
items:
type: string
example:
- abcd1234cdef1234abcd1234cdef1234
/projects/{project_id}/job_templates:
get:
summary: List job templates
description: List all job templates for the given project.
operationId: job_templates/list
tags:
- Job Templates
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/job_template'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/job_templates?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase job_templates list \
--project_id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
post:
summary: Create a job template
description: Create a new job template.
operationId: job_template/create
tags:
- Job Templates
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/job_template_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/job_templates" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch","name":"template","briefing":"text"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase job_templates create \
--project_id \
--data '{"branch":"my-feature-branch", "name":"template", "briefing":"text"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job_template/create/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
name:
description: Job template name
type: string
example: template
briefing:
description: Briefing for the translators
type: string
example: text
autotranslate:
description: Automatically translate the job using machine translation.
type: boolean
example: true
source_locale_id:
description: The API id of the source language. This locale will be set as source locale for the job template. If not provided, the project default locale will be used.
type: string
example: abcd1234cdef1234abcd1234cdef1234
required:
- name
x-cli-version: '2.5'
/projects/{project_id}/job_templates/{id}:
get:
summary: Get a single job template
description: Get details on a single job template for a given project.
operationId: job_templates/show
tags:
- Job Templates
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_template_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/job_templates/:id?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase job_templates show \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a job template
description: Update an existing job template.
operationId: job_template/update
tags:
- Job Templates
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/job_template_details'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/job_templates/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"branch":"my-feature-branch","name":"template","briefing":"text"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase job_templates update \
--project_id \
--id \
--data '{"branch":"my-feature-branch", "name":"template", "briefing":"text"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: job_template/update/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
name:
description: Job template name
type: string
example: template
briefing:
description: Briefing for the translators
type: string
example: text
autotranslate:
description: Automatically translate the job using machine translation.
type: boolean
example: true
source_locale_id:
description: The API id of the source language. This locale will be set as source locale for the job template. If not provided, the project default locale will be used.
type: string
example: abcd1234cdef1234abcd1234cdef1234
required:
- name
x-cli-version: '2.5'
delete:
summary: Delete a job template
description: Delete an existing job template.
operationId: job_template/delete
tags:
- Job Templates
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/job_templates/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase job_templates delete \
--project_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
/accounts/{account_id}/glossaries:
get:
summary: List term bases
description: 'List all term bases (previously: glossaries) the current user has access to.'
operationId: glossaries/list
tags:
- Glossaries
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/glossary'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/glossaries" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase glossaries list \
--account_id \
--access_token
x-cli-version: '2.5'
post:
summary: Create a term base
description: 'Create a new term base (previously: glossary).'
operationId: glossary/create
tags:
- Glossaries
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/glossary'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/glossaries" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"name":"My term base","project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235","space_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase glossaries create \
--account_id \
--data '{"name":"My term base", "project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235", "space_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: glossary/create/parameters
required:
- name
properties:
name:
description: Name of the glossary
type: string
example: My glossary
project_ids:
description: List of project ids the glossary should be assigned to.
type: string
example: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235
space_ids:
description: List of space ids the glossary should be assigned to.
type: array
items:
type: string
example:
- abcd1234abcd1234abcd1234
- abcd1234abcd1234abcd1235
x-cli-version: '2.5'
/accounts/{account_id}/glossaries/{id}:
get:
summary: Get a single term base
description: 'Get details on a single term base (previously: glossary).'
operationId: glossary/show
tags:
- Glossaries
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/glossary'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/glossaries/:id" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase glossaries show \
--account_id \
--id \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a term base
description: 'Update an existing term base (previously: glossary).'
operationId: glossary/update
tags:
- Glossaries
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/glossary'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/glossaries/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"name":"My glossary","project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235","space_ids":["abcd1234abcd1234abcd1234","abcd1234abcd1234abcd1235"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase glossaries update \
--account_id \
--id \
--data '{"name": "My glossary", "project_ids":"abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235", "space_ids": "abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235"}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: glossary/update/parameters
properties:
name:
description: Name of the glossary
type: string
example: My glossary
project_ids:
description: List of project ids the glossary should be assigned to.
type: string
example: abcd1234abcd1234abcd1234,abcd1234abcd1234abcd1235
space_ids:
description: List of space ids the glossary should be assigned to.
type: array
items:
type: string
example:
- abcd1234abcd1234abcd1234
- abcd1234abcd1234abcd1235
x-cli-version: '2.5'
delete:
summary: Delete a term base
description: 'Delete an existing term base (previously: glossary).'
operationId: glossary/delete
tags:
- Glossaries
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/account_id'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/accounts/:account_id/glossaries/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE
- lang: CLI v2
source: |-
phrase glossaries delete \
--account_id \
--id \
--access_token
x-cli-version: '2.5'
/authorizations:
get:
summary: List authorizations
description: List all your authorizations.
operationId: authorizations/list
tags:
- Authorizations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/authorization'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/authorizations" \
-u USERNAME
- lang: CLI v2
source: phrase authorizations list
x-cli-version: '2.5'
post:
summary: Create an authorization
description: Create a new authorization.
operationId: authorization/create
tags:
- Authorizations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/authorization_with_token'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/authorizations" \
-u USERNAME \
-X POST \
-d '{"note":"My Deploy Script","scopes":["read","write"],"expires_at":"2015-03-30T09:52:53Z"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase authorizations create \
--data '{"note": "My Deploy Script", "scopes": "read,write", "expires_at": "2015-03-30T09:52:53Z"}'
requestBody:
required: true
content:
application/json:
schema:
type: object
title: authorization/create/parameters
required:
- note
properties:
note:
description: A note to help you remember what the access is used for.
type: string
example: My Deploy Script
scopes:
description: A list of scopes that the access can be used for.
type: array
items:
type: string
example:
- read
- write
expires_at:
description: Expiration date for the authorization token. Null means no expiration date (default).
type: string
format: date-time
example: '2015-03-30T09:52:53Z'
x-cli-version: '2.5'
/authorizations/{id}:
get:
summary: Get a single authorization
description: Get details on a single authorization.
operationId: authorization/show
tags:
- Authorizations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/authorization'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/authorizations/:id" \
-u USERNAME
- lang: CLI v2
source: |-
phrase authorizations show \
--id
x-cli-version: '2.5'
patch:
summary: Update an authorization
description: Update an existing authorization.
operationId: authorization/update
tags:
- Authorizations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/authorization'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/authorizations/:id" \
-u USERNAME \
-X PATCH \
-d '{"note":"My Deploy Script","scopes":["read","write"],"expires_at":"2015-03-30T09:52:53Z"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase authorizations update \
--id \
--data '{"note": "My Deploy Script", "scopes": "read,write", "expires_at": "2015-03-30T09:52:53Z"}'
requestBody:
required: true
content:
application/json:
schema:
type: object
title: authorization/update/parameters
properties:
note:
description: A note to help you remember what the access is used for.
type: string
example: My Deploy Script
scopes:
description: A list of scopes that the access can be used for.
type: array
items:
type: string
example:
- read
- write
expires_at:
description: Expiration date for the authorization token. Null means no expiration date (default).
type: string
format: date-time
example: '2015-03-30T09:52:53Z'
x-cli-version: '2.5'
delete:
summary: Delete an authorization
description: Delete an existing authorization. API calls using that token will stop working.
operationId: authorization/delete
tags:
- Authorizations
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/id'
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/authorizations/:id" \
-u USERNAME \
-X DELETE
- lang: CLI v2
source: |-
phrase authorizations delete \
--id
x-cli-version: '2.5'
/projects/{project_id}/keys/{key_id}/comments:
get:
summary: List comments
description: List all comments for a key.
operationId: comments/list
tags:
- Comments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/key_id'
- $ref: '#/components/parameters/page'
- $ref: '#/components/parameters/per_page'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
- description: Search query for comment messages
example: Some comment content
name: query
in: query
schema:
type: string
- description: Search comments by their assigned locales
example:
- someId
name: locale_ids
in: query
schema:
type: array
items:
type: string
- description: Specify the filter for the comments
name: filters
in: query
schema:
type: array
example:
- read
- unread
items:
type: string
- description: 'Order direction. Can be one of: asc, desc.'
name: order
in: query
example: desc
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/comment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
Link:
$ref: '#/components/headers/Link'
Pagination:
$ref: '#/components/headers/Pagination'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments?branch=my-feature-branch&filters=unread&query=something&locale_ids=someId&order=desc" \
-u USERNAME_OR_ACCESS_TOKEN \
-X GET \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase comments list \
--project_id \
--key_id \
--branch "my-feature-branch" \
--filters unread \
--order desc \
--query "Some comment content" \
--locale_ids someId \
--access_token
x-cli-version: '2.5'
post:
summary: Create a comment
description: Create a new comment for a key.
operationId: comment/create
tags:
- Comments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/key_id'
responses:
'201':
description: Created
content:
application/json:
schema:
$ref: '#/components/schemas/comment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments" \
-u USERNAME_OR_ACCESS_TOKEN \
-X POST \
-d '{"branch":"my-feature-branch", "message":"Some message...", "locale_ids": ["someId"]}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase comments create \
--project_id \
--key_id \
--data '{"branch":"my-feature-branch", "message": "Some message...", "locale_ids": ["someId"]}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: comment/create/parameters
required:
- message
properties:
message:
description: Comment message
type: string
example: Some message...
branch:
description: specify the branch to use
type: string
example: my-feature-branch
locale_ids:
description: specify the locales for the comment
type: array
items:
type: string
example:
- someId
- someOtherId
x-cli-version: '2.5'
/projects/{project_id}/keys/{key_id}/comments/{id}:
get:
summary: Get a single comment
description: Get details on a single comment.
operationId: comment/show
tags:
- Comments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/key_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/comment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id?branch=my-feature-branch" \
-u USERNAME_OR_ACCESS_TOKEN
- lang: CLI v2
source: |-
phrase comments show \
--project_id \
--key_id \
--id \
--branch my-feature-branch \
--access_token
x-cli-version: '2.5'
patch:
summary: Update a comment
description: Update an existing comment.
operationId: comment/update
tags:
- Comments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/key_id'
- $ref: '#/components/parameters/id'
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/comment'
headers:
X-Rate-Limit-Limit:
$ref: '#/components/headers/X-Rate-Limit-Limit'
X-Rate-Limit-Remaining:
$ref: '#/components/headers/X-Rate-Limit-Remaining'
X-Rate-Limit-Reset:
$ref: '#/components/headers/X-Rate-Limit-Reset'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X PATCH \
-d '{"branch":"my-feature-branch","message":"Some message..."}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase comments update \
--project_id \
--key_id \
--id \
--data '{"branch":"my-feature-branch", "message": "Some message..."}' \
--access_token
requestBody:
required: true
content:
application/json:
schema:
type: object
title: comment/update/parameters
properties:
branch:
description: specify the branch to use
type: string
example: my-feature-branch
message:
description: Comment message
type: string
example: Some message...
x-cli-version: '2.5'
delete:
summary: Delete a comment
description: Delete an existing comment.
operationId: comment/delete
tags:
- Comments
parameters:
- $ref: '#/components/parameters/X-PhraseApp-OTP'
- $ref: '#/components/parameters/project_id'
- $ref: '#/components/parameters/key_id'
- $ref: '#/components/parameters/id'
- description: specify the branch to use
example: my-feature-branch
name: branch
in: query
schema:
type: string
responses:
'204':
$ref: '#/components/responses/204'
'400':
$ref: '#/components/responses/400'
'404':
$ref: '#/components/responses/404'
'429':
$ref: '#/components/responses/429'
x-code-samples:
- lang: Curl
source: |-
curl "https://api.phrase.com/v2/projects/:project_id/keys/:key_id/comments/:id" \
-u USERNAME_OR_ACCESS_TOKEN \
-X DELETE \
-d '{"branch":"my-feature-branch"}' \
-H 'Content-Type: application/json'
- lang: CLI v2
source: |-
phrase comments delete \
--project_id \
--key_id \
--id \
--branch my-feature-branch \
--access_token