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

# Prepare a pinned workflow document

> Required scope: documents:write. Sandbox and supported Production configurations; app allowlists, mapped requester authority and active paid coverage apply. Production availability is checked per operation.



## OpenAPI

````yaml /openapi.json post /api/v1/approval-requests/document-preparations
openapi: 3.0.3
info:
  title: DekaSign integration and session API
  version: '2026-10-28'
  description: >-
    Production APIs require an active paid plan, Production app/key, allowed
    scopes and enabled capabilities. Some design-management operations remain
    sandbox-only. Template authoring and human approval decisions are not
    delegated to API keys. Session routes use separate identity. This
    specification grants no access or capability activation.
servers:
  - url: https://{workspace}.dekasign.com
    description: Use the organization workspace authorized for your integration app.
    variables:
      workspace:
        default: your-workspace
security: []
paths:
  /api/v1/approval-requests/document-preparations:
    post:
      tags:
        - approval-requests
      summary: Prepare a pinned workflow document
      description: >-
        Required scope: documents:write. Sandbox and supported Production
        configurations; app allowlists, mapped requester authority and active
        paid coverage apply. Production availability is checked per operation.
      operationId: post_approval_requests_document_preparations
      parameters:
        - name: X-Dekasign-Environment
          in: header
          required: true
          schema:
            type: string
            enum:
              - sandbox
              - production
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 8
            maxLength: 160
            pattern: ^[!-~]+$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    workflow_id:
                      type: string
                      minLength: 1
                      maxLength: 100
                    workflow_release_id:
                      type: string
                      minLength: 1
                      maxLength: 160
                    field_key:
                      type: string
                      minLength: 1
                      maxLength: 100
                    sender_values:
                      type: object
                      additionalProperties:
                        oneOf:
                          - type: string
                            maxLength: 4000
                          - type: number
                          - type: boolean
                    expires_in_seconds:
                      type: integer
                      minimum: 60
                      maximum: 86400
                      default: 86400
                  required:
                    - workflow_id
                    - workflow_release_id
                    - field_key
                  additionalProperties: false
                - type: object
                  properties:
                    workflow_id:
                      type: string
                      minLength: 1
                      maxLength: 100
                    workflow_release_id:
                      type: string
                      minLength: 1
                      maxLength: 160
                    field_key:
                      type: string
                      minLength: 1
                      maxLength: 100
                    sender_values:
                      type: object
                      additionalProperties:
                        oneOf:
                          - type: string
                            maxLength: 4000
                          - type: number
                          - type: boolean
                    expires_in_seconds:
                      type: integer
                      minimum: 60
                      maximum: 86400
                      default: 86400
                    request_id:
                      type: string
                      minLength: 1
                      maxLength: 100
                    expected_version:
                      type: integer
                      minimum: 1
                    expected_task_version:
                      type: integer
                      minimum: 1
                  required:
                    - workflow_id
                    - workflow_release_id
                    - field_key
                    - request_id
                    - expected_version
                    - expected_task_version
                  additionalProperties: false
      responses:
        '200':
          description: >-
            Operation result. Read fields vary by endpoint and deployment; see
            narrative guide.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  prepared_instance_id:
                    type: string
                  field_key:
                    type: string
                  name:
                    type: string
                  expires_at:
                    type: string
                    format: date-time
                  source_sha256:
                    type: string
                    pattern: ^[a-f0-9]{64}$
                  signing_layout_sha256:
                    type: string
                    pattern: ^[a-f0-9]{64}$
                  environment:
                    type: string
                    enum:
                      - sandbox
                      - production
                  signed:
                    type: boolean
                    enum:
                      - false
                  prepared_content:
                    type: object
                    properties:
                      method:
                        type: string
                        enum:
                          - GET
                      url:
                        type: string
                    required:
                      - method
                      - url
                    additionalProperties: false
                additionalProperties: true
        '400':
          description: Invalid operation or layout.
        '401':
          description: Invalid or expired credential/session.
        '403':
          description: Scope, environment, tenant or authority denied.
        '404':
          description: Not found or outside app scope.
        '409':
          description: Stale version, active usage or idempotency conflict.
        '422':
          description: Invalid schema or required idempotency key.
        '429':
          description: Rate limited.
        '503':
          description: Sandbox disabled or operation temporarily unavailable.
      security:
        - SandboxBearer: []
        - ProductionBearer: []
components:
  securitySchemes:
    SandboxBearer:
      type: http
      scheme: bearer
      description: Sandbox dks_test_ key, server-side only.
    ProductionBearer:
      type: http
      scheme: bearer
      description: Production dks_live_ key, server-side only.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.