Actions

Call the finalizeAsset MCP tool

Second half of the signed-upload flow: validate bytes previously PUT to a requestUploadUrl upload_url (size checked from storage metadata before the bytes are even downloaded, then magic-byte sniffed as png, jpeg, webp, gif, pdf, docx, or markdown/plain text, never by the declared content type and never svg or html, metadata stripped for images, workspace storage quota enforced) and publish them as a hosted asset. Returns the same url/name/content_type/bytes shape as uploadAsset plus kind (image, pdf, docx, or markdown); the name works as asset_name in insert_image/attachImageToPost. The staging object is deleted whether validation passes or fails, so a rejected upload leaves nothing behind.

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/finalizeAsset

Request

  • Base URL: https://app.reachium.io
  • URL: https://app.reachium.io/api/v1/actions/finalizeAsset
  • 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

asset_tokenstring required

The incoming-<uuid> token returned by requestUploadUrl.

filenamestring

Optional friendly name prefix for the stored asset (sanitized; extension is derived from the actual bytes).

Response

The result of calling this tool.

dataunknown required
errorunknown required

Changes

No recorded changes to this operation across all 1 revision of this API.