Concept by Reed Tereski · Invented brand, not client work
API reference
POST https://api.ferrule.example/v1/verify
Authentication
Send a key as a Bearer token on every request. Keys starting fr_sample_ are fake and only exist on this page. Ferrule shows a key once, then masks it, so store it when it is issued.
curl -s https://api.ferrule.example/v1/verify -H "Authorization: Bearer fr_sample_PUBLIC_not_a_real_key"Request body
JSON. Leave out optional fields you do not have.
| field | type | present | description |
|---|---|---|---|
line1 | string | required | Street number and name. Must contain a digit. |
line2 | string | optional | Apartment, suite or unit. |
city | string | required | City or town. Letters only. |
region | string | US, CA | Two-letter code. Optional when country is GB. |
postal_code | string | required | Must fit the format for country. |
country | enum | required | One of US, CA, GB. |
geocode | boolean | optional | Adds coordinates to the response. Default false. |
{ "line1": "118 tannery street", "line2": "apartment 4", "city": "Aldrefield", "region": "oh", "postal_code": "00014", "country": "US", "geocode": true}Response body
Status 200 means Ferrule answered. Read verdict to learn the answer.
| field | type | present | description |
|---|---|---|---|
request_id | string | always | Quote this when asking for support. |
verdict | enum | always | One of the four verdicts below. |
deliverable | boolean | always | True when mail can reach the returned address. |
address | object | always | The address in postal case and abbreviation. |
address.line2 | string | null | always | Null when no unit was sent. |
address.region | string | null | always | Null when no region was sent. |
changes[] | array | always | Empty when nothing changed. Case changes are not listed. |
changes[].field | string | per item | Which address field changed. |
changes[].from | string | per item | The value you sent. |
changes[].to | string | per item | The value returned. |
changes[].reason | string | per item | For example suffix_abbreviated. |
geocode | object | if requested | Holds lat, lng and precision. Left out when undeliverable. |
{ "request_id": "req_a2dfa61b", "verdict": "corrected", "deliverable": true, "address": { "line1": "118 TANNERY ST", "line2": "APT 4", "city": "ALDERFIELD", "region": "OH", "postal_code": "00014", "country": "US" }, "changes": [ { "field": "line1", "from": "118 tannery street", "to": "118 TANNERY ST", "reason": "suffix_abbreviated" }, { "field": "line2", "from": "apartment 4", "to": "APT 4", "reason": "unit_designator_standardized" }, { "field": "city", "from": "Aldrefield", "to": "ALDERFIELD", "reason": "city_spelling_corrected" } ], "geocode": { "lat": 46.32, "lng": -87, "precision": "rooftop" }}Verdicts
deliverable- Mail can reach the address as sent.
corrected- Mail can reach the address once the listed changes are applied.
unit_required- The building has several delivery points and no unit was sent.
undeliverable- No delivery point exists at this address.
Errors
Every error has the same shape, so one handler covers them. A 422 returns every failing field at once, so a form can mark them all together.
| field | type | present | description |
|---|---|---|---|
error.type | string | always | authentication, invalid_request or rate_limit. |
error.code | string | always | Stable. Branch on this, not on message. |
error.message | string | always | Written for developers. May change. |
error.fields[] | array | 422 only | One entry per field that failed. All failures are returned at once. |
error.fields[].field | string | per item | The request field to fix. |
error.fields[].code | string | per item | For example postal_code_format. |
error.fields[].got | string | null | per item | The value you sent. Null when missing. |
error.fields[].expected | string | per item | The accepted format, in words. |
error.retry_after | integer | 429 only | Same value as the Retry-After header, in seconds. |
request_id | string | always | Quote this when asking for support. |
401 Unauthorized
No key, or a revoked key. Does not count against the limit.
{ "error": { "type": "authentication", "code": "api_key_missing", "message": "No API key was sent. Create a sample key and send it as a Bearer token." }, "request_id": "req_7341f731"}422 Unprocessable Content
The address could not be read. Nothing was looked up.
{ "error": { "type": "invalid_request", "code": "address_malformed", "message": "3 fields failed validation. Nothing was looked up.", "fields": [ { "field": "line1", "code": "street_number_missing", "got": "Tannery Row", "expected": "A street number and name, such as 118 Tannery Row", "message": "line1 has no street number." }, { "field": "region", "code": "region_format", "got": "Ohio", "expected": "A 2-letter code, such as OH", "message": "region is not a 2-letter code." }, { "field": "postal_code", "code": "postal_code_format", "got": "OH-14", "expected": "5 digits, or ZIP+4 as 12345-6789", "message": "postal_code does not fit the US format." } ] }, "request_id": "req_68b64701"}429 Too Many Requests
Wait the number of seconds in the header, then retry once.
{ "error": { "type": "rate_limit", "code": "too_many_requests", "message": "Sample keys allow 5 requests per 60 seconds. Wait 15 seconds, then retry.", "retry_after": 15 }, "request_id": "req_7341f731"}Rate limits
A sample key allows 5 requests per 60 seconds. The next one returns 429 with Retry-After: 15, and the limit clears when that time is up. Requests that return 422 count. Requests that return 401 do not.
| header | sent on | meaning |
|---|---|---|
X-RateLimit-Limit | 200, 422, 429 | Requests allowed in a window. |
X-RateLimit-Remaining | 200, 422, 429 | Requests left in this window. |
Retry-After | 429 | Seconds to wait before retrying. |
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.
