IPAbuse Developers

Authentication

The IPAbuse API supports two authentication methods depending on what you are building.

API Key (recommended for server-side integrations)

Pass your key in the X-API-Keyrequest header. API keys are scoped to your account and subject to your plan's rate limits.

cURL
curl https://api.ipabuse.org/v1/ip/1.2.3.4/ \
  -H "X-API-Key: YOUR_API_KEY"
Node.js
// Store securely — never expose in client-side code
const IPABUSE_API_KEY = process.env.IPABUSE_API_KEY;

const res = await fetch("https://api.ipabuse.org/v1/ip/8.8.8.8/", {
  headers: { "X-API-Key": IPABUSE_API_KEY },
});
Security note: Never expose your API key in client-side JavaScript, public repos, or browser network requests. Always call the API from your backend or a Next.js server action / route handler.

Manage keys

Create, rotate, or revoke keys at ipabuse.org/settings. Each key can have a name, expiry, and IP allowlist.

JWT Bearer Token (for user-scoped operations)

Billing, team, and profile operations require a JWT obtained by logging in. Report submissions can also use an API key with the REPORT scope.

1. Obtain a token

cURL
curl -c cookies.txt -X POST https://api.ipabuse.org/v1/auth/login -H "Content-Type: application/json" -d '{"email":"you@example.com","password":"secret"}'

On success, the response sets an HttpOnly cookie named token; the cookie's value is the JWT. The JSON body contains the user object only, not a data.token field. You can see the cookie in the browser's network/storage tools or in the Set-Cookie response header, but browser JavaScript cannot read it because it is HttpOnly.

2. Use the token

Browsers send the cookie automatically on requests to the API. For cURL, save and resend it with the cookie jar:

cURL
curl -b cookies.txt https://api.ipabuse.org/v1/billing/subscription

You may also send the cookie value explicitly as a bearer token when making server-side requests:

cURL
curl https://api.ipabuse.org/v1/billing/subscription \
  -H "Authorization: Bearer YOUR_JWT"

Token lifetime

Tokens expire after 7 days by default. Refresh by logging in again to obtain a new one.

Summary

MethodHeaderUse case
API KeyX-API-Key: sk_...IP lookups, blocklists, plugin calls
JWTAuthorization: Bearer <JWT>Reporting, billing, team, profile

Next steps