Documents and signing

engagements.save

Save a useful incomplete engagement draft, proposed agreement or review version using stable existing party/contact/project/billing-group IDs and expectedRevision (0 for new). terms is the complete replacement; retrieve first and preserve unrelated fields. Unknown terms stay null or unresolved. Billing, IP ownership and approval are independent: clarify ambiguous split requests before writing. Optional phases are not approved scope. Cannot edit executed terms, send, sign, invoice or pay.

POST/api/v1/accounting/engagements.save

Permissions

accounting:readaccounting:write

Who can call it

admin, finance

Retries

Idempotency key required, with expectedRevision

MCP

accounting_engagements_save

Fields

  • idstring (ID)

    The record's ID.

  • projectIdstring (ID)Required

    The ID of the related record.

  • namestringRequired

    A display name.

    1–200 characters

  • statusenumRequired

    Only include records with this status.

    draftproposedreview
  • termsobjectRequired

    No other fields

  • expectedRevisionintegerRequired

    The record's current revision, from the last time you read it. If someone changed the record since, the request is refused with a conflict so you can reload and check before trying again.

    0 to 9007199254740991

  • idempotencyKeystringRequired

    Any unique text you generate once per intended change, so a retried request only happens once. Send it as the Idempotency-Key header instead if you prefer; if you send both they must match.

    8–200 characters

Example

curl https://app.getoatmilk.com/api/v1/accounting/engagements.save \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "projectId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "name": "Synthetic Ventures Inc.",
  "status": "draft",
  "terms": {
    "parties": [
      {
        "entityId": "workspace",
        "contracting": true,
        "billing": true,
        "ipBeneficiary": true,
        "signatoryContactId": "example",
        "signatoryName": "Synthetic Ventures Inc.",
        "signatoryTitle": "Synthetic services agreement"
      }
    ],
    "scope": "example",
    "phases": [
      {
        "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "name": "Synthetic Ventures Inc.",
        "scope": "example",
        "coverage": "included"
      }
    ],
    "approvals": {
      "deliverables": {
        "mode": "all",
        "entityIds": [
          "workspace"
        ]
      },
      "scopeChanges": {
        "mode": "all",
        "entityIds": [
          "workspace"
        ]
      }
    },
    "ip": {
      "basis": "allocated",
      "allocations": [
        {
          "entityId": "workspace",
          "percent": 1
        }
      ],
      "customDeliverables": "example",
      "preExistingTools": "example",
      "thirdPartyComponents": "example"
    },
    "billingGroupIds": [
      "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
    ],
    "envelopeId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "unresolved": [
      {
        "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "question": "example",
        "ownerEntityId": "workspace"
      }
    ]
  },
  "expectedRevision": 3
}'
Response
{
  "data": { … }
}

Try it

Try it

Checks your input with this action’s real schema and answers like the API, with synthetic data. No key needed, and nothing changes.

POST/api/v1/accounting/engagements.save
curl https://app.getoatmilk.com/api/v1/accounting/engagements.save \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "projectId": "4d5e6f7a-8b9c-4d0e-8f1a-2b3c4d5e6f7a",
  "name": "Synthetic Ventures Inc.",
  "status": "draft",
  "terms": {
    "parties": [
      {
        "entityId": "workspace",
        "contracting": true,
        "billing": true,
        "ipBeneficiary": true,
        "signatoryContactId": "example",
        "signatoryName": "Synthetic Ventures Inc.",
        "signatoryTitle": "Synthetic services agreement"
      }
    ],
    "scope": "example",
    "phases": [
      {
        "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "name": "Synthetic Ventures Inc.",
        "scope": "example",
        "coverage": "included"
      }
    ],
    "approvals": {
      "deliverables": {
        "mode": "all",
        "entityIds": [
          "workspace"
        ]
      },
      "scopeChanges": {
        "mode": "all",
        "entityIds": [
          "workspace"
        ]
      }
    },
    "ip": {
      "basis": "allocated",
      "allocations": [
        {
          "entityId": "workspace",
          "percent": 1
        }
      ],
      "customDeliverables": "example",
      "preExistingTools": "example",
      "thirdPartyComponents": "example"
    },
    "billingGroupIds": [
      "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
    ],
    "envelopeId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
    "unresolved": [
      {
        "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
        "question": "example",
        "ownerEntityId": "workspace"
      }
    ]
  },
  "expectedRevision": 3
}'

More in Documents and signing.