# Export request in PDF **GET /requests/{requestId}/export** Generate a collated PDF for a given request and get a temporary download URL. **Authentication:** Same as the rest of the API (API key e.g. `Authorization: Basic ` or `?api_key=...`, or OAuth Bearer token). The authenticated user must have **requests-download** permission for the request. **Default export (templateId omitted):** All uploaded documents for that request, in item order. Forms are not included. **Custom template (templateId set):** Export follows the template (documents, static pages, PDFs, forms, order, "do not include if form has no answers", etc.). Template IDs are shown in the app in "Manage your PDF exports" (list and in the template detail modal when editing). The client should use the returned `url` with a simple GET (e.g. redirect or fetch) to download the PDF. The link is valid for 15 minutes; after that a new export must be requested. ## Servers - Production server.: https://api.usecollect.com/v1 (Production server.) ## Authentication methods - Basic auth ## Parameters ### Path parameters - **requestId** (string) ID of the request to export. ### Query parameters - **templateId** (string) ID of the export template to use. If omitted, the default export is used (all uploaded documents in item order, no forms). Custom template IDs are shown in the app in "Manage your PDF exports". ## Responses ### 200 Pre-signed URL to download the generated PDF. #### Body: application/json (object) - **url** (string) Pre-signed S3 URL to download the generated PDF. - **expiresIn** (integer) Validity of the URL in seconds (always 900, i.e. 15 minutes). ### 400 Nothing to export (e.g. template results in an empty list, or export not supported for this storage). #### Body: application/json (object) - **error** (integer) - **message** (string) Reason for the error ### 401 Unauthorized -- Your API key is wrong. ### 403 Forbidden — user not allowed to download this request (e.g. missing requests-download permission). #### Body: application/json (object) - **error** (integer) - **message** (string) ### 404 Not found — invalid or unknown requestId, or template not found when templateId is provided. #### Body: application/json (object) - **error** (integer) - **message** (string) Not found, or "Export template not found" when templateId is invalid. ### 429 Too Many Requests -- You're requesting too many objects! Slow down! ### 500 Server or Lambda error during export or URL generation. #### Body: application/json (object) - **error** (integer) - **message** (string) Error reason ### 503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later. [Powered by Bump.sh](https://bump.sh)