Skip to content
First requestVisit website ↗
Navigation

Process text or preview a saved assistant draft

The preview_assistant_draft operation is available in every workspace and requires a Bearer session, selected X-Workspace-Id membership, and draft-editor or administrator access. Other operation contracts are unchanged. Preview uses a saved current draft, a reviewed safety baseline, current knowledge and model, and no tools or persistent conversation.

POST
https://api.channelautomation.com/api/ai/process-text

Request body JSON required

  • workspaceId
    string
    required
  • operation
    string
    required
  • text
    optional
    string
  • options
    optional
    object
    • agentId
      optional
      string
      format: uuid
    • draftToken
      optional
      integer
      minimum: 1
    • messages
      optional
      array of
      object
      • role
        optional
        user
        or
        assistant
      • content
        optional
        string
        maxLength: 8000
    • simulatedContact
      optional
      object

      Synthetic display fields only; real contact IDs are ignored.

Returns

200

Generated text; preview also returns model and draftToken

400

Invalid input

401

Preview session required

403

Preview access denied

409

Saved draft changed

503

Preview could not run

Type to search…

↑↓ navigate↵ selectEsc close