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

# One template, with every field address on it.

> THE ENDPOINT THAT SHOWS THE ADDRESSES. Read it once, by hand, before writing the code that sends anything: it is where you learn which `(subject, data_key)` pair each box on the paper answers to, and which boxes have no address at all.

⚠️ AND IT SHOWS WHERE EVERY BOX IS. Each `Field` carries a `rect`, and `pages` carries the dimensions those rectangles are fractions of. Together with `GET /api/v1/documents/{documentId}/pages/{pageNumber}`, which serves the page itself, that is enough for a program that can SEE to match fields it could not match from labels alone — which is the case on any real form, where `checklist.17` is a field name and "ID or passport number" appears four times on one page.

⚠️ FOUR SITUATIONS ANSWER WITH THE SAME 404: no such template anywhere; a template belonging to another organisation; one of yours that has been archived; and an id that is not a uuid. "This exists but is not yours" is itself the secret, and the handler could not distinguish them if it wanted to — the read runs inside a transaction already scoped to the key’s tenant.



## OpenAPI

````yaml /openapi.json get /api/v1/templates/{templateId}
openapi: 3.1.0
info:
  title: Vumasign API
  version: 0.1.0
  description: >-
    The Vumasign API. South African e-signature: templates, the addresses an

    integration writes values to, an idempotent send, and webhooks.


    **This document describes what exists today and nothing else.** It is not a

    roadmap, and there is deliberately no entry here for anything that has not

    shipped — a spec you can generate a client from and then discover was

    aspirational is worse than no spec at all.


    ## Authentication

        Authorization: Bearer vsk_live_…

    One header, one step. Keys are minted in Settings. `vsk_live_` and
    `vsk_test_`

    are different keys; the prefix is stored in clear so a leaked key is
    greppable

    and traceable to an organisation, while the secret is stored only as a hash.


    ## Errors


    Every refusal the API returns deliberately, at every status, is

    `{ "error": { "code", "message" } }`, and such a response is a failure **if

    and only if** it carries an `error` key — that test is correct even for a

    client that ignores the status line. An unexpected server failure may not
    have

    this shape: treat a 5xx without an `error` key as an `internal_error`, which

    is retryable. `code` is the

    contract and is stable forever; `message` is prose for a developer reading a

    log and may be reworded in any release.


    The root of this document carries **`x-error-codes`**: the closed enum, with

    `status`, `retryable`, `backoff`, `emitted` and `guidance` for each

    code. Branch on that rather than on our prose.


    ## Rate limits


    **600 requests a minute on any paid plan,

    60 on the free plan — and a test key

    gets the same number as a live one.** Per key, not per organisation, so a
    batch

    job and an interactive integration can be given a key each and neither can

    starve the other.


    The ceiling follows the PLAN rather than the kind of key, because the plan
    is

    what says whether this is production traffic or somebody evaluating us. On
    the

    API plan it is sized so that no honest workload meets it: a thousand
    envelopes

    with a status read each is two thousand requests, which is three and a half

    minutes rather than seventeen. The sandbox deliberately gets the *same*
    number

    rather than a larger one — an integration that passes in rehearsal is then
    an

    integration that passes live, and your `429` handling is exercised where

    meeting a `429` is free.


    Every successful authenticated response carries `RateLimit-Limit`,

    `RateLimit-Remaining` and `RateLimit-Reset` (seconds until the window

    closes, at most 60). Read them on your successes and you will never need to
    be

    refused. A 429 carries them too, and additionally carries `Retry-After`,
    which

    you should honour. A 401 carries none of them; a 403 may not, depending on

    whether it was decided before the request was counted. Each operation's

    responses say which others do.


    ⚠️ **A refused request still counts.** Retrying inside the window pushes the

    counter higher rather than holding it at the ceiling — which is why the
    backoff

    in `x-error-codes` is exponential and why `Retry-After` is worth reading

    rather than guessing at.


    ⚠️ The limits are **per minute**, and the window is fixed rather than
    sliding.

    Spending a whole window at the end of one minute and a whole window at the
    start

    of the next is possible; it is bounded at two windows' worth, which is a
    burst

    rather than an incident.


    ## Webhooks


    Register an endpoint with `POST /api/v1/webhooks`; the response carries the

    signing secret, **once**. The root of this document carries
    **`x-webhooks`**:

    the body we POST, the signature recipe (including the two mistakes that make
    a

    verifier look correct and be worthless), the published retry ladder, and the

    auto-disable rule. Read that before writing a receiver.


    ## What is not here yet


    No organisation-level email exists, so an auto-disabled webhook endpoint is

    discovered by polling rather than by being told. There is no way to change
    an

    envelope after it is created and before it is sent — `PATCH
    /v1/envelopes/{id}`

    is designed and not built — so a draft is created complete or not at all.
    Both

    are stated because a gap named is a gap somebody can plan around.


    ⚠️ **The rate limit above counts authenticated requests only.** A request

    carrying no key, or a key we cannot recognise, is refused before any counter
    is

    touched — a per-key ceiling cannot defend against a caller who has not
    presented

    a key, and pretending otherwise would be a promise we could not keep. That
    half

    belongs to the edge rather than to this API.


    (This section has twice described as missing something that now exists: the

    `uri` on every webhook body, which was `null` until

    `GET /api/v1/envelopes/{envelopeId}` gave it somewhere to point, and the
    rate

    limiter, which nothing enforced until the per-key ceiling above. Both were
    named

    here as gaps first, which is the point of naming them.)
