Contract creation, participant routing, lifecycle, and evidence APIs.
GET/contractsيتطلب مصادقة
List/search readable contracts
Lists contracts by applying requested filters and then intersecting every result with the
current actor's read authorization. Filters such as organization, counterparty, status,
participant action, and date range never bypass access control.
Default scope is `readable`.
Scopes:
- `owned`: contracts controlled by the current actor/context
- `organization`: contracts controlled by the current acting organization
- `shared_with_me`: contracts where the actor has an active viewer access grant
- `readable`: all contracts the actor can read via controller, organization membership, signer grant, or viewer grant
Platform read access is grant-based. `action="view"` creates read-only platform access;
`action="receive_copy"` does not create platform access and does not appear in readable/shared results
unless another access grant exists.
Examples:
- `GET /contracts?scope=readable&status=completed&dateField=completedAt&from=2026-05-01T00:00:00Z&to=2026-05-31T23:59:59Z`
- `GET /contracts?scope=shared_with_me`
- `GET /contracts?scope=readable&counterpartyOrganizationId=org_123`
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| scope | query | string | لا |
|---|
| status | query | string | لا |
|---|
| dateField | query | string | لا |
|---|
| from | query | string | لا |
|---|
| to | query | string | لا |
|---|
| organizationId | query | string | لا |
|---|
| counterpartyOrganizationId | query | string | لا |
|---|
| participantAction | query | string | لا |
|---|
| accessRole | query | string | لا |
|---|
| q | query | string | لا |
|---|
| limit | query | integer | لا |
|---|
| cursor | query | string | لا |
|---|
الاستجابات
200Contract listdefaultStandardized API error
POST/contractsيتطلب مصادقة
Recommended simple happy path - schema-driven create contract with optional participants/role assignment/send
Primary external integrator endpoint for the common flow.
Document this operation in two conceptual modes:
- Create Draft Contract (`sendNow` omitted or `false`)
- Create and Send Contract (`sendNow=true`)
In one request, this endpoint can:
- create a contract from a template
- accept structured `data` generated from template `inputSchema` (recommended)
- apply direct `fieldValues` and optional `tableData` (alternate advanced mode)
- create participants
- auto-assign signer roles using `participants[].templateRoleId`
- send immediately when `sendNow=true`
Structured data mapping:
- request `data` accepts section-based objects from `GET /templates/{id}/published-version` `inputSchema`
- field `key` is the canonical submission key inside each section object
- server maps `data` internally to contract `fieldValues` and `tableData`
- direct `fieldValues` and `tableData` payloads are supported as an alternate advanced mode
- in Dynamic Tables V2, `fieldValues` is for non-table fields and table cell values must be provided in `tableData`
Role assignment behavior with `participants[].templateRoleId`:
- role identity and signature placement are inherited from the template version
- participant assignment is set by the provided participant object
- `routingOrder` and `providerConfigRef` can be overridden per participant
- mismatch cases (unknown role id, invalid routing config, duplicate/invalid bindings) fail with role-binding errors
- when `sendNow=true` and explicit `roleBindings` are not supplied, signer participants must provide `templateRoleId`; otherwise the request fails with `CONTRACT_ROLE_BINDING_INVALID`
- using `participants[].templateRoleId`, explicit `roleBindings`, `signingSettings`, or `sendNow=true` requires `contracts:send` permission in addition to `contracts:create`
Signing execution behavior:
- `executionChannel` is valid only when `action="sign"`
- `action="sign"` requires `executionChannel`
- `action="view"` and `action="receive_copy"` must not include `executionChannel`
- person signers (`recipientType="individual"`) may use `platform_hosted` or `integrator_managed`
- organization signers (`recipientType="organization"`) must use `provider_managed`
`organizationSigningMode` is not writable by this endpoint.
It is snapshotted from template version settings during contract creation and defaults to `automatic` when template settings omit it.
جسم الطلب
titlestringمطلوبtemplateIdstringمطلوبtemplateVersionIdstringdataobjectSchema-driven structured payload aligned with `inputSchema` from
`GET /templates/{id}/published-version`.
Submit values using each field's canonical `key`.
Primary recommended submission mode.
Server maps this to contract `fieldValues` and schema-based `tableData`.fieldValuesarrayAlternate direct mode for non-table fields.
Dynamic table cells must be provided in `tableData`.tableDataobjectSchema-based dynamic table rows keyed by `tableKey`.
Each row must be an object keyed by the dynamic table column keys.participantsarrayroleBindingsarraysigningSettingsobjectsendNowbooleanWhen true, the server prepares the draft contract and sends it in the same request.
This is the primary simple integrator path and requires send-level permissions.notificationsobjectOptional per-event email notification override for this contract.
Merged into the contract's snapshotted settings on top of
platform/organization/template defaults. Omit an event or a setting
to inherit the broader default ("inherit" = key absent); set
`enabled: false` to explicitly disable an event. Invalid settings
(unknown event key or a setting not supported by the event) fail the
request before any send with `400` `INVALID_NOTIFICATION_SETTINGS`.
الاستجابات
201Contract createddefaultStandardized API error
GET/contracts/{id}يتطلب مصادقة
Get contract details (includes snapshotted organization signing mode)
Returns contract metadata including `organizationSigningMode`.
The mode is snapshotted from the selected template version at contract creation time and defaults to `automatic` if missing in template settings.
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Contract detailsdefaultStandardized API error
PUT/contracts/{id}/dataيتطلب مصادقة
Update contract field values and optional table data (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
جسم الطلب
fieldValuesarrayمطلوبtableDataobject
الاستجابات
200Contract updateddefaultStandardized API error
GET/contracts/{id}/documents/artifact-revisionsيتطلب مصادقة
List signed artifact revisions (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Artifact revisionsdefaultStandardized API error
GET/contracts/{id}/documents/artifact-revisions/{revision}/downloadيتطلب مصادقة
Download artifact revision bytes (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
| revision | path | integer | نعم |
|---|
| download | query | boolean | لا |
|---|
الاستجابات
200Artifact bytesdefaultStandardized API error
GET/contracts/{id}/documents/rendered-unsignedيتطلب مصادقة
Download rendered unsigned PDF
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
| download | query | boolean | لا |
|---|
الاستجابات
200PDF bytesdefaultStandardized API error
GET/contracts/{id}/documents/signed-latestيتطلب مصادقة
Download signed-latest document
Returns the stored signed PDF when `signedPdfKey` is present on the contract.
If no stored signed PDF exists, the endpoint falls back to the current rendered contract version PDF.
If neither source is available, returns `404 CONTRACT_SIGNED_DOCUMENT_NOT_AVAILABLE`.
Integrators that require a strictly signed artifact should call `/contracts/{id}/documents/signed-only`.
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
| download | query | boolean | لا |
|---|
الاستجابات
200PDF bytesdefaultStandardized API error
GET/contracts/{id}/documents/signed-onlyيتطلب مصادقة
Download signed PDF only (strict)
Returns only the stored signed artifact for the contract.
If no signed artifact exists, returns `404 CONTRACT_SIGNED_DOCUMENT_NOT_AVAILABLE`.
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
| download | query | boolean | لا |
|---|
الاستجابات
200Signed PDF bytesdefaultStandardized API error
GET/contracts/{id}/evidence/audit-trailيتطلب مصادقة
Get contract audit trail (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Audit traildefaultStandardized API error
GET/contracts/{id}/evidence/bundleيتطلب مصادقة
Build and fetch evidence bundle payload (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Evidence bundledefaultStandardized API error
POST/contracts/{id}/evidence/bundleيتطلب مصادقة
Persist evidence bundle as artifact revision (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
201Artifact revision createddefaultStandardized API error
GET/contracts/{id}/evidence/verificationيتطلب مصادقة
Get contract verification report (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Verification reportdefaultStandardized API error
PUT/contracts/{id}/participantsيتطلب مصادقة
Replace participants for a contract (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Participants replaceddefaultStandardized API error
PUT/contracts/{id}/role-bindingsيتطلب مصادقة
Set role bindings and signing settings (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
جسم الطلب
roleBindingsarrayمطلوبsigningSettingsobject
الاستجابات
200Role bindings updateddefaultStandardized API error
POST/contracts/{id}/sendيتطلب مصادقة
Send contract for signing (advanced; prepares drafts automatically)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
جسم الطلب
roleBindingsarraysigningSettingsobjectnotificationsobjectOptional per-event email notification override applied to this send.
Same semantics as on contract creation. Invalid settings fail with
`400` `INVALID_NOTIFICATION_SETTINGS` before the contract is sent.
الاستجابات
200Contract sentdefaultStandardized API error
GET/contracts/{id}/statusيتطلب مصادقة
Primary contract status endpoint (includes lifecycle + signing participant summary)
Preferred polling fallback endpoint when webhook delivery is unavailable.
Returns contract status, lifecycle summary, participant-level signing summary, and snapshotted `organizationSigningMode`.
The mode is template-version-driven and defaults to `automatic` when not explicitly configured on the template version.
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Contract statusdefaultStandardized API error
PUT/contracts/{id}/table-dataيتطلب مصادقة
Update schema-based dynamic table rows only (advanced)
المعاملات
| الاسم | الموضع | النوع | مطلوب |
|---|
| id | path | string | نعم |
|---|
الاستجابات
200Table data updateddefaultStandardized API error