Generate DOCX Contracts

Generate editable DOCX service agreements with parties, terms, and payment schedules.

Who this is for

Legal teams and SaaS companies use this recipe to generate service agreements programmatically. Define the contracting parties, scope of work, payment terms, and legal clauses — delivered as an editable DOCX file ready for review and signature.

curl -X POST https://api.iterationlayer.com/document-generation/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "format": "docx",
    "document": {
      "metadata": {
        "title": "SaaS Consulting Services Agreement",
        "author": "Evergreen Digital Solutions"
      },
      "page": {
        "size": { "preset": "A4" },
        "margins": { "top_in_pt": 72, "right_in_pt": 72, "bottom_in_pt": 72, "left_in_pt": 72 }
      },
      "styles": {
        "text": { "font_family": "Helvetica", "font_size_in_pt": 11.0, "line_height": 1.5, "color": "#333333" },
        "headline": { "font_family": "Helvetica", "font_size_in_pt": 24.0, "color": "#111111", "spacing_before_in_pt": 12.0, "spacing_after_in_pt": 6.0, "is_bold": true },
        "link": { "color": "#0066CC", "is_underlined": true },
        "list": { "text_style": { "font_family": "Helvetica", "font_size_in_pt": 11.0, "line_height": 1.5, "color": "#333333" }, "marker_color": "#333333", "marker_gap_in_pt": 8.0 },
        "table": { "header": { "background_color": "#333333", "text_color": "#FFFFFF", "font_size_in_pt": 11.0, "is_bold": true }, "body": { "background_color": "#FFFFFF", "text_color": "#333333", "font_size_in_pt": 11.0 }, "border": { "outer": { "top": { "color": "#CCCCCC", "width_in_pt": 1.0 }, "right": { "color": "#CCCCCC", "width_in_pt": 1.0 }, "bottom": { "color": "#CCCCCC", "width_in_pt": 1.0 }, "left": { "color": "#CCCCCC", "width_in_pt": 1.0 } }, "inner": { "horizontal": { "color": "#EEEEEE", "width_in_pt": 0.5 }, "vertical": { "color": "#EEEEEE", "width_in_pt": 0.5 } } } },
        "grid": { "background_color": "#FFFFFF", "border_color": "#CCCCCC", "border_width_in_pt": 0.0, "gap_in_pt": 12.0 },
        "separator": { "color": "#CCCCCC", "thickness_in_pt": 1.0, "spacing_before_in_pt": 12.0, "spacing_after_in_pt": 12.0 },
        "image": { "border_color": "#000000", "border_width_in_pt": 0.0 }
      },
      "header": [
        { "type": "paragraph", "runs": [{ "text": "CONFIDENTIAL — Evergreen Digital Solutions", "is_bold": true }] }
      ],
      "footer": [
        {
          "type": "grid",
          "columns": [
            { "column_span": 6, "blocks": [{ "type": "paragraph", "runs": [{ "text": "SaaS Consulting Services Agreement" }] }] },
            { "column_span": 6, "blocks": [{ "type": "page-number", "text_alignment": "right" }] }
          ]
        }
      ],
      "content": [
        { "type": "headline", "level": "h1", "text": "SaaS Consulting Services Agreement" },
        { "type": "paragraph", "runs": [
          { "text": "This SaaS Consulting Services Agreement (the \"Agreement\") is entered into as of " },
          { "text": "March 1, 2026", "is_bold": true },
          { "text": " (the \"Effective Date\") by and between the following parties." }
        ] },
        { "type": "separator" },
        { "type": "headline", "level": "h2", "text": "1. Parties" },
        { "type": "paragraph", "runs": [
          { "text": "Provider: ", "is_bold": true },
          { "text": "Evergreen Digital Solutions Inc., a Delaware corporation with its principal office at 500 Market Street, Suite 1200, San Francisco, CA 94105 (\"Provider\")." }
        ] },
        { "type": "paragraph", "runs": [
          { "text": "Client: ", "is_bold": true },
          { "text": "Cascade Health Systems LLC, a Washington limited liability company with its principal office at 2200 Westlake Avenue, Seattle, WA 98109 (\"Client\")." }
        ] },
        { "type": "separator" },
        { "type": "headline", "level": "h2", "text": "2. Scope of Work" },
        { "type": "paragraph", "markdown": "Provider agrees to deliver the following consulting services to Client during the term of this Agreement:" },
        { "type": "list", "variant": "ordered", "items": [
          { "text": "Platform Architecture Review — Comprehensive audit of Client's existing SaaS infrastructure, including database performance, API design, and microservices topology. Deliverable: Architecture Assessment Report." },
          { "text": "Data Migration Planning — Design and document a phased migration strategy for transitioning Client's legacy patient records system to Provider's cloud-native platform. Deliverable: Migration Runbook." },
          { "text": "Custom Integration Development — Build and deploy integrations between Client's EHR system and Provider's analytics dashboard, including HL7 FHIR-compliant data pipelines. Deliverable: Deployed integration with documentation." },
          { "text": "Staff Training & Enablement — Conduct four half-day training sessions for Client's engineering and operations teams covering platform administration, monitoring, and incident response. Deliverable: Training materials and recorded sessions." }
        ] },
        { "type": "separator" },
        { "type": "headline", "level": "h2", "text": "3. Term and Termination" },
        { "type": "paragraph", "markdown": "This Agreement shall commence on the Effective Date and continue for a period of **twelve (12) months** unless terminated earlier in accordance with this section. Either party may terminate this Agreement for convenience upon **sixty (60) days** written notice to the other party. Either party may terminate this Agreement immediately upon written notice if the other party materially breaches any provision and fails to cure such breach within **thirty (30) days** of receiving written notice." },
        { "type": "separator" },
        { "type": "headline", "level": "h2", "text": "4. Compensation and Payment Terms" },
        {
          "type": "table",
          "column_widths_in_percent": [40, 25, 20, 15],
          "header": {
            "cells": [
              { "text": "Milestone" },
              { "text": "Deliverable" },
              { "text": "Due Date", "horizontal_alignment": "center" },
              { "text": "Amount", "horizontal_alignment": "right" }
            ]
          },
          "rows": [
            { "cells": [
              { "text": "Project Kickoff" },
              { "text": "Architecture Report" },
              { "text": "Apr 15, 2026", "horizontal_alignment": "center" },
              { "text": "$45,000", "horizontal_alignment": "right" }
            ] },
            { "cells": [
              { "text": "Migration Planning" },
              { "text": "Migration Runbook" },
              { "text": "Jun 1, 2026", "horizontal_alignment": "center" },
              { "text": "$35,000", "horizontal_alignment": "right" }
            ] },
            { "cells": [
              { "text": "Integration Development" },
              { "text": "Deployed Integration" },
              { "text": "Sep 30, 2026", "horizontal_alignment": "center" },
              { "text": "$85,000", "horizontal_alignment": "right" }
            ] },
            { "cells": [
              { "text": "Training & Enablement" },
              { "text": "Training Materials" },
              { "text": "Nov 15, 2026", "horizontal_alignment": "center" },
              { "text": "$25,000", "horizontal_alignment": "right" }
            ] }
          ]
        },
        { "type": "paragraph", "runs": [
          { "text": "Total Contract Value: ", "is_bold": true },
          { "text": "$190,000. Invoices are due within thirty (30) days of receipt. Late payments shall accrue interest at a rate of 1.5% per month." }
        ] },
        { "type": "separator" },
        { "type": "headline", "level": "h2", "text": "5. Confidentiality" },
        { "type": "paragraph", "markdown": "Each party agrees to hold in strict confidence all Confidential Information received from the other party. \"Confidential Information\" means any non-public technical, business, or financial information disclosed by either party, whether in writing, orally, or by inspection. This obligation shall survive termination of this Agreement for a period of **three (3) years**." },
        { "type": "separator" },
        { "type": "headline", "level": "h2", "text": "6. Limitation of Liability" },
        { "type": "paragraph", "markdown": "In no event shall either party be liable for any indirect, incidental, special, consequential, or punitive damages. Provider's total aggregate liability under this Agreement shall not exceed the **total fees paid by Client** under this Agreement during the twelve (12) months preceding the claim." },
        { "type": "separator" },
        { "type": "headline", "level": "h2", "text": "7. Signatures" },
        {
          "type": "grid",
          "columns": [
            {
              "column_span": 6,
              "blocks": [
                { "type": "paragraph", "runs": [
                  { "text": "For Evergreen Digital Solutions Inc.\n\n\n", "is_bold": true },
                  { "text": "________________________________\nName: James Whitfield\nTitle: Chief Executive Officer\nDate: ________________________" }
                ] }
              ]
            },
            {
              "column_span": 6,
              "blocks": [
                { "type": "paragraph", "runs": [
                  { "text": "For Cascade Health Systems LLC\n\n\n", "is_bold": true },
                  { "text": "________________________________\nName: Dr. Priya Ramanathan\nTitle: Chief Operating Officer\nDate: ________________________" }
                ] }
              ]
            }
          ]
        }
      ]
    }
  }'
