{"path":"/domain","session":"Required. Send session and brand. Brand must match the session. Module DOMAIN and the right for the action.","what":"Claims a domain name for a company on this brand. A claimed name serves the brand PUBLIC /files at https://<name>/ once DNS and hosting point at DW Alliance, and lets /dns manage records in that zone.","actions":{"create":"company_id and domain_name. Claims the name and www.<name>. A leading www. is removed first. Names already claimed by this company are returned as already_owned.","read":"company_id. Optional domain_name. Lists the names this company has claimed on this brand.","delete":"company_id and domain_name. Releases the name and www.<name>. Refused while /dns still has records in that zone on this brand."},"refused":["Names claimed by another company or brand, and names under or above a name another company or brand claimed.","app.dwalliance.com, localhost, IP addresses, and .lan names.","Protected platform names: app.dwalliance.com, ns1.dwalliance.com, ns2.dwalliance.com, ns3.dwalliance.com, mail.dwalliance.com, store.dwalliance.com, and every name under them."],"returns":"domain_id, domain_name, and status for each name. Never codes or session ids.","examples":{"create":"const res = 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());","read":"const res = await fetch('/domain/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'read', session: 'SESSION_ID', brand: 'BRANDCODE', company_id: 'COMPANY_ID' }) }).then(r => r.json());","delete":"const res = await fetch('/domain/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'delete', session: 'SESSION_ID', brand: 'BRANDCODE', company_id: 'COMPANY_ID', domain_name: 'example.com' }) }).then(r => r.json());"}}