Skip to content

Commit 4166602

Browse files
Daniel Jonesclaude
andcommitted
docs(v3-languages): apply GA breaking changes (May 5 2026)
Applies all 5 planned changes shipping at GA: - Rename `product` → `resource` (query param + /products → /resources endpoint) - Replace `features` array with object (keys = feature names, values = {status}) - Add `status` field to language objects (stable/beta/early_access) - Add `include` query param (beta, external) - Rename `custom_instructions` feature → `style_rules` Updates changelog, overview, use-cases, migration guide, nav group name. openapi.json is regenerated by CI. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d913a2b commit 4166602

7 files changed

Lines changed: 286 additions & 246 deletions

api-reference/languages/language-feature-use-cases.mdx

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ description: "Pseudocode examples for common language and feature lookup pattern
55
---
66

77
This page shows how to use the `/v3/languages` endpoints for common integration tasks. Examples are written
8-
as pseudocode and are product-agnostic unless otherwise noted.
8+
as pseudocode and are resource-agnostic unless otherwise noted.
99

1010
For background on how features and feature dependency types work, see the
1111
[overview](/api-reference/languages/retrieve-supported-languages-by-product).
@@ -14,11 +14,11 @@ For background on how features and feature dependency types work, see the
1414

1515
## Populate source and target language dropdowns
1616

17-
A single call to `GET /v3/languages` returns all languages for a product. Filter by `usable_as_source` and
17+
A single call to `GET /v3/languages` returns all languages for a resource. Filter by `usable_as_source` and
1818
`usable_as_target` to populate each dropdown separately.
1919

2020
```
21-
GET /v3/languages?product=translate_text
21+
GET /v3/languages?resource=translate_text
2222
2323
languages = response
2424
@@ -34,15 +34,15 @@ render target_dropdown(target_options)
3434
## Show formality options only when supported
3535

3636
`formality` only needs to be supported by the target language. Check the selected target language's `features`
37-
array — no need to look at the source language.
37+
object — no need to look at the source language.
3838

3939
```
40-
GET /v3/languages?product=translate_text
40+
GET /v3/languages?resource=translate_text
4141
4242
languages = response
4343
target = languages.find(l => l.lang == selected_target_lang)
4444
45-
if target.features.includes("formality"):
45+
if "formality" in target.features:
4646
show formality_selector // e.g. ["default", "more", "less"]
4747
else:
4848
hide formality_selector
@@ -55,15 +55,15 @@ else:
5555
`glossary` must be supported by both languages.
5656

5757
```
58-
GET /v3/languages?product=translate_text
58+
GET /v3/languages?resource=translate_text
5959
6060
languages = response
6161
6262
source = languages.find(l => l.lang == source_lang)
6363
target = languages.find(l => l.lang == target_lang)
6464
65-
glossary_allowed = source.features.includes("glossary")
66-
and target.features.includes("glossary")
65+
glossary_allowed = "glossary" in source.features
66+
and "glossary" in target.features
6767
```
6868

6969
---
@@ -73,34 +73,34 @@ glossary_allowed = source.features.includes("glossary")
7373
Filter to targets where both the source and target support the `glossary` feature.
7474

7575
```
76-
GET /v3/languages?product=translate_text
76+
GET /v3/languages?resource=translate_text
7777
7878
languages = response
7979
source_lang = "en"
8080
8181
source = languages.find(l => l.lang == source_lang)
8282
83-
if not source.features.includes("glossary"):
83+
if "glossary" not in source.features:
8484
return [] // source doesn't support glossary at all
8585
8686
targets_with_glossary = languages
8787
.filter(l => l.usable_as_target)
88-
.filter(l => l.features.includes("glossary"))
88+
.filter(l => "glossary" in l.features)
8989
```
9090

9191
---
9292

93-
## Show writing style options for the Write product
93+
## Show writing style options for the Write resource
9494

95-
`writing_style` is a target-only feature on the `write` product. Check the target language's `features` array.
95+
`writing_style` is a target-only feature on the `write` resource. Check the target language's `features` object.
9696

