---
updatedAt: 2026-08-17T09:02:15.000Z
agentTools:
  projectIndex: https://developer.oneflow.com/llms.txt
---

# Contract event

Any action or a change in a contract content creates a [contract event](oneflow-platform-glossary#contract-event).

Contract events are also the basis for triggering [webhooks](oneflow-platform-glossary#webhook). See the [Webhook type](https://developer.oneflow.com/docs/webhook-type) section for information on the types and format of contract events.

The events are grouped by the entity on which the event occurs. For example, a `contract:delete` event is created when a contract is deleted, while a `party:delete` event is created when a [party](oneflow-platform-glossary#party) is deleted. See the [Contract event type](contract-event#contract-event-type) chapter that follows.

# Contract event attributes

| Attribute     | Type                                                                     | Description                                                                                                    |
| :------------ | :----------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------- |
| \_links       | [object](type-reference#base-types)                                      | Contains links to endpoints associated with the parent object. See [Links](https://developer.oneflow.com/docs/links).                         |
| actor         | [object](type-reference#base-types) or [null](type-reference#base-types) | Indicates the [participant](oneflow-platform-glossary#participant) in the contract event. See [Actor](#actor). |
| created\_time | [string(datetime)](type-reference#subtypes-for-str)                      | The time the contract event was created.                                                                       |
| data          | [object](type-reference#base-types)                                      | Details of the action or change that created the event. See [Data](#data).                                     |
| id            | [integer(signed\_integer\_id)](type-reference#subtypes-for-int)          | The ID of the contract event.                                                                                  |
| type          | [string(enum)](type-reference#subtypes-for-str)                          | The type of the contract event. See [Contract event type](#contract-event-type)                                |

## Actor

The `actor` object shows which participant performed the action or change that led to the event being created.

| Attribute | Type                                                            | Description                                                    |
| :-------- | :-------------------------------------------------------------- | :------------------------------------------------------------- |
| id        | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the participant.                                     |
| name      | [string](type-reference#base-types)                             | The name of the participant.                                   |
| party     | [object](type-reference#base-types)                             | The party of the participant. See [Actor party](#actor-party). |

### Actor party

| Attribute | Type                                                            | Description            |
| :-------- | :-------------------------------------------------------------- | :--------------------- |
| id        | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the party.   |
| name      | [string](type-reference#base-types)                             | The name of the party. |

## Data

| Attribute | Type                                                                     | Description                                                                                                                                                                                                                                                                                 |
| :-------- | :----------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| changes   | [array](type-reference#base-types)\[[object](type-reference#base-types)] | Details about the changes made to the contract that created the event. See [Contract event data changes](#contract-event-data-changes).                                                                                                                                                     |
| subject   | [object](type-reference#base-types)                                      | Indicates the subject of the contract event data changes. See [Comment](contract-event#comment), [Contract](contract-event#contract), [Data field](contract-event#data-field), [Participant](contract-event#participant), [Party](contract-event#party), [Product](contract-event#product). |

### Contract event data changes

The contract event data `changes` array attributes are available only for update-related events.

| Attribute | Type                                | Description                                                            |
| :-------- | :---------------------------------- | :--------------------------------------------------------------------- |
| attribute | [string](type-reference#base-types) | The name of the changed attribute, such as “name”, “email” or “value”. |
| from      | [string](type-reference#base-types) | The value of the attribute before the change.                          |
| to        | [string](type-reference#base-types) | The value of the attribute after the change.                           |

### Subject

The entity that is the subject of the event. The type of the subject depends on the event and can be determined by looking at the [event type](contract-event#contract-event-type). One of the following depends on the event type:

#### Comment

| Attribute    | Type                                                            | Description                                 |
| :----------- | :-------------------------------------------------------------- | :------------------------------------------ |
| contract\_id | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the contract that comment exists. |
| id           | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the comment.                      |

#### Contract

| Attribute | Type                                                            | Description            |
| :-------- | :-------------------------------------------------------------- | :--------------------- |
| id        | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the contract |

#### Data field

| Attribute    | Type                                                            | Description                                    |
| :----------- | :-------------------------------------------------------------- | :--------------------------------------------- |
| contract\_id | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the contract that data field exists. |
| custom\_id   | [string](type-reference#base-types)                             | The custom ID of the data field.               |
| id           | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the data field.                      |
| name         | [string](type-reference#base-types)                             | The name of the data field.                    |

#### Participant

| Attribute | Type                                                            | Description                                       |
| :-------- | :-------------------------------------------------------------- | :------------------------------------------------ |
| id        | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the participant.                        |
| name      | [string](type-reference#base-types)                             | The name of the participant.                      |
| party     | [object](type-reference#base-types)                             | The party of the participant. See [Party](#party) |

#### Party

| Attribute | Type                                                            | Description            |
| :-------- | :-------------------------------------------------------------- | :--------------------- |
| id        | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the party.   |
| name      | [string](type-reference#base-types)                             | The name of the party. |

#### Product

| Attribute | Type                                                            | Description              |
| :-------- | :-------------------------------------------------------------- | :----------------------- |
| id        | [integer(signed\_integer\_id)](type-reference#subtypes-for-int) | The ID of the product.   |
| name      | [string](type-reference#base-types)                             | The name of the product. |

## Contract event type

<Callout icon="📘" theme="info">
  ### Note:

  We are constantly working on creating new contract events and updating the list below.
</Callout>

Currently, we support the following event types:

### Contract

* contract:ai\_extract:complete
* contract:content\_update
* contract:create
* contract:decline
* contract:delete
* contract:draft\_approval\_flow:complete
* contract:draft\_approval\_flow:reset
* contract:draft\_approval\_flow:start
* contract:lifecycle\_settings:update
* contract:lifecycle\_state:cancel
* contract:lifecycle\_state:end
* contract:lifecycle\_state:new\_period
* contract:lifecycle\_state:start
* contract:lifecycle\_state:terminate
* contract:publish
* contract:restore
* contract:sign
* contract:signature\_reset
* contract:signing\_period\_expire
* contract:signing\_period\_revive
* contract:workspace\_update

### Comment

* comment:create

### Data field

* data\_field:update

### Participant

* participant:create
* participant:decline
* participant:delegate
* participant:delete
* participant:delivery\_failure
* participant:first\_visit
* participant:publish
* participant:sign
* participant:signature\_reset
* participant:update
* participant:draft\_approval\_flow:approve
* participant:draft\_approval\_flow:reset

### Party

* party:create
* party:delete
* party:update

### Product

* product:create
* product:delete
* product:update