# List Document Audit Trail Retrieves the full audit trail for a specified document. The audit trail includes detailed user actions such as sending, viewing, signing, and editing, along with metadata like timestamps, IP addresses, and user identity. This endpoint is accessible to authorized workspace administrators only. # OpenAPI definition ```json { "openapi": "3.0.3", "info": { "title": "PandaDoc Public API", "description": "PandaDoc API spans a broad range of functionality to help you build incredible documents automation experiences inside your product.\n\nPandaDoc API is organized around REST. Our API has predictable resource-oriented URLs and uses standard HTTP response codes, authentication, and verbs.\n\n## Getting started\n\nYou can start testing PandaDoc API with a sandbox key on our [Enterprise](https://www.pandadoc.com/pricing/) plan, either active or in trial.\n\nGenerate your [sandbox key](https://developers.pandadoc.com/reference/sandbox-key) on the Developer Dashboard with predefined [rate limits](https://developers.pandadoc.com/reference/limits). Or contact our solutions expert if you work with high-transaction volumes.\n\n## Guides\n\nIf you’re just getting started with PandaDoc, you may want to jump straight into one of our [getting started guides](https://developers.pandadoc.com/docs/getting-started) for the feature you’re most interested in, whether that’s:\n\n- [Create from template](https://developers.pandadoc.com/docs/create-send-document),\n- [Upload and send a local PDF](https://developers.pandadoc.com/docs/upload-and-send-a-local-pdf),\n- or [Listening for changes in document status](https://developers.pandadoc.com/docs/listen-document-status-changes).\n\nWe also recommend you to discover our dynamic content generation on a fly: [Create from a template with content placeholder](https://developers.pandadoc.com/docs/create-with-content-placeholders-from-template).\n", "termsOfService": "https://www.pandadoc.com/master-services-agreement/", "contact": { "name": "PandaDoc API Support", "url": "https://developers.pandadoc.com/", "email": "api-track@pandadoc.com" }, "license": { "name": "MIT", "url": "https://github.com/PandaDoc/pandadoc-openapi-specification/blob/main/LICENSE" }, "version": "7.18.2" }, "servers": [ { "url": "https://api.pandadoc.com", "description": "Public API" } ], "security": [ { "apiKey": [] }, { "oauth2": [] } ], "tags": [ { "name": "Document Audit Trail", "description": "Operations for retrieving the full audit trail of a document, including user actions and metadata." } ], "paths": { "/public/v2/documents/{document_id}/audit-trail": { "get": { "tags": [ "Document Audit Trail" ], "summary": "List Document Audit Trail", "description": "Retrieves the full audit trail for a specified document. The audit trail includes detailed user actions\nsuch as sending, viewing, signing, and editing, along with metadata like timestamps, IP addresses, and user identity.\nThis endpoint is accessible to authorized workspace administrators only.\n", "operationId": "listDocumentAuditTrail", "parameters": [ { "name": "document_id", "in": "path", "required": true, "schema": { "type": "string" }, "description": "Unique identifier of the document to retrieve the audit trail for.", "example": "BhVzRcxH9Z2LgfPPGXFUBa" }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 1, "maximum": 100, "default": 20 }, "description": "Maximum number of items to return.", "example": 20 }, { "name": "offset", "in": "query", "required": false, "schema": { "type": "integer", "minimum": 0, "default": 0 }, "description": "Number of items to skip before starting to collect the result set.", "example": 0 } ], "responses": { "200": { "description": "Successfully retrieved audit trail.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DocumentAuditTrailResponse" }, "examples": { "List Audit Trail": { "summary": "A paginated audit trail list", "value": { "count": 3, "results": [ { "id": "V9aG9KSREgTE8GnMqxWyzf", "user": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "pandadoc@pandadoc.com" }, "action": 1, "reason": null, "date_created": "2025-05-22T09:03:19Z", "ip_address": "8.8.8.8" }, { "id": "bWuXeU2bsToNyheeXfENAQ", "user": { "id": "FA5QAu8UGA3oVDQZuPL75B", "email": "pandadoc@pandadoc.com" }, "action": 6, "reason": "", "date_created": "2025-05-22T09:03:49Z", "ip_address": "8.8.8.8" }, { "id": "TkgpWurccyfAZv9kazRs3D", "user": { "id": "6A3gGiRY7TQp4PHBqCpEjG", "email": "astronaut@nasa.com" }, "action": 8, "reason": null, "date_created": "2025-05-22T09:06:42Z", "ip_address": "128.156.0.0" } ] } } } } } } } } } }, "components": { "securitySchemes": { "apiKey": { "type": "apiKey", "name": "Authorization", "in": "header", "description": "The `Authorization` header must contain the API key. The value should be prefixed with `API-Key` followed by a space and the actual API key.\n", "x-default": "API-Key 3039ba033eb1410caa0a2227158d63c9d6502cd8" }, "oauth2": { "type": "oauth2", "flows": { "authorizationCode": { "authorizationUrl": "https://app.pandadoc.com/oauth2/authorize", "tokenUrl": "https://api.pandadoc.com/oauth2/access_token", "refreshUrl": "https://api.pandadoc.com/oauth2/access_token", "scopes": { "read+write": "Use `read+write` to create, send, delete, and download documents, and `read` to view templates and document details." } } }, "description": "Send the authenticating user to the PandaDoc OAuth2 request URL. We recommend a button or a link titled\n\"Connect to PandaDoc\" if you are connecting users from a custom application. Users will see the \"Authorize Application\" screen.\nWhen the user clicks \"Authorize\", PandaDoc redirects the user back to your site with an authorization code inside the URL.\n\nhttps://app.pandadoc.com/oauth2/authorize?client_id={client_id}&redirect_uri={redirect_uri}&scope=read+write&response_type=code\n\n`client_id` and `redirect_uri` values should match your application settings.\n" } }, "schemas": { "DocumentAuditTrailResponse": { "type": "object", "properties": { "count": { "type": "integer", "description": "Total number of audit trail entries available." }, "results": { "type": "array", "description": "List of audit trail entries returned for the current page.", "items": { "type": "object", "description": "Represents a single audit trail event for a document.", "properties": { "id": { "type": "string", "description": "Unique identifier of the audit trail entry." }, "user": { "type": "object", "description": "The user who triggered the action.", "properties": { "id": { "type": "string", "description": "Unique identifier of the user." }, "email": { "type": "string", "format": "email", "description": "User's email address." } } }, "action": { "type": "integer", "description": "Numeric code representing the type of action performed.\nPossible values:\n\n| Integer Value | String Representation |\n|---------------|---------------------------------------------|\n| 1 | new document |\n| 2 | new revision |\n| 3 | approval request |\n| 4 | approved |\n| 5 | rejected |\n| 6 | sent |\n| 7 | completed by all |\n| 8 | viewed |\n| 9 | completed |\n| 10 | waiting pay |\n| 11 | paid |\n| 12 | forwarded |\n| 13 | expired |\n| 14 | bank account submitted |\n| 15 | bank account verified |\n| 16 | payment submitted |\n| 17 | payment failed |\n| 18 | completed manually |\n| 19 | expired manually |\n| 20 | paid manually |\n| 21 | approval deleted |\n| 22 | approval forced |\n| 23 | reassigned |\n| 24 | recipient edited |\n| 25 | recipient added |\n| 26 | recipient deleted |\n| 27 | declined manually |\n| 28 | approval step skipped |\n| 29 | suggest edits |\n| 43 | declined |\n| 44 | partly paid |\n| 45 | partly paid manually |\n| 47 | recipient verification with kba passed |\n| 48 | recipient verification with id passed |\n| 49 | recipient verification with text sms passed |\n| 50 | recipient verification with passcode passed |\n| 51 | recipient verification with kba failed |\n| 52 | recipient verification with id failed |\n| 53 | recipient verification with text sms failed |\n| 54 | recipient verification with passcode failed |\n| 55 | recipient signed with QES |\n| 56 | QES completed |\n| 57 | recipient QES attempt started |\n| 58 | recipient QES attempt expired |\n| 59 | Optional item in quote selected |\n| 60 | Optional item in quote deselected |\n| 61 | Item quantity in quote changed |\n| 62 | Item quantity in pricing table changed |\n| 63 | Optional item in pricing table selected |\n| 64 | Optional item in pricing table deselected |\n| 65 | Section item in pricing table selected (one of) |\n| 66 | Optional section in quote selected |\n| 67 | Optional section in quote deselected |\n| 68 | Section quantity in quote changed |\n" }, "reason": { "type": "string", "nullable": true, "description": "Optional reason or explanation for the action." }, "date_created": { "type": "string", "format": "date-time", "description": "Timestamp when the action was performed (in ISO 8601 format)." }, "ip_address": { "type": "string", "nullable": true, "description": "The IP address from which the action was performed. If a sandbox API key is used, this will be \"hidden\"." } } } } } } } } } ```