9797
```
98-
GET /v3/languages?product=write
98+
GET /v3/languages?resource=write
9999
100100
languages = response
101101
target = languages.find(l => l.lang == selected_target_lang)
102102
103-
if target.features.includes("writing_style"):
103+
if "writing_style" in target.features:
104104
show writing_style_selector
105105
else:
106106
hide writing_style_selector
@@ -110,12 +110,12 @@ else:
110110

111111
## Check if style rules are available for a target language
112112

113-
Use `product=style_rules` to query which languages support style rules. Style rules are target-language only — check
114-
that the target language is listed in the response. The `style_rules` product has no additional features, so only
113+
Use `resource=style_rules` to query which languages support style rules. Style rules are target-language only — check
114+
that the target language is listed in the response. The `style_rules` resource has no additional features, so only
115115
the language availability needs to be checked.
116116

117117
```
118-
GET /v3/languages?product=style_rules
118+
GET /v3/languages?resource=style_rules
119119
120120
languages = response
121121
target = languages.find(l => l.lang == selected_target_lang)
@@ -130,25 +130,24 @@ else:
130130

131131
## Determine feature support programmatically
132132

133-
Use `/v3/languages/products` to drive feature checks at runtime — without hardcoding which features need
133+
Use `/v3/languages/resources` to drive feature checks at runtime — without hardcoding which features need
134134
target-only or both-language support into your client.
135135

136136
```
137-
GET /v3/languages/products
138-
GET /v3/languages?product=translate_text
137+
GET /v3/languages/resources
138+
GET /v3/languages?resource=translate_text
139139
140-
products = first response
140+
resources = first response
141141
languages = second response
142142
143-
product = products.find(p => p.name == "translate_text")
143+
resource = resources.find(r => r.name == "translate_text")
144144
source = languages.find(l => l.lang == source_lang)
145145
target = languages.find(l => l.lang == target_lang)
146146
147-
for feature in product.features:
147+
for feature in resource.features:
148148
supported = true
149-
if feature.needs_source_support and not source.features.includes(feature.name):
149+
if feature.needs_source_support and feature.name not in source.features:
150150
supported = false
151-
if feature.needs_target_support and not target.features.includes(feature.name):
151+
if feature.needs_target_support and feature.name not in target.features:
152152
supported = false
153153
```
154-

api-reference/languages/migrate-from-v2-languages.mdx

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ GET /v2/languages?type=source
2020
GET /v2/languages?type=target
2121
```
2222

23-
v3 uses a single endpoint that returns all languages for a product, with each language indicating whether it is
23+
v3 uses a single endpoint that returns all languages for a resource, with each language indicating whether it is
2424
usable as a source, a target, or both:
2525

2626
```
27-
GET /v3/languages?product=translate_text
27+
GET /v3/languages?resource=translate_text
2828
```
2929

30-
### New product identifiers
30+
### New resource identifiers
3131

32-
v2 languages are implicitly tied to text and document translation. v3 introduces an explicit `product` parameter that applies across all DeepL API products:
32+
v2 languages are implicitly tied to text and document translation. v3 introduces an explicit `resource` parameter that applies across all DeepL API resources:
3333

34-
| v2 | v3 `product` value |
34+
| v2 | v3 `resource` value |
3535
|---|---|
3636
| *(implicit, text/document translation only)* | `translate_text` |
3737
| *(implicit, text/document translation only)* | `translate_document` |
@@ -43,16 +43,16 @@ The v3 endpoints replace both `/v2/languages` and `/v2/glossary-language-pairs`.
4343

4444
### Features instead of `supports_formality`
4545

46-
v2 target languages include a boolean `supports_formality` field. v3 replaces this with a `features` array that covers additional capabilities per product:
46+
v2 target languages include a boolean `supports_formality` field. v3 replaces this with a `features` object that covers additional capabilities per resource:
4747

4848
| v2 field | v3 equivalent |
4949
|---|---|
50-
| `"supports_formality": true` | `"features": ["formality"]` on the language object |
50+
| `"supports_formality": true` | `"formality"` key present in the language's `features` object |
5151

5252
For example, querying languages for text translation:
5353

5454
```sh
55-
curl -X GET 'https://api.deepl.com/v3/languages?product=translate_text' \
55+
curl -X GET 'https://api.deepl.com/v3/languages?resource=translate_text' \
5656
--header 'Authorization: DeepL-Auth-Key [yourAuthKey]'
5757
```
5858

@@ -63,29 +63,39 @@ curl -X GET 'https://api.deepl.com/v3/languages?product=translate_text' \
6363
"name": "German",
6464
"usable_as_source": true,
6565
"usable_as_target": true,
66-
"features": ["formality", "tag_handling", "glossary"]
66+
"status": "stable",
67+
"features": {
68+
"formality": {"status": "stable"},
69+
"tag_handling": {"status": "stable"},
70+
"glossary": {"status": "stable"}
71+
}
6772
},
6873
{
6974
"lang": "en-US",
7075
"name": "English (American)",
7176
"usable_as_source": false,
7277
"usable_as_target": true,
73-
"features": ["tag_handling", "glossary"]
78+
"status": "stable",
79+
"features": {
80+
"tag_handling": {"status": "stable"},
81+
"glossary": {"status": "stable"}
82+
}
7483
}
7584
]
7685
```
7786

