Update a Partner Agreement

PATCH https://api.suger.cloud/ai/org/{orgId}/prm/agreement/{agreementId}

Change an agreement's `status`, `name`, `type`, `effectiveDate` or `expiryDate`. Fields you leave out stay as they are. Dates are RFC 3339 timestamps, such as "2026-12-31T00:00:00Z" (a bare date is refused with 400), and the zero time ("0001-01-01T00:00:00Z") clears a date. Statuses: DRAFT, AWAITING_SIGNATURE, PARTIALLY_SIGNED, FULLY_EXECUTED, EXPIRED. Types: NDA, MSA, REFERRAL_AGREEMENT, SOW, OTHER. Moving an agreement to FULLY_EXECUTED completes the journey step waiting on it. Only the organization that sent the agreement (its `organizationId`) can change its status; the partner gets 403 AGREEMENT_SENDER_ONLY. `agreementId` is the agreement's `id` from ListPartnerAgreements. Send its current `version` to guard against a concurrent edit: a stale one is refused with 409 AGREEMENT_VERSION_CONFLICT.

Parameters

NameInTypeRequiredDescription
orgId path string yes Organization ID
agreementId path string yes Agreement ID

Request Body

Required. Content-Type: application/json · Schema: PartnerAgreementUpdate

PartnerAgreementUpdate fields:

FieldTypeRequiredDescription
effectiveDate string no
expiryDate string no
name string no
status string no
type string no
version integer no Version is the optimistic-concurrency guard. When set, the update fails with a conflict error if the row's current version differs.

Responses

200 — Updated agreement

Content-Type: application/json · Schema: PartnerAgreement

PartnerAgreement fields:

FieldTypeRequiredDescription
attachments array<PartnerAgreementAttachment> no File attachments with role labels (TEMPLATE, SIGNED_PARTY_A, COUNTERSIGNED, FINAL_EXECUTED, AMENDMENT).
createTime string no Creation timestamp
createdByUserId string no Creator's user id
createdByUserName string no Display name of the creator
deletedAt string no The time it was deleted; empty while it is active.
effectiveDate string no Date the agreement takes effect
expiryDate string no Date the agreement expires
id string no ID of the ent. Unique partner agreement identifier (UUID)
lastUpdateTime string no Last update timestamp
name string no Agreement display name, e.g. "Acme ↔ Globex NDA"
organizationId string no Sending/owner org id — the org that created the agreement. Tenant isolation; only this org may change status/stages or delete.
partnershipId string no The two parties (sender + counterpart) are derived from this partnership at query time.
status string no DRAFT, AWAITING_SIGNATURE, PARTIALLY_SIGNED, FULLY_EXECUTED, EXPIRED.
type string no NDA, MSA, REFERRAL_AGREEMENT, SOW, OTHER.
version integer no Optimistic-concurrency counter; bumped on every write

PartnerAgreementAttachment fields:

FieldTypeRequiredDescription
fileId string no FileID is the UUID allocated by the upload step (PartnerFileUploadRef.FileID).
fileName string no FileName is the original upload file name.
role string no Role is one of PartnerAgreementAttachmentRoles.
s3Key string no S3Key points at the uploaded object in the org-file bucket. The bucket itself is resolved internally at download time (org-file bucket), so it is not stored per-attachment.
sizeBytes integer no SizeBytes is the uploaded object size.
uploadTime string no UploadTime is when the attachment was added to the agreement.
uploadedByUserId string no UploadedByUserID / UploadedByUserName identify the uploader (resolved from auth).
uploadedByUserName string no

400 — Validation error

Content-Type: application/json

404 — Agreement not found

Content-Type: application/json

409 — Version conflict

Content-Type: application/json

Example

The request bodies are this operation's documented examples; the response and error bodies are generated from its schema. Substitute your own ids, and set SUGER_TOKEN to a bearer token from the OAuth client-credentials exchange.

Request

curl -X PATCH 'https://api.suger.cloud/ai/org/{orgId}/prm/agreement/{agreementId}' \
  -H "Authorization: Bearer $SUGER_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{
  "status": "FULLY_EXECUTED",
  "version": 2
}'

Response — 200

{
  "attachments": [
    {
      "fileId": "01H0000000000000000000",
      "fileName": "Acme Corp",
      "role": "string",
      "s3Key": "string",
      "sizeBytes": 1,
      "uploadTime": "2026-01-31T12:00:00Z",
      "uploadedByUserId": "01H0000000000000000000",
      "uploadedByUserName": "Acme Corp"
    }
  ],
  "createTime": "2026-01-31T12:00:00Z",
  "createdByUserId": "01H0000000000000000000",
  "createdByUserName": "Acme Corp",
  "deletedAt": "string",
  "effectiveDate": "2026-01-31T12:00:00Z",
  "expiryDate": "2026-01-31T12:00:00Z",
  "id": "01H0000000000000000000",
  "lastUpdateTime": "2026-01-31T12:00:00Z",
  "name": "Acme Corp",
  "organizationId": "01H0000000000000000000",
  "partnershipId": "01H0000000000000000000"
}

Error — 400

"string"

View as Markdown · API reference overview

Spotted something wrong or out of date on this page? Tell us and we'll correct it.