DW Alliance app

API overview for app.dwalliance.com. Create an account, start a session, then upload an HTML page and its related files.

Modules

/account_setup/ Create a person, email, optional company, and a new brand. No session required.
/session/ Email a one-time session id for an email + brand. Response is ok and mailed only.
/crm/ Create, update, and delete people and companies. Needs a session, brand, and CRM CRUD.
/relation/ Create, update, delete, and read a person's link to a company. Needs a session, brand, and CRM CRUD.
/dns/ Create, update, delete, and read DNS records for a company. Needs a session, brand, DNS right, and company_id. The zone must be claimed first with /domain.
/domain/ Claim, read, and release a domain and its www for a company. Needs a session, brand, DOMAIN right, and company_id.
/permissions/ Per-domain editor switch, domain EDITOR grants, and SUPER_ADMIN grants. Needs a session and SUPER_ADMIN on the brand. Open the admin UI.
/files/ Create, update, delete, read, and search files. Uploads need a session with FILE rights. Search returns only files that person uploaded.
/notes/ Create, update, delete, read, and search notes with optional GPS. Needs a session with NOTE rights. Only that person's notes on the session brand.
/note_files/ Link your notes to your files: create, update, delete, read, and search by note_id or file_id. Needs a session with NOTE rights.

Brand SUPER_ADMINs manage the Suggest-an-edit tool per domain with /permissions/ (turn the editor on, grant domain editors, grant or revoke super admins). Suggested edits are emailed to that brand’s super admins.

If you are creating a website and want a shared menu system, include a menu.json. On your own domain, every site also gets an automatic /sitemap.xml and /robots.txt (see Search engines).

1. Create an account

  1. POST JSON to /account_setup/ with {"email":"you@example.com"}. You get back id. A 6-character confirmation code is emailed from support@dwalliance.com. It expires after 30 minutes.
  2. POST JSON again with id, confirmation_id, first_name, last_name, and optional company_name.
  3. Success returns ok, person_id, company_id, relation_id, and brand_emailed. A second email delivers your brand code. Keep that code; it is not in the JSON.
// step 1
await fetch('/account_setup/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ email: 'you@example.com' })
}).then(r => r.json());

// step 2
await fetch('/account_setup/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    id: 'SETUP_ID',
    confirmation_id: 'xxxxxx',
    first_name: 'Ada',
    last_name: 'Lovelace',
    company_name: 'Example LLC'
  })
}).then(r => r.json());

New brands get default data_access for LOGIN (READ) and CREATE/READ/UPDATE/DELETE on FILE, CRM, NOTE, DNS, and DOMAIN.

2. Start a session

  1. POST JSON to /session/ with your email and brand code.
  2. If they match, a session id is emailed. The HTTP body is only {"ok":true,"mailed":true}.
  3. Send that session id later as JSON field session or cookie session.
await fetch('/session/', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ email: 'you@example.com', brand: 'BRANDCODE' })
}).then(r => r.json());

3. Upload an HTML document and its files

Use /files/ with action create. Set public_private to PUBLIC for pages browsers should open. Keep related assets under the same brand and a shared file_path.

  1. Upload index.html (or any page) with file_path like site.
  2. Upload CSS, JS, images, fonts the same way. Match the relative paths your HTML uses.
  3. Open the public URL: /BRANDCODE/file_path/file_name. Example: /BRANDCODE/site/index.html.

Shared menu

A site with only a few pages should still keep the navigation in one PUBLIC menu.json next to those pages. Each page loads that file and fills its nav from it. Adding a page or removing one is an update to menu.json. The other HTML files stay as they are.

[
  {"label": "Home", "href": "index.html"},
  {"label": "About", "href": "about.html"},
  {"label": "Contact", "href": "contact.html"},
  {"label": "Sitemap", "href": "/sitemap.xml"}
]

Add the Sitemap item so people and search engines can find every page. /sitemap.xml works on your own domain from any folder; see Search engines.

