PreArrive Developers

Test mode

Build and test integrations without sending real emails or burning plan caps.

Two completely separate worlds

Every key carries a mode in its prefix:

prearrive_live_sk_…      → live data, real emails
prearrive_test_sk_…      → test data, no real emails

The two are isolated end-to-end:

What happens when you call POST /v1/reservations/{id}/send with a test key

No real email goes to the guest. Instead:

  1. The reservation row is marked sent_at = now, status = "sent".
  2. The rendered email body (subject + HTML + text) is stashed in a short-lived KV slot (24h TTL).
  3. The response includes email_preview_url on the reservation.
  4. The reservation.sent webhook fires with livemode: false.

Reading the preview

GET https://api.prearrive.com/v1/reservations/res_…/email_preview
Authorization: Bearer prearrive_test_sk_…

{
  "object": "email_preview",
  "reservation_id": "res_…",
  "rendered_at":  "2026-05-20T05:30:00Z",
  "would_send_to": "guest@example.com",
  "from":          "host@example.com",
  "subject": "Your Beachside Loft check-in packet — please review",
  "html":    "<!doctype html>…full body…",
  "text":    "Hi Avery, …"
}

The preview disappears after 24 hours. Use it to:

Creating a test key

  1. Sign in to /app/settings/api.
  2. Switch to the Test tab.
  3. Create a new key — same scope picker as live. Copy the plaintext (shown once).

You get the same 3-keys-per-mode cap and the same rotation flow. Test and live keys are fully independent.

What's the same as live

Related: Idempotency · Versioning · Full API reference