openapi: 3.0.3 info: title: Have I Been Pwned API v3 Breached Accounts Pastes API description: 'The Have I Been Pwned (HIBP) API allows the list of pwned accounts (email addresses, domains, passwords, and stealer log entries) to be quickly searched via REST. Authenticated endpoints require an `hibp-api-key` header. All requests must send a `user-agent` header that accurately identifies the consuming application. Subscriptions range from Pwned 1 to Pwned 5. ' version: 3.0.0 contact: name: Have I Been Pwned url: https://haveibeenpwned.com/API/v3 license: name: Creative Commons Attribution 4.0 url: https://creativecommons.org/licenses/by/4.0/ servers: - url: https://haveibeenpwned.com/api/v3 description: HIBP Production API security: - ApiKeyAuth: [] tags: - name: Pastes description: Lookup pastes referencing an email address. paths: /pasteaccount/{account}: get: tags: - Pastes summary: Get Pastes For An Account description: Returns all pastes referencing the supplied email address, sorted chronologically (newest first). operationId: getPastesForAccount parameters: - $ref: '#/components/parameters/AccountPath' responses: '200': description: A list of pastes referencing the account. content: application/json: schema: type: array items: $ref: '#/components/schemas/Paste' '401': $ref: '#/components/responses/Unauthorized' '403': $ref: '#/components/responses/Forbidden' '404': $ref: '#/components/responses/NotFound' '429': $ref: '#/components/responses/TooManyRequests' components: responses: Unauthorized: description: The `hibp-api-key` header is missing or invalid. content: application/json: schema: $ref: '#/components/schemas/Error' TooManyRequests: description: 'Rate limit exceeded. Inspect the `retry-after` header to determine when to retry. ' headers: retry-after: schema: type: integer description: Seconds to wait before retrying. content: application/json: schema: $ref: '#/components/schemas/Error' NotFound: description: No record matched the supplied identifier. Forbidden: description: 'The request is forbidden. Common causes include a missing `user-agent` header, querying an unverified domain, or a feature not included in the calling subscription. ' content: application/json: schema: $ref: '#/components/schemas/Error' schemas: Paste: type: object description: A paste referencing an email address. properties: Source: type: string description: Paste source service (e.g. Pastebin, Pastie, Slexy, Ghostbin). Id: type: string description: Source-specific identifier of the paste. Title: type: string nullable: true description: Title of the paste, if available. Date: type: string format: date-time nullable: true description: When the paste was published. EmailCount: type: integer description: Number of email addresses found in the paste. required: - Source - Id - EmailCount Error: type: object description: Standard HIBP error payload. properties: statusCode: type: integer message: type: string required: - statusCode - message parameters: AccountPath: name: account in: path required: true description: URL-encoded email address to search. schema: type: string format: email securitySchemes: ApiKeyAuth: type: apiKey in: header name: hibp-api-key description: '32-character hexadecimal API key issued at https://haveibeenpwned.com/API/Key. Required for all account, paste, stealer log, domain search, and subscription endpoints. '