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

> ## Agent Instructions
> Flowsign is one word with a lowercase s.
> The REST API base URL is https://my.flowsign.app and every endpoint lives under /api/v1.
> When answering API questions, cite the HTTP method and endpoint path.
> API access needs the Enterprise plan and an API key with the API access permission.

# Download a package as a zip

> Returns the signed copies once the package has completed, and the originals before that.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/packages/{packageId}/download/zip
openapi: 3.0.3
info:
  title: Flowsign API
  version: 1.0.0
  description: >-
    Public v1 API for Flowsign. Every endpoint is authenticated with a Bearer
    API key (prefix `fsk_`). Errors use `{ error, details? }`; success responses
    wrap payload data as `{ data }`.


    An organisation is divided into workspaces. A key is issued for one
    workspace and acts there on every request (see `GET /api/v1/workspaces`);
    `X-Workspace-Id` is optional and may only name that workspace. Packages,
    templates, contacts and members are scoped to the key's workspace.
servers:
  - url: https://my.flowsign.app
    description: Production
security:
  - ApiKey: []
paths:
  /api/v1/packages/{packageId}/download/zip:
    get:
      tags:
        - Packages
      summary: Download a package as a zip
      description: >-
        Returns the signed copies once the package has completed, and the
        originals before that.
      operationId: getPackagesByPackageIdDownloadZip
      parameters:
        - schema:
            type: string
          required: true
          name: packageId
          in: path
        - schema:
            type: string
            description: >-
              A comma-separated list of document ids to include. Omit it for
              every document in the package.
            example: cmg4v8q2k0003s7xhq1w8n5r7,cmg4v8q2k0004s7xhm3c5v7b9
          required: false
          name: documents
          in: query
        - schema:
            $ref: '#/components/schemas/QueryBoolean'
          required: false
          name: certificate
          in: query
        - schema:
            type: string
            description: >-
              The workspace the key was issued for, as returned by `GET
              /api/v1/workspaces`. Optional: omitting it acts in the key's
              workspace, and any other id is rejected with 401.
          required: false
          name: x-workspace-id
          in: header
      responses:
        '200':
          description: The package's documents as separate files in a zip
          content:
            application/zip:
              schema:
                type: string
                format: binary
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Caller's plan does not include this feature (publicApi / webhooks)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: API key present but caller lacks the required permission
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            No package with that id that the caller can see, or none of the
            requested documents belong to it
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            certificate=true on a package that has not completed, or a completed
            package whose signed copies are still being prepared
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Request failed schema validation; details keyed by field
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded; see `Retry-After`
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    QueryBoolean:
      type: string
      enum:
        - 'true'
        - 'false'
      description: >-
        "true" appends the certificate of completion, which only a completed
        package has; "false", or omitting it, leaves it out.
      example: 'true'
    Error:
      type: object
      properties:
        error:
          type: string
          description: What went wrong, in plain words.
          example: 'Missing permission: canSendPackages'
        details:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: >-
            Validation problems keyed by field path. Present only on 422
            responses.
          example:
            recipients.0.email:
              - Invalid email
      required:
        - error
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: fsk_*

````