Dry runs
Check any change before it happens with dry_run=true.
On this page
Add dry_run=true to any operation that changes something. Seemly runs every step of the real call: authentication, scopes, plan checks, validation, consent and safety checks. Then it stops before writing, and tells you what would have happened.
curl -X POST 'https://api.seemly.com/v1/lists?dry_run=true' \
-H "Authorization: Bearer $SEEMLY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Launch readers"}'const response = await fetch("https://api.seemly.com/v1/lists?dry_run=true", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.SEEMLY_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Launch readers"
}),
});
const result = await response.json();
console.log(response.status, result);import os
import requests
response = requests.post(
"https://api.seemly.com/v1/lists?dry_run=true",
headers={
"Authorization": f"Bearer {os.environ['SEEMLY_API_KEY']}",
},
json={
"name": "Launch readers",
},
)
print(response.status_code, response.json())The answer is always HTTP 200 with this shape, whatever the real status would be:
{
"dry_run": true,
"would": { "action": "create_list", "name": "Launch readers" }
}The would object describes the effect for the operation. If a check fails, you get the same problem response the real call would give, with the same code and fix, so a dry run is the cheapest way to find out why a call would be refused.
What a dry run guarantees#
- Nothing is written, nothing is queued, no email is sent and no webhook fires.
- It does not use up an
Idempotency-Key. - It counts as a normal request against the rate limit.
- If a handler ever tried to do something real during a dry run, the request fails instead of doing it.
When to use it#
- Before the first call of a new integration.
- Before a bulk call:
bulk_upsert_subscriberswithdry_run=truereports what each item would do. - In an agent, before anything you are not sure of. It is free of side effects.
Read operations and preview_send do not take dry_run: they already change nothing. request_send takes it and reports whether the send would be allowed, without storing a request.