import { IterationLayer } from "iterationlayer";
const client = new IterationLayer({ apiKey: "YOUR_API_KEY" });

const result = await client.generateDocument({
  format: "docx",
  document: {
    metadata: {
      title: "SaaS Consulting Services Agreement",
      author: "Evergreen Digital Solutions",
    },
    page: {
      size: { preset: "A4" },
      margins: { top_in_pt: 72, right_in_pt: 72, bottom_in_pt: 72, left_in_pt: 72 },
    },
    styles: {
      text: { font_family: "Helvetica", font_size_in_pt: 11.0, line_height: 1.5, color: "#333333" },
      headline: { font_family: "Helvetica", font_size_in_pt: 24.0, color: "#111111", spacing_before_in_pt: 12.0, spacing_after_in_pt: 6.0, is_bold: true },
      link: { color: "#0066CC", is_underlined: true },
      list: { text_style: { font_family: "Helvetica", font_size_in_pt: 11.0, line_height: 1.5, color: "#333333" }, marker_color: "#333333", marker_gap_in_pt: 8.0 },
      table: { header: { background_color: "#333333", text_color: "#FFFFFF", font_size_in_pt: 11.0, is_bold: true }, body: { background_color: "#FFFFFF", text_color: "#333333", font_size_in_pt: 11.0 }, border: { outer: { top: { color: "#CCCCCC", width_in_pt: 1.0 }, right: { color: "#CCCCCC", width_in_pt: 1.0 }, bottom: { color: "#CCCCCC", width_in_pt: 1.0 }, left: { color: "#CCCCCC", width_in_pt: 1.0 } }, inner: { horizontal: { color: "#EEEEEE", width_in_pt: 0.5 }, vertical: { color: "#EEEEEE", width_in_pt: 0.5 } } } },
      grid: { background_color: "#FFFFFF", border_color: "#CCCCCC", border_width_in_pt: 0.0, gap_in_pt: 12.0 },
      separator: { color: "#CCCCCC", thickness_in_pt: 1.0, spacing_before_in_pt: 12.0, spacing_after_in_pt: 12.0 },
      image: { border_color: "#000000", border_width_in_pt: 0.0 },
    },
    header: [
      { type: "paragraph", runs: [{ text: "CONFIDENTIAL — Evergreen Digital Solutions", is_bold: true }] },
    ],
    footer: [
      {
        type: "grid",
        columns: [
          { column_span: 6, blocks: [{ type: "paragraph", runs: [{ text: "SaaS Consulting Services Agreement" }] }] },
          { column_span: 6, blocks: [{ type: "page-number", text_alignment: "right" }] },
        ],
      },
    ],
    content: [
      { type: "headline", level: "h1", text: "SaaS Consulting Services Agreement" },
      { type: "paragraph", runs: [
        { text: "This SaaS Consulting Services Agreement (the \"Agreement\") is entered into as of " },
        { text: "March 1, 2026", is_bold: true },
        { text: " (the \"Effective Date\") by and between the following parties." },
      ] },
      { type: "separator" },
      { type: "headline", level: "h2", text: "1. Parties" },
      { type: "paragraph", runs: [
        { text: "Provider: ", is_bold: true },
        { text: "Evergreen Digital Solutions Inc., a Delaware corporation with its principal office at 500 Market Street, Suite 1200, San Francisco, CA 94105 (\"Provider\")." },
      ] },
      { type: "paragraph", runs: [
        { text: "Client: ", is_bold: true },
        { text: "Cascade Health Systems LLC, a Washington limited liability company with its principal office at 2200 Westlake Avenue, Seattle, WA 98109 (\"Client\")." },
      ] },
      { type: "separator" },
      { type: "headline", level: "h2", text: "2. Scope of Work" },
      { type: "paragraph", markdown: "Provider agrees to deliver the following consulting services to Client during the term of this Agreement:" },
      { type: "list", variant: "ordered", items: [
        { text: "Platform Architecture Review — Comprehensive audit of Client's existing SaaS infrastructure, including database performance, API design, and microservices topology. Deliverable: Architecture Assessment Report." },
        { text: "Data Migration Planning — Design and document a phased migration strategy for transitioning Client's legacy patient records system to Provider's cloud-native platform. Deliverable: Migration Runbook." },
        { text: "Custom Integration Development — Build and deploy integrations between Client's EHR system and Provider's analytics dashboard, including HL7 FHIR-compliant data pipelines. Deliverable: Deployed integration with documentation." },
        { text: "Staff Training & Enablement — Conduct four half-day training sessions for Client's engineering and operations teams covering platform administration, monitoring, and incident response. Deliverable: Training materials and recorded sessions." },
      ] },
      { type: "separator" },
      { type: "headline", level: "h2", text: "3. Term and Termination" },
      { type: "paragraph", markdown: "This Agreement shall commence on the Effective Date and continue for a period of **twelve (12) months** unless terminated earlier in accordance with this section. Either party may terminate this Agreement for convenience upon **sixty (60) days** written notice to the other party. Either party may terminate this Agreement immediately upon written notice if the other party materially breaches any provision and fails to cure such breach within **thirty (30) days** of receiving written notice." },
      { type: "separator" },
      { type: "headline", level: "h2", text: "4. Compensation and Payment Terms" },
      {
        type: "table",
        column_widths_in_percent: [40, 25, 20, 15],
        header: {
          cells: [
            { text: "Milestone" },
            { text: "Deliverable" },
            { text: "Due Date", horizontal_alignment: "center" },
            { text: "Amount", horizontal_alignment: "right" },
          ],
        },
        rows: [
          { cells: [
            { text: "Project Kickoff" },
            { text: "Architecture Report" },
            { text: "Apr 15, 2026", horizontal_alignment: "center" },
            { text: "$45,000", horizontal_alignment: "right" },
          ] },
          { cells: [
            { text: "Migration Planning" },
            { text: "Migration Runbook" },
            { text: "Jun 1, 2026", horizontal_alignment: "center" },
            { text: "$35,000", horizontal_alignment: "right" },
          ] },
          { cells: [
            { text: "Integration Development" },
            { text: "Deployed Integration" },
            { text: "Sep 30, 2026", horizontal_alignment: "center" },
            { text: "$85,000", horizontal_alignment: "right" },
          ] },
          { cells: [
            { text: "Training & Enablement" },
            { text: "Training Materials" },
            { text: "Nov 15, 2026", horizontal_alignment: "center" },
            { text: "$25,000", horizontal_alignment: "right" },
          ] },
        ],
      },
      { type: "paragraph", runs: [
        { text: "Total Contract Value: ", is_bold: true },
        { text: "$190,000. Invoices are due within thirty (30) days of receipt. Late payments shall accrue interest at a rate of 1.5% per month." },
      ] },
      { type: "separator" },
      { type: "headline", level: "h2", text: "5. Confidentiality" },
      { type: "paragraph", markdown: "Each party agrees to hold in strict confidence all Confidential Information received from the other party. \"Confidential Information\" means any non-public technical, business, or financial information disclosed by either party, whether in writing, orally, or by inspection. This obligation shall survive termination of this Agreement for a period of **three (3) years**." },
      { type: "separator" },
      { type: "headline", level: "h2", text: "6. Limitation of Liability" },
      { type: "paragraph", markdown: "In no event shall either party be liable for any indirect, incidental, special, consequential, or punitive damages. Provider's total aggregate liability under this Agreement shall not exceed the **total fees paid by Client** under this Agreement during the twelve (12) months preceding the claim." },
      { type: "separator" },
      { type: "headline", level: "h2", text: "7. Signatures" },
      {
        type: "grid",
        columns: [
          {
            column_span: 6,
            blocks: [
              { type: "paragraph", runs: [
                { text: "For Evergreen Digital Solutions Inc.\n\n\n", is_bold: true },
                { text: "________________________________\nName: James Whitfield\nTitle: Chief Executive Officer\nDate: ________________________" },
              ] },
            ],
          },
          {
            column_span: 6,
            blocks: [
              { type: "paragraph", runs: [
                { text: "For Cascade Health Systems LLC\n\n\n", is_bold: true },
                { text: "________________________________\nName: Dr. Priya Ramanathan\nTitle: Chief Operating Officer\nDate: ________________________" },
              ] },
            ],
          },
        ],
      },
    ],
  },
});

