{"path":"/session","session":false,"required":["email","brand"],"flow":["POST email and brand (the brand code, up to 10 characters).","If that email belongs to a person on that brand, a session id is created and emailed.","The response is ok and mailed only. The id is only in the email. Rights are stored, not returned."],"actions":{"get_permissions":"POST {action:\"get_permissions\", session, brand or domain}. Session may also come from the session cookie, or from __Host-dw_s on a customer domain. The session must be valid and hold rights for that brand (a domain is resolved to its brand). Returns the brand, optional domain, super_admin, and rights grouped by module. The session id is never returned. An empty body or a missing action still starts a sign-in as before."},"javascript":{"create":"const session = await fetch('/session/', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ email: 'person@example.com', brand: 'DWALLC' }) }).then(r => r.json());","get_permissions":"const perms = await fetch('/session/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'get_permissions', session: 'SESSION_ID', brand: 'BRANDCODE' }) }).then(r => r.json());","get_permissions_domain":"const perms = await fetch('/session/', { method: 'POST', credentials: 'include', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ action: 'get_permissions', session: 'SESSION_ID', domain: 'www.example.com' }) }).then(r => r.json());"}}