IQMail

v1

API for tests and tools

Version 1 reads mail. It never sends it. Create a key on the owner desk, then wait for a letter.

Send the key as X-API-Key or Authorization: Bearer. A private inbox also needs X-Inbox-Secret or X-Inbox-Token.

Wait ignores mail that is already there unless you pass since as a unix timestamp in milliseconds.

There is no send, relay, or forward endpoint.

OpenAPI

/api/openapi

@iqmail.atiqsoft.com

curl

curl -s -H "X-API-Key: $IQMAIL_API_KEY" \
  "https://iqmail.atiqsoft.com/api/v1/inboxes/qa-signup/wait?timeout=30"

JavaScript

const res = await fetch(base + "/api/v1/inboxes/" + inbox + "/otp", {
  headers: { "X-API-Key": apiKey, "X-Inbox-Secret": secret }
});
const body = await res.json();
console.log(body.otp);

Python

import os, requests
r = requests.get(
    "https://iqmail.atiqsoft.com/api/v1/inboxes/qa-signup/latest",
    headers={"X-API-Key": os.environ["IQMAIL_API_KEY"]},
    timeout=30,
)
r.raise_for_status()
print(r.json()["message"]["subject"])

Playwright

import { expect, test } from "@playwright/test";

test("signup code arrives", async ({ page, request }) => {
  const inbox = "qa" + Date.now();
  await page.goto("/inbox/" + inbox);
  const res = await request.get("/api/v1/inboxes/" + inbox + "/wait?timeout=30", {
    headers: { "X-API-Key": process.env.IQMAIL_API_KEY! },
  });
  const body = await res.json();
  expect(body.message.otp).toMatch(/\d{4,8}/);
});