Rewrites free text into a chosen tone/length. Technician identity comes from the authenticated request (user_id header handled by /), not from the request body.

Request Information

URI Parameters :

None.

Body Parameters :

JSON body with text, optional tone and optional length.

RewriteTextRequest
NameDescriptionTypeAdditional information
text

The free text to rewrite.

string
tone

Desired tone: "professional" (default) or "customer_friendly".

string
length

Desired length: "concise" (default) or "detailed".

string

Response Information

Resource Description :

200 OK with rewritten_text; on failure, the project's standard error envelope (FSA-6091) whose error.code tells the client which case it is: 400 Bad Request (DataInvalid) for invalid input or a request Claude rejects outright, 422 Unprocessable Entity (AiRewriteNotSupported) when Claude answered but declined to rewrite this text (FSA-6154), 403 Forbidden (AiFeatureDisabled) when the AI is not turned on for the domain (FSA-6215), 429 Too Many Requests with a Retry-After header when an AI usage limit is reached (FSA-6217: AiRateLimited, AiUserQuotaExceeded or AiDomainQuotaExceeded, with period, limit, used and reset_utc in error.detail) or when every place on the domain's AI key stayed busy for 5 seconds (FSA-6215: AiRateLimited), 503 Service Unavailable (AiServiceUnavailable) when the AI service, its settings or the usage limits could not be reached, the AI key was refused, or the AI sent back nothing usable, or 500 Internal Server Error for anything else unexpected. rewritten_text is only ever a rewrite. Before FSA-6154 a refusal from Claude came back in that field with a 200, and the app displayed it to the technician as their rewritten note; the rewrite now arrives through a forced tool call, so a refusal cannot reach this field at all.

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.