Actions

Call the generateDocument MCP tool

Generate a SHORT lead-magnet document from an existing post's topic (about 20 to 40 seconds), insert it into this workspace's documents and link it to the post. Longer documents are written in the Documents area of the app. It spends credits (check the balance with getCreditBalance). Needs a booking link on the brand profile, or pass booking_url. Send idempotency_key (8 to 200 characters) and reuse the same key on a retry after a timeout: a retry with the same key returns the first result, or a conflict telling you to check the result in the app. Returns document_id, ui_url and the artifact ids (read them with getArtifact).

Called through the Actions bridge: the response is that tool's own result, wrapped as { data: <tool result> } under HTTP 200. Billing, daily-cap, and confirm-step outcomes are embedded INSIDE data, never remapped to an HTTP status (see the templated /api/v1/actions/{toolName} operation above for the full protocol, and x-mcp-actions for this tool's machine-readable scope/cap/confirm_behavior fields). Authentication, request-shape, and optional idempotency-protocol failures still use their documented non-200 statuses.

post/api/v1/actions/generateDocument

Request

  • Base URL: https://app.reachium.io
  • URL: https://app.reachium.io/api/v1/actions/generateDocument
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional caller-generated key (8-200 characters: letters, digits, dot, underscore, colon, or hyphen). A final tool result is replayed for the same key and body. An ambiguous result remains 409 under that key; reconcile external state before using a new key. Reuse with a different body returns 422.

Request body

post_idstring uuid required

The post whose topic seeds the document.

booking_urlstring

Booking/calendar URL for the document CTAs. Omit to use the brand profile calendar link.

idempotency_keystring

Optional. Send the same key on a retry to get the first result back instead of generating (and charging) again. 8 to 200 characters: letters, digits, dot, underscore, colon, hyphen. A stored refusal is returned too; use a new key for a fresh attempt.

Response

The result of calling this tool.

dataunknown required
errorunknown required

Changes

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