IP geolocation API

Ip2Geo sends usage alerts and billingthrough OpenEmail.

Ip2Geo turns IP addresses into location data with one API call. Its 15 kinds of email go through OpenEmail, and most carry an idempotency key built from the event behind them, so a retry never sends a copy.

Visit ip2geo.dev
libs/openemail/SendBatchEmails.ts
const chunkSuffix = `-${chunkNumber}`const chunkLimit = OPENEMAIL_IDEMPOTENCY_KEY_MAX_LENGTH - chunkSuffix.lengthconst chunkKey = idempotencyKey  ? `${idempotencyKey.slice(0, chunkLimit)}${chunkSuffix}`  : undefined const data = await OpenEmail.emails.sendBatch(  rendered,  chunkKey ? { idempotencyKey: chunkKey } : undefined,)

Batches go out 100 emails at a time. Each chunk gets its own idempotency key, derived from the event, so a chunk that is retried is never sent twice.

15

kinds of email, each with its own template

12

of them sent with an idempotency key built from the event

Sep 2026

The month it started on OpenEmail

What runs through it

What Ip2Geo runs
on OpenEmail.

  • Login codesA one-time code that expires after ten minutes, with at most one new code a minute.
  • Usage alertsA warning at 80% and 90% of a plan's lookups, and a notice when the limit is reached.
  • MilestonesA note to the whole team at 1,000, 10,000, 100,000, 500,000 and one million lookups.
  • Team and key activityInvitations, new members, and a heads-up to owners and admins when an API key is created, rotated or deleted.
  • BillingPayment receipts with an invoice link, renewals, plan changes, failed payments and cancellations.
  • Contact formMessages from the website's contact form, with the visitor set as the reply-to address.

How it was built

How Ip2Geo
put it together.

  1. 01

    Render every template

    Ip2Geo's 15 React Email templates are rendered into HTML and plain text before each send.

  2. 02

    Tag every email

    Each email is tagged with its template, and most with the project it belongs to, so sends can be filtered later.

  3. 03

    Key every event

    Twelve kinds of email carry an idempotency key built from the event, such as the project, the threshold and the billing period.

  4. 04

    Send in batches of 100

    Team-wide email goes out with emails.sendBatch, 100 at a time, and failures come back per recipient.

Features in use

The OpenEmail features
Ip2Geo relies on.

Email API

Send one message or a hundred per call, now or later, and retry without sending twice.

Typed SDKs

TypeScript, Python and Ruby clients, one method for every operation.

/threads?query=invoice
{ "threads": 12 }
Same mailbox, whether a person or a program is holding it.
API keys

A key per job, limited to the scopes and senders it needs, with every call logged.

Multiple domains

Point several domains at one inbox, subdomains included.

acme.comacme.devteam.acme.comhey.acme.io

Questions

Questions about
Ip2Geo and OpenEmail.

Mint a key.
Send something.

Full API, MCP and SDK access on every plan, the free one included.