> ## 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.

# Launch a package from a template

> Creates a package from the template, mapping each recipient onto the role of that name. Merge values go in `fields`; `workflowAnswers` and `documentAnswers` answer the questions the template's documents ask. `metadata` sets custom field values over the template's defaults; unknown keys are rejected with 422, and so are missing required values when the package is sent or scheduled. `status: "sent"` dispatches immediately; `scheduledAt` leaves it SCHEDULED instead. Repeating an `externalId` returns the existing package rather than creating a second one. Requires canSendPackages.



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/packages/from-template
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/from-template:
    post:
      tags:
        - Packages
      summary: Launch a package from a template
      description: >-
        Creates a package from the template, mapping each recipient onto the
        role of that name. Merge values go in `fields`; `workflowAnswers` and
        `documentAnswers` answer the questions the template's documents ask.
        `metadata` sets custom field values over the template's defaults;
        unknown keys are rejected with 422, and so are missing required values
        when the package is sent or scheduled. `status: "sent"` dispatches
        immediately; `scheduledAt` leaves it SCHEDULED instead. Repeating an
        `externalId` returns the existing package rather than creating a second
        one. Requires canSendPackages.
      operationId: postPackagesFrom-template
      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:
                templateId:
                  type: string
                  minLength: 1
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 255
                status:
                  type: string
                  enum:
                    - draft
                    - sent
                  default: draft
                scheduledAt:
                  type: string
                  format: date-time
                recipients:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        minLength: 1
                      name:
                        type: string
                        minLength: 1
                      email:
                        type: string
                        format: email
                    required:
                      - role
                      - name
                      - email
                    additionalProperties: false
                  minItems: 1
                fields:
                  type: object
                  additionalProperties:
                    type: string
                  default: {}
                workflowAnswers:
                  type: object
                  additionalProperties:
                    type: object
                    properties:
                      port:
                        type: string
                      value:
                        anyOf:
                          - type: string
                          - type: number
                    additionalProperties: false
                documentAnswers:
                  type: object
                  additionalProperties:
                    type: string
                  default: {}
                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.
              required:
                - templateId
                - recipients
              additionalProperties: false
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      packageId:
                        type: string
                      externalId:
                        type: string
                        nullable: true
                      status:
                        type: string
                        enum:
                          - DRAFT
                          - SCHEDULED
                          - IN_PROGRESS
                          - COMPLETED
                          - DECLINED
                          - ON_HOLD
                          - VOID
                    required:
                      - packageId
                      - externalId
                      - status
                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_*

````