HomeDev guideRecipesAPI Reference
Dev guideUser GuidesLegal TermsNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Webhooks

How to use webhooks for static site generation.

Optimizely Graph gets a notification when something is updated for a specific account, so a static site generator (such as Gatsby) can be notified using webhooks.

📘

Note

Refer to the API Reference or Manage webhooks page for webhook management information.

Bulk completed

The content is gathered and organized into chunks during the synchronization job before being sent to the remote server. Each chunk represents a bulk of data, and within one synchronization job cycle, the system may generate multiple chunks. When Optimizely Graph finishes processing each chunk, it emits an event and identifier. This event can activate your static site generation pipeline, generating pages with up-to-date data.

{
  "id": "<event-id>",
  "timestamp": "<event-time>",
  "tenantId": "<tenant-id>", // ContentGraph instance id
  "type": {
    "subject": "bulk",
    "action": "completed"
  },
  "data": {
    "journalId": "<journal-id>"
  }
}

Expired content

In the Optimizely Content Management System (CMS), you can set content to be expired with the StopPublish field. If there is expired content, it is not retrieved in Optimizely Graph with the single public key. You get one notification with the Expired event when there is expired content using a sliding window of one hour.

{
  "id": "<event-id>",
  "timestamp": "<event-time>",
  "tenantId": "<tenant-id>", // ContentGraph instance id
  "type": {
    "subject": "doc",
    "action": "expired"
  },
  "data": {
    "docId": "<doc-id>"
  }
}