Skip to content

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

Bearer tokenMCP tool: rewrite_post

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

  • textstringrequired
  • tonestring
  • platformstring

    one of x, linkedin, tiktok, reddit, facebook, instagram, youtube, bluesky, threads

  • variantCountinteger
  • instructionstring
  • maxLengthinteger

Responses

200
  • dataobjectrequired
    Fields
    • variationsarray<object>required
      Item fields
      • styleKeystringrequired
      • textstringrequired
    • providerstringrequired
    • providerModelstringrequired
    • promptVersionstringrequired
    • creditsUsednumberrequired
    • remainingCreditsnumberrequired
Request
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"}'