AI Inbox

Generate Inbox Draft

Write or rewrite a message with the model. THIS SPENDS CREDITS.

DELIVERS NOTHING. It returns text; sending it is a separate, external call. Classified billable (inbox:run) because it charges - 402 when the organisation has no credits left.

ONE CHARGE PER CALL, including a multi-operation call: pass a LIST in operation to apply several transforms in a single generation rather than paying per transform.

generate_from_scratch is the only operation that does not need message_html; give it either a conversation_id + channel_type to ground the reply in the thread, or free-text instructions to write something with no thread at all.

Wider than the already-published GET /inbox/{reply_id}/draft, which only ever generates from scratch on an existing thread.

post/inbox/drafts/generate

Request

  • Base URL: https://be.graph8.com/api/v1
  • URL: https://be.graph8.com/api/v1/inbox/drafts/generate
  • Auth: HTTP bearer

Headers

Authorizationstring nullable
X-Target-Org-Idstring nullable

Request body

conversation_idstring nullable

Ground the draft in this thread's history.

channel_type'email' | 'heyreach' | 'sms' nullable

Required alongside conversation_id. heyreach is the LinkedIn channel and additionally needs linkedin_account_id.

linkedin_account_idinteger nullable
message_htmlstring

The text to transform. Required by every operation except generate_from_scratch.

tone'professional' | 'friendly' | 'casual' | 'assertive' | 'empathetic' | 'urgent' nullable
objective'book_meeting' | 'follow_up' | 're_engage' | 'provide_value' | 'handle_objection' | 'close_deal' nullable
persona'sdr' | 'growth_manager' | 'account_executive' | 'customer_success' | 'founder' nullable
instructionsstring nullable

Free-text prompt. With generate_from_scratch this writes a message with no thread at all.

Response

Successful Response

dataInboxPayload required

An open envelope for a comment, an assignment or a workspace.

Open because a comment carries attachment refs and mention metadata that grow, and because an assignment result reports per-assignee outcomes.

Changes

No recorded changes to this operation across all 2 revisions of this API.