curl --request POST \
--url https://api.deepl.com/v3/style_rules \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My style rules",
"language": "de"
}
'{
"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"
}Create a style rule list
Create a style rule list, the container for the configured rules and custom instructions applied to translations.
curl --request POST \
--url https://api.deepl.com/v3/style_rules \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My style rules",
"language": "de"
}
'{
"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
Authentication with Authorization header and DeepL-Auth-Key authentication scheme. Example: DeepL-Auth-Key <api-key>
Body
Name associated with the style rule list.
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" }
}
Array of custom instruction objects
200Show child attributes
Show child attributes
Response
Style rule list created successfully
A unique ID assigned to a style rule list.
"bd0a38f3-1831-440b-a8dd-2c702e2325ab"
Name associated with the style rule list.
The creation time of the style rule list in the ISO 8601-1:2019 format (e.g.: 2021-08-03T14:16:18.329Z).
The time of the style rule list when it was last updated in the ISO 8601-1:2019 format (e.g.: 2022-08-03T14:16:18.329Z).
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 version of the style rule list. Incremented when the style rule list is updated.
13
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" }
}
List of custom instructions enabled for the style rule list.
Show child attributes
Show child attributes