> ## Documentation Index
> Fetch the complete documentation index at: https://morphik.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Document Download Url

> Get a download URL for a specific document.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/morphik/openapi.documented.yml get /documents/{document_id}/download_url
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /documents/{document_id}/download_url:
    get:
      tags:
        - Documents
      summary: Get Document Download Url
      description: Get a download URL for a specific document.
      operationId: get_document_download_url_documents__document_id__download_url_get
      parameters:
        - name: document_id
          in: path
          required: true
          schema:
            type: string
            title: Document Id
        - name: expires_in
          in: query
          required: false
          schema:
            type: integer
            description: URL expiration time in seconds
            default: 3600
            title: Expires In
          description: URL expiration time in seconds
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentDownloadUrlResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Morphik from 'morphik';


            const client = new Morphik({
              apiKey: process.env['MORPHIK_API_KEY'], // This is the default and can be omitted
            });


            const documentDownloadURLResponse = await
            client.documents.getDownloadURL('document_id');


            console.log(documentDownloadURLResponse.download_url);
        - lang: cURL
          source: |-
            curl https://api.morphik.ai/documents/$DOCUMENT_ID/download_url \
                -H "Authorization: Bearer $MORPHIK_API_KEY"
components:
  schemas:
    DocumentDownloadUrlResponse:
      properties:
        download_url:
          type: string
          title: Download Url
        expires_in:
          type: integer
          title: Expires In
      type: object
      required:
        - download_url
        - expires_in
      title: DocumentDownloadUrlResponse
      description: Response for document download URL endpoint
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````