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

# Launch a package from a template

> Creates a package from an ACTIVE template, mapping each recipient onto the role of that name. 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 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/from-template:
    post:
      tags:
        - Packages
      summary: Launch a package from a template
      description: >-
        Creates a package from an ACTIVE template, mapping each recipient onto
        the role of that name. Requires canSendPackages.
      operationId: postPackagesFrom-template
      parameters:
        - 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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                templateId:
                  type: string
                  minLength: 1
                  description: The id of the template to launch.
                  example: K7dQm2xPz9Lw
                externalId:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Your own reference for the package, up to 255 characters and
                    unique within the organisation. Repeating it returns the
                    existing package instead of creating another, and sends it
                    when it is still a DRAFT and `status` is "sent", so a retry
                    after a failed send completes it.
                  example: crm-deal-48213
                status:
                  type: string
                  enum:
                    - draft
                    - sent
                  default: draft
                  description: >-
                    "draft" leaves the package unsent; "sent" dispatches it to
                    recipients immediately. Defaults to "draft".
                  example: sent
                scheduledAt:
                  type: string
                  format: date-time
                  description: >-
                    An ISO 8601 time to send the package automatically. Leaves
                    it SCHEDULED, and cannot be combined with `status: "sent"`.
                  example: '2026-10-01T20:00:00.000Z'
                recipients:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        minLength: 1
                        description: >-
                          The name of the template role this person fills. Every
                          role on the template must be filled, and a name the
                          template does not have is rejected with 422.
                        example: Employee
                      name:
                        type: string
                        minLength: 1
                        description: The recipient's name.
                        example: Jane Ahu
                      email:
                        type: string
                        format: email
                        description: >-
                          The recipient's email address, where the invitation is
                          sent.
                        example: jane.ahu@example.co.nz
                    required:
                      - role
                      - name
                      - email
                    additionalProperties: false
                  minItems: 1
                  maxItems: 100
                  description: >-
                    One recipient per template role. At least one and at most
                    100.
                fields:
                  type: object
                  additionalProperties:
                    type: string
                    description: >-
                      The merge field's value. A blank value takes the field's
                      default.
                    example: Jane Ahu
                  default: {}
                  description: >-
                    Merge field values keyed by merge field key. Each is checked
                    against its field's type and list options, and a bad or
                    missing required value is rejected with 422 under
                    `fields.<key>`. A blank value takes the field's default.
                    Keys the template does not ask the sender for are rejected
                    under `unknownFields`.
                  example:
                    employee_name: Jane Ahu
                    start_date: '2026-10-12'
                    salary: '78000'
                workflowAnswers:
                  type: object
                  additionalProperties:
                    type: object
                    properties:
                      port:
                        type: string
                        description: The id of the chosen answer, for a choice question.
                        example: 'yes'
                      value:
                        anyOf:
                          - type: string
                          - type: number
                        description: >-
                          The typed answer, text or a number, for an open
                          question.
                        example: 3
                    additionalProperties: false
                  description: >-
                    The sender's answers to the template's workflow questions,
                    keyed by question id. `port` names the picked answer for a
                    choice question; `value` carries the typed input for an open
                    one. Omit it when nothing branches: only the default
                    documents are included.
                  example:
                    q_probation:
                      port: 'yes'
                    q_notice_weeks:
                      value: 4
                documentAnswers:
                  type: object
                  additionalProperties:
                    type: object
                    additionalProperties:
                      type: string
                      description: The chosen answer.
                      example: full_time
                  default: {}
                  description: >-
                    Answers to the questions the template's documents ask, keyed
                    by document id and then question id, so two documents asking
                    a question with the same id are answered apart. They decide
                    which conditional content each document includes. A document
                    question the workflow also asks is answered once, here or in
                    `workflowAnswers`; giving it two different answers is
                    refused.
                  example:
                    cmg3k5r1c0003s7p4h2m8tb7k:
                      employment_type: full_time
                metadata:
                  type: object
                  additionalProperties:
                    type: string
                    maxLength: 500
                    description: >-
                      A custom field value of up to 500 characters. An empty
                      string clears the value.
                    example: CC-4410
                  description: >-
                    Custom field values keyed by custom field `key`, set over
                    the template's defaults. Every key must be a live custom
                    field that applies to this package. An empty string clears a
                    value. Unknown keys are rejected with 422, and so are
                    missing required values when the package is sent or
                    scheduled.
                  example:
                    cost_centre: CC-4410
                    region: Auckland
              required:
                - templateId
                - recipients
              additionalProperties: false
      responses:
        '201':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The package's id.
                        example: cmg4v8q2k0001s7xh3b9d2f6a
                      externalId:
                        type: string
                        nullable: true
                        description: >-
                          Your own reference for the package, unique within the
                          organisation. Repeating it returns the existing
                          package instead of creating another.
                        example: crm-deal-48213
                      status:
                        allOf:
                          - $ref: '#/components/schemas/PackageStatus'
                          - description: >-
                              The package's status: DRAFT, SCHEDULED when
                              `scheduledAt` was given, IN_PROGRESS when `status`
                              was "sent". A package matched on `externalId`
                              returns its current status.
                      recipients:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                The recipient's id, which library documents map
                                their roles onto.
                              example: cmg4v8q2k0002s7xh6k4m1p9c
                            name:
                              type: string
                              description: The recipient's name.
                              example: Jane Ahu
                            email:
                              type: string
                              description: The recipient's email address.
                              example: jane.ahu@example.co.nz
                            role:
                              type: string
                              nullable: true
                              description: >-
                                The template role the recipient fills. Null only
                                for a package matched on `externalId` that was
                                not launched from a template.
                              example: Employee
                          required:
                            - id
                            - name
                            - email
                            - role
                        description: >-
                          The package's recipients in signing order, with the
                          ids fields and library documents are assigned to.
                    required:
                      - id
                      - externalId
                      - status
                      - recipients
                required:
                  - data
        '400':
          description: >-
            The body is not valid JSON, or `status` is "sent" and the template's
            workflow still has an unanswered sender question
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '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 template with that id that the caller can use
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The template is not ACTIVE (a DRAFT must be published in the app
            first), the template's workflow cannot run as configured, `status`
            is "sent" and a document's file is missing, or a package the caller
            cannot see already has this `externalId`
          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:
    PackageStatus:
      type: string
      enum:
        - DRAFT
        - SCHEDULED
        - IN_PROGRESS
        - COMPLETED
        - DECLINED
        - ON_HOLD
        - VOID
      description: >-
        The package's status. DRAFT is not yet sent; SCHEDULED is queued to send
        at its scheduled time; IN_PROGRESS is out for signing; COMPLETED is
        signed by every signer; DECLINED is refused by a recipient; ON_HOLD is
        paused by the sender; VOID is ended early by the sender or at its
        expiry.
      example: IN_PROGRESS
    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_*

````