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

# Get a template

> Returns the full template with its roles, documents, fields, merge fields, questions and email, reminder and expiry settings. Requires USE template access.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/templates/{templateId}
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/templates/{templateId}:
    get:
      tags:
        - Templates
      summary: Get a template
      description: >-
        Returns the full template with its roles, documents, fields, merge
        fields, questions and email, reminder and expiry settings. Requires USE
        template access.
      operationId: getTemplatesByTemplateId
      parameters:
        - schema:
            type: string
          required: true
          name: templateId
          in: path
        - 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: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The template's id.
                        example: kX9dQ2mB7pLw
                      name:
                        type: string
                        description: The template's name.
                        example: Employment agreement
                      description:
                        type: string
                        nullable: true
                        description: Free-text description, or null when none was given.
                        example: >-
                          Standard individual employment agreement for new
                          hires.
                      status:
                        $ref: '#/components/schemas/TemplateStatus'
                      tags:
                        type: array
                        items:
                          type: string
                        description: >-
                          The organisation tags on the template, in alphabetical
                          order.
                        example:
                          - HR
                          - Onboarding
                      signingMode:
                        allOf:
                          - $ref: '#/components/schemas/SigningMode'
                          - description: >-
                              How recipients are walked through signing.
                              PARALLEL invites every recipient at once;
                              SEQUENTIAL invites one at a time in `order`;
                              WORKFLOW follows the template's workflow, asking
                              recipients its questions as they open the package.
                      roles:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                The role's id. Pass it as `roleId` when placing
                                fields.
                              example: cmg3k2v8a0001s7p4d9x1qz2h
                            name:
                              type: string
                              description: >-
                                The role's name. Each recipient in `POST
                                /api/v1/packages/from-template` is matched onto
                                a role by this exact name.
                              example: Employee
                            actionType:
                              $ref: '#/components/schemas/ActionType'
                            order:
                              type: integer
                              description: >-
                                Zero-based position of the role; the signing
                                order in SEQUENTIAL mode.
                              example: 0
                            deliveryDefault:
                              $ref: '#/components/schemas/RecipientDelivery'
                            hostRole:
                              $ref: '#/components/schemas/RecipientHostRole'
                            hostUserIds:
                              type: array
                              items:
                                type: string
                              description: >-
                                The members who may host an IN_PERSON recipient
                                when `hostRole` is SPECIFIC_USER.
                              example: []
                            hostGroupIds:
                              type: array
                              items:
                                type: string
                              description: >-
                                The member groups whose members may host when
                                `hostRole` is MEMBER_GROUP.
                              example: []
                          required:
                            - id
                            - name
                            - actionType
                            - order
                            - deliveryDefault
                            - hostRole
                            - hostUserIds
                            - hostGroupIds
                        description: The template's roles in `order`.
                      documents:
                        type: array
                        items:
                          allOf:
                            - $ref: '#/components/schemas/Document'
                            - type: object
                              properties:
                                order:
                                  type: integer
                                  description: >-
                                    Zero-based position of the document within
                                    the template.
                                  example: 0
                                isSupplemental:
                                  type: boolean
                                  description: >-
                                    True for a supporting document recipients
                                    read but do not sign, false for one that
                                    carries fields.
                                  example: false
                                kind:
                                  $ref: '#/components/schemas/DocumentKind'
                                variables:
                                  type: array
                                  items:
                                    $ref: '#/components/schemas/DocumentVariable'
                                  description: >-
                                    The placeholders in a DYNAMIC document's
                                    converted content. Empty for a STANDARD
                                    document, or before conversion.
                              required:
                                - order
                                - isSupplemental
                                - kind
                                - variables
                          description: A document attached to a package or template.
                        description: The template's documents in `order`.
                      fields:
                        type: array
                        items:
                          allOf:
                            - $ref: '#/components/schemas/PlacedField'
                            - type: object
                              properties:
                                documentId:
                                  type: string
                                  description: The document the field is placed on.
                                  example: cmg3k5r1c0003s7p4h2m8tb7k
                                roleId:
                                  type: string
                                  nullable: true
                                  description: >-
                                    The role whose recipient completes the
                                    field, or null when the field is not
                                    assigned to anyone yet. The same id `PUT
                                    /api/v1/templates/:templateId/fields` takes.
                                  example: cmg3k2v8a0001s7p4d9x1qz2h
                                defaultValue:
                                  type: string
                                  nullable: true
                                  description: >-
                                    The value the field starts with, or null
                                    when it starts empty.
                                  example: Studio Phoenix Limited
                              required:
                                - documentId
                                - roleId
                                - defaultValue
                          description: >-
                            A field as it is placed on a document. It has the
                            same shape the field endpoints take, so a field can
                            be read, changed and written back whole.
                        description: >-
                          Every field placed on the template's documents, in the
                          shape `PUT /api/v1/templates/:templateId/fields`
                          takes, so it can be changed and written back whole.
                      mergeFields:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: The merge field's id.
                              example: cmg3k8w4g0005s7p4c9v2mx8r
                            key:
                              type: string
                              description: >-
                                Placeholder name, written as {{key}} in emails
                                and document text, and the key to supply the
                                value under in `fields` when launching a
                                package.
                              example: start_date
                            label:
                              type: string
                              description: Human-readable name shown to the sender.
                              example: Start date
                            description:
                              type: string
                              nullable: true
                              description: >-
                                Help text shown to the sender alongside the
                                field, or null.
                              example: The employee's first day of work.
                            source:
                              $ref: '#/components/schemas/MergeFieldSource'
                            binding:
                              allOf:
                                - $ref: '#/components/schemas/MergeFieldBinding'
                                - nullable: true
                                  description: >-
                                    Where a MAPPED field reads its value from,
                                    or null for any other source.
                            type:
                              type: string
                              description: 'Value type: TEXT, NUMBER, DATE or CURRENCY.'
                              example: DATE
                            options:
                              type: array
                              items:
                                type: string
                              description: >-
                                Allowed values for a list field. Empty when any
                                value of `type` is accepted.
                              example: []
                            isRequired:
                              type: boolean
                              description: >-
                                Whether a value must exist at launch, from the
                                sender or from `defaultValue`.
                              example: true
                            defaultValue:
                              type: string
                              nullable: true
                              description: >-
                                The value used when the sender leaves the field
                                blank at launch, or null when there is no
                                default.
                              example: '2026-10-01'
                          required:
                            - id
                            - key
                            - label
                            - description
                            - source
                            - binding
                            - type
                            - options
                            - isRequired
                            - defaultValue
                        description: >-
                          The values the template collects at launch, in display
                          order.
                      workflowQuestions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                The question's id. Answer it under this key in
                                `workflowAnswers` when launching a package.
                              example: q_probation
                            question:
                              type: string
                              description: The question as it is asked.
                              example: Is there a probation period?
                            answerMode:
                              type: string
                              enum:
                                - choice
                                - open
                              description: >-
                                `choice` offers `answers`: answer with `{ port:
                                <answer id> }`. `open` takes a typed value:
                                answer with `{ value }`.
                              example: choice
                            answers:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    description: >-
                                      The answer's id, passed as `port` to pick
                                      it.
                                    example: 'yes'
                                  label:
                                    type: string
                                    description: The answer as it is shown.
                                    example: 'Yes'
                                  isDefault:
                                    type: boolean
                                    description: >-
                                      Whether this answer is used when the
                                      question is left unanswered.
                                    example: false
                                required:
                                  - id
                                  - label
                                  - isDefault
                              description: >-
                                The answers on offer. Empty for an `open`
                                question.
                          required:
                            - id
                            - question
                            - answerMode
                            - answers
                        description: >-
                          The questions in the template's workflow, which only
                          runs when `signingMode` is WORKFLOW. Empty when there
                          is no workflow.
                      documentQuestions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                              description: >-
                                The question's id. Answer it under its
                                document's id and then this key in
                                `documentAnswers` when launching a package.
                              example: cmg3k9y2h0006s7p4e4k7nq1t
                            documentId:
                              type: string
                              description: The document that asks the question.
                              example: cmg3k5r1c0003s7p4h2m8tb7k
                            question:
                              type: string
                              description: The question as it is asked.
                              example: Does the role include a company vehicle?
                            askedWhen:
                              type: object
                              nullable: true
                              properties:
                                questionId:
                                  type: string
                                  description: The question that must be answered first.
                                  example: cmg3k9y2h0008s7p4j5w1kd9m
                                optionId:
                                  type: string
                                  nullable: true
                                  description: >-
                                    The option of that question which reveals
                                    this one, or null when any answer does.
                                  example: cmg3k9y2h0009s7p4l7c4fs2q
                              required:
                                - questionId
                                - optionId
                              description: >-
                                The earlier answer this question depends on, or
                                null when it is always asked.
                            options:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    description: >-
                                      The option's id. Pass it as the value in
                                      `documentAnswers` to pick this answer.
                                    example: cmg3k9y2h0007s7p4g8d3rp6v
                                  label:
                                    type: string
                                    description: The answer as it is shown.
                                    example: 'Yes'
                                  isDefault:
                                    type: boolean
                                    description: >-
                                      Whether this option is used when the
                                      question is left unanswered.
                                    example: false
                                required:
                                  - id
                                  - label
                                  - isDefault
                              description: The answers on offer, in display order.
                          required:
                            - id
                            - documentId
                            - question
                            - askedWhen
                            - options
                        description: >-
                          Questions the template's documents ask the sender at
                          launch. Empty for a template of plain PDFs.
                      emailSubject:
                        type: string
                        nullable: true
                        description: >-
                          Subject of the invitation email, or null to use the
                          default.
                        example: Your employment agreement with Studio Phoenix Limited
                      emailMessage:
                        type: string
                        nullable: true
                        description: >-
                          Body of the invitation email, or null to use the
                          default.
                        example: >-
                          Kia ora {{employee_name}}, please review and sign your
                          agreement.
                      expirationDays:
                        type: integer
                        nullable: true
                        minimum: 1
                        description: >-
                          Days the package stays open for signing, counted from
                          when it is sent. Null or absent means it never
                          expires.
                        example: 30
                      reminderIntervalDays:
                        type: integer
                        nullable: true
                        minimum: 1
                        description: >-
                          Days between automatic reminders to each recipient who
                          hasn't finished, counted from their invitation. Null
                          or absent sends none.
                        example: 3
                      expiryWarningDays:
                        type: integer
                        nullable: true
                        minimum: 1
                        description: >-
                          Days before expiry at which recipients who haven't
                          finished are warned. MUST be fewer than
                          `expirationDays`.
                        example: 5
                      brandColor:
                        type: string
                        nullable: true
                        description: >-
                          Accent colour for the signing experience and emails,
                          as a six-digit hex code, or null.
                        example: '#1a2b3c'
                      createdAt:
                        type: string
                        description: >-
                          When the template was created, as an ISO 8601
                          timestamp in UTC.
                        example: '2026-09-14T02:15:30.000Z'
                      updatedAt:
                        type: string
                        description: >-
                          When the template was last changed, as an ISO 8601
                          timestamp in UTC.
                        example: '2026-09-21T23:48:05.000Z'
                      metadata:
                        type: object
                        additionalProperties:
                          type: string
                          description: The custom field's value.
                          example: CC-4410
                        description: >-
                          Default custom field values a package launched from
                          this template starts with, keyed by custom field
                          `key`. `{}` when none are set.
                        example:
                          cost_centre: HR-AKL
                          region: Auckland
                    required:
                      - id
                      - name
                      - description
                      - status
                      - tags
                      - signingMode
                      - roles
                      - documents
                      - fields
                      - mergeFields
                      - workflowQuestions
                      - documentQuestions
                      - emailSubject
                      - emailMessage
                      - expirationDays
                      - reminderIntervalDays
                      - expiryWarningDays
                      - brandColor
                      - createdAt
                      - updatedAt
                      - metadata
                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'
        '404':
          description: No template with that id in the workspace
          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:
    TemplateStatus:
      type: string
      enum:
        - DRAFT
        - ACTIVE
        - ARCHIVED
      description: >-
        Lifecycle state. DRAFT is still being built, ACTIVE is published and
        ready to launch packages from, ARCHIVED is retired but kept for
        reference.
      example: ACTIVE
    SigningMode:
      type: string
      enum:
        - PARALLEL
        - SEQUENTIAL
        - WORKFLOW
      description: >-
        PARALLEL (the default) invites everyone at once; SEQUENTIAL invites one
        recipient at a time in the order given. WORKFLOW is refused here, since
        a workflow is drawn in the app or comes from a template.
      example: SEQUENTIAL
    ActionType:
      type: string
      enum:
        - SIGNER
        - VIEWER
        - CC
      description: >-
        What the recipient does with the package. SIGNER completes fields and
        signs; VIEWER can open and read the package while it is out but has no
        fields; CC only receives the finished copy by email and never gets a
        signing session.
      example: SIGNER
    RecipientDelivery:
      type: string
      enum:
        - EMAIL
        - IN_PERSON
      description: >-
        How the recipient receives the package. EMAIL sends them an invitation;
        IN_PERSON sends no email, and a host opens the session and hands the
        device over.
      example: EMAIL
    RecipientHostRole:
      type: string
      enum:
        - SENDER
        - SPECIFIC_USER
        - MEMBER_GROUP
      description: >-
        Who may host an IN_PERSON recipient's session. SENDER is whoever sent
        the package; SPECIFIC_USER is one of `hostUserIds`; MEMBER_GROUP is any
        member of `hostGroupIds`.
      example: SENDER
    Document:
      type: object
      properties:
        id:
          type: string
          description: The document's id.
          example: cmg4v8q2k0003s7xhq1w8n5r7
        title:
          type: string
          description: 'The document''s title: its file name without the extension.'
          example: Employment agreement
        pageCount:
          type: integer
          description: How many pages the document has.
          example: 4
      required:
        - id
        - title
        - pageCount
      description: A document attached to a package or template.
    DocumentKind:
      type: string
      enum:
        - STANDARD
        - DYNAMIC
      description: >-
        `STANDARD` is an uploaded PDF whose pages are fixed. `DYNAMIC` is a
        document converted from an editable source into content Flowsign edits
        and lays out itself, so its pages are not fixed.
      example: STANDARD
    DocumentVariable:
      type: object
      properties:
        ref:
          type: string
          minLength: 1
          description: >-
            The variable's ref, the stable identity its placeholders in the
            content carry. Minted when the content is converted or edited; it
            cannot be chosen here.
          example: v_3kq9x
        key:
          type: string
          pattern: ^\w+$
          description: >-
            The placeholder name the content and merge values use. Letters,
            digits and _ only.
          example: start_date
        label:
          type: string
          description: The name shown to whoever supplies the value.
          example: Start date
        type:
          allOf:
            - $ref: '#/components/schemas/VariableType'
            - description: >-
                The kind of value a merge field or document variable holds,
                which decides how its default and launch values are validated:
                TEXT, NUMBER, DATE (ISO 8601 date) or CURRENCY.
              example: TEXT
        source:
          $ref: '#/components/schemas/VariableSource'
        defaultValue:
          type: string
          nullable: true
          description: The value used when none is given, or null.
          example: '2026-10-01'
        isRequired:
          type: boolean
          description: Whether a value must be given.
          example: true
        dropdownOptions:
          type: array
          items:
            type: string
          description: >-
            Allowed values for a list variable. Empty when any value of `type`
            is accepted.
          example: []
        binding:
          allOf:
            - $ref: '#/components/schemas/MergeFieldBinding'
            - nullable: true
              description: >-
                Where a MAPPED variable reads its value from, or null for any
                other source.
      required:
        - ref
        - key
        - label
        - type
        - source
        - defaultValue
        - isRequired
        - dropdownOptions
        - binding
      description: >-
        A placeholder in a dynamic document's content, and who supplies its
        value.
    PlacedField:
      type: object
      properties:
        id:
          type: string
          description: The field's id, as given when it was placed.
          example: cmg1p4k2a000bv9x0f2r6s8u4
        pageNumber:
          type: integer
          description: The page the field sits on, counting from 1.
          example: 1
        fieldType:
          $ref: '#/components/schemas/FieldType'
        position:
          type: object
          properties:
            x:
              type: number
              description: >-
                Distance from the page's left edge to the field's left edge, as
                a fraction of the page width (0 is the left edge, 1 the right).
              example: 0.12
            'y':
              type: number
              description: >-
                Distance from the page's top edge to the field's top edge, as a
                fraction of the page height (0 is the top, 1 the bottom).
              example: 0.78
          required:
            - x
            - 'y'
          description: >-
            The field's top-left corner, as fractions of the page's width and
            height. Fractions keep the placement valid whatever the page's pixel
            size.
          example:
            x: 0.12
            'y': 0.78
        size:
          type: object
          properties:
            width:
              type: number
              description: The field's width as a fraction of the page width.
              example: 0.28
            height:
              type: number
              description: The field's height as a fraction of the page height.
              example: 0.05
          required:
            - width
            - height
          description: The field's extent, as fractions of the page's width and height.
          example:
            width: 0.28
            height: 0.05
        isRequired:
          type: boolean
          description: Whether the recipient must complete the field before finishing.
          example: true
        placeholder:
          type: string
          nullable: true
          description: >-
            Text shown inside the empty field in place of the default for its
            type, or null. For a `label` field it is the text itself.
          example: Sign here
        dropdownOptions:
          type: array
          items:
            type: string
          description: >-
            The choices a `dropdown` field offers, in display order. Empty for
            other types.
          example:
            - Full time
            - Part time
            - Casual
        radioGroup:
          type: string
          nullable: true
          description: >-
            For a `radio` field, the name shared by every option in the same
            group, or null for other types.
          example: employment-type
      required:
        - id
        - pageNumber
        - fieldType
        - position
        - size
        - isRequired
        - placeholder
        - dropdownOptions
        - radioGroup
      description: >-
        A field as it is placed on a document. It has the same shape the field
        endpoints take, so a field can be read, changed and written back whole.
    MergeFieldSource:
      type: string
      enum:
        - SENDER
        - AUTHOR
        - MAPPED
        - WORKFLOW
      description: >-
        Who supplies a merge field's value. SENDER asks the sender at launch;
        AUTHOR fixes it to `defaultValue`; MAPPED reads it from a recipient's
        details through `binding`; WORKFLOW lets a workflow answer set it.
      example: SENDER
    MergeFieldBinding:
      type: object
      properties:
        kind:
          type: string
          enum:
            - recipient
          description: >-
            Where the value is read from. `recipient` reads one of a role's
            recipient details.
          example: recipient
        roleId:
          type: string
          minLength: 1
          description: The template role whose recipient the value is read from.
          example: cmg3k2v8a0001s7p4d9x1qz2h
        attribute:
          type: string
          enum:
            - name
            - email
          description: Which of the recipient's details fills the value.
          example: name
      required:
        - kind
        - roleId
        - attribute
      description: Where a MAPPED merge field reads its value from.
    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
    VariableType:
      type: string
      enum:
        - TEXT
        - NUMBER
        - DATE
        - CURRENCY
      description: >-
        Value type, which decides how the default and launch values are
        validated: TEXT (free text), NUMBER, DATE (ISO 8601 date) or CURRENCY.
        Defaults to TEXT.
      example: DATE
    VariableSource:
      type: string
      enum:
        - AUTHOR
        - SENDER
        - SIGNEE
        - WORKFLOW
        - MAPPED
      description: >-
        Who supplies a document variable's value. SENDER asks the sender at
        launch; AUTHOR fixes it to `defaultValue`; SIGNEE asks the recipient
        while signing; WORKFLOW lets a workflow answer set it; MAPPED reads a
        recipient's details through `binding`.
      example: SENDER
    FieldType:
      type: string
      enum:
        - text
        - signature
        - date
        - initial
        - comment
        - name
        - email
        - company
        - title
        - number
        - checkbox
        - radio
        - dropdown
        - formula
        - payment
        - label
        - attachment
      description: >-
        What the field collects. `signature` and `initial` capture a drawn or
        typed mark. `date` is filled with the signing date. `name`, `email`,
        `company` and `title` are single-line text prefilled from the
        recipient's details where known. `text` is free text and `number` a
        numeric value. `checkbox` is a tick box; `radio` is one option of a
        group named by `radioGroup`, of which the recipient picks one;
        `dropdown` offers `dropdownOptions`. `comment` is a multi-line note.
        `attachment` asks the recipient to upload a file. `label` is static text
        the sender writes and nobody fills. `formula` (a calculated value) and
        `payment` are placed only in the app for now.
      example: signature
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: fsk_*

````