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 isv1. All endpoints are prefixed with /api/v1/:
Authentication
All API requests must be authenticated using an API key. Include your API key in theAuthorization header:
Request format
Send request bodies as JSON with theContent-Type: application/json header:
Response format
All responses are JSON objects. Successful responses include adata field containing the response payload:
Error responses
Error responses use standard HTTP status codes and include a JSON body with details: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. Passpage and perPage query parameters:
perPage is 20. Maximum perPage is 100.