> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runmorph.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Events

### Event Headers

<ParamField header="x-conector-id" type="string" required>
  The unique identifier of the connector
</ParamField>

<ParamField header="x-owner-id" type="string" required>
  The unique identifier of the owner
</ParamField>

<ParamField header="x-idempotency-key" type="string" required>
  A unique key to ensure idempotency of the webhook request
</ParamField>

### Event Body

<ResponseField name="event" type="enum<string>" required>
  The event type : `crmEngagement::created`, `crmEngagement::updated` or
  `crmEngagement::deleted`
</ResponseField>

<ResponseField name="data" type="Engagement Resource" required>
  <Expandable title="properties">
    <ResponseField name="object" type="enum<string>" default="resource" required>
      Available options: resource
    </ResponseField>

    <ResponseField name="model" type="enum<string>" default="crmEngagement" required>
      The model identifier
    </ResponseField>

    <ResponseField name="id" type="string" required>
      The unique identifier
    </ResponseField>

    <ResponseField name="fields" type="object" required>
      <Expandable title="properties">
        <ResponseField name="type" type="string">
          Type of engagement
        </ResponseField>

        <ResponseField name="direction" type="string">
          Direction of the engagement
        </ResponseField>

        <ResponseField name="status" type="string">
          Engagement status
        </ResponseField>

        <ResponseField name="title" type="string">
          Subject or title of the engagement
        </ResponseField>

        <ResponseField name="description" type="string">
          Engagement content details
        </ResponseField>

        <ResponseField name="startedAt" type="string">
          Start time in ISO 8601 format
        </ResponseField>

        <ResponseField name="endedAt" type="string">
          End time in ISO 8601 format
        </ResponseField>

        <ResponseField name="duration" type="string">
          Duration in seconds
        </ResponseField>

        <ResponseField name="owner" type="string">
          Owner of the engagement
        </ResponseField>

        <ResponseField name="users" type="string">
          Related users
        </ResponseField>

        <ResponseField name="companies" type="string">
          Related companies
        </ResponseField>

        <ResponseField name="contacts" type="string">
          Related contacts
        </ResponseField>

        <ResponseField name="opportunities" type="string">
          Related opportunities
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="createdAt" type="string" required>
      The creation timestamp
    </ResponseField>

    <ResponseField name="updatedAt" type="string" required>
      The last update timestamp
    </ResponseField>

    <ResponseField name="rawResource" type="any | null">
      The raw resource data
    </ResponseField>

    <ResponseField name="warnings" type="object[]">
      <Expandable title="properties">
        <ResponseField name="code" type="string" required>
          The warning code
        </ResponseField>

        <ResponseField name="message" type="string">
          The warning message
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

### Expected Response

<Check>200 OK</Check>

<RequestExample>
  ```json Webhook Event theme={null}
  {
    "event": "crmEngagement::created",
    "data": {
      "object": "resource",
      "model": "crmEngagement",
      "id": "<string>",
      "fields": {
        "type": "<string>",
        "direction": "<string>",
        "status": "<string>",
        "title": "<string>",
        "description": "<string>",
        "startedAt": "<string>",
        "endedAt": "<string>",
        "duration": "<integer>",
        "owner": {
          "object": "resourceRef",
          "model": "<string>",
          "id": "<string>"
        },
        "users": [
          {
            "object": "resourceRef",
            "model": "<string>",
            "id": "<string>"
          }
        ],
        "companies": [
          {
            "object": "resourceRef",
            "model": "<string>",
            "id": "<string>"
          }
        ],
        "contacts": [
          {
            "object": "resourceRef",
            "model": "<string>",
            "id": "<string>"
          }
        ],
        "opportunities": [
          {
            "object": "resourceRef",
            "model": "<string>",
            "id": "<string>"
          }
        ]
      },
      "createdAt": "2025-03-06T09:05:04.606Z",
      "updatedAt": "2025-03-06T09:15:04.606Z",
      "rawResource": null,
      "warnings": []
    }
  }
  ```
</RequestExample>

<ResponseExample>
  ```json Expected Response  theme={null}
  // 200 
  ```
</ResponseExample>
