Concept by Reed Tereski · Invented brand, not client work
Verify a postal address with one POST
curl -s https://api.ferrule.example/v1/verify \
-H "Authorization: Bearer fr_sample_PUBLIC_not_a_real_key" \
-d '{"line1":"118 Tannery Row","city":"Alderfield","region":"OH","postal_code":"00014","country":"US"}'try another address
200 OK, verdict deliverable
200 OK
deliverable
- latency
- 155 ms
- request
- req_7341f731
body
{ "request_id": "req_7341f731", "verdict": "deliverable", "deliverable": true, "address": { "line1": "118 TANNERY ROW", "line2": null, "city": "ALDERFIELD", "region": "OH", "postal_code": "00014", "country": "US" }, "changes": []}field by field
| field | you sent | ferrule returned | reading |
|---|---|---|---|
| verdict | nothing | deliverable | confirmedMail can reach this address as sent. Store the returned form. |
| line1 | 118 Tannery Row | 118 TANNERY ROW | confirmedMatches the postal record. Returned in postal case. |
| line2 | nothing | nothing | absentNot sent and not needed. |
| city | Alderfield | ALDERFIELD | confirmedMatches the postal record. Returned in postal case. |
| region | OH | OH | confirmedAlready in postal form. |
| postal_code | 00014 | 00014 | confirmedAlready in postal form. |
| country | US | US | confirmedAlready in postal form. |
Pasting this into a terminal fails: Ferrule is invented and the host is reserved. The response above came from a simulator in this page.
Ferrule tells you whether a postal address can receive mail.
Send one POST to /v1/verify. The response gives a verdict, the address in postal form, and every change made to it. Your checkout decides what to do from the verdict alone.
Create a sample key
The console issues one. It is shown once, then masked, and it only works inside this page.
open the consoleexport FERRULE_KEY=fr_sample_PUBLIC_not_a_real_keySend an address
Export the key as
FERRULE_KEYand post the fields you have. Leave out what you do not have.const res = await fetch("https://api.ferrule.example/v1/verify", { method: "POST", headers: { Authorization: `Bearer ${process.env.FERRULE_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "line1": "118 Tannery Row", "city": "Alderfield", "region": "OH", "postal_code": "00014", "country": "US", }),});const result = await res.json();Branch on the verdict
A 200 means Ferrule answered. Whether the mail arrives is in
verdict.switch (result.verdict) { case "deliverable": return saveAddress(result.address); case "corrected": return confirmChanges(result.changes, result.address); case "unit_required": return askForUnit(); case "undeliverable": return askForNewAddress();}
Every 200 carries one of four verdicts
| verdict | deliverable | what your code does |
|---|---|---|
deliverable | true | Store the returned address and continue. |
corrected | true | Show the changes, confirm with the customer, store the returned address. |
unit_required | false | Ask for an apartment or suite, then send again with line2. |
undeliverable | false | Ask for a different address. Do not retry this one. |
Every error names what to do next
| status | code | what your code does |
|---|---|---|
401 | api_key_missing | Send a key as a Bearer token. Does not count against the limit. |
422 | address_malformed | Read error.fields, show each message beside its input, and let the customer fix it. |
429 | too_many_requests | Wait the seconds in Retry-After, then retry once. |
Ferrule is an invented company.
About this concept
The measure that sets this layout is time to first response: how long a developer waits between opening the docs and seeing the API answer. The docs home opens on a command with its response already printed, and the console lets you send before you have a key, because the 401 that comes back names the next step.
Errors get the same care as success because errors are what an integration shows you first. The 422 lists every bad field and jumps to its input, and the 429 counts down its Retry-After and holds the send button until the window clears.
The command is the call to action because copying it is the real first move, and other actions invert through one difference-blend layer, so a single hover rule holds on black, bone and acid.
Figma mockups


Prototype map
3 screens and 6 prototype links, drawn from the Figma file.
