Skip to main content

Create a new contract for the authenticated tenant

POST 

/contracts

Creates a new Contract record and returns the persisted object with server-assigned identifiers.

What it does: Registers a new contract for the tenant identified by the tenant-id header. The server assigns id (a UUID); any id supplied in the request body is ignored and discarded before the request reaches storage. createdBy and updatedBy are always set from the authenticated caller's user ID - any values supplied in the body are ignored.

When to use: Use this endpoint to introduce a net-new contract. To modify an existing contract, use PUT /contracts/{id} instead.

Preconditions: Requires the CREATE_CONTRACT permission. documentId, networkId, and planId are required top-level identifiers (caller-supplied, not server-generated). Within generalInfo, contractId, contractName, contractType, and contractStatus are required; all other fields and sections are optional.

Response: Returns 201 Created with the full Contract object, including the server-assigned id. No async jobs, webhooks, or downstream events are triggered by this operation as of this writing.

Request​

Responses​

The newly created Contract, including its server-assigned id.