> ## 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 : `crmOpportunity::created`, `crmOpportunity::updated` or
  `crmOpportunity::deleted`
</ResponseField>

<ResponseField name="data" type="Opportunity 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="crmOpportunity" 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="name" type="string">
          Opportunity name. Required string length: 1 - 250
        </ResponseField>

        <ResponseField name="amount" type="string">
          Opportunity amount
        </ResponseField>

        <ResponseField name="currency" type="string">
          Currency code. Required string length: 3 - 3
        </ResponseField>

        <ResponseField name="stage" type="string">
          Stage of the opportunity
        </ResponseField>

        <ResponseField name="pipeline" type="string">
          Pipeline of the opportunity
        </ResponseField>

        <ResponseField name="owner" type="string">
          User that own the opportunity
        </ResponseField>

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

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

        <ResponseField name="engagements" type="string">
          Associated engagements
        </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": "crmOpportunity::created",
    "data": {
      "object": "resource",
      "model": "crmOpportunity",
      "id": "<string>",
      "fields": {
        "name": "<string>",
        "amount": "<number>",
        "currency": "<string>",
        "stage": {
          "object": "resourceRef",
          "model": "<string>",
          "id": "<string>"
        },
        "pipeline": {
          "object": "resourceRef",
          "model": "<string>",
          "id": "<string>"
        },
        "owner": {
          "object": "resourceRef",
          "model": "<string>",
          "id": "<string>"
        },
        "contacts": [
          {
            "object": "resourceRef",
            "model": "<string>",
            "id": "<string>"
          }
        ],
        "companies": [
          {
            "object": "resourceRef",
            "model": "<string>",
            "id": "<string>"
          }
        ],
        "engagements": [
          {
            "object": "resourceRef",
            "model": "<string>",
            "id": "<string>"
          }
        ]
      },
      "createdAt": "2025-03-06T09:05:04.596Z",
      "updatedAt": "2025-03-06T09:15:04.596Z",
      "rawResource": null,
      "warnings": []
    }
  }
  ```
</RequestExample>

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