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
- POST
email. Response isid. A 6-character confirmation code is emailed and expires after 30 minutes. - POST
id,confirmation_id,first_name,last_name, and optionalcompany_name. - Writes a person, email, optional company, and a brand. The brand code is emailed only, never returned in JSON.
- POST
emailandbrand(the brand code). - If they match, a session id is emailed. The HTTP body is only
okandmailed.
create_person-first_name,last_name. Writes a person on the session brand.update_person-person_id,first_name,last_name.delete_person-person_id. Also removes that person's relation rows on this brand.create_company-name. Writes a company on the session brand.update_company-company_id,name.delete_company-company_id. Also removes relation rows for that company on this brand.
create-person_id,company_id.update-id, andperson_idand/orcompany_id.delete-id.read-id, orperson_id, orcompany_id.
create-company_id,domain,rr_type,rr_fqdn, and the fields that type uses. The zone must already belong to this company.update-company_id,rr_id, and any fields to replace.delete-company_idandrr_id.read-company_id. Optionalrr_idordomain.- Claim the zone first with /domain/;
/dns/no longer claims names.
create-company_idanddomain_name. Claims the name andwww.the name.read-company_id. Optionaldomain_name. Lists names this company has claimed on this brand.delete-company_idanddomain_name. Releases the name and its www after its DNS records are deleted.- After a claim, add and change the zone's records with /dns/. Release is refused while
/dns/still has records in the zone.
list- domains of the brand with editor_enabled, editors per domain, and super admins.set_editor_enabled-domain,enabled(true/false). Per-domain editor switch; off by default.grant_editor-domain,email. Grants EDITOR for that domain only.revoke_editor-domain,email.grant_super_admin-email. Brand-wide SUPER_ADMIN.revoke_super_admin-email. Refused if it would remove the last SUPER_ADMIN.- Admin UI is GET
/permissions/. API help is POST with an empty body.
create- needs FILE CREATE or SUPER_ADMIN. Multipartfileor JSONfile_dataas base64.update- needs FILE UPDATE or SUPER_ADMIN, andid.delete- needs FILE DELETE or SUPER_ADMIN, andid.read- needsid. A PUBLIC file needs no session.search- needs FILE READ. Optional filters: file name, type, size, or created date.
create- needs NOTE CREATE or SUPER_ADMIN.noteis required;gpsis optional.update- needs NOTE UPDATE or SUPER_ADMIN, andid.delete- needs NOTE DELETE or SUPER_ADMIN, andid. Also removes the note_files links for that note.read- needs NOTE READ or SUPER_ADMIN, andid.search- needs NOTE READ. Optional filters: note text or created date.
create- needs NOTE CREATE or SUPER_ADMIN.note_idandfile_idare required; both must be yours on this brand.update- needs NOTE UPDATE or SUPER_ADMIN, andid. Optionalnote_idand/orfile_id.delete- needs NOTE DELETE or SUPER_ADMIN, andid. Removes only the link, not the note or file.read- needs NOTE READ or SUPER_ADMIN, andid.search- needs NOTE READ. Optional exactnote_idorfile_id.
request_code-email. A 6-character code is emailed (30 minutes). The response isid; the code is never in JSON.verify-idand the emailedconfirmation_id. Creates the customer and signs them in for 30 days on that domain.profile- after verify:first_name,last_name, optionalmiddle_name,company_name,telephone{phone_number, line_type}, andshipping/billingaddress objects.status- shows the signed-in customer's sign-up. Unfinished sign-ups are deleted after 90 days.
/session/.
request_code-email. Always the same answer, whether or not the email is a customer.verify- theidfrom request_code and the emailedcode. Sets a secure cookie for that domain, valid 30 days. No session id is ever in JSON.whoamiandlogout.
- Create an address
- POST
actioncreatewithline_1,city,state,zipcode. - Optional
line_2,line_3,country(default US),address_typeBilling, Shipping, or Other (default Shipping). - Staff also send
session,brand,owner_type(PRSN or CMPNY) andowner_id; needs CRM CREATE or SUPER_ADMIN. - The answer is
address_id.
- POST
- Edit an address
- POST
actionupdatewithaddress_idand only the fields to change. - Send an empty string to clear
line_2orline_3. Required fields cannot be cleared. - Staff need CRM UPDATE or SUPER_ADMIN.
- POST
- Delete an address
- POST
actiondeletewithaddress_id. Staff need CRM DELETE or SUPER_ADMIN. - Orders already placed keep their own copy of the address, so deleting never changes an order.
- POST
- Find addresses
readwithaddress_id, orlist(customers: their own; staff:owner_type+owner_id). Optionaladdress_typefilter.
- Browse (public, on your domain)
/store/products/-list(optionalcompany_id,category_id) andread(product_idorslug)./store/products/categories/-listcategories./store/search/-q: products whose name or description contains it.
- Manage the catalog (staff:
session+brand; SUPER_ADMIN, a STORE right, or EDITOR of the company's domain)/store/product/-create(company_id,name,price; a Default variant is made too),update,delete,claim,unclaim./store/product/variants/-list,create,update,delete(price, stock, position)./store/product/description/- one description perused_location./store/product/categories/- company categories:create,update,delete,link,unlink./store/product/images/- attach a/files/file to a product, variant, or category.
- Buy (customers, on your domain)
/store/cart/-addreturns a server-madecart_id;update,remove,read,mine,delete. One line per variant./store/checkout/- signed-in customer,cart_id,shipping_address_id, optionalbilling_address_id(from/address/). Makes a PENDING invoice.
- After the order
/store/invoice/-read,list; staffupdatetax, shipping, or status./store/invoice/payment/- record payments; PAID when the total is covered. Online card/PayPal processing is not connected yet: customer requests are recorded as PENDING and no charge is made./store/shipment/- staff ship order lines (partial shipments allowed) with carrier and tracking; customers can read them.
- Every create, update, and delete is kept in history.
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
- POST JSON to
/account_setup/with{"email":"you@example.com"}. You get backid. A 6-character confirmation code is emailed from support@dwalliance.com. It expires after 30 minutes. - POST JSON again with
id,confirmation_id,first_name,last_name, and optionalcompany_name. - Success returns
ok,person_id,company_id,relation_id, andbrand_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
- POST JSON to
/session/with your email and brand code. - If they match, a session id is emailed. The HTTP body is only
{"ok":true,"mailed":true}. - Send that session id later as JSON field
sessionor cookiesession.
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.
- Upload
index.html(or any page) withfile_pathlikesite. - Upload CSS, JS, images, fonts the same way. Match the relative paths your HTML uses.
- 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.
- Upload
index.htmlwith an emptyfile_path. - Upload the other pages, CSS, JS, images, and fonts the same way. Use relative links that match each file's
file_pathandfile_name. Do not name a top-level file or folder after a module path such aslib,files,session,account_setup,relation,crm,dns,domain,notes,note_files,docs, orskill; on your own domain those paths reach the platform, not your files. - To change a file, send
updatewith itsidand the new file. To remove it, senddeletewith itsid.
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.
- Point the domain here. At your registrar, either set the nameservers to
ns1.dwalliance.com,ns2.dwalliance.com, andns3.dwalliance.com, or keep your DNS host and add A records forexample.comandwww.example.comto64.62.211.170. - Claim the domain with
/domain/actioncreate. That claimsexample.comandwww.example.comfor your company and brand. - If you use our nameservers, create those A records with
/dns/. - 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.
https://example.com/sitemap.xmllists every PUBLIC.htmlpage of your site with its last change time (lastmod). PRIVATE files, images, CSS, JS and other non-HTML files, error pages such as404.html, and pages with<meta name="robots" content="noindex">are left out. A top-levelindex.htmlis listed ashttps://example.com/, andabout/index.htmlashttps://example.com/about/.https://example.com/robots.txtlets every search engine crawl the site and points them to your sitemap.
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.
9. Create, edit, and delete addresses
Use your own domain for customer calls (the cookie from /customer_session/ or /end_user_account_setup/ is sent automatically by the browser). Staff can call https://app.dwalliance.com/address/ with session and brand.
- Create
- Customer:
{"action":"create","line_1":"75-5660 Palani Rd","city":"Kailua-Kona","state":"HI","zipcode":"96740","address_type":"Shipping"} - Staff: add
"session","brand","owner_type":"PRSN"(or"CMPNY") and"owner_id". - Keep the
address_idfrom the answer.
- Customer:
- Edit
{"action":"update","address_id":"...","line_2":"Suite 3"}changes just that field."line_2":""clears it.line_1,city,state, andzipcodecannot be cleared.
- Delete
{"action":"delete","address_id":"..."}.- Past orders are not affected; each order keeps its own shipping and billing copy.
- List
{"action":"list"}for a customer, or withowner_typeandowner_idfor staff. Add"address_type":"Shipping"to filter.
Every create, update, and delete writes address_history (edits and deletes keep the old row), so changes can be traced. Checkout uses one shipping address and one billing address from this list.
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.