401.
Getting an API Key
To generate a key, visit https://parsetx.dev/#pricing and click Get API Key. During sign-up you’ll provide:- Your email address — used for billing notifications and account recovery.
- A credit card — required to prevent automated abuse of the API. You are only charged for actual usage at $0.005 per request. There are no monthly fees and no charges for simply having an account.
Sending Your API Key
ParseTx supports two authentication methods. Both are equivalent — use whichever fits your stack.Method 1: X-API-Key Header (Recommended)
Pass your key in theX-API-Key header. This is the preferred method and what all ParseTx documentation examples use.
Method 2: Bearer Token
Alternatively, pass your key as a Bearer token in theAuthorization header. This is useful when integrating with tools or frameworks that expect standard OAuth-style headers.
You cannot use both headers in the same request. If both are present,
X-API-Key takes precedence.Error Responses
When authentication fails, the API returns401 Unauthorized. There are two distinct error messages:
Missing key — returned when the X-API-Key header is absent or empty:
Security Best Practices
Use Environment Variables
Never hardcode your API key directly in source files. Store it as an environment variable and read it at runtime. Here’s how this looks in practice:Node.js
Python
Keep Keys Out of Version Control
Before committing code, double-check that your key is not embedded in:- Source files or configuration files checked into Git
- Docker images or container build artifacts
- Client-side JavaScript bundles served to browsers
- Public API documentation or README examples
How ParseTx Protects Your Key
On the server side, ParseTx applies the following protections:- SHA-256 hashing at ingestion — your raw API key is hashed immediately on arrival and the raw value is discarded. Only the hash is stored in the database, so a database breach cannot expose your key.
- No recovery path — because the raw key is never persisted, there is no support escalation path that could be socially engineered to retrieve it. The only way to get a new key is through the dashboard with verified account access.
- Revocation — you can invalidate a key at any time from the dashboard. Revoked keys return
401immediately with no grace period.