Skip to content

Commit 5217cad

Browse files
Add documentation for new style rules CRUD endpoints
1 parent de52e8b commit 5217cad

12 files changed

+1180
-87
lines changed

api-reference/openapi.yaml

Lines changed: 372 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,6 +1994,378 @@ paths:
19941994
$ref: '#/components/responses/ServiceUnavailable'
19951995
security:
19961996
- auth_header: []
1997+
post:
1998+
summary: Create a style rule list
1999+
operationId: createStyleRuleList
2000+
requestBody:
2001+
required: true
2002+
content:
2003+
application/json:
2004+
schema:
2005+
type: object
2006+
required:
2007+
- name
2008+
- language
2009+
properties:
2010+
name:
2011+
$ref: '#/components/schemas/StyleRuleName'
2012+
language:
2013+
$ref: '#/components/schemas/StyleRuleLanguage'
2014+
configured_rules:
2015+
$ref: '#/components/schemas/ConfiguredRules'
2016+
custom_instructions:
2017+
type: array
2018+
description: Array of custom instruction objects
2019+
items:
2020+
type: object
2021+
required:
2022+
- label
2023+
- prompt
2024+
properties:
2025+
label:
2026+
type: string
2027+
description: Label for the custom instruction
2028+
prompt:
2029+
type: string
2030+
description: Instruction text
2031+
maxLength: 300
2032+
source_language:
2033+
type: string
2034+
description: Optional source language code
2035+
responses:
2036+
200:
2037+
description: Style rule list created successfully
2038+
headers:
2039+
X-Trace-ID:
2040+
$ref: '#/components/headers/X-Trace-ID'
2041+
content:
2042+
application/json:
2043+
schema:
2044+
$ref: '#/components/schemas/StyleRuleList'
2045+
400:
2046+
$ref: '#/components/responses/BadRequest'
2047+
401:
2048+
$ref: '#/components/responses/Unauthorized'
2049+
403:
2050+
$ref: '#/components/responses/Forbidden'
2051+
429:
2052+
$ref: '#/components/responses/TooManyRequests'
2053+
500:
2054+
$ref: '#/components/responses/InternalServerError'
2055+
503:
2056+
$ref: '#/components/responses/ServiceUnavailable'
2057+
security:
2058+
- auth_header: []
2059+
/v3/style_rules/{style_id}:
2060+
get:
2061+
summary: Get a style rule list
2062+
operationId: getStyleRuleList
2063+
parameters:
2064+
- name: style_id
2065+
in: path
2066+
required: true
2067+
schema:
2068+
type: string
2069+
description: The ID of the style rule list
2070+
responses:
2071+
200:
2072+
description: Style rule list details
2073+
headers:
2074+
X-Trace-ID:
2075+
$ref: '#/components/headers/X-Trace-ID'
2076+
content:
2077+
application/json:
2078+
schema:
2079+
$ref: '#/components/schemas/StyleRuleList'
2080+
401:
2081+
$ref: '#/components/responses/Unauthorized'
2082+
403:
2083+
$ref: '#/components/responses/Forbidden'
2084+
404:
2085+
$ref: '#/components/responses/NotFound'
2086+
429:
2087+
$ref: '#/components/responses/TooManyRequests'
2088+
500:
2089+
$ref: '#/components/responses/InternalServerError'
2090+
503:
2091+
$ref: '#/components/responses/ServiceUnavailable'
2092+
security:
2093+
- auth_header: []
2094+
patch:
2095+
summary: Update configured rules
2096+
operationId: updateStyleRuleList
2097+
parameters:
2098+
- name: style_id
2099+
in: path
2100+
required: true
2101+
schema:
2102+
type: string
2103+
description: The ID of the style rule list
2104+
requestBody:
2105+
required: true
2106+
content:
2107+
application/json:
2108+
schema:
2109+
type: object
2110+
properties:
2111+
name:
2112+
$ref: '#/components/schemas/StyleRuleName'
2113+
configured_rules:
2114+
$ref: '#/components/schemas/ConfiguredRules'
2115+
responses:
2116+
200:
2117+
description: Style rule list updated successfully
2118+
headers:
2119+
X-Trace-ID:
2120+
$ref: '#/components/headers/X-Trace-ID'
2121+
content:
2122+
application/json:
2123+
schema:
2124+
$ref: '#/components/schemas/StyleRuleList'
2125+
400:
2126+
$ref: '#/components/responses/BadRequest'
2127+
401:
2128+
$ref: '#/components/responses/Unauthorized'
2129+
403:
2130+
$ref: '#/components/responses/Forbidden'
2131+
404:
2132+
$ref: '#/components/responses/NotFound'
2133+
429:
2134+
$ref: '#/components/responses/TooManyRequests'
2135+
500:
2136+
$ref: '#/components/responses/InternalServerError'
2137+
503:
2138+
$ref: '#/components/responses/ServiceUnavailable'
2139+
security:
2140+
- auth_header: []
2141+
delete:
2142+
summary: Delete a style rule list
2143+
operationId: deleteStyleRuleList
2144+
parameters:
2145+
- name: style_id
2146+
in: path
2147+
required: true
2148+
schema:
2149+
type: string
2150+
description: The ID of the style rule list
2151+
responses:
2152+
204:
2153+
description: Style rule list deleted successfully
2154+
headers:
2155+
X-Trace-ID:
2156+
$ref: '#/components/headers/X-Trace-ID'
2157+
401:
2158+
$ref: '#/components/responses/Unauthorized'
2159+
403:
2160+
$ref: '#/components/responses/Forbidden'
2161+
404:
2162+
$ref: '#/components/responses/NotFound'
2163+
429:
2164+
$ref: '#/components/responses/TooManyRequests'
2165+
500:
2166+
$ref: '#/components/responses/InternalServerError'
2167+
503:
2168+
$ref: '#/components/responses/ServiceUnavailable'
2169+
security:
2170+
- auth_header: []
2171+
/v3/style_rules/{style_id}/custom_instructions:
2172+
post:
2173+
summary: Create a custom instruction
2174+
operationId: createCustomInstruction
2175+
parameters:
2176+
- name: style_id
2177+
in: path
2178+
required: true
2179+
schema:
2180+
type: string
2181+
description: The ID of the style rule list
2182+
requestBody:
2183+
required: true
2184+
content:
2185+
application/json:
2186+
schema:
2187+
type: object
2188+
required:
2189+
- label
2190+
- prompt
2191+
properties:
2192+
label:
2193+
type: string
2194+
description: Label for the custom instruction
2195+
maxLength: 100
2196+
prompt:
2197+
type: string
2198+
description: Instruction text
2199+
maxLength: 300
2200+
source_language:
2201+
type: string
2202+
description: Optional source language code
2203+
responses:
2204+
200:
2205+
description: Custom instruction created successfully
2206+
headers:
2207+
X-Trace-ID:
2208+
$ref: '#/components/headers/X-Trace-ID'
2209+
content:
2210+
application/json:
2211+
schema:
2212+
$ref: '#/components/schemas/StyleRuleList'
2213+
400:
2214+
$ref: '#/components/responses/BadRequest'
2215+
401:
2216+
$ref: '#/components/responses/Unauthorized'
2217+
403:
2218+
$ref: '#/components/responses/Forbidden'
2219+
404:
2220+
$ref: '#/components/responses/NotFound'
2221+
429:
2222+
$ref: '#/components/responses/TooManyRequests'
2223+
500:
2224+
$ref: '#/components/responses/InternalServerError'
2225+
503:
2226+
$ref: '#/components/responses/ServiceUnavailable'
2227+
security:
2228+
- auth_header: []
2229+
/v3/style_rules/{style_id}/custom_instructions/{instruction_id}:
2230+
get:
2231+
summary: Get a custom instruction
2232+
operationId: getCustomInstruction
2233+
parameters:
2234+
- name: style_id
2235+
in: path
2236+
required: true
2237+
schema:
2238+
type: string
2239+
description: The ID of the style rule list
2240+
- name: instruction_id
2241+
in: path
2242+
required: true
2243+
schema:
2244+
type: string
2245+
description: The ID of the custom instruction
2246+
responses:
2247+
200:
2248+
description: Custom instruction details
2249+
headers:
2250+
X-Trace-ID:
2251+
$ref: '#/components/headers/X-Trace-ID'
2252+
content:
2253+
application/json:
2254+
schema:
2255+
$ref: '#/components/schemas/CustomInstruction'
2256+
401:
2257+
$ref: '#/components/responses/Unauthorized'
2258+
403:
2259+
$ref: '#/components/responses/Forbidden'
2260+
404:
2261+
$ref: '#/components/responses/NotFound'
2262+
429:
2263+
$ref: '#/components/responses/TooManyRequests'
2264+
500:
2265+
$ref: '#/components/responses/InternalServerError'
2266+
503:
2267+
$ref: '#/components/responses/ServiceUnavailable'
2268+
security:
2269+
- auth_header: []
2270+
put:
2271+
summary: Update a custom instruction
2272+
operationId: updateCustomInstruction
2273+
parameters:
2274+
- name: style_id
2275+
in: path
2276+
required: true
2277+
schema:
2278+
type: string
2279+
description: The ID of the style rule list
2280+
- name: instruction_id
2281+
in: path
2282+
required: true
2283+
schema:
2284+
type: string
2285+
description: The ID of the custom instruction
2286+
requestBody:
2287+
required: true
2288+
content:
2289+
application/json:
2290+
schema:
2291+
type: object
2292+
required:
2293+
- label
2294+
- prompt
2295+
properties:
2296+
label:
2297+
type: string
2298+
description: Updated label for the custom instruction
2299+
maxLength: 100
2300+
prompt:
2301+
type: string
2302+
description: Updated instruction text
2303+
maxLength: 300
2304+
source_language:
2305+
type: string
2306+
description: Optional source language code
2307+
responses:
2308+
200:
2309+
description: Custom instruction updated successfully
2310+
headers:
2311+
X-Trace-ID:
2312+
$ref: '#/components/headers/X-Trace-ID'
2313+
content:
2314+
application/json:
2315+
schema:
2316+
$ref: '#/components/schemas/CustomInstruction'
2317+
400:
2318+
$ref: '#/components/responses/BadRequest'
2319+
401:
2320+
$ref: '#/components/responses/Unauthorized'
2321+
403:
2322+
$ref: '#/components/responses/Forbidden'
2323+
404:
2324+
$ref: '#/components/responses/NotFound'
2325+
429:
2326+
$ref: '#/components/responses/TooManyRequests'
2327+
500:
2328+
$ref: '#/components/responses/InternalServerError'
2329+
503:
2330+
$ref: '#/components/responses/ServiceUnavailable'
2331+
security:
2332+
- auth_header: []
2333+
delete:
2334+
summary: Delete a custom instruction
2335+
operationId: deleteCustomInstruction
2336+
parameters:
2337+
- name: style_id
2338+
in: path
2339+
required: true
2340+
schema:
2341+
type: string
2342+
description: The ID of the style rule list
2343+
- name: instruction_id
2344+
in: path
2345+
required: true
2346+
schema:
2347+
type: string
2348+
description: The ID of the custom instruction
2349+
responses:
2350+
204:
2351+
description: Custom instruction deleted successfully
2352+
headers:
2353+
X-Trace-ID:
2354+
$ref: '#/components/headers/X-Trace-ID'
2355+
401:
2356+
$ref: '#/components/responses/Unauthorized'
2357+
403:
2358+
$ref: '#/components/responses/Forbidden'
2359+
404:
2360+
$ref: '#/components/responses/NotFound'
2361+
429:
2362+
$ref: '#/components/responses/TooManyRequests'
2363+
500:
2364+
$ref: '#/components/responses/InternalServerError'
2365+
503:
2366+
$ref: '#/components/responses/ServiceUnavailable'
2367+
security:
2368+
- auth_header: []
19972369
/v3/voice/realtime:
19982370
servers:
19992371
- url: https://api.deepl.com

0 commit comments

Comments
 (0)