Integrations
Keys and domains
Public and secret API keys, authorized domains, rotating keys, rate limits and spam protection in nodenly. One.
Two kinds of keys
Public key pk_live_… | Secret key sk_live_… | |
|---|---|---|
| Where it goes | Your website's code (visitors can see it) | Servers only: WordPress PHP, Make, Zapier, your back end |
| What it can do | Only create leads | Create leads |
| Where it is accepted | Only from your authorized domains | Never from a browser |
A public key is meant to be visible, like a map key: on its own it can only add contacts, and only from your websites. A secret key is refused if the request comes from a browser (it has an Origin header), so a leaked secret key in a web page simply does not work.
Only owners and admins of the company can create and revoke keys.
Authorized domains
example.comcoversexample.com,www.example.comandshop.example.com.- A full address is fine:
https://www.example.com/contactis saved asexample.com. - To test on your computer, add the address with its port, for example
localhost:3000.
Keeping keys safe
- Keys are stored as a fingerprint (a hash): nobody can read them back, which is why they are shown only once. If you lose one, create another.
- Never put a secret key in a web page, a mobile app or a public code repository.
- To replace a key without stopping your website: create a new key, put it on the website, then revoke the old one. A revoked key stops working at once.
- Each key shows when it was last used, so you know whether it is still in use.
Limits
- 60 requests per minute per key.
- With public keys, 10 requests per minute per visitor (IP address): plenty for people, not for bots.
- Above that the API answers
429withRetry-After: 60. - Requests can be up to 32 KB.
Spam
- Add a hidden
_gotchafield to your form. People never fill it; bots do. When it is filled, the API answers as if it worked and stores nothing. - If the same form may be sent twice (a double click, a retry), send an
Idempotency-Keyheader: see JavaScript.