curl --request PUT \
--url https://api.deepl.com/v3/style_rules/{style_id}/configured_rules \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dates_and_times": {
"calendar_era": "use_bc_and_ad"
},
"punctuation": {
"periods_in_academic_degrees": "do_not_use"
}
}
'{
"style_id": "bd0a38f3-1831-440b-a8dd-2c702e2325ab",
"name": "<string>",
"creation_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"language": "ar",
"version": 13,
"configured_rules": {
"style_and_tone": {
"abbreviations": "use_abbreviations_and_symbols",
"short_vs_long_words": "use_short_words"
},
"punctuation": {
"apostrophe": "use_curly_apostrophes"
}
},
"custom_instructions": [
{
"id": "68fdb803-c013-4e67-b62e-1aad0ab519cd",
"label": "Currency custom instruction",
"prompt": "Have currency symbols before the numerical value (e.g. $100, €100)",
"source_language": "en"
}
]
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}Replace configured rules
Replace the full set of configured rules on a style rule list. Rules left out of the request are removed.
curl --request PUT \
--url https://api.deepl.com/v3/style_rules/{style_id}/configured_rules \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"dates_and_times": {
"calendar_era": "use_bc_and_ad"
},
"punctuation": {
"periods_in_academic_degrees": "do_not_use"
}
}
'{
"style_id": "bd0a38f3-1831-440b-a8dd-2c702e2325ab",
"name": "<string>",
"creation_time": "2023-11-07T05:31:56Z",
"updated_time": "2023-11-07T05:31:56Z",
"language": "ar",
"version": 13,
"configured_rules": {
"style_and_tone": {
"abbreviations": "use_abbreviations_and_symbols",
"short_vs_long_words": "use_short_words"
},
"punctuation": {
"apostrophe": "use_curly_apostrophes"
}
},
"custom_instructions": [
{
"id": "68fdb803-c013-4e67-b62e-1aad0ab519cd",
"label": "Currency custom instruction",
"prompt": "Have currency symbols before the numerical value (e.g. $100, €100)",
"source_language": "en"
}
]
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}Authorizations
Body
The enabled rules for the style rule list including what option was selected for each rule. This schema combines rules from all supported languages.
Response
Configured rules updated successfully
The target language the style rule list applies to. Codes are matched case-insensitively;
the response returns the canonical form (for example de-CH).
A root code (for example en) applies to that language and all of its variants. A variant
code (for example en-GB) applies only when target_lang is that variant.
Variant lists for de-CH, fr-CA, pt-BR, and pt-PT are generally available. Variant
lists for de-DE, en-GB, en-US, es-419, es-ES, fr-FR, zh-Hans, and zh-Hant
are in beta. The current list and the status of each language are returned by
GET /v3/languages?resource=style_rules&include=beta.
ar, bg, cs, da, de, de-CH, de-DE, el, en, en-GB, en-US, es, es-419, es-ES, et, fi, fr, fr-CA, fr-FR, he, hu, id, it, ja, ko, lt, lv, nb, nl, pl, pt, pt-BR, pt-PT, ro, ru, sk, sl, sv, th, tr, uk, vi, zh, zh-Hans, zh-Hant The enabled rules for the style rule list including what option was selected for each rule. This schema combines rules from all supported languages.
Show child attributes
Show child attributes
{
"style_and_tone": {
"abbreviations": "use_abbreviations_and_symbols",
"short_vs_long_words": "use_short_words"
},
"punctuation": { "apostrophe": "use_curly_apostrophes" }
}