API keys
Creating, viewing and revoking business API keys for the Blocklist API, and generating or rotating per-form keys for the Forms API — who can manage them, how Zoie stores them and what the key list shows.
Zoie has two kinds of API key. Both are created in the web app, shown once, and stored only as a hash.
| Business API key | Form API key | |
|---|---|---|
| Used by | Blocklist API | Forms API submitForm |
| Header | x-zoie-api-key | X-Form-Api-Key |
| Looks like | zbk_ followed by 43 random characters | zfk_ followed by 43 random characters |
| Belongs to | One business | One form |
| How many | As many as you like per business | One per form |
| Created in | Settings › Leads › Blocked Leads › Website API access | The form builder: Publish Form › REST API |
| Removed by | Revoke | Generating a new key. The old one stops working, but a form can’t go back to having no key. |
| Expires | Never | Never |
Business API keys
A business API key lets websites the business runs check contacts against its blocked list, or fetch the list. It can’t read leads or anything else.
Who can manage keys
The key panel sits on the Leads settings page, which appears for users whose role includes Leads permissions. There’s no separate permission for API keys: anyone who can open that page can generate and revoke the business’s keys. Keep Leads access to people you’d trust with a key.
Generating a key
- In Zoie, open Settings and, under Preferences, click Leads.
- Open the Blocked Leads tab and scroll to Website API access.
- Click Generate API key.
- Optionally, enter a Label (optional), for example
marketing-site. The hint reads “A name to recognize this key later, e.g. the website it’s for.” Labels can be up to 120 characters. - Click Generate. The Your new API key window shows the full key with a Scope: blocklist:read tag, and warns “Copy this key now — it won’t be shown again.”
- Click Copy, store the key on your website’s server, then click Done.
Below the list, How to use these endpoints expands to show both endpoint URLs and a cURL example for your account.
The key list
| Column | Shows |
|---|---|
| Label | The label you gave the key, or —. |
| Key | The first and last few characters, for example zbk_A1b2…9xQz. The rest is never shown again. |
| Last used | When the key last authenticated a request, or Never. It’s updated at most once a minute per key, so it can lag by up to a minute. |
| Created | When the key was generated. |
Every key gets the same scope, blocklist:read. You can’t choose a scope, and the list doesn’t show it.
Revoking a key
Click Revoke on the key’s row. Zoie asks “Revoke this key?” and warns “Any website using it will immediately lose access. This can’t be undone.” Confirm with Revoke.
The key disappears from the list, and from then on requests that use it get 401 {"success":false,"message":"Invalid or revoked API key."}.
To replace a key without downtime, generate the new one first, deploy it, then revoke the old one.
How Zoie stores keys
- Zoie keeps only a SHA-256 hash of the key, salted with a server-side secret, plus the first and last few characters for the list. Nobody at Zoie can recover a lost key. Revoke it and generate a new one.
- A key belongs to the business, not to the person who generated it. It keeps working if that person leaves the team, until someone revokes it.
- Revoking is immediate and permanent. A revoked key can’t be restored.
Form API keys
A form API key authenticates submissions sent to one form from your own server. Without one, a form accepts submissions from anyone, subject to its allowed domains.
Generating a form key
- Open the form in the form builder and click Publish Form.
- Open the REST API tab.
- Under API key, click Generate API key.
- Copy the key from the field below the button. “Full secret shown only here until you refresh or leave this page. After that you will see the last characters only (from the server).”
The card now shows a Key active tag, and the Headers and request examples on the tab are filled in with the new key. Once you refresh or leave the page, the full key is gone and the card shows Active key ends with … followed by its last four characters.
Rotating a form key
Click Generate new key. Zoie asks “Generate a new API key?” and warns “The previous key will stop working as soon as a new key is created. Existing integrations must be updated.” Confirm with Generate new key, then update your server right away.
By default, Zoie allows 5 key generations per hour. After that, requests get 429 with “Too many API key generations, please try again later.”
How Zoie stores form keys
Like business keys, form keys are stored only as a salted SHA-256 hash, with the last four characters kept for display. A form key never expires. Generate a new one if it’s lost or exposed.