{"path":"/dns","session":"Required. Send session and brand. Brand must match the session. Module DNS and the right for the action.","store":"Rows are written to crm.dns on db1. dns_history is written on db2. Claim the zone first with /domain. /dns no longer claims names.","protected":"Refused for every brand: app.dwalliance.com, ns1.dwalliance.com, ns2.dwalliance.com, ns3.dwalliance.com, mail.dwalliance.com, store.dwalliance.com and every name under them, plus MX, NS, and SOA records on dwalliance.com.","actions":{"create":"company_id, domain, rr_type, rr_fqdn, and the fields that type uses. The zone must already belong to this company. Claim it with /domain action create.","update":"company_id, rr_id, and any fields to replace. The zone must already belong to this company.","delete":"company_id and rr_id.","read":"company_id. Optional rr_id or domain. Returns records for zones this company owns."},"rr_type":{"+":"A. rr_fqdn and rr_ip","=":"A and PTR. rr_fqdn and rr_ip","C":"CNAME. rr_fqdn and rr_target","@":"MX. rr_fqdn, rr_target, rr_mx_dist. rr_ip is optional",".":"NS. rr_fqdn and rr_target. rr_ip is optional","&":"NS delegation. rr_fqdn and rr_target","^":"PTR. rr_fqdn and rr_target","Z":"SOA. rr_fqdn plus the SOA columns when sent","'":"TXT. rr_fqdn and rr_target"},"examples":{"create":"const res = 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());","read":"const res = await fetch('/dns/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'read', session: 'SESSION_ID', brand: 'BRANDCODE', company_id: 'COMPANY_ID', domain: 'example.com' }) }).then(r => r.json());","update":"const res = await fetch('/dns/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'update', session: 'SESSION_ID', brand: 'BRANDCODE', company_id: 'COMPANY_ID', rr_id: 1, rr_ip: '192.0.2.11' }) }).then(r => r.json());","delete":"const res = await fetch('/dns/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'delete', session: 'SESSION_ID', brand: 'BRANDCODE', company_id: 'COMPANY_ID', rr_id: 1 }) }).then(r => r.json());"}}