API Reference
Authentication
Authenticate requests using your API key
Nomod uses API keys to authenticate and securely identify your requests. Every request to the Nomod API must include your API key in the request header.
curl https://api.nomod.dev/v1/charges \
-H "X-API-KEY: your_api_key"
Replace your_api_key with your actual API key.
Creating and managing API keys
Create and manage your API keys from Settings > Tools & customisations > Apps & APIs > Nomod API. You can create multiple live keys and name them to track which key belongs to which integration or website. See Nomod API to learn more about revoking and managing your API keys.
Using your API key
Include your key in every API request using the X-API-KEY header. If your key is missing or invalid, the request will fail with a 401 Unauthorized response.
API Key Scheme
| Item | Value |
|---|---|
| Security scheme type | API Key |
| Header parameter name | X-API-KEY |
| Example value | sk_test_LKhVdQrc.EqkGuzuCQ0qQvgwdrnu43TtMDwTlppxU |
Authentication errors
Authentication errors occur when your API request cannot be verified, usually because the API key is missing, invalid, or formatted incorrectly.
When this happens, Nomod returns an HTTP 401 Unauthorized response, along with an error object in JSON format.
{
"error": {
"message": "Please use your API Key to authenticate",
"code": "not_authenticated",
"docs_url": "https://nomod.com/docs/api-reference/requests-responses"
}
}
See Error codes for the full list of Nomod-specific error codes and how to resolve them.