Part of Data sovereigntyLaw 25 · Engineering

Handling Law 25 access and portability requests in your app.

Under Law 25 you have 30 days to answer an access request in writing, and silence counts as a refusal (section 32). The request must be written and come from someone who proves who they are (section 30). Information the person gave you must be provided, on request, in a structured, commonly used format (section 27).

Facts checked

The sections that shape the feature

Section numbers are from Quebec’s Act respecting the protection of personal information in the private sector, read on LégisQuébec on 2026-10-29. The Act sets the obligations; the schema and routes below are our design. This is not legal advice.

SectionWhat it says, in shortWhat you build
27, para. 1–2 †Confirm the information exists, communicate it, allow a copy; a “written and intelligible transcript” on requestAn export, and a readable version of it
27, para. 3 †Information “collected from the applicant, and not created or inferred” goes out “in a structured, commonly used technological format”, also to a body authorized by law to collect itA JSON export that separates provided from derived data
29 †Tell the public where and how access can be obtainedA privacy page that names the request form or address
30 †A request is considered only if made in writing by someone who proves they are the person concerned or a listed representative; it goes to the person in charge of the protection of personal informationA request form, an identity check, and routing to your privacy lead
32 †Reply in writing “promptly and not later than 30 days after the date the request is received”; no reply is a refusalA due date on every request and a daily reminder
33 †Access is free; a reasonable charge for transcription, reproduction or transmission only if announced in advanceA free self-serve download
34 †A refusal gives reasons, the provision relied on, the remedies and the time limitA refusal template with those four parts
36 †Information under a refused request is kept until recourse is exhaustedA hold that stops the retention purge
40 †Refuse to reveal a third person’s information when disclosure could seriously harm themRedaction of other people in the export

† Competitor details come from each vendor’s own published pages on the dates shown; prices and plans change, so check the vendor before you decide. 27, para. 1–2 (2026-10-29) · 27, para. 3 (2026-10-29) · 29 (2026-10-29) · 30 (2026-10-29) · 32 (2026-10-29) · 33 (2026-10-29) · 34 (2026-10-29) · 36 (2026-10-29) · 40 (2026-10-29)

Record every request and its 30-day deadline (sections 30 and 32)

Section 32 counts from “the date the request is received”, not from the day you confirmed the requester’s identity. Our reading: start the clock at receipt, ask for proof of identity in your first reply, and answer in writing before the due date whatever happens. A request that came in by email or support chat counts too, so log those in the same table.

The second paragraph of section 32 is the one teams miss: “Failure to respond within 30 days of the receipt of a request is deemed to be a refusal.” From that point the person has 30 days to take it to the Commission d’accès à l’information (section 43). A row per request, with its due date, makes the deadline visible:

CREATE TABLE privacy_requests (
  id                  bigserial PRIMARY KEY,
  kind                text NOT NULL CHECK (kind IN ('access', 'portability', 'rectification')),
  user_id             bigint REFERENCES users(id) ON DELETE SET NULL,
  requester_email     text NOT NULL,
  on_behalf_of        text,                  -- s. 30: representative, heir, parent...
  received_at         timestamptz NOT NULL DEFAULT now(),
  due_at              timestamptz NOT NULL,  -- s. 32: received_at + 30 days, set on insert
  identity_checked_at timestamptz,
  identity_method     text,                  -- 'recent_sign_in', 'email_link', 'documents'
  status              text NOT NULL DEFAULT 'open'
                      CHECK (status IN ('open', 'granted', 'partly_granted', 'refused')),
  responded_at        timestamptz,
  refusal_section     text,                  -- s. 34: the provision relied on
  hold_until          timestamptz            -- s. 36: keep the data while recourse is open
);

-- received today, due in 30 days. Not a generated column: timestamptz + interval
-- isn't immutable, so Postgres won't accept it there.
INSERT INTO privacy_requests (kind, user_id, requester_email, due_at)
VALUES ('portability', $1, $2, now() + interval '30 days');

