# List Templates Retrieves a list of templates. You can filter results by a search query, tags, or fields. > 🚧 Avoid empty values for the parameters > > API returns "400" error when any of the parameters has empty value. Remove such parameters from the request or add a value. # 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": "Templates", "description": "Operations for managing templates, including listing, creating, and deleting templates." } ], "paths": { "/public/v1/templates": { "get": { "summary": "List Templates", "description": "Retrieves a list of templates. You can filter results by a search query, tags, or fields.", "operationId": "listTemplates", "tags": [ "Templates" ], "parameters": [ { "name": "q", "description": "Search query. Filter by template name.", "in": "query", "schema": { "type": "string" }, "example": "Sample onboarding template" }, { "name": "shared", "description": "Returns only the shared templates.", "in": "query", "schema": { "type": "boolean" }, "example": false }, { "name": "deleted", "description": "Returns only the deleted templates.", "in": "query", "schema": { "type": "boolean" }, "example": false }, { "name": "count", "description": "Specify how many templates to return.", "in": "query", "schema": { "type": "integer", "format": "int32", "minimum": 1, "maximum": 100, "default": 50 }, "example": 10 }, { "name": "page", "description": "Specify which page of the dataset to return.", "in": "query", "schema": { "type": "integer", "format": "int32", "minimum": 1 }, "example": 1 }, { "name": "id", "description": "Specify template ID.", "in": "query", "schema": { "type": "string" }, "example": "e9LxBesSL73AeZMzeYdfvV" }, { "name": "folder_uuid", "description": "UUID of the folder where the templates are stored.", "x-ignore-no-type": true, "in": "query", "schema": { "type": "string" }, "examples": { "List from a Folder": { "value": "xDKHoJ8DkwhiTQSUzNveCJ" } } }, { "name": "tag", "in": "query", "style": "form", "explode": true, "schema": { "type": "array", "items": { "type": "string" } }, "description": "Search tag. Filter by template tag.", "example": [ "onboarding" ] }, { "name": "fields", "description": "A comma-separated list of additional fields to include in the response.", "in": "query", "schema": { "type": "array", "items": { "type": "string", "enum": [ "content_date_modified" ] } }, "style": "form", "explode": false, "example": [ "content_date_modified" ] } ], "responses": { "200": { "description": "OK", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TemplateListResponse" }, "examples": { "Default": { "value": { "results": [ { "id": "iMymdDd9XFD3HyxP5VD67Q", "name": "Blank", "date_created": "2021-06-17T15:51:13.226974Z", "date_modified": "2021-06-17T15:51:13.326974Z", "version": "2", "content_date_modified": "2021-06-17T15:51:13.426974Z" } ] } }, "List from a Folder": { "value": { "results": [ { "id": "vibuun3DXG8QDDLfXm27Ne", "name": "New template", "date_created": "2024-07-15T17:44:07.524617Z", "date_modified": "2024-07-15T17:44:07.613821Z", "version": "2" } ] } } } } } }, "401": { "$ref": "#/components/responses/401" }, "429": { "$ref": "#/components/responses/429" } } } } }, "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": { "TemplateCreateResponse": { "type": "object", "properties": { "id": { "type": "string", "example": "iMymdDd9XFD3HyxP5VD67Q" }, "name": { "type": "string", "example": "Blank" }, "date_created": { "type": "string", "format": "date-time", "example": "2021-06-17T15:51:13.226974Z" }, "date_modified": { "type": "string", "format": "date-time", "example": "2021-06-17T15:51:13.326974Z" }, "version": { "type": "string", "example": "2" }, "content_date_modified": { "type": "string", "format": "date-time", "example": "2021-06-17T15:51:13.426974Z" } } }, "TemplateListResponse": { "type": "object", "properties": { "results": { "type": "array", "items": { "$ref": "#/components/schemas/TemplateCreateResponse" } } } } }, "responses": { "401": { "description": "Authentication error", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "example": "authentication_error" }, "detail": { "type": "string", "example": "Authentication credentials were not provided." } } } } } }, "429": { "description": "Too Many Requests", "content": { "application/json": { "schema": { "properties": { "type": { "type": "string", "example": "throttled" }, "detail": { "type": "string", "example": "Request was throttled." } } } } } } } } } ```