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.

      Account

      The calling account, and what it is allowed to do.

      Every endpoint needs Authorization: Bearer lk_live_.... See Conventions for headers, status codes and error shape.

      Get the calling tenant

      GET /v1/tenant  ·  scope tenant:read

      Returns the tenant the presented API key belongs to.

      Response 200

      Tenant info

      Field Type Notes
      id string Required.
      slug string Required.
      display_name string Required.
      status string (active, suspended, closing, closed) Required.
      plan string Required.
      rate_cap_per_min integer Required. Per-tenant share of the per-VPS 5/min outbound cap (L6).
      daily_msg_quota integer Required.
      admin_email string Required.
      created_at string Required.
      suspended_at string
      closed_at string
      hard_delete_after string

      Errors: 401, 403

      Get the engagement tracking policy

      GET /v1/tracking  ·  scope tenant:admin

      Whether open and click tracking are enabled for this account. Both are off until switched on, and an account that has never set a policy reads as off rather than as an error.

      configured reports whether this deployment holds a signing secret. Without one no tracking token can be minted or verified, so tracking cannot work however the flags are set, and a caller seeing track_opens: true with nothing arriving deserves to know why.

      Response 200

      The policy.

      Field Type Notes
      track_opens boolean Required.
      track_clicks boolean Required.
      updated_at string Absent until a policy has been set.
      configured boolean Required. Whether this deployment holds a tracking signing secret. False means tracking cannot work whatever the flags say.

      Errors: 401, 403

      Update the engagement tracking policy

      PUT /v1/tracking  ·  scope tenant:admin

      Enables or disables tracking for the account. Send either flag or both; an omitted flag is left unchanged rather than reset.

      Enabling this changes what Lockally collects about your recipients, who have no relationship with us. You are the controller for them. What is collected is a user-agent string, a timestamp, and for a click the destination URL: no IP address, ever. The change is written to your audit log.

      Request body

      Field Type Notes
      track_opens boolean
      track_clicks boolean

      Response 200

      The updated policy.

      Field Type Notes
      track_opens boolean Required.
      track_clicks boolean Required.
      updated_at string Absent until a policy has been set.
      configured boolean Required. Whether this deployment holds a tracking signing secret. False means tracking cannot work whatever the flags say.

      Errors: 400, 401, 403

      Usage snapshot

      GET /v1/usage  ·  scope tenant:read

      Returns the tenant’s current usage + cap consumption. Designed for poll-based alerting on the integrator side (e.g. “warn when daily quota is 80% used”). Computed live on request, so there is no cache, so callers should poll at most once per minute.

      Response 200

      Usage snapshot

      Field Type Notes
      mailboxes_active integer Required. Mailboxes that are neither disabled nor soft-deleted.
      mailboxes_total integer All mailboxes for this tenant, including disabled/soft-deleted.
      domains_verified integer Domains that have passed DNS verification.
      domains_total integer
      messages_sent_last_60s integer Sends in the 60-second window ending now. Used by the rate-cap check.
      messages_sent_today_utc integer Sends since 00:00 UTC. Compared against daily_msg_quota.
      messages_sent_last_30d integer Rolling 30-day send count (not calendar month).
      bytes_stored integer Lifetime sum of messages.size_bytes for this tenant.
      rate_cap_per_min integer Per-tenant outbound rate cap (sends per minute).
      daily_msg_quota integer Per-tenant daily send quota (UTC day boundary).
      webhooks_total integer
      webhooks_paused integer Webhook subscriptions auto-paused after 50 consecutive failures (LT2).
      generated_at string Required. When this snapshot was generated, RFC 3339 UTC.

      Errors: 401, 403