Skip to content

Finalize contract

Request

Finalize the current builder session contract. Once finalized, the document becomes read-only and can no longer be patched. The document PDF and HTML can still be downloaded.

In most cases, the end-user finalizes the contract directly through the Builder UI. Use this endpoint when you need to trigger finalization programmatically from your backend.

Regardless of how finalization is triggered, if the end-user has the Builder UI open, they will be redirected to the success_handler URL configured when creating the session.

Security
APIKey
Path
session_idstring, (uuid)required

The UUID of the session to finalize.

Example:7f3f5f62-2c69-7d4e-8a3d-9c0f0e2c5f3a
Headers
X-Participantstring, (uuid)required

The participant ID for the builder session performing the finalize action.

Example:123e4567-e89b-12d3-a456-426614174000
curl -i -X POST \
  https://api.builder.docue.com/api/builder/sessions/7f3f5f62-2c69-7d4e-8a3d-9c0f0e2c5f3a/contract/finalize \
  -H 'Authorization: Bearer <YOUR_API Key_HERE>' \
  -H 'X-Participant: 123e4567-e89b-12d3-a456-426614174000'

Responses

Successfully finalized contract

Bodyapplication/json
dataobject
Response
{ "data": { "state": { … }, "signees": [ … ] } }