Skip to content
MyStocks Developers
API v1

API v1

Current stable contract

Versioning policyRelease changelog
Sandbox console

Generate a partner PDF document

Institutional Reporting, Auditing & Compliance

POST

/documents

Generate a partner PDF document

Production onlygeneratePartnerDocument

Generates an account statement, compliance summary, or partner-wide operations summary and retains an auditable generation record. Customer documents require a partner-owned sub-account userId.

Parameters

This endpoint has no path or query parameters.

Headers

AuthorizationstringRequired

Bearer sk_sandbox_<your_key> for sandbox requests.

Idempotency-KeystringheaderRequired

Unique string that makes write calls safe to retry on network failure. Required for money movement, trading, KYC, subscriptions, and webhook creation. Deduplicated for 24 hours -- duplicate keys return the cached response. HTTP 409 if a concurrent request with the same key is still in progress.

Example: dep_user42_1743152580

Request body

typeaccount-statement | compliance-summary | operations-summaryRequired
userIdstring

Required for account-statement and compliance-summary.

Response fields

See the response format and API Reference for this endpoint.

Response codes

200Generated PDF document.
400Unsupported document type or missing required userId.
404The requested customer does not belong to the partner.