Oleg Isonen fc38f71ba2 docs: Document self-hosted email tRPC interface (#6542)
Document the email service interface used by the Builder's server-side
tRPC call.

- Specify `POST /trpc/email.send`, bearer authorization, project-ID
metadata, direct JSON input, attachment encoding, and the tRPC
delivery-result envelope.
- Document `TRPC_SERVER_API_TOKEN` and `EMAIL_SERVICE_URL`, including
the current restriction to approved Webstudio Worker origins. The docs
do not claim that an arbitrary self-hosted origin can be configured
today.
- Keep the endpoint contract focused on its external HTTP interface.

Validation:
- A clean-room implementation from the original REST wording returned
404 for the Builder's `/trpc/email.send` request.
- I discarded it, revised the docs, then tested from scratch using the
actual Builder `createCloudflareManagedFormEmailSenderWithUrl` helper
from this PR head against a local fake tRPC endpoint. Success and
delivery-failure responses passed; the emitted URL, method, headers, and
direct JSON payload matched the contract.
- Confirmed the actual Builder helper rejects an arbitrary self-hosted
URL. The endpoint used a fake provider; no email was sent.
- The focused SDK managed-form email suite passes: 57 tests.
Documentation only; no deployment.
2026-10-17 02:38:56 +02:00
2026-07-12 11:27:58 +02:00
2026-02-05 10:25:17 +01:00
2026-03-20 21:09:47 +01:00
2023-09-06 21:43:29 +03:00

builder-screenshot

Webstudio is an Open Source Visual Development Platform for developers, designers, and cross-functional teams. You own the data, components, and infrastructure. You can use the hosted version or roll out your own.


Learning Resources

Social Media

License

  • Webstudio core (all functionality in this repository) is free/open-source under AGPL-3.0-or-later.
  • sdk-components-animation package (optional) is proprietary. You must accept the Webstudio, Inc. EULA located in sdk-components-animation/LICENSE before using it.
Languages
TypeScript 98.9%
PLpgSQL 0.5%
CSS 0.3%
Shell 0.2%
JavaScript 0.1%