servers:
  - url: https://app.vumasign.com
security:
  - ApiKey: []
tags:
  - name: Templates
    description: >-
      A template is a document with its signing roles and field placements
      authored once. Every envelope is made from one, or from a one-off pack.
  - name: Documents
    description: >-
      The pages of a template’s documents, served as PDF so that a client which
      has to show the paper can do so without rendering it itself.
  - name: Envelopes
    description: >-
      An envelope is one sending of a document to named people. Creating one is
      not sending it: a draft emails nobody until it is sent.
  - name: Webhooks
    description: >-
      Endpoints we POST signed events to when an envelope changes, with the
      health of each endpoint and a secret you can rotate without a gap.
  - name: Specification
    description: >-
      This document, served without a credential so that anybody can read what
      the API does before they hold a key.
paths:
  /api/v1/templates/{templateId}:
    get:
      tags:
        - Templates
      summary: One template, with every field address on it.
      description: >-
        THE ENDPOINT THAT SHOWS THE ADDRESSES. Read it once, by hand, before
        writing the code that sends anything: it is where you learn which
        `(subject, data_key)` pair each box on the paper answers to, and which
        boxes have no address at all.


        ⚠️ AND IT SHOWS WHERE EVERY BOX IS. Each `Field` carries a `rect`, and
        `pages` carries the dimensions those rectangles are fractions of.
        Together with `GET /api/v1/documents/{documentId}/pages/{pageNumber}`,
        which serves the page itself, that is enough for a program that can SEE
        to match fields it could not match from labels alone — which is the case
        on any real form, where `checklist.17` is a field name and "ID or
        passport number" appears four times on one page.


        ⚠️ FOUR SITUATIONS ANSWER WITH THE SAME 404: no such template anywhere;
        a template belonging to another organisation; one of yours that has been
        archived; and an id that is not a uuid. "This exists but is not yours"
        is itself the secret, and the handler could not distinguish them if it
        wanted to — the read runs inside a transaction already scoped to the
        key’s tenant.
      operationId: getTemplate
      parameters:
        - name: templateId
          in: path
          required: true
          description: The template’s `id`, as returned by the list endpoint.
          schema:
            type: string
            format: uuid
            examples:
              - 01960000-0000-4000-8000-0000000007e1
            description: A template id.
      responses:
        '200':
          description: The template, with its documents, pages, roles and every field.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Template'
                description: The template, in full.
              examples:
                example:
                  summary: A template with one addressable field
                  value:
                    id: 01960000-0000-4000-8000-0000000007e1
                    name: Employment contract
                    created_at: '2026-09-01T08:30:00.000Z'
                    documents:
                      - id: 01960000-0000-4000-8000-00000000d0c5
                        page_count: 1
                    pages:
                      - document_id: 01960000-0000-4000-8000-00000000d0c5
                        page: 1
                        width: 595.28
                        height: 841.89
                        rotation: 0
                    roles:
                      - name: Employee
                        routing_type: sign
                    subjects:
                      - key: employee
                        label: Employee
                    questions: []
                    fields:
                      - id: 01960000-0000-4000-8000-00000000f1e1
                        type: text
                        label: Full name
                        required: true
                        role: Employee
                        document_id: 01960000-0000-4000-8000-00000000d0c5
                        page: 1
                        subject: employee
                        data_key: full_name
                        question_id: null
                        options: null
                        rect:
                          x: 0.1007929
                          'y': 0.2107045
                          w: 0.5288973
                          h: 0.0213805
          headers:
            RateLimit-Limit:
              description: >-
                How many requests this key may make per minute: 600 on any paid
                plan and 60 on the free plan, the same in both environments. Per
                key, not per organisation — a second key has its own allowance.
                ⚠️ READ IT RATHER THAN ASSUMING IT: it is the number the
                database applied to this request, so it is right even when this
                description is out of date.
              schema:
                type: integer
                description: Requests permitted in the current minute.
            RateLimit-Remaining:
              description: >-
                How many of them are left, this one already counted. Zero on the
                request that is refused, and zero on every further request of
                that minute — ⚠️ a refused request still counts.
              schema:
                type: integer
                description: Requests remaining in the current minute.
            RateLimit-Reset:
              description: >-
                Seconds until the current minute closes and the allowance
                returns. At most 60, which is what makes the published
                exponential backoff converge in about six doublings rather than
                eleven.
              schema:
                type: integer
                description: Seconds until the window resets.
        '401':
          description: >-
            `unauthenticated` — The credential was absent, unreadable, unknown,
            wrong or revoked — this answer is deliberately identical for all of
            them, so it cannot be used to probe which keys exist. Retrying the
            same request changes nothing. Check the key in Settings or issue a
            new one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                description: The refusal.
        '403':
          description: >-
            `forbidden` — The key is valid and the organisation’s plan does not
            grant what this operation does. Nothing about the credential needs
            to change, and it is deliberately MORE specific than 401 because the
            caller has already proved they hold the key. TWO SITUATIONS PRODUCE
            IT. (1) THE PLAN EXCLUDES THE OPERATION: `POST /api/v1/templates` on
            the Free plan, which does not include authoring templates. A
            template that already exists stays readable at `GET
            /api/v1/templates`; authoring one needs a plan that includes
            templates. (2) WE CANNOT ESTABLISH WHAT THE PLAN INCLUDES, on any
            operation, so nothing is granted. That one is ours rather than
            yours, an ordinary account does not meet it, and it means ask us.


            `insufficient_scope` — This key is scoped and does not hold the
            scope this operation requires — `x-required-scope` on the operation
            names it, and the `WWW-Authenticate` header on the refusal repeats
            it (RFC 6750 §3.1). ⚠️ Retrying cannot help and neither can editing
            the key: scopes are fixed when a key is minted and no endpoint or
            screen can widen them. Issue a new key with the access it needs. A
            key created before scopes existed carries an empty scope list, which
            means EVERY capability, so this refusal cannot reach an integration
            that was already working.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                description: The refusal.
        '404':
          description: >-
            `not_found` — No such resource — or none this key’s organisation can
            see, or one that has been archived, or an id that is not a uuid.
            Those four are one answer on purpose: "it exists but is not yours"
            is itself a disclosure. Do not retry; check the id against the list
            endpoint.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                description: The refusal.
        '429':
          description: >-
            `rate_limited` — This key has spent its minute. The limit is per KEY
            and per minute, and it follows your PLAN rather than the kind of key
            — 600 requests a minute on every paid plan, 60 on the free plan, and
            the sandbox gets the same number as production so that an
            integration which passes in rehearsal passes live. Every successful
            authenticated response, and this one, carries `RateLimit-Limit`,
            `RateLimit-Remaining` and `RateLimit-Reset` (seconds), so a client
            can slow down before it is made to. TWO OPERATIONS ALSO ANSWER IT
            FOR A REASON OF THEIR OWN. `POST /api/v1/envelopes/batches` costs
            one request per row and is refused WHOLE when its rows do not fit
            what is left of the key’s minute — `RateLimit-Remaining` says how
            many would. `GET
            /api/v1/envelopes/{envelopeId}/documents/{position}/draft` has its
            own per-envelope and per-organisation ceilings on renders each
            minute, and the `message` says which one refused; there
            `Retry-After` is that ceiling’s, while the `RateLimit-*` headers
            still describe the key. `Retry-After` on this refusal is at most 60
            and is read from the stored window rather than computed, so two of
            our instances refusing the same key quote the same instant. ⚠️ A
            REFUSED REQUEST STILL COUNTS: hammering a limit you have already
            exceeded pushes the counter higher rather than holding it. Honour
            `Retry-After`. If one key genuinely needs more throughput, issue a
            second one in Settings — the ceiling is a fairness and blast-radius
            control, not a commercial meter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                description: The refusal.
          headers:
            RateLimit-Limit:
              description: >-
                How many requests this key may make per minute: 600 on any paid
                plan and 60 on the free plan, the same in both environments. Per
                key, not per organisation — a second key has its own allowance.
                ⚠️ READ IT RATHER THAN ASSUMING IT: it is the number the
                database applied to this request, so it is right even when this
                description is out of date.
              schema:
                type: integer
                description: Requests permitted in the current minute.
            RateLimit-Remaining:
              description: >-
                How many of them are left, this one already counted. Zero on the
                request that is refused, and zero on every further request of
                that minute — ⚠️ a refused request still counts.
              schema:
                type: integer
                description: Requests remaining in the current minute.
            RateLimit-Reset:
              description: >-
                Seconds until the current minute closes and the allowance
                returns. At most 60, which is what makes the published
                exponential backoff converge in about six doublings rather than
                eleven.
              schema:
                type: integer
                description: Seconds until the window resets.
            Retry-After:
              description: >-
                Seconds to wait before retrying, from the stored end of the
                window. Always present on a 429, and never more than 60. On the
                per-key limit it equals `RateLimit-Reset`; a narrower limit,
                such as the draft render allowance, has a window of its own and
                may ask for a different wait. `x-error-codes` tells you to
                honour it; this is it.
              schema:
                type: integer
                description: Seconds to wait before retrying.
        '500':
          description: >-
            `internal_error` — Ours, not yours. ⚠️ RETRY WITH THE SAME
            `Idempotency-Key` YOU SENT THE FIRST TIME, on any operation that
            takes one — that is what makes a retry safe here, and sending a NEW
            key would create a second envelope or send the same one twice. The
            safe GETs in this document can be retried freely. (This entry used
            to say every operation here was a GET; the write endpoints have
            since shipped, and the reasoning moved with them.)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
                description: The refusal.
      security:
        - ApiKey: []
components:
  schemas:
    Template:
      type: object
      description: >-
        One template in full: its documents, its roles, its subjects, its
        questions and every field placement. This is the response an integrator
        reads once, by hand, to learn the ADDRESSES their values must be written
        to.
      properties:
        id:
          type: string
          format: uuid
          description: The template’s id. A bare uuid, no prefix.
        name:
          type: string
          description: What the sender called it.
        created_at:
          type: string
          format: date-time
          description: ISO 8601, UTC. Also the order this list is in — newest first.
        documents:
          type: array
          description: The pack, in the order it is stacked.
          items:
            $ref: '#/components/schemas/Document'
            description: One document of the pack.
        pages:
          type: array
          description: >-
            ⚠️ THE DENOMINATOR FOR EVERY `Field.rect`, and a client doing field
            matching cannot skip it: a rectangle of fractions is dimensionless
            without the page it is a fraction of. Join on `(document_id, page)`,
            the same pair `fields` is joined by.


            Every page of every document of the pack, in the pack’s order and
            then by page number — the order a signer scrolls.
          items:
            $ref: '#/components/schemas/Page'
            description: 'One page: its size in points and its rotation.'
        roles:
          type: array
          description: The signing roles, in routing order.
          items:
            $ref: '#/components/schemas/Role'
            description: One role.
        subjects:
          type: array
          description: The people whose data this template collects.
          items:
            $ref: '#/components/schemas/Subject'
            description: One subject.
        questions:
          type: array
          description: The tickbox questions and how many answers each takes.
          items:
            $ref: '#/components/schemas/Question'
            description: One question.
        fields:
          type: array
          description: >-
            ⚠️ A FLAT LIST, NOT A MAP KEYED BY ADDRESS. Several fields sharing
            one `(subject, data_key)` pair is NORMAL — real forms ask for an ID
            number on the application and again on the declaration, and initials
            in the footer of all nine pages. A value supplied for an address
            means it for every box that asks.
          items:
            $ref: '#/components/schemas/Field'
            description: One field placement.
      required:
        - id
        - name
        - created_at
        - documents
        - pages
        - roles
        - subjects
        - questions
        - fields
    Error:
      type: object
      description: >-
        The body of every refusal the API returns deliberately, at every status,
        from every endpoint. Such a response is a failure if and only if it
        carries an `error` key — that test is correct even for a client that
        ignores the status line, which is a thing real clients do. An unexpected
        server failure may not have this shape: treat a 5xx without an `error`
        key as an `internal_error`, which is retryable.
      properties:
        error:
          type: object
          description: The refusal. Anything added in future is added INSIDE this object.
          properties:
            code:
              type: string
              description: >-
                A stable snake_case identifier that will never change meaning or
                spelling. This is the contract; branch on it. See
                `x-error-codes` at the root of this document for retry semantics
                per code.
              enum:
                - unauthenticated
                - forbidden
                - insufficient_scope
                - not_found
                - invalid_request
                - rate_limited
                - internal_error
                - service_unavailable
                - idempotency_key_required
                - idempotency_key_reused
                - request_in_progress
                - template_archived
                - template_unusable
                - template_has_no_fields
                - recipient_role_unknown
                - recipient_role_missing
                - recipient_role_duplicated
                - value_subject_unknown
                - value_address_unknown
                - value_not_writable
                - value_not_lockable
                - locked_answer_missing
                - locked_answer_unusable
                - cannot_be_drawn
                - send_allowance_exhausted
                - test_key_cannot_send
                - test_key_cannot_read_documents
                - test_key_cannot_mint
                - webhook_url_invalid
                - webhook_events_invalid
                - webhook_brand_unknown
                - webhook_limit_reached
                - api_key_owner_removed
                - recipient_not_embedded
                - recipient_not_yet_turn
                - recipient_cannot_sign
                - envelope_not_sent
                - envelope_not_draft
                - brand_has_no_embed_origins
                - recipient_cannot_be_embedded
                - batch_interrupted
                - brand_unknown
                - draft_not_available
            message:
              type: string
              description: >-
                ⚠️ PROSE FOR A DEVELOPER READING A LOG, and NOT part of the
                contract. It may be reworded in any release; anything that
                parses it is broken by design.
          required:
            - code
            - message
      required:
        - error
    Document:
      type: object
      description: >-
        One document of a template’s pack. Present so that a field’s `page`
        means something: the pack renders as one continuous column, so page 1
        occurs once per document. Listed in the order the pack is stacked, which
        is the order a signer scrolls.
      properties:
        id:
          type: string
          format: uuid
          description: >-
            The document’s id. ⚠️ ALSO THE `documentId` OF `GET
            /api/v1/documents/{documentId}/pages/{pageNumber}`, which is where
            you fetch the page itself to look at.
        page_count:
          type: integer
          description: How many pages this document contributes to the pack.
      required:
        - id
        - page_count
    Page:
      type: object
      description: >-
        One page of one of the template’s documents: how big it is and which way
        up it is. ⚠️ EVERY `Field.rect` IS A FRACTION OF THIS — a rectangle
        without its page is dimensionless, so a client that ignores this array
        cannot tell a portrait page from a landscape one and cannot check its
        own render against ours.
      properties:
        document_id:
          type: string
          format: uuid
          description: >-
            Which document of the pack. Matches `Document.id` and
            `Field.document_id`.
        page:
          type: integer
          description: >-
            1-indexed, WITHIN `document_id` and not within the pack. Matches
            `Field.page`, and is the `pageNumber` of `GET
            /api/v1/documents/{documentId}/pages/{pageNumber}`.
        width:
          type: number
          description: >-
            The visible width in PDF points (1/72 inch). ⚠️ ALREADY ROTATED —
            this is the width of the page as it is drawn and as you will see it.
            A4 portrait is 595.28; the same page at `rotation: 90` reports
            841.89 here.
          examples:
            - 595.28
        height:
          type: number
          description: The visible height in PDF points. Already rotated, like `width`.
          examples:
            - 841.89
        rotation:
          type: integer
          examples:
            - 0
          description: >-
            One of 0, 90, 180 or 270. ⚠️ INFORMATION, NOT AN INSTRUCTION.
            `width`, `height` and every `Field.rect` on this page are ALREADY
            expressed against the rotated page. A client that rotates the
            geometry again because this says 90 places every field wrongly, and
            the result looks entirely plausible.


            It is published for the two things it is genuinely needed for:
            telling a page that is landscape because it was rotated from one
            that was authored landscape, and checking that whatever produced
            your image honoured the rotation at all — if your image’s aspect
            ratio disagrees with `width`/`height`, your renderer is what is
            wrong.
      required:
        - document_id
        - page
        - width
        - height
        - rotation
    Role:
      type: object
      description: >-
        A signing role, addressed by NAME and never by position. A positional
        address breaks the moment a sender reorders a template; the array
        arrives in routing order, so nothing is lost by omitting the index.
      properties:
        name:
          type: string
          description: What the sender called this role. Matches `Field.role`.
        routing_type:
          type: string
          description: What this role does with the document.
          enum:
            - sign
            - approve
            - cc
      required:
        - name
        - routing_type
    Subject:
      type: object
      description: >-
        A subject: WHOSE data a field holds, as opposed to who fills it in. Half
        of every field address — `first_name` under the subject `spouse` is a
        different datum from `first_name` under the subject `main_member`.
      properties:
        key:
          type: string
          description: >-
            The machine half of the address — letters, digits and underscores
            only, so it can never contain a dot. Matches `Field.subject`.
        label:
          type: string
          description: >-
            What the sender called this person. This is what an integrator
            matches against their own record of the same human.
      required:
        - key
        - label
    Question:
      type: object
      description: >-
        ⚠️ A QUESTION, WHICH IS WHAT A SET OF TICKBOXES MEANS. A caller
        supplying a value for "Race" has to know the question takes exactly one
        answer, and no individual tickbox can tell them: `required` is per
        option, so a "required" Race question would mean every race must be
        ticked. The bounds here are the answer.
      properties:
        id:
          type: string
          format: uuid
          description: >-
            ⚠️ A JOIN KEY WITHIN THIS RESPONSE, NOT AN ADDRESS. Nothing in the
            API accepts it as input. It exists because a question has no natural
            key — two questions on one form legitimately called "Other" are a
            form, not a mistake — so joining fields to questions by name would
            merge them.
        name:
          type: string
          description: 'What a signer reads above the boxes: "Race", "Marital status".'
        min_selected:
          type: integer
          description: 0 makes the question optional. `>= 1` is what "required" means here.
        max_selected:
          type: integer
          description: >-
            1 makes the question exclusive. ⚠️ It is NOT always 1: "tick any
            that apply, at least one" is `(1, n)`. Never 0 — a question that
            takes no answers is not a question.
      required:
        - id
        - name
        - min_selected
        - max_selected
    Field:
      type: object
      description: >-
        One placement on the paper. ⚠️ ONE ARRAY WITH A `type` DISCRIMINATOR,
        not one array per type: DocuSign has 37 typed tab arrays, so adding a
        type is a breaking change there and a generic client must enumerate 37
        keys.
      properties:
        id:
          type: string
          format: uuid
          description: >-
            ⚠️ THE HANDLE FOR EXACTLY ONE FIELD, AND NOT A SECOND ADDRESS.
            `subject` + `data_key` is the address and it names a SET of fields
            on purpose — one `main_member.id_number` is meant to fill the box on
            the application, the box on the declaration and the initials in nine
            footers. Write values to the ADDRESS by default. Use this id when
            you need to name ONE of several boxes the address cannot tell apart,
            or to keep a durable reference to a particular box. The two can
            never name the same target, so there is no precedence to learn: an
            id is one field, an address is a set. ⚠️ NOTHING ACCEPTS IT AS INPUT
            TODAY — `values` on `POST /api/v1/envelopes` is addressed by
            `subject` and `key`, and there is no id-keyed form. ⚠️ IT IS STABLE
            across ordinary editing — the sender may move, retype, relabel and
            readdress a box, or delete its neighbours, and this value does not
            change — so it is safe to store. ⚠️ IT NAMES A TEMPLATE FIELD:
            sending a template COPIES its fields onto the envelope, and those
            copies are their own rows with their own ids.
        type:
          type: string
          description: >-
            What kind of box this is. This vocabulary is `FIELD_TYPES` verbatim
            and the database CHECK constraint’s, not a translation of either.
          enum:
            - signature
            - initial
            - text
            - date
            - checkbox
            - dropdown
            - attachment
            - date_signed
            - signer_name
            - signer_email
            - signer_title
            - signer_company
        label:
          type:
            - string
            - 'null'
          description: >-
            What is printed beside the box. Null for a box the sender never
            named.
        required:
          type: boolean
          description: >-
            ⚠️ ALWAYS FALSE ON A GROUPED OPTION — requiredness lives on the
            question, so read `min_selected` there instead. This flag is the
            answer for independent boxes only.
        role:
          type: string
          description: WHO fills this in. Matches `Role.name`.
        document_id:
          type: string
          format: uuid
          description: Which document of the pack this box is on. Matches `Document.id`.
        page:
          type: integer
          description: 1-indexed, WITHIN `document_id` and not within the pack.
        subject:
          type:
            - string
            - 'null'
          description: >-
            WHOSE datum this is — a `Subject.key` — or null for the signer’s
            own. Half of the address.
        data_key:
          type:
            - string
            - 'null'
          description: >-
            ⚠️ THE OTHER HALF OF THE ADDRESS, AND NULL IS THE MOST USEFUL THING
            THIS ENDPOINT SAYS. Null means this box has no address at all and an
            integration CANNOT write to it. Find those here, against your own
            data model, rather than by watching a send leave them blank. ⚠️ It
            may contain a dot and any Unicode letter — South Africa has eleven
            official languages and a Sesotho label is not a malformed address —
            which is why this is never composed with `subject` into one dotted
            string.
        question_id:
          type:
            - string
            - 'null'
          description: >-
            The `Question.id` this box is an option of, or null for an
            independent one.
        options:
          type:
            - array
            - 'null'
          items:
            type: string
            description: >-
              One option, exactly as a signer sees it and exactly as it is
              sealed.
          description: >-
            WHAT A `dropdown` OFFERS, in the order the signer reads them. Null
            on every other type. An option is ONE STRING — what is shown, what
            you write back, and what is sealed onto the document; there is no
            separate value and label, so the string on the certificate cannot
            disagree with the string in the database. ⚠️ A value you write to a
            dropdown MUST be one of these exactly: anything else is refused. ⚠️
            Null on a dropdown created before options existed — such a field
            cannot be answered at all, by you or by a signer, and has to be
            given a list in the editor.
        rect:
          $ref: '#/components/schemas/Rect'
          description: >-
            ⚠️ WHERE THE BOX IS ON THE PAGE, AND THE REASON THIS ENDPOINT IS
            USABLE BY SOMETHING THAT CAN SEE. `label` says what is printed
            beside the box and `data_key` says what may be written into it; on a
            real form neither is enough. A nine-page medical application carries
            284 fields named `checklist.17` and `fullwidth.42`, with OCR-derived
            labels, where "ID or passport number" appears four times on one page
            and only the POSITION says which dependant it belongs to.


            Fetch the page it is on from `GET
            /api/v1/documents/{document_id}/pages/{page}`, render it, and these
            four fractions land on the box. ⚠️ Read `Rect` before using them:
            origin top-left, Y downward, measured against the page AFTER
            rotation.
      required:
        - id
        - type
        - label
        - required
        - role
        - document_id
        - page
        - subject
        - data_key
        - question_id
        - options
        - rect
    Rect:
      type: object
      description: >-
        ⚠️ WHERE THE BOX IS. **Fractions of the VISIBLE page. Origin TOP-LEFT. Y
        increases DOWNWARD. `x`/`y` are the box’s TOP-LEFT corner.**


        To place it on an image of the page you rendered at any size:

        `left = x * imageWidth`, `top = y * imageHeight`, `width = w *
        imageWidth`, `height = h * imageHeight`. That arithmetic is correct at
        every resolution, which is the reason these are fractions and not
        points.


        ⚠️ "VISIBLE" MEANS AFTER ROTATION. A page with `rotation: 90` is
        measured as it is drawn and as it is seen, not as it is stored — so
        these fractions are already right for the image in front of you and must
        not be rotated again. Join `Page` on `(document_id, page)` for the
        dimensions they are fractions of.


        ⚠️ TOP-LEFT IS NOT PDF’S CONVENTION. PDF measures from the bottom-left
        upward. This API does not, because what you are matching against is an
        image, and every image and every vision model is top-left origin. If
        your fields come out mirrored vertically, this is the paragraph you
        needed.
      properties:
        x:
          type: number
          description: >-
            The LEFT edge, as a fraction of the visible page width. 0 is the
            left edge of the page, 1 the right.
          examples:
            - 0.1024
        'y':
          type: number
          description: >-
            ⚠️ The TOP edge, as a fraction of the visible page height, measured
            DOWNWARD. 0 is the top of the page, 1 the bottom.
          examples:
            - 0.2153
        w:
          type: number
          description: Width, as a fraction of the visible page width. Always positive.
          examples:
            - 0.3201
        h:
          type: number
          description: Height, as a fraction of the visible page height. Always positive.
          examples:
            - 0.0261
      required:
        - x
        - 'y'
        - w
        - h
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: >-
        `Authorization: Bearer vsk_live_…`. Chosen over a bespoke `X-API-KEY`
        header because every client, proxy and log-redaction rule already knows
        this one. What a key may DO is its scopes — see `x-scopes` at the root
        of this document and `x-required-scope` on each operation. The scope
        list is not written here because OpenAPI reserves a requirement’s scope
        array for `oauth2` and `openIdConnect` and requires it to be empty for
        an `http` scheme.

````