Calling the API
The API is intended for automated integrations. To upload, flag or download fraud data by hand, use the web app: it signs every request for you, and no code is needed.
Base URL
Send every API request to:
https://backend.fraudintelligencelimited.comEndpoint paths throughout this documentation are relative to that host. For example, Authorizing an account gives the path POST /auth/api/v1/authentication-management/session, so the full URL is https://backend.fraudintelligencelimited.com/auth/api/v1/authentication-management/session.
The API is served over HTTPS only.
What you need
- An approved account. See Registration.
- The email address of the user and the user's key pairs, shown on the Profile page of the web app: the Authorization key signs you in, the Signing key signs upload and flag transactions.
- Any programming language with an HTTP client and an Ed25519 library.
Keep private keys out of source control and logs. Anyone who holds the private authorization key can sign in as the user, unless a second sign-in step is on.
Requests and responses
- Requests and responses are JSON, except where the API reference says otherwise: a signed transaction is sent as plain text, and a CSV download returns a file.
- Every endpoint except sign-in needs the header
Authorization: Bearer <accessToken>. - Every JSON response has the same envelope, and errors carry a numbered code. See Responses and error codes.
A typical integration
- Sign in and keep the tokens. Refresh them before the access token expires, 5 minutes after it is issued.
- On a schedule, retrieve the contributions you have not seen yet with
fetch-mode=NEW. - When your own systems detect fraud, submit contributions, up to
5000entries per request. - When a contribution proves to be a false positive, flag it.
- Sign out when the work is done.