Skip to main content

Overview

The Pwnbook API is a RESTful HTTP API. All requests and responses use JSON. The API is designed to be predictable and consistent — once you understand the patterns used by one endpoint, you’ll find the others work the same way.

Base URL

All API endpoints are relative to your Pwnbook instance’s base URL:

Versioning

The current API version is v1. All endpoints are prefixed with /api/v1/:
The API version is included in all request paths. When breaking changes are introduced, a new version is released with an updated path prefix, and the previous version remains supported for a deprecation period.

Authentication

All API requests must be authenticated using an API key. Include your API key in the Authorization header:
API keys are scoped to an organization and carry the permissions defined when the key was created. See API Authentication for details on generating and managing API keys.

Request format

Send request bodies as JSON with the Content-Type: application/json header:

Response format

All responses are JSON objects. Successful responses include a data field containing the response payload:
List responses include pagination metadata:

Error responses

Error responses use standard HTTP status codes and include a JSON body with details:
Common error codes:

Rate limiting

API requests are rate-limited per API key. Rate limit headers are included in every response: When you exceed the rate limit, you’ll receive a 429 Too Many Requests response. Implement exponential backoff and retry logic in your client.

Pagination

List endpoints support page-based pagination. Pass page and perPage query parameters:
Default perPage is 20. Maximum perPage is 100.

Filtering and sorting

Most list endpoints support filtering and sorting via query parameters:
Refer to individual endpoint documentation for supported filter and sort fields.

SDK support

Currently, direct HTTP requests are the primary integration method. Community-maintained SDKs may be available — check the Pwnbook GitHub organization for the latest.