78-
The response indicates German supports `formality`, but English (American) does not.
87+
The response indicates German supports `formality` (key present in `features`), but English (American) does not (key absent).
7988

80-
See the [overview](/api-reference/languages/retrieve-supported-languages-by-product) for the full list of features per product.
89+
See the [overview](/api-reference/languages/retrieve-supported-languages-by-product) for the full list of features per resource.
8190

8291
### Response field names
8392

84-
| v2 field | v3 field |
85-
|----------------------|------------------------|
86-
| `language` | `lang` |
87-
| `name` | `name` *(unchanged)* |
88-
| `supports_formality` | `features["formality]` |
93+
| v2 field | v3 field |
94+
|----------------------|---------------------------------------------------|
95+
| `language` | `lang` |
96+
| `name` | `name` *(unchanged)* |
97+
| `supports_formality` | `"formality"` key in `features` object |
98+
| *(not present)* | `status` |
8999

90100
### Language code casing
91101

@@ -97,6 +107,6 @@ DeepL accepts language codes case-insensitively as input across all endpoints. H
97107

98108
If you currently use `/v2/glossary-language-pairs` to discover which language pairs are supported for glossaries, use one of the following:
99109

100-
- `GET /v3/languages?product=glossary` to check which languages support glossary management (i.e. creating a glossary for that language). Filter by `usable_as_source` and `usable_as_target` as needed. Any combination of a valid source and target language is a supported glossary language pair.
101-
- `GET /v3/languages?product=translate_text` to check which languages support using a glossary during text translation. Languages that include `"glossary"` in their `features` array support the `glossary_id` parameter on the translate endpoint.
102-
- Similarly, use `product=translate_document` to check glossary support for document translation.
110+
- `GET /v3/languages?resource=glossary` to check which languages support glossary management (i.e. creating a glossary for that language). Filter by `usable_as_source` and `usable_as_target` as needed. Any combination of a valid source and target language is a supported glossary language pair.
111+
- `GET /v3/languages?resource=translate_text` to check which languages support using a glossary during text translation. Languages with a `"glossary"` key in their `features` object support the `glossary_id` parameter on the translate endpoint.
112+
- Similarly, use `resource=translate_document` to check glossary support for document translation.
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
2-
openapi: get /v3/languages/products
3-
title: "Retrieve language products"
2+
openapi: get /v3/languages/resources
3+
title: "Retrieve language resources"
44
tag: "BETA"
55
---
66

77
<Info>
88
This endpoint is available for testing in BETA. Breaking changes may be pushed with little or no advance notice, and we provide no guarantees of stability.
99
</Info>
10+

0 commit comments

Comments
 (0)