Start

Base URL https://usedefeated.com/api. Every response is JSON with an ok boolean. The public API lives under /api/v1 and takes a key; the account endpoints under /api take a session cookie and are what the dashboard uses.

# 1. Get a key — it comes back once, in this response. curl -X POST https://usedefeated.com/api/signup \ -H 'content-type: application/json' \ -d '{"email":"you@example.com","password":"at-least-ten-chars"}' # 2. Use it. curl https://usedefeated.com/api/v1/ping \ -H 'authorization: Bearer dft_live_…'

Authentication

Send your key as a bearer token on every /api/v1 request:

Authorization: Bearer dft_live_<48 hex characters>

Keys are stored as a SHA-256 hash. We can show you the prefix and the date it was issued; we cannot show you the key again. If you lose it, rotate it from the dashboard.

Keys

Formatdft_live_ followed by 48 hexadecimal characters — 57 characters total.
IssuedOnce on sign-up, and on every rotation. Rotating invalidates the previous key immediately.
ScopeOne key per account. It identifies the account; it does not carry roles.
StorageTreat it like a password. Never put it in client-side code or a public repository.

GET/api/v1/ping

Proves the key works and tells you which account it belongs to. Counts as one request.

{ "ok": true, "service": "defeated", "version": "v1", "account": "you@example.com", "key": "dft_live_3f9a12c0…b7e1", "ts": "2026-09-22T19:04:11.208Z" }

GET/api/v1/usage

Requests per day for the last 30 days, and the total. Counts as one request.

{ "ok": true, "account": "you@example.com", "days": [ { "day": "2026-09-21", "requests": 412 }, … ], "total_30d": 5130 }

Account endpoints

These use an HttpOnly session cookie set by sign-up or sign-in, so they are meant for the dashboard rather than for scripts. Sessions last 30 days.

EndpointBody / result
POST/api/signup{ email, password }{ ok, email, api_key, key_prefix }. Password must be 10+ characters. 409 if the email exists.
POST/api/signin{ email, password }{ ok, email } and the session cookie.
POST/api/signoutEnds the session and clears the cookie.
GET/api/me{ ok, email, key_prefix, key_created, created_at, requests_30d }
POST/api/key/rotate{ ok, api_key, key_prefix }. The old key stops working at once.

Errors

Failures return a non-2xx status and { "ok": false, "error": "…" }. The message is meant to be shown to a person.

StatusMeaning
400Bad or missing input. The message says which field.
401No valid key or session.
404Unknown endpoint.
409Sign-up with an email that already has an account.
429Rate limited. Wait for the window to pass.

Rate limits

Sign-up5 per 10 minutes per address
Sign-in10 per minute per address
/api/v1No fixed ceiling on v1 today; usage is counted per key per day and visible at /api/v1/usage. Limits will be announced here before they apply.

Buying

The API key is free. Verdicts, analyst time and higher rate limits are sold by request — email support@usedefeated.com with what you want settled and we will quote it.

Examples

JavaScript

const r = await fetch('https://usedefeated.com/api/v1/ping', { headers: { authorization: 'Bearer ' + process.env.DEFEATED_KEY } }); const body = await r.json(); if (!body.ok) throw new Error(body.error);

Python

import os, requests r = requests.get("https://usedefeated.com/api/v1/usage", headers={"authorization": f"Bearer {os.environ['DEFEATED_KEY']}"}) r.raise_for_status() print(r.json()["total_30d"])

Rotate a key from the command line

# sign in, keep the cookie, rotate curl -c jar -X POST https://usedefeated.com/api/signin \ -H 'content-type: application/json' -d '{"email":"…","password":"…"}' curl -b jar -X POST https://usedefeated.com/api/key/rotate