Skip to main content
The document upload endpoint allows you to submit compliance and identity documents directly to a Buildmarkets brokerage account. This is used during account onboarding when a user’s KYC (Know Your Customer) review requires supporting documentation, and during ongoing account maintenance for remediation requests or regulatory requirements. Uploaded documents are associated with the specified account and routed to the appropriate compliance workflow.

Endpoint


Upload a document

Accepts a Base64-encoded file along with its document type classification. The platform processes the upload and associates it with the account for compliance review.

POST /v1/accounts/{accountId}/documents/upload

Path parameters

Request body

Supported document_type values

Response

Returns 204 No Content on success. No body is returned.

Example requests

Identity verification — passport (image)

Address verification — utility bill (PDF)

W-8BEN — JSON form data

The w8ben document type accepts form data as a JSON object in content_data rather than a Base64-encoded file. The structure mirrors the IRS W-8BEN form fields.

Response


File size and format limits

Tip: If you’re encoding in JavaScript, use Buffer.from(fileBuffer).toString('base64'). In Python, use base64.b64encode(file_bytes).decode('utf-8').

Common errors


Next steps

Updated 3 months ago

W-9 Requests Documentation

Overview

The W-9 endpoint enables automated generation of IRS Form W-9 (Request for Taxpayer Identification Number and Certification) for specified users. As the documentation states, “W-9s are required for U.S. persons and entities to certify their taxpayer identification number.”

Key Endpoint

POST /v1/documents/w9 — Initiates W-9 generation for a user

Request Details

The endpoint requires a single query parameter:
  • userId (string, UUID format) — The unique identifier for the user
Important: The userId passes as a query parameter, not in the request body. No request payload is needed.

Response Structure

A successful request (200 OK) returns:
  • successful (boolean) — Confirms request acceptance
  • message (string) — Status confirmation text

Processing Timeline

The endpoint confirms immediate receipt, but form generation occurs asynchronously. Users can later retrieve the completed W-9 using the document listing endpoint with documentTypeID: 3 and the relevant year.

Error Scenarios

Common failures include invalid/malformed UUIDs (400), missing API credentials (401), non-existent users (404), and server-side failures (500).

Generation vs. Upload

Two distinct workflows exist: using this endpoint to generate forms from stored data, or uploading pre-signed documents users complete independently.