await Bun.write("service-agreement.docx", Buffer.from(result.data.buffer, "base64"));
import base64

from iterationlayer import IterationLayer
client = IterationLayer(api_key="YOUR_API_KEY")

result = client.generate_document(
    format="docx",
    document={
        "metadata": {
            "title": "SaaS Consulting Services Agreement",
            "author": "Evergreen Digital Solutions",
        },
        "page": {
            "size": {"preset": "A4"},
            "margins": {"top_in_pt": 72, "right_in_pt": 72, "bottom_in_pt": 72, "left_in_pt": 72},
        },
        "styles": {
            "text": {"font_family": "Helvetica", "font_size_in_pt": 11.0, "line_height": 1.5, "color": "#333333"},
            "headline": {"font_family": "Helvetica", "font_size_in_pt": 24.0, "color": "#111111", "spacing_before_in_pt": 12.0, "spacing_after_in_pt": 6.0, "is_bold": True},
            "link": {"color": "#0066CC", "is_underlined": True},
            "list": {"text_style": {"font_family": "Helvetica", "font_size_in_pt": 11.0, "line_height": 1.5, "color": "#333333"}, "marker_color": "#333333", "marker_gap_in_pt": 8.0},
            "table": {"header": {"background_color": "#333333", "text_color": "#FFFFFF", "font_size_in_pt": 11.0, "is_bold": True}, "body": {"background_color": "#FFFFFF", "text_color": "#333333", "font_size_in_pt": 11.0}, "border": {"outer": {"top": {"color": "#CCCCCC", "width_in_pt": 1.0}, "right": {"color": "#CCCCCC", "width_in_pt": 1.0}, "bottom": {"color": "#CCCCCC", "width_in_pt": 1.0}, "left": {"color": "#CCCCCC", "width_in_pt": 1.0}}, "inner": {"horizontal": {"color": "#EEEEEE", "width_in_pt": 0.5}, "vertical": {"color": "#EEEEEE", "width_in_pt": 0.5}}}},
            "grid": {"background_color": "#FFFFFF", "border_color": "#CCCCCC", "border_width_in_pt": 0.0, "gap_in_pt": 12.0},
            "separator": {"color": "#CCCCCC", "thickness_in_pt": 1.0, "spacing_before_in_pt": 12.0, "spacing_after_in_pt": 12.0},
            "image": {"border_color": "#000000", "border_width_in_pt": 0.0},
        },
        "header": [
            {"type": "paragraph", "runs": [{"text": "CONFIDENTIAL — Evergreen Digital Solutions", "is_bold": True}]},
        ],
        "footer": [
            {
                "type": "grid",
                "columns": [
                    {"column_span": 6, "blocks": [{"type": "paragraph", "runs": [{"text": "SaaS Consulting Services Agreement"}]}]},
                    {"column_span": 6, "blocks": [{"type": "page-number", "text_alignment": "right"}]},
                ],
            },
        ],
        "content": [
            {"type": "headline", "level": "h1", "text": "SaaS Consulting Services Agreement"},
            {"type": "paragraph", "runs": [
                {"text": "This SaaS Consulting Services Agreement (the \"Agreement\") is entered into as of "},
                {"text": "March 1, 2026", "is_bold": True},
                {"text": " (the \"Effective Date\") by and between the following parties."},
            ]},
            {"type": "separator"},
            {"type": "headline", "level": "h2", "text": "1. Parties"},
            {"type": "paragraph", "runs": [
                {"text": "Provider: ", "is_bold": True},
                {"text": "Evergreen Digital Solutions Inc., a Delaware corporation with its principal office at 500 Market Street, Suite 1200, San Francisco, CA 94105 (\"Provider\")."},
            ]},
            {"type": "paragraph", "runs": [
                {"text": "Client: ", "is_bold": True},
                {"text": "Cascade Health Systems LLC, a Washington limited liability company with its principal office at 2200 Westlake Avenue, Seattle, WA 98109 (\"Client\")."},
            ]},
            {"type": "separator"},
            {"type": "headline", "level": "h2", "text": "2. Scope of Work"},
            {"type": "paragraph", "markdown": "Provider agrees to deliver the following consulting services to Client during the term of this Agreement:"},
            {"type": "list", "variant": "ordered", "items": [
                {"text": "Platform Architecture Review — Comprehensive audit of Client's existing SaaS infrastructure, including database performance, API design, and microservices topology. Deliverable: Architecture Assessment Report."},
                {"text": "Data Migration Planning — Design and document a phased migration strategy for transitioning Client's legacy patient records system to Provider's cloud-native platform. Deliverable: Migration Runbook."},
                {"text": "Custom Integration Development — Build and deploy integrations between Client's EHR system and Provider's analytics dashboard, including HL7 FHIR-compliant data pipelines. Deliverable: Deployed integration with documentation."},
                {"text": "Staff Training & Enablement — Conduct four half-day training sessions for Client's engineering and operations teams covering platform administration, monitoring, and incident response. Deliverable: Training materials and recorded sessions."},
            ]},
            {"type": "separator"},
            {"type": "headline", "level": "h2", "text": "3. Term and Termination"},
            {"type": "paragraph", "markdown": "This Agreement shall commence on the Effective Date and continue for a period of **twelve (12) months** unless terminated earlier in accordance with this section. Either party may terminate this Agreement for convenience upon **sixty (60) days** written notice to the other party. Either party may terminate this Agreement immediately upon written notice if the other party materially breaches any provision and fails to cure such breach within **thirty (30) days** of receiving written notice."},
            {"type": "separator"},
            {"type": "headline", "level": "h2", "text": "4. Compensation and Payment Terms"},
            {
                "type": "table",
                "column_widths_in_percent": [40, 25, 20, 15],
                "header": {
                    "cells": [
                        {"text": "Milestone"},
                        {"text": "Deliverable"},
                        {"text": "Due Date", "horizontal_alignment": "center"},
                        {"text": "Amount", "horizontal_alignment": "right"},
                    ],
                },
                "rows": [
                    {"cells": [
                        {"text": "Project Kickoff"},
                        {"text": "Architecture Report"},
                        {"text": "Apr 15, 2026", "horizontal_alignment": "center"},
                        {"text": "$45,000", "horizontal_alignment": "right"},
                    ]},
                    {"cells": [
                        {"text": "Migration Planning"},
                        {"text": "Migration Runbook"},
                        {"text": "Jun 1, 2026", "horizontal_alignment": "center"},
                        {"text": "$35,000", "horizontal_alignment": "right"},
                    ]},
                    {"cells": [
                        {"text": "Integration Development"},
                        {"text": "Deployed Integration"},
                        {"text": "Sep 30, 2026", "horizontal_alignment": "center"},
                        {"text": "$85,000", "horizontal_alignment": "right"},
                    ]},
                    {"cells": [
                        {"text": "Training & Enablement"},
                        {"text": "Training Materials"},
                        {"text": "Nov 15, 2026", "horizontal_alignment": "center"},
                        {"text": "$25,000", "horizontal_alignment": "right"},
                    ]},
                ],
            },
            {"type": "paragraph", "runs": [
                {"text": "Total Contract Value: ", "is_bold": True},
                {"text": "$190,000. Invoices are due within thirty (30) days of receipt. Late payments shall accrue interest at a rate of 1.5% per month."},
            ]},
            {"type": "separator"},
            {"type": "headline", "level": "h2", "text": "5. Confidentiality"},
            {"type": "paragraph", "markdown": "Each party agrees to hold in strict confidence all Confidential Information received from the other party. \"Confidential Information\" means any non-public technical, business, or financial information disclosed by either party, whether in writing, orally, or by inspection. This obligation shall survive termination of this Agreement for a period of **three (3) years**."},
            {"type": "separator"},
            {"type": "headline", "level": "h2", "text": "6. Limitation of Liability"},
            {"type": "paragraph", "markdown": "In no event shall either party be liable for any indirect, incidental, special, consequential, or punitive damages. Provider's total aggregate liability under this Agreement shall not exceed the **total fees paid by Client** under this Agreement during the twelve (12) months preceding the claim."},
            {"type": "separator"},
            {"type": "headline", "level": "h2", "text": "7. Signatures"},
            {
                "type": "grid",
                "columns": [
                    {
                        "column_span": 6,
                        "blocks": [
                            {"type": "paragraph", "runs": [
                                {"text": "For Evergreen Digital Solutions Inc.\n\n\n", "is_bold": True},
                                {"text": "________________________________\nName: James Whitfield\nTitle: Chief Executive Officer\nDate: ________________________"},
                            ]},
                        ],
                    },
                    {
                        "column_span": 6,
                        "blocks": [
                            {"type": "paragraph", "runs": [
                                {"text": "For Cascade Health Systems LLC\n\n\n", "is_bold": True},
                                {"text": "________________________________\nName: Dr. Priya Ramanathan\nTitle: Chief Operating Officer\nDate: ________________________"},
                            ]},
                        ],
                    },
                ],
            },
        ],
    },
)