-- every morning: what is due within a week (a scheduled query can run this)
SELECT id, kind, requester_email, due_at - now() AS time_left
FROM privacy_requests
WHERE status = 'open' AND due_at < now() + interval '7 days'
ORDER BY due_at;

Identity checks that don’t collect more (sections 30 and 5)

Section 30 says no request may be considered unless it comes from a person “who proves that he is the person concerned” or one of the listed representatives: a representative, heir or successor, the liquidator of the succession, a beneficiary of life insurance or a death benefit, a person with parental authority, or a spouse or close relative of a deceased person under section 40.1.

The Act doesn’t say how to prove it. Section 5 limits collection to what is necessary, so asking for a copy of a driver’s licence to confirm someone who can sign in is hard to justify. For account holders, a fresh sign-in is the best proof you have. For a request by email, send a confirmation link to the address on file. Ask for documents only for representatives, and delete them once the request is closed.

// POST /privacy/requests — written request (s. 30) from a signed-in user
app.post("/privacy/requests", requireUser, async (req, res) => {
  // s. 30: the requester must prove they are the person concerned.
  // A fresh sign-in proves it without collecting anything new (s. 5).
  const authAge = Date.now() / 1000 - req.session.authTime;
  if (authAge > 10 * 60) return res.status(401).json({ error: "reauthenticate" });

  const kind = req.body.kind; // 'access' | 'portability' | 'rectification'
  const r = await db.one(
    `INSERT INTO privacy_requests
       (kind, user_id, requester_email, due_at, identity_checked_at, identity_method)
     VALUES ($1, $2, $3, now() + interval '30 days', now(), 'recent_sign_in')
     RETURNING id, due_at`,
    [kind, req.user.id, req.user.email],
  );
  await enqueue("build_privacy_export", { requestId: r.id });
  await mail.send(req.user.email, "We received your request", ackText(r)); // s. 32: reply in writing
  res.status(202).json({ id: r.id, due_at: r.due_at });
});

The export: what goes in, and in what format (sections 27 and 40)

Section 27 has two scopes, and the export should keep them apart. The right of access in the first paragraph covers everything you hold about the person, including scores and segments you computed. The portability rule in the third paragraph is narrower: computerized information “collected from the applicant, and not created or inferred using personal information concerning him”, given “in a structured, commonly used technological format” unless that raises serious practical difficulties. The Act names no format. JSON fits; CSV works for flat tables. The person can also ask you to send it to “any person or body authorized by law to collect such information”.

Section 40 runs the other way: you must refuse to reveal a third person’s information when that could seriously harm them. A messaging app exports the person’s own messages and replaces other participants with a placeholder. Build the file in a background job, keep it in your bucket, and serve it through an authenticated route: on Canner, storage buckets are private and reachable only from your apps, so the download goes through the app anyway.

// Job: build the export for one request (s. 27)
async function buildPrivacyExport({ requestId }) {
  const rq = await db.one("SELECT * FROM privacy_requests WHERE id = $1", [requestId]);
  const id = rq.user_id;

  const [profile, orders, messages, consents, segments] = await Promise.all([
    db.one("SELECT email, name, phone, created_at FROM users WHERE id = $1", [id]),
    db.any("SELECT id, placed_at, items, total FROM orders WHERE user_id = $1", [id]),
    // s. 40: the person's own messages; other people's names and text stay out
    db.any(`SELECT m.id, m.sent_at, m.body,
                   CASE WHEN m.recipient_id = $1 THEN 'you' ELSE 'another user' END AS recipient
            FROM messages m WHERE m.sender_id = $1`, [id]),
    db.any("SELECT purpose, text_version, granted_at, withdrawn_at FROM consents WHERE user_id = $1", [id]),
    db.any("SELECT segment, score, computed_at FROM user_segments WHERE user_id = $1", [id]),
  ]);

  const doc = {
    format: "example-app/privacy-export/1",
    exported_at: new Date().toISOString(),
    // para. 3: collected from the person, in a structured, commonly used format
    provided: { profile, orders, messages, consents },
    // para. 1: also covered by the right of access, but created or inferred by us,
    // so outside the format rule. Include it for an access request.
    derived: rq.kind === "access" ? { segments } : undefined,
  };

  // keep the file in the bucket; the person downloads it through an app route
  await storage.putObject(`privacy-exports/${requestId}.json`, JSON.stringify(doc, null, 2));
  await db.none(
    "UPDATE privacy_requests SET status = 'granted', responded_at = now() WHERE id = $1",
    [requestId],
  );
  await mail.send(rq.requester_email, "Your data is ready", downloadText(requestId));
}

