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

# Campaign events

> JSON Schemas for the three events Lobyco publishes when a campaign is created, changed or deleted.

Lobyco publishes a campaign event when a [campaign](/business-documentation/campaigns) is created, changed or deleted in Lobyco Nexus. These events describe the campaign itself, not a customer, so they carry no `customerId`.

<Warning>
  Campaign payloads use camelCase property names, such as `campaignId` and `eventId`. The other catalogues use PascalCase.

  A property with no value is left out of the payload, not sent as `null`. Only `eventId`, `campaignId` and `timestamp` are always present.

  Dates are UTC with second precision, in the form `yyyy-MM-ddTHH:mm:ssZ`.
</Warning>

## Field reference

| Event | Raised when |
| - | - |
| Campaign Created | A campaign is created, including when an existing campaign is copied |
| Campaign Updated | A campaign is changed, including when one of its steps is added, updated or removed |
| Campaign Deleted | A campaign is deleted |

All three events carry the same properties. Only `eventId` is composed differently.

## Schemas

<Tabs>
  <Tab title="Campaign Created">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "description": "Payload emitted when a campaign is created in TurboFlow.",
      "type": "object",
      "required": ["eventId", "campaignId", "timestamp"],
      "properties": {
        "eventId": {
          "type": "string",
          "description": "Computed event identifier, also used as the Service Bus message id: CampaignCreated-{campaignId}."
        },
        "campaignId": {
          "type": "string",
          "description": "Unique identifier of the campaign."
        },
        "campaignName": {
          "type": "string",
          "description": "Name of the campaign."
        },
        "campaignDescription": {
          "type": "string",
          "description": "Description of the campaign."
        },
        "externalReferenceId": {
          "type": "string",
          "description": "Reference used to identify the campaign in an external system."
        },
        "authorId": {
          "type": "string",
          "description": "Identifier of the user whose change raised the event."
        },
        "authorName": {
          "type": "string",
          "description": "Full name of the user whose change raised the event."
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "Start of the campaign validity period, when one is set."
        },
        "endDate": {
          "type": "string",
          "format": "date-time",
          "description": "End of the campaign validity period, when one is set."
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the event occurred."
        }
      }
    }
    ```
  </Tab>

  <Tab title="Campaign Updated">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "description": "Payload emitted when a campaign is changed in TurboFlow, including when one of its steps is added, updated or removed.",
      "type": "object",
      "required": ["eventId", "campaignId", "timestamp"],
      "properties": {
        "eventId": {
          "type": "string",
          "description": "Computed event identifier, also used as the Service Bus message id: CampaignUpdated-{campaignId}-{timestamp}."
        },
        "campaignId": {
          "type": "string",
          "description": "Unique identifier of the campaign."
        },
        "campaignName": {
          "type": "string",
          "description": "Name of the campaign."
        },
        "campaignDescription": {
          "type": "string",
          "description": "Description of the campaign."
        },
        "externalReferenceId": {
          "type": "string",
          "description": "Reference used to identify the campaign in an external system."
        },
        "authorId": {
          "type": "string",
          "description": "Identifier of the user whose change raised the event."
        },
        "authorName": {
          "type": "string",
          "description": "Full name of the user whose change raised the event."
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "Start of the campaign validity period, when one is set."
        },
        "endDate": {
          "type": "string",
          "format": "date-time",
          "description": "End of the campaign validity period, when one is set."
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the event occurred."
        }
      }
    }
    ```
  </Tab>

  <Tab title="Campaign Deleted">
    ```json theme={"system"}
    {
      "$schema": "https://json-schema.org/draft/2020-12/schema",
      "description": "Payload emitted when a campaign is deleted in TurboFlow.",
      "type": "object",
      "required": ["eventId", "campaignId", "timestamp"],
      "properties": {
        "eventId": {
          "type": "string",
          "description": "Computed event identifier, also used as the Service Bus message id: CampaignDeleted-{campaignId}."
        },
        "campaignId": {
          "type": "string",
          "description": "Unique identifier of the campaign."
        },
        "campaignName": {
          "type": "string",
          "description": "Name the campaign had when it was deleted."
        },
        "campaignDescription": {
          "type": "string",
          "description": "Description the campaign had when it was deleted."
        },
        "externalReferenceId": {
          "type": "string",
          "description": "Reference used to identify the campaign in an external system."
        },
        "authorId": {
          "type": "string",
          "description": "Identifier of the user who deleted the campaign."
        },
        "authorName": {
          "type": "string",
          "description": "Full name of the user who deleted the campaign."
        },
        "startDate": {
          "type": "string",
          "format": "date-time",
          "description": "Start of the campaign validity period, when one is set."
        },
        "endDate": {
          "type": "string",
          "format": "date-time",
          "description": "End of the campaign validity period, when one is set."
        },
        "timestamp": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when the event occurred."
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Related

* [Offer events](/integration/external-integrations/events/offer-events) — the offers a campaign holds.
* [Challenge events](/integration/external-integrations/events/challenge-events) — the challenges a campaign holds.
* [OutboundAPI connection](/integration/external-integrations/outboundapi-connection) — how these events reach an endpoint in your system.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.