Skip to content

Rewrite CopyBeta

Rewrite one flagged sentence or the whole draft. Costs 1 AI credit.

POST/api/v1/copy/rewrite

Asks the chat model to rewrite the copy, then has the Copy check accept or discard the result. Nothing is saved: the rewrite is returned for you to apply. Costs 1 AI credit from the key owner's monthly pool once the model has answered, whether or not the check accepts the rewrite. A 422 or a 502 from the model is not charged.

Body Parameters#

subjectstringbody

Subject line, up to 500 characters.

bodystringbody

Email body, plain text or HTML.

sendAsHtmlbooleanbodydefault false

Set to true when the body is HTML.

stepNumberintegerbodydefault 1

Sequence step the copy belongs to (1-50).

targetobjectbodyrequired

What to rewrite.

Show target
kindstringbodyrequired
email for the whole draft, span for one sentence.
fieldstringbody
For a span: subject or body.
startintegerbody
For a span: start offset in the text returned by /copy/judge.
endintegerbody
For a span: end offset.
textstringbody
For a span: the exact sentence at start to end.
categorystringbody
For a span: the flag category from /copy/judge.
signalsarraybody

Overall problems from a previous /copy/judge call, to steer the rewrite.

Response#

For kind: "email":

dataobject
Show Email rewrite
subjectstring
Rewritten subject.
bodyTextstring
Rewritten body.
verdictobject
Copy check verdict for the rewritten draft, same shape as /copy/judge.

For kind: "span", data holds replacement, accepted, keepProbability and issue.

Errors#

StatusDescription
400A span rewrite is missing field, start, end or text, or the draft is empty
403ai_credits_exhausted: the monthly AI credits are used up, or the key is read-only
409The draft no longer matches the span. Run /copy/judge again
422The model's rewrite was discarded (it added merge tags that are not in your draft). Not charged
502The model could not be reached. Not charged for a model failure, retry shortly
503Rewriting is unavailable on this server

Rate Limit#

  • 100 requests per minute, shared by every expensive call in your workspace. Fixed 60-second window.
  • Every response includes X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (unix epoch seconds) and X-RateLimit-Bucket (expensive).
  • A 429 response includes a Retry-After header (seconds until the bucket resets).

For client-side patterns (Retry-After, exponential backoff, monitoring X-RateLimit-Remaining), see Rate Limiting.

Was this page helpful?
View as MarkdownLast updated November 4, 2026