apiKey header to authenticate requests to Niva. Create keys in the Niva dashboard under Settings › API Keys.| Credential | Use |
|---|---|
Private API key (nt_…) | Server-side requests, including creating submissions and running verification. Keep it on your server. |
Public API key (ntpub_…) | The Public Documents API and embeddable widgets. It can be used in your frontend. |
Submission token (token) | Grants access to one submission through the Public Documents API or widgets. Use it together with a public API key. |
401 Unauthorized. Sending a public key to a private endpoint, or a private key to a public endpoint, also returns 401:{
"errors": ["401 Unauthorized"]
}401 with a different message:{
"errors": ["Invalid token."]
}