Lockally

      Use your API key in the examples

      Replaces lk_live_… in the code samples on this site so you can copy and run them. It is stored in this browser only and is never sent anywhere, including to Ask AI.

      It will be visible on the page. Use a test key if you are sharing your screen or taking screenshots.

      Open and click tracking

      Open and click tracking is off until you turn it on, per account, and any individual send can opt out.

      # Enable it for the account
      curl -X PUT https://api.lockally.com/v1/tracking \
        -H "Authorization: Bearer $LOCKALLY_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"track_opens": true, "track_clicks": true}'
      # Opt one send out, without changing the account
      curl -X POST https://api.lockally.com/v1/send \
        -H "Authorization: Bearer $LOCKALLY_API_KEY" \
        -H "Idempotency-Key: receipt-1042" \
        -H "Content-Type: application/json" \
        -d '{"from":"receipts@yourdomain.com","to":["c@example.com"],
             "subject":"Receipt","html":"<p>Thanks</p>",
             "track_opens": false, "track_clicks": false}'

      track_opens and track_clicks have three states on a send: true, false, and absent meaning “whatever the account is set to”.

      What is collected

      Collected A user-agent string, a timestamp, and for a click the destination URL (your own link)
      Not collected The recipient’s IP address. Not stored, not logged, not derived from

      That omission is deliberate. An open is a request from somebody who has a relationship with you, not with us, and an open rate is the only thing anybody reads off this, so an IP adds nothing while making us hold third-party location data on your behalf.

      You are the controller for your recipients. Enabling this changes what is collected about them, so the change is written to your audit log, and whether your notice to them covers it is your call rather than ours.

      What gets rewritten, and what never does

      Click tracking rewrites http(s) links in the HTML part only. The plain-text part is never touched, because a visible redirect URL is the thing recipients complain about. A text-only send is therefore not click-tracked.

      Never rewritten:

      • mailto:, tel:, sms: and anything that is not http(s)
      • One-click unsubscribe links. Routing one through a redirect can fail the contract mailbox providers check, and breaking unsubscribe to measure a click is the wrong trade in every direction
      • Anchors (#section) and empty hrefs
      • Anything already pointing at a Lockally tracking path, so a resend cannot nest tokens
      • Any link carrying data-lockally-no-track, which is how you exclude one by hand

      The HTML is parsed, not pattern-matched, so a URL inside a <style> block, an Outlook conditional comment, or an <img src> is left alone.

      A tracking link carries its destination inside an HMAC-signed token. That is not a detail: an unsigned redirect endpoint is an open redirect, which is a phishing primitive on our domain. A token that does not verify gets a 404 and no redirect, with no fallback destination.

      The open pixel behaves differently on purpose: it returns a 1×1 GIF whatever happens, including for a token that does not verify. A 404 for a bad token and an image for a good one would make the endpoint an oracle for guessing tokens, and a broken-image icon in your email is your support ticket.

      Turning it off

      Setting track_opens and track_clicks to false stops collection immediately, including for mail already sitting in inboxes: the policy is re-checked when an engagement is recorded, not only when the message was sent. Historical rows are kept; nothing new is added.