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

# campaign.created

> Occurs when a new campaign is created in your workspace.

export const WebhookResponseBodyParameters = ({type, children}) => <div>
    <h2>Response body parameters</h2>
    <p>
      All webhook payloads follow a consistent top-level structure with
      event-specific data nested within the <code>data</code> object.
    </p>
    <ParamField body="id" type="string">
      The event ID.
    </ParamField>
    <ParamField body="event" type="string">
      The event type that triggered the webhook (e.g., <code>{type}</code>).
    </ParamField>
    <ParamField body="timestamp" type="string">
      ISO 8601 timestamp when the webhook event was triggered.
    </ParamField>
    <ParamField body="data" type="object">
      Event-specific data containing detailed information about the event. The
      data object for the <code>{type}</code> event contains the following
      parameters:
      <Expandable defaultOpen title="object parameters">
        {children}
      </Expandable>
    </ParamField>
  </div>;

The `campaign.created` event is triggered when a new campaign is created in your Heyoo workspace.

<WebhookResponseBodyParameters type="campaign.created">
  <ParamField body="id" type="string" required>
    The unique ID of the campaign.
  </ParamField>

  <ParamField body="name" type="string" required>
    The name of the campaign.
  </ParamField>

  <ParamField body="objective" type="string" required>
    The objective of the campaign (e.g., `increase_awareness`).
  </ParamField>

  <ParamField body="description" type="string" required>
    A description of the campaign payload.
  </ParamField>

  <ParamField body="domain" type="string" required>
    The domain associated with the campaign.
  </ParamField>

  <ParamField body="destinationUrl" type="string" required>
    The destination URL where clicks should be redirected.
  </ParamField>

  <ParamField body="utm_source" type="string">
    The UTM source parameter.
  </ParamField>

  <ParamField body="utm_medium" type="string">
    The UTM medium parameter.
  </ParamField>

  <ParamField body="utm_campaign" type="string">
    The UTM campaign parameter.
  </ParamField>

  <ParamField body="utm_term" type="string">
    The UTM term parameter.
  </ParamField>

  <ParamField body="utm_content" type="string">
    The UTM content parameter.
  </ParamField>

  <ParamField body="ref" type="string">
    Referral identifier.
  </ParamField>

  <ParamField body="clicks" type="integer" required>
    Number of clicks received.
  </ParamField>

  <ParamField body="shares" type="integer" required>
    Number of shares.
  </ParamField>

  <ParamField body="targetShares" type="integer">
    Target number of shares.
  </ParamField>

  <ParamField body="startDate" type="string" required>
    Campaign start date.
  </ParamField>

  <ParamField body="endDate" type="string" required>
    Campaign end date.
  </ParamField>

  <ParamField body="shareRewardAmount" type="number" required>
    Reward amount per share.
  </ParamField>

  <ParamField body="clickRewardAmount" type="number" required>
    Reward amount per click.
  </ParamField>

  <ParamField body="rewardType" type="string" required>
    Type of reward given.
  </ParamField>

  <ParamField body="maxRewardPerEmployee" type="number">
    Maximum reward per employee.
  </ParamField>

  <ParamField body="totalBudget" type="number">
    Total budget allocated to the campaign.
  </ParamField>

  <ParamField body="consumedBudget" type="number" required>
    Budget consumed so far.
  </ParamField>

  <ParamField body="minimumClicksForReward" type="integer">
    Minimum clicks required for a reward.
  </ParamField>

  <ParamField body="uniqueClicksOnly" type="boolean">
    Whether only unique clicks are rewarded.
  </ParamField>

  <ParamField body="status" type="string" required>
    Current status of the campaign.
  </ParamField>

  <ParamField body="creatorId" type="string" required>
    The unique ID of the user who created the campaign.
  </ParamField>

  <ParamField body="workspaceId" type="string" required>
    The unique ID of the workspace.
  </ParamField>

  <ParamField body="workspaceSlug" type="string" required>
    The slug of the workspace.
  </ParamField>

  <ParamField body="contentPillarName" type="string">
    The content pillar name.
  </ParamField>

  <ParamField body="createdAt" type="string" required>
    ISO 8601 timestamp when the campaign was created.
  </ParamField>

  <ParamField body="updatedAt" type="string" required>
    ISO 8601 timestamp when the campaign was last updated.
  </ParamField>
</WebhookResponseBodyParameters>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "evt_...",
    "event": "campaign.created",
    "timestamp": "2024-08-26T16:41:52.346Z",
    "data": {
      "id": "cm11q3oxr0000a...",
      "name": "Acme Fall 2024",
      "shareContext": "Check out this amazing opportunity!",
      "objective": "increase_awareness",
      "description": "Fall awareness campaign",
      "domain": "acme.heyoo.ai",
      "destinationUrl": "https://acme.com",
      "utm_source": "heyoo",
      "utm_medium": "referral",
      "utm_campaign": "fall_2024",
      "utm_term": null,
      "utm_content": null,
      "ref": null,
      "clicks": 0,
      "shares": 0,
      "targetShares": 100,
      "startDate": "2024-09-01T00:00:00.000Z",
      "endDate": "2024-11-30T23:59:59.999Z",
      "shareRewardAmount": 10,
      "clickRewardAmount": 1,
      "rewardType": "points",
      "maxRewardPerEmployee": 500,
      "totalBudget": 5000,
      "consumedBudget": 0,
      "minimumClicksForReward": 5,
      "uniqueClicksOnly": true,
      "status": "draft",
      "creatorId": "usr_...",
      "workspaceId": "ws_...",
      "workspaceSlug": "acme",
      "contentPillarName": "Promotions",
      "createdAt": "2024-08-26T16:40:00.000Z",
      "updatedAt": "2024-08-26T16:40:00.000Z"
    }
  }
  ```
</ResponseExample>
