Skip to content

Webhooks

React to lifecycle events instead of polling for them.

Why webhooks rather than polling

Webhooks are the primary mechanism for tracking a contract's lifecycle. Polling endpoints exist as a fallback, but a poll loop tells you late and costs both sides requests that nobody needed.

Lifecycle events

A contract moves through a small number of states, and each transition that matters to an integrator is delivered as an event.

Contract lifecycle events
StateEvent deliveredWhat it means
draftcontract.createdThe contract exists and is being prepared.
sentcontract.sentIt has gone to its participants.
signingsigner.completed, contract.signing_in_progressAt least one signer is done and the flow continues.
completedcontract.completedEvery required signature is in; the signed artifact is expected.
declinedsigner.declined, contract.declinedA signer declined.

Retrieving the signed document

Once you receive contract.completed, fetch the signed artifact. Before completion the signed-only endpoint returns 404 by design — there is nothing signed to return yet.

cURL
curl https://api.elcontract.com/api/v1/contracts/$CONTRACT_ID/documents/signed-latest \
  -H "Authorization: Bearer $ACCESS_TOKEN"