Skip to content

Quickstart

This walks through a site from nothing to a live Worker with a contact form. You need a Digize workspace, git, and Node.js 22 or later for the local tools.

  1. In the app, open Sites › Workers and choose Create Worker.

  2. Give it a name: 3 to 40 lowercase letters, digits and dashes, such as hello. The name is the site’s address too, hello.yourfreesite.com, so it has to be free across Digize. A few names that the platform uses itself (www, app, api, docs and others) are reserved.

  3. The app makes the site’s git repository and shows its remote and a push token. Copy the token now: it’s shown once. It lasts 90 days; make more, and revoke them, in Sites › Settings under Git and push tokens.

A site with a wrangler.jsonc and a main entry is deployed as that Worker. Make a folder with these files:

wrangler.jsonc
{
"name": "hello",
"main": "src/index.ts",
"compatibility_date": "2026-10-01"
}
package.json
{
"name": "hello",
"private": true,
"scripts": { "dev": "wrangler dev" },
"devDependencies": { "wrangler": "^4.0.0" }
}
src/index.ts
export default {
async fetch(request: Request): Promise<Response> {
const url = new URL(request.url);
return new Response(`Hello from ${url.hostname}`);
},
};
.gitignore
node_modules
.wrangler

Run npm install, which writes package-lock.json. The build finds the lockfile and installs with npm ci, then bundles src/index.ts with your project’s own Wrangler. npx wrangler dev runs it locally.

Add the site’s remote and push its branch, main unless you change it:

Terminal window
git init -b main
git add .
git commit -m "Hello"
git remote add digize https://git.digize.com/ws_01JB8X4Q2M7KTW9C3N5RVHZ1DE/site-01jc5m2p8r4t6v8x0z2b4d6f8h.git
git push digize main

Use the remote the app showed you; the one above is an example. Git asks for a username and password: any username works, and the push token is the password.

The push starts a build. Open Sites › Deployments, or the Worker’s Deployments tab, to watch its log as it’s printed. When the deployment says Live, open https://hello.yourfreesite.com: the next request runs the new version. See How deploys work for each step and for rolling back.

A form post to /_platform/forms on the site’s own hostname becomes a submission in the workspace: Digize finds or adds the CRM contact, adds the form to their timeline, and starts any automation whose trigger is that form. The site never sends a key or names its workspace; Digize knows which site is calling.

Your Worker gets the visitor’s post first, so it passes it on. Replace src/index.ts with:

src/index.ts
const PAGE = `<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Contact us</title>
<script src="https://challenges.cloudflare.com/turnstile/v0/api.js" async defer></script>
</head>
<body>
<form method="post" action="/_platform/forms">
<input type="hidden" name="_form" value="contact" />
<input type="hidden" name="_redirect" value="/thanks" />
<label>Name <input name="name" required /></label>
<label>Email <input name="email" type="email" required /></label>
<label>Message <textarea name="message"></textarea></label>
<div class="cf-turnstile" data-sitekey="TURNSTILE_SITE_KEY"></div>
<button>Send</button>
</form>
</body>
</html>`;
export default {
async fetch(request: Request): Promise<Response> {
const url = new URL(request.url);
if (url.pathname === "/_platform/forms" && request.method === "POST") {
// The same path on the site's own hostname: Digize answers it.
return fetch(new URL("/_platform/forms", url), {
method: "POST",
headers: {
"content-type": request.headers.get("content-type") ?? "",
// The visitor's address, for the rate limit and Turnstile.
"x-forwarded-for": request.headers.get("cf-connecting-ip") ?? "",
referer: request.headers.get("referer") ?? "",
},
body: await request.arrayBuffer(),
redirect: "manual",
});
}
if (url.pathname === "/thanks") {
return new Response("Thanks, we'll be in touch.");
}
return new Response(PAGE, {
headers: { "content-type": "text/html; charset=utf-8" },
});
},
};

Commit and push again. When the new version is live, send the form: the browser goes on to /thanks, and the contact shows up in CRM › Contacts with a timeline entry for the contact form.

Every form needs Cloudflare Turnstile’s token, cf-turnstile-response, which the widget adds to the form; a post without one is refused. Replace TURNSTILE_SITE_KEY with Digize’s Turnstile site key.

A site made of static files doesn’t need the forwarding code: the script Digize deploys with static sites passes /_platform/forms on by itself. Forms has every field the platform reads, the JSON form of a post, and what comes back.