Authentication
The Prop AI Deals API uses bearer API keys for all programmatic access. Keys are created from your dashboard and sent on every request via theAuthorization header.
API key format
Keys look like this:- Prefix:
paid_(37 characters total) - 32 hex characters of cryptographic randomness after the prefix
- Hashed with HMAC-SHA256 in our database — we cannot recover a lost key
- Cached in Redis for sub-millisecond validation
- One key carries the full plan and scope set of the user who created it
Creating an API key
From the dashboard
- Open propaideals.co.uk/dashboard/api
- Click Create API Key
- Enter a descriptive name (e.g.
production-server,staging-app) - Copy the key from the modal — this is the only time it will be shown
- Store it in your secret manager (1Password, AWS Secrets Manager, Doppler, etc.)
Limits
- Maximum 5 active keys per user
- Revoke an old key before creating a 6th
- Each key inherits its plan from your active subscription
Sending the key
Send the key in theAuthorization header on every request:
Scopes
Each plan grants a set of scopes. The middleware checks the request path against the required scope:| Scope | Endpoint prefix | What it grants |
|---|---|---|
properties:read | /api/v1/properties | Listing search and detail |
market-data:read | /api/v1/market-data | Sold history, comparables |
rentals:read | /api/v1/rentals | Rental estimates, yields |
investment:read | /api/v1/investment, /api/v1/calculations, /api/v1/evaluations | Calculators and deal scoring |
areas:read | /api/v1/areas, /api/v1/districts, /api/v1/market-intelligence | Area-level analytics |
spatial:read | /api/v1/spatial | Viewport / polygon / radius search |
planning:read | /api/v1/planning | Planning applications |
leads:read | /api/v1/leads, /api/v1/off-market | Off-market and motivated-seller signals |
ai:chat | /api/v1/ultimate-ai | Conversational AI (cost: 5 per request) |
Rotating keys
We recommend rotating production keys at least every 90 days, and immediately if you suspect exposure.- Create a new key in the dashboard
- Deploy it to your application as a new env var
- Verify traffic is flowing on the new key (check
last_usedin the dashboard) - Revoke the old key
Two authentication systems
Prop AI Deals has two separate authentication paths:API keys (paid_*) | Clerk JWT (eyJhbG...) | |
|---|---|---|
| Who uses it | Server-to-server, scripts, integrations | Logged-in users in the web app |
| How obtained | Created in the dashboard | Issued by Clerk on browser sign-in |
| Lifetime | Until revoked | Short-lived (rotated every 60 minutes) |
| Scopes | Plan-based, fixed at creation | Full user permissions |
| Used for | The public API (everything in this documentation) | The dashboard, billing, account settings |
| Header | Authorization: Bearer paid_... | Authorization: Bearer eyJ... |
| Rate limited per | Key | User |
Security best practices
- Never put API keys in client-side JavaScript, mobile apps, browser extensions, or public source control. Anyone with the key can use your full quota.
- Use environment variables.
process.env.PROPAIDEALS_API_KEYin Node,os.environ["PROPAIDEALS_API_KEY"]in Python. - Use a secrets manager in production (AWS Secrets Manager, GCP Secret Manager, HashiCorp Vault, Doppler, 1Password Secrets Automation).
- Restrict by network where possible — IP allowlisting on your egress proxy adds defence in depth.
- Monitor
last_usedin the dashboard to detect inactive keys. - Rotate regularly. If you ever leak a key, revoke it within minutes.
- One key per environment. Use a separate key for production, staging, and local development.
Verifying a key works
Hit the cheapest endpoint with your key — it should return200:
HTTP/1.1 200 OK and headers including X-RateLimit-Limit, X-Monthly-Usage. If you get 401 invalid_api_key, the key is wrong, expired, or revoked. See Errors for the full reference.