// GET /privacy/exports/:id — served through the app, owner only
app.get("/privacy/exports/:id", requireUser, async (req, res) => {
  const rq = await db.oneOrNone(
    "SELECT id FROM privacy_requests WHERE id = $1 AND user_id = $2 AND status = 'granted'",
    [req.params.id, req.user.id],
  );
  if (!rq) return res.sendStatus(404);
  res.setHeader("Content-Type", "application/json");
  res.setHeader("Content-Disposition", 'attachment; filename="my-data.json"');
  (await storage.getObject(`privacy-exports/${rq.id}.json`)).pipe(res);
});

Refusals, corrections and the data you must keep (sections 34 to 36)

  • A refusal is a letter with four parts (section 34): the reasons, the provision of the Act relied on, the remedies (an application to the CAI under section 42), and the time limit (30 days, section 43). If the person asks, help them understand it.
  • A correction gets a copy (section 35): when you grant a rectification, send a free copy of the information you changed or added, or an attestation that you deleted it.
  • A fee needs notice first (section 33): access is free. You may charge a reasonable amount for transcription, reproduction or transmission only if you give the approximate amount in advance. A self-serve download has no reason to cost anything.
  • Refused data stays (section 36): information under a refused request is kept until the person has exhausted their recourse, so your retention job must skip it.
-- s. 36: refused or partly refused requests keep their data while recourse is open.
-- s. 43 gives the person 30 days to go to the CAI; a dispute there can run longer,
-- so set hold_until by hand once you know.
UPDATE privacy_requests
SET hold_until = responded_at + interval '30 days'
WHERE status IN ('refused', 'partly_granted') AND hold_until IS NULL;

-- the nightly retention purge skips anyone with an active hold
DELETE FROM users u
WHERE u.last_seen_at < now() - interval '24 months'
  AND NOT EXISTS (
    SELECT 1 FROM privacy_requests r
    WHERE r.user_id = u.id
      AND (r.status = 'open' OR r.hold_until > now())
  );

Questions

How long do I have to answer a Law 25 access request?

30 days from the date you receive it, in writing (section 32). If you don’t answer in that time, the request is deemed refused, and the person then has 30 days to bring it to the Commission d’accès à l’information (section 43).

What format does a Law 25 portability export need?

“A structured, commonly used technological format” (section 27, third paragraph). The Act names none; JSON or CSV fits. It covers information collected from the person, not information you created or inferred, unless the export raises serious practical difficulties.

Do I have to include data I inferred about the person?

For an access request, yes: the first paragraph of section 27 covers all personal information you hold. The portability format rule in the third paragraph excludes information “created or inferred”, so you may keep it out of that file.

Can I ask for ID before answering?

You must check identity: section 30 only lets you consider a request from someone who proves who they are. Use the least intrusive proof that works, such as a fresh sign-in or a link to the email on file, since section 5 limits what you collect.

Can I charge for an access request?

Access is free (section 33). A reasonable charge for transcription, reproduction or transmission is allowed only if you tell the person the approximate amount beforehand.

Keep the requests, the data and the exports in Quebec.

Postgres, storage and backups on Canner stay in Montréal. Start free.