JSON create (base64)

const html = btoa('Hello');
await fetch('/files/', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    action: 'create',
    session: 'SESSION_ID_FROM_EMAIL',
    file_name: 'index.html',
    file_path: 'site',
    file_type: 'HTML',
    public_private: 'PUBLIC',
    file_data: html
  })
}).then(r => r.json());

Multipart create

const body = new FormData();
body.append('action', 'create');
body.append('session', 'SESSION_ID_FROM_EMAIL');
body.append('file_name', 'hero.png');
body.append('file_path', 'site');
body.append('public_private', 'PUBLIC');
body.append('file', fileInput.files[0]);
await fetch('/files/', { method: 'POST', credentials: 'include', body }).then(r => r.json());

Also supported: update, delete, read, and search. Search matches file name, file type, exact file size, or created date. Set order to ascend or descend, and limit from 1 to 100. Search returns only files that person uploaded. PUBLIC files can be read without a session. Max upload size is about 10 MB. GET each module path with no body for its live help JSON.

4. Edit DNS

POST JSON to /dns/. Send session, brand, and company_id. The person must belong to that company. Claim the zone first with /domain/. /dns/ only changes records in zones that company has claimed.

await fetch('/dns/', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    action: 'create',
    session: 'SESSION_ID',
    brand: 'BRANDCODE',
    company_id: 'COMPANY_ID',
    domain: 'example.com',
    rr_type: '+',
    rr_fqdn: 'www.example.com',
    rr_ip: '192.0.2.10'
  })
}).then(r => r.json());

Record types are + = C @ . & ^ Z and ' for TXT. rr_ttl defaults to 600. The response for read is records with rr_id. GET /dns/ with no body for the live field list.

Protected for every brand: app.dwalliance.com, ns1.dwalliance.com, ns2.dwalliance.com, ns3.dwalliance.com, mail.dwalliance.com, store.dwalliance.com, every name under them, and the MX, NS, and SOA records of dwalliance.com. /dns/ refuses to create, update, or delete them, and /domain/ refuses to claim them.

5. Claim a domain

POST JSON to /domain/ with action create, session, brand, company_id, and domain_name. It claims the name and www. the name for your company and brand. Names another company or brand already holds are refused, and so are app.dwalliance.com, IP addresses, and localhost. Action read lists your names. Action delete releases a name and its www after its DNS records are deleted.

await fetch('/domain/', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    action: 'create',
    session: 'SESSION_ID',
    brand: 'BRANDCODE',
    company_id: 'COMPANY_ID',
    domain_name: 'example.com'
  })
}).then(r => r.json());

The response lists domain_id, domain_name, and status (created or already_owned) for each name.

6. Host a website

Your brand can host a static website from its PUBLIC files. Upload every page and asset with /files/ action create and public_private set to PUBLIC. Leave file_path empty for files at the top of the site, or set a folder such as about. A top-level index.html is your homepage.

  1. Upload index.html with an empty file_path.
  2. Upload the other pages, CSS, JS, images, and fonts the same way. Use relative links that match each file's file_path and file_name. Do not name a top-level file or folder after a module path such as lib, files, session, account_setup, relation, crm, dns, domain, notes, note_files, docs, or skill; on your own domain those paths reach the platform, not your files.
  3. To change a file, send update with its id and the new file. To remove it, send delete with its id.
const body = new FormData();
body.append('action', 'create');
body.append('session', 'SESSION_ID_FROM_EMAIL');
body.append('file_name', 'index.html');
body.append('file_path', '');
body.append('file_type', 'HTML');
body.append('public_private', 'PUBLIC');
body.append('file', fileInput.files[0]);
await fetch('/files/', { method: 'POST', credentials: 'include', body }).then(r => r.json());

7. Use your own domain

Your site can answer on your own domain, such as example.com and www.example.com, with no brand code in the address.

  1. Point the domain here. At your registrar, either set the nameservers to ns1.dwalliance.com, ns2.dwalliance.com, and ns3.dwalliance.com, or keep your DNS host and add A records for example.com and www.example.com to 64.62.211.170.
  2. Claim the domain with /domain/ action create. That claims example.com and www.example.com for your company and brand.
  3. If you use our nameservers, create those A records with /dns/.
  4. Ask DW Alliance to turn on hosting for the domain. We connect it to your brand and enable HTTPS for it. This step is not self-serve yet.
await fetch('/dns/', {
  method: 'POST',
  credentials: 'include',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    action: 'create',
    session: 'SESSION_ID',
    brand: 'BRANDCODE',
    company_id: 'COMPANY_ID',
    domain: 'example.com',
    rr_type: '+',
    rr_fqdn: 'www.example.com',
    rr_ip: '64.62.211.170'
  })
}).then(r => r.json());

Send the same create again with rr_fqdn set to example.com for the bare domain. Once hosting is on, https://example.com/ shows your top-level index.html, and https://example.com/{file_path}/{file_name} shows any other PUBLIC file. A folder address ending in / shows that folder's index.html, so https://example.com/about/ shows about/index.html. Missing files return 404, and PHP files are never served.

8. Search engines: sitemap.xml and robots.txt

Once your own domain is on, it gets two files automatically. You do not upload anything.

Replace example.com with your domain; www.example.com works the same way and lists www addresses. For example, the DW Alliance site itself is at https://dwalliance.com/sitemap.xml and https://dwalliance.com/robots.txt. The default robots.txt is:

# Default robots.txt from DW Alliance. Upload your own robots.txt (PUBLIC, top of the site) to replace it.
User-agent: *
Allow: /

Sitemap: https://example.com/sitemap.xml

A sitemap looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url><loc>https://example.com/</loc><lastmod>2026-10-29T17:39:10Z</lastmod></url>
  <url><loc>https://example.com/contact.html</loc><lastmod>2026-10-28T04:06:49Z</lastmod></url>
</urlset>

The sitemap is built the first time someone asks for it and then cached. Creating, updating or deleting any of your files clears it, and the next request builds a fresh one. To keep a page out of it, make the file PRIVATE or add a noindex robots meta tag. Sites with more than 50,000 pages get a sitemap index at /sitemap.xml that points to /sitemap-1.xml, /sitemap-2.xml, and so on.

Use your own instead

Upload a PUBLIC file named robots.txt or sitemap.xml with an empty file_path, and your file is served instead of the automatic one. Delete it to go back to the automatic file. Keep a Sitemap: line in your own robots.txt.

const body = new FormData();
body.append('action', 'create');
body.append('session', 'SESSION_ID_FROM_EMAIL');
body.append('file_name', 'robots.txt');
body.append('file_path', '');
body.append('public_private', 'PUBLIC');
body.append('file', new Blob(['User-agent: *\nDisallow: /drafts/\n\nSitemap: https://example.com/sitemap.xml\n'], { type: 'text/plain' }));
await fetch('https://app.dwalliance.com/files/', { method: 'POST', credentials: 'include', body }).then(r => r.json());

Link your sitemap

Add {"label": "Sitemap", "href": "/sitemap.xml"} to your menu.json (or a link in your footer) so visitors and crawlers can reach it. Then submit https://example.com/sitemap.xml in Google Search Console and Bing Webmaster Tools. The automatic files are only on your own domain, not on https://app.dwalliance.com/BRANDCODE/... addresses.

Public URLs

After a PUBLIC file is created, the first request for /{brand}/{file_path}/{file_name} writes a cache on the app node and serves it. Files with an empty file_path are at /{brand}/{file_name}, so a homepage is /{brand}/index.html. On your own domain the same file is at /{file_path}/{file_name}. Updates and deletes clear that cache automatically, and any create, update or delete also clears your cached sitemap.xml.