Resources
Integrations
Keep cookies between requests. Run one isolated session per independent test workflow.
Python · requests.Session
Install requests with pip. Session keeps both the scoped and current-inbox cookies automatically. Send a test message from your own mail provider after creation, then fetch its body. Cleanup runs even if a test assertion fails.
import time
import requests
BASE = "https://inboxflick.com/v1"
with requests.Session() as client:
created = client.post(f"{BASE}/mailboxes", json={}, timeout=15)
created.raise_for_status()
inbox = created.json()["data"]["mailbox"]
selected = client.post(f"{BASE}/mailboxes/{inbox['id']}/select", timeout=15)
selected.raise_for_status()
try:
print(inbox["address"]) # send your test email to this address
for attempt in range(12):
result = client.get(f"{BASE}/messages", timeout=15)
result.raise_for_status()
items = result.json()["data"]["items"]
ready = next((m for m in items if m["status"] == "ready"), None)
if ready:
detail = client.get(f"{BASE}/messages/{ready['id']}", timeout=15)
detail.raise_for_status()
message = detail.json()["data"]["message"]
# Make private assertions on message["text_body"].
break
time.sleep(5)
finally:
deleted = client.delete(f"{BASE}/mailboxes/current", timeout=15)
deleted.raise_for_status()Node.js · cookie-aware fetch
Node’s built-in fetch does not persist cookies automatically. Install fetch-cookie and tough-cookie, then run this example as an ES module. Each new CookieJar isolates an inbox client. Never print the jar or response headers.
// npm install fetch-cookie tough-cookie
import makeFetchCookie from 'fetch-cookie';
import { CookieJar } from 'tough-cookie';
const api = 'https://inboxflick.com/v1';
const client = makeFetchCookie(fetch, new CookieJar());
async function request(path, options = {}) {
const response = await client(api + path, {
...options, signal: AbortSignal.timeout(15000)
});
if (!response.ok) throw new Error(`API HTTP ${response.status}`);
return response.status === 204 ? null : response.json();
}
const created = await request('/mailboxes', {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: '{}'
});
await request(`/mailboxes/${created.data.mailbox.id}/select`, { method: 'POST' });
try {
console.log(created.data.mailbox.address); // use as your test recipient
const result = await request('/messages');
console.log(`Messages: ${result.data.items.length}`);
} finally {
await request('/mailboxes/current', { method: 'DELETE' });
}CI and safe usage
Use one cookie jar per job, redact cookies and message content, and delete the inbox when finished. Account for shared egress-IP limits. Do not create new inboxes in a tight loop or retry creation blindly. The examples are plain HTTP integrations, not official SDKs. Any third-party packages follow their own installation and licensing terms. A temporary domain may be rejected by a sender, so test only flows you control or are authorized to test.