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

> Memerlukan scope documents:write. Sandbox dan konfigurasi Production yang didukung; allowlist aplikasi dan kewenangan pemohon tetap berlaku.



## OpenAPI

````yaml /openapi-id.json post /api/v1/approval-requests/document-preparations
openapi: 3.0.3
info:
  title: DekaSign integration and session API
  version: '2026-10-28'
  description: >-
    API Production memerlukan paket berbayar aktif, key/aplikasi Production,
    cakupan dan kapabilitas yang diizinkan. Operasi manajemen desain tertentu
    hanya untuk sandbox. Desain template dan keputusan approval manusia tidak
    diambil alih API key. Rute sesi memakai identitas terpisah. Spesifikasi ini
    tidak memberikan akses atau mengaktifkan kapabilitas.
servers:
  - url: https://{workspace}.dekasign.com
    description: Gunakan workspace organisasi yang diizinkan untuk aplikasi integrasi Anda.
    variables:
      workspace:
        default: your-workspace
security: []
paths:
  /api/v1/approval-requests/document-preparations:
    post:
      tags:
        - approval-requests
      summary: Prepare a pinned workflow document
      description: >-
        Memerlukan scope documents:write. Sandbox dan konfigurasi Production
        yang didukung; allowlist aplikasi dan kewenangan pemohon tetap berlaku.
      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: >-
            Hasil operasi. Field respons berbeda menurut endpoint dan
            deployment; lihat panduan.
          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: Operasi atau layout tidak valid.
        '401':
          description: Kredensial/sesi tidak valid atau kedaluwarsa.
        '403':
          description: Scope, environment, tenant atau kewenangan ditolak.
        '404':
          description: Tidak ditemukan atau di luar lingkup aplikasi.
        '409':
          description: Versi kedaluwarsa, masih digunakan aktif atau konflik idempotensi.
        '422':
          description: Schema atau idempotency key wajib tidak valid.
        '429':
          description: Batas laju permintaan tercapai.
        '503':
          description: Sandbox tidak aktif atau operasi sementara tidak tersedia.
      security:
        - SandboxBearer: []
        - ProductionBearer: []
components:
  securitySchemes:
    SandboxBearer:
      type: http
      scheme: bearer
      description: Key sandbox dks_test_, hanya untuk server.
    ProductionBearer:
      type: http
      scheme: bearer
      description: Key Production dks_live_, hanya di server.

````

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