Rewrite API
1 endpoint. Every path is relative to the API base URL and needs a bearer token unless it is marked public. See the REST API overview for authentication, errors and pagination.
POST/v1/orgs/{orgId}/marketing/rewrite
Generate 3 to 5 better versions of a piece of post copy in the workspace's brand voice and the author's own writing voice, for a platform and optional tone. Pass instruction to say what to change (e.g. shorter, punchier hook, more casual); without one, each version takes a different direction. Each call spends the workspace's AI credits, so call it only when the user wants AI rewrites, not to polish copy you can edit yourself, and don't retry it in a loop. It saves nothing: show the user the variations, and apply the one they choose with update_post. Confirm the copy with the user before calling approve_post_group.
Path parameters
orgIdstring (uuid)required
Request body application/json
textstringrequiredtonestringplatformstringone of
x,linkedin,tiktok,reddit,facebook,instagram,youtube,bluesky,threadsvariantCountintegerinstructionstringmaxLengthinteger
Responses
200
dataobjectrequiredFields
variationsarray<object>requiredItem fields
styleKeystringrequiredtextstringrequired
providerstringrequiredproviderModelstringrequiredpromptVersionstringrequiredcreditsUsednumberrequiredremainingCreditsnumberrequired
curl -X POST "https://api.adventur.ai/v1/orgs/$ORG_ID/marketing/rewrite" \ -H "Authorization: Bearer $ADVENTURAI_TOKEN" \ -H "Content-Type: application/json" \ -d '{"text":"string"}'