Skip to content

feat(API): add machine translation settings and locale provider mapping endpoints #STRINGS-2977 - #1252

Open
Phrase (phrase-bot) wants to merge 2 commits into
mainfrom
openapi-sync/strings-app-pr-18571
Open

feat(API): add machine translation settings and locale provider mapping endpoints #STRINGS-2977#1252
Phrase (phrase-bot) wants to merge 2 commits into
mainfrom
openapi-sync/strings-app-pr-18571

Conversation

@phrase-bot

Copy link
Copy Markdown
Collaborator

This PR was generated by the openapi-apply agent in response to a
/openapi-sync apply request on
Phrase-Engineering/strings-app#18571.

What changed in the API

  • GET /api/v2/accounts/{account_id}/machine_translation_settings — new endpoint that returns the account's default MT service, current MTU usage (used/total), and all locale-specific provider overrides.
  • PATCH /api/v2/accounts/{account_id}/machine_translation_settings — new endpoint that sets the account's default MT service (default_service).
  • POST /api/v2/accounts/{account_id}/machine_translation_locale_provider_mappings — new endpoint that creates a locale-pair-specific provider override (source_locale_code, target_locale_code, service); rejects duplicates for the same locale pair.
  • DELETE /api/v2/accounts/{account_id}/machine_translation_locale_provider_mappings — new collection-level delete endpoint that removes a mapping identified by source_locale_code + target_locale_code query parameters (no ID in the path).

Source

  • Originating strings-app PR: Phrase-Engineering/strings-app#18571
  • Applied by: jablan

Opened automatically by the openapi-apply agent. Review the spec changes
against the linked strings-app PR; the agent does not vouch for correctness
beyond "the YAML parsed and the documented layout was followed."

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

API changelog (oasdiff)

Doc-only edits (descriptions, examples) do not appear here.

4 changes: 0 error, 0 warning, 4 info
info	[endpoint-added] at doc/compiled.json
	in API DELETE /accounts/{account_id}/machine_translation_locale_provider_mappings
		endpoint added

info	[endpoint-added] at doc/compiled.json
	in API POST /accounts/{account_id}/machine_translation_locale_provider_mappings
		endpoint added

info	[endpoint-added] at doc/compiled.json
	in API GET /accounts/{account_id}/machine_translation_settings
		endpoint added

info	[endpoint-added] at doc/compiled.json
	in API PATCH /accounts/{account_id}/machine_translation_settings
		endpoint added

application/x-www-form-urlencoded bodies duplicated the application/json
schema without a title, which made openapi-generator emit ambiguous
"...Request1" model names inconsistently between the Java and TypeScript
generators, breaking both builds. Match the repo convention of a single
application/json body with an explicit title.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants