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

# Create a package

> Creates a DRAFT package (or SCHEDULED when `scheduledAt` is set) with the given recipients and documents. `metadata` sets custom field values; unknown keys are rejected with 422, and so are missing required values when `scheduledAt` is set. Requires canSendPackages. Each document comes back with an `uploadUrl`: PUT the file's bytes to it to attach them. The URL is single-use and expires after two hours. Sending is a separate PATCH call.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/packages
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 belongs to the
    organisation and acts in one workspace per request: pass `X-Workspace-Id`
    (see `GET /api/v1/workspaces`) or omit it to act in the default workspace.
    Packages, templates, contacts and members are scoped to the workspace the
    call acts in.
servers:
  - url: https://my.flowsign.app
    description: Production
security:
  - ApiKey: []
paths:
  /api/v1/packages:
    post:
      tags:
        - Packages
      summary: Create a package
      description: >-
        Creates a DRAFT package (or SCHEDULED when `scheduledAt` is set) with
        the given recipients and documents. `metadata` sets custom field values;
        unknown keys are rejected with 422, and so are missing required values
        when `scheduledAt` is set. Requires canSendPackages. Each document comes
        back with an `uploadUrl`: PUT the file's bytes to it to attach them. The
        URL is single-use and expires after two hours. Sending is a separate
        PATCH call.
      operationId: postPackages
      parameters:
        - schema:
            type: string
            description: >-
              The workspace to act in, from `GET /api/v1/workspaces`. Omit to
              act in the organisation's default workspace. A workspace the key's
              user cannot act in is treated as omitted.
          required: false
          name: x-workspace-id
          in: header
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                title:
                  type: string
                  minLength: 1
                description:
                  type: string
                signingOrder:
                  type: boolean
                emailSubject:
                  type: string
                emailMessage:
                  type: string
                sendReminders:
                  type: boolean
                scheduledAt:
                  type: string
                  format: date-time
                expiresIn:
                  type: string
                  enum:
                    - No expiry
                    - 7 days
                    - 14 days
                    - 30 days
                    - 60 days
                    - 90 days
                    - 6 months
                    - 1 year
                tags:
                  type: array
                  items:
                    type: string
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                    maxLength: 500
                  description: >-
                    Custom field values keyed by custom field `key`. Every key
                    must be a live custom field that applies to this package. An
                    empty string clears a value.
                recipients:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                        minLength: 1
                      email:
                        type: string
                        format: email
                      action:
                        type: string
                        minLength: 1
                      delay:
                        type: integer
                        minimum: 0
                    required:
                      - name
                      - email
                      - action
                  minItems: 1
                documents:
                  type: array
                  items:
                    type: object
                    properties:
                      fileName:
                        type: string
                        minLength: 1
                      pageCount:
                        type: integer
                        minimum: 1
                      nonce:
                        type: string
                        minLength: 1
                    required:
                      - fileName
                      - pageCount
                      - nonce
                  minItems: 1
              required:
                - title
                - recipients
                - documents
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      packageId:
                        type: string
                      documents:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            nonce:
                              type: string
                            filePath:
                              type: string
                            uploadUrl:
                              type: string
                              format: uri
                          required:
                            - id
                            - nonce
                            - filePath
                            - uploadUrl
                    required:
                      - packageId
                      - documents
                required:
                  - data
        '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'
        '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:
    Error:
      type: object
      properties:
        error:
          type: string
        details:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - error
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: fsk_*

````