with open("service-agreement.docx", "wb") as f:
    f.write(base64.b64decode(result["data"]["buffer"]))
package main

import (
    "encoding/base64"
    "os"

    il "github.com/iterationlayer/sdk-go"
)

func main() {
    client := il.NewClient("YOUR_API_KEY")

    result, err := client.GenerateDocument(il.GenerateDocumentRequest{
        Format: "docx",
        Document: il.DocumentDefinition{
            Metadata: il.DocumentMetadata{
                Title:  "SaaS Consulting Services Agreement",
                Author: "Evergreen Digital Solutions",
            },
            Page: il.PageConfig{
                Size:    il.PageSize{Preset: "A4"},
                Margins: il.Margins{TopInPt: 72, RightInPt: 72, BottomInPt: 72, LeftInPt: 72},
            },
            Content: []il.ContentBlock{
                il.NewHeadlineBlock("h1", "SaaS Consulting Services Agreement"),
                il.ParagraphBlock{Type: "paragraph", Markdown: "This Agreement is entered into as of **March 1, 2026**."},
                il.NewSeparatorBlock(),
                il.NewHeadlineBlock("h2", "1. Parties"),
                il.ParagraphBlock{Type: "paragraph", Markdown: "**Provider:** Evergreen Digital Solutions Inc."},
                il.ParagraphBlock{Type: "paragraph", Markdown: "**Client:** Cascade Health Systems LLC"},
                il.NewSeparatorBlock(),
                il.NewHeadlineBlock("h2", "2. Scope of Work"),
                il.NewListBlock("ordered", []string{
                    "Platform Architecture Review",
                    "Data Migration Planning",
                    "Custom Integration Development",
                    "Staff Training & Enablement",
                }),
                il.NewSeparatorBlock(),
                il.NewHeadlineBlock("h2", "4. Compensation and Payment Terms"),
                il.NewTableBlock([]il.TableRow{
                    {Cells: []il.TableCell{{Text: "Project Kickoff"}, {Text: "$45,000"}}},
                    {Cells: []il.TableCell{{Text: "Migration Planning"}, {Text: "$35,000"}}},
                    {Cells: []il.TableCell{{Text: "Integration Development"}, {Text: "$85,000"}}},
                    {Cells: []il.TableCell{{Text: "Training & Enablement"}, {Text: "$25,000"}}},
                }),
                il.ParagraphBlock{Type: "paragraph", Markdown: "**Total Contract Value:** $190,000"},
            },
        },
    })
    if err != nil {
        panic(err)
    }

    decoded, _ := base64.StdEncoding.DecodeString(result.Data.Buffer)
    os.WriteFile("service-agreement.docx", decoded, 0644)
}

Related Recipes

Start building in minutes

Free trial credits included. No credit card required.