> For the complete documentation index, see [llms.txt](https://knowledgebase.fabricdata.com/studio/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.fabricdata.com/studio/integrations-and-apis/api-overview/events-and-webhooks.md).

# Events & Webhooks

### Overview

Origin Studio publishes event notifications when changes occur within your tenant.

Events are delivered via **AWS Simple Notification Service (SNS)** to a subscriber endpoint configured for your tenant.

You can use these events to:

* Trigger downstream workflows
* Synchronize external systems
* React to record lifecycle changes
* Automate enrichment or publishing pipelines

***

## How Event Delivery Works

1. A change occurs in Origin Studio (e.g., record created).
2. An event is published to your tenant’s SNS topic.
3. SNS delivers a notification to your subscribed webhook endpoint.
4. Your system processes the event payload.

***

## Supported Event Types

Examples:

| Event            | Description                   |
| ---------------- | ----------------------------- |
| `record.created` | A new record has been created |
| `record.updated` | Workflow status changed       |

***

## Event Payload Structure

Events are delivered using the AWS SNS `Notification` format.

The HTTP request your endpoint receives contains:

* SNS headers
* A JSON body containing the SNS envelope
* The actual Origin Studio event inside the `Message` field

```json
[
    {
        "headers": {
            "host": "fabricdata.app.n8n.cloud",
            "user-agent": "Amazon Simple Notification Service Agent",
            "content-length": "1042",
            "accept-encoding": "gzip, br",
            "cdn-loop": "cloudflare; loops=1; subreqs=1",
            "cf-connecting-ip": "15.221.164.147",
            "cf-ew-via": "15",
            "cf-ipcountry": "US",
            "cf-ray": "9d3681731c2a4598-PDX",
            "cf-visitor": "{\"scheme\":\"https\"}",
            "cf-worker": "n8n.cloud",
            "content-type": "text/plain; charset=UTF-8",
            "x-amz-sns-message-id": "5f722a59-abef-5554-8815-48417b70fa9c",
            "x-amz-sns-message-type": "Notification",
            "x-amz-sns-subscription-arn": "arn:aws:sns:us-west-2:418295686474:events-tenant-79267e3b4e62477e:3efe4469-7dab-40c0-87d7-d08007ba42ad",
            "x-amz-sns-topic-arn": "arn:aws:sns:us-west-2:418295686474:events-tenant-79267e3b4e62477e",
            "x-amzn-trace-id": "Root=1-699ece4f-452e865d2a85268d6bd01288;Parent=2896c5208ca02190;Sampled=0;Lineage=2:cdfa789b:0",
            "x-forwarded-for": "15.221.164.147, 104.23.160.227",
            "x-forwarded-host": "fabricdata.app.n8n.cloud",
            "x-forwarded-port": "443",
            "x-forwarded-proto": "https",
            "x-forwarded-server": "traefik-prod-users-gwc-34-f494454b5-5g6t6",
            "x-is-trusted": "yes",
            "x-real-ip": "15.221.164.147"
        },
        "params": {},
        "query": {},
        "body": "{\n  \"Type\" : \"Notification\",\n  \"MessageId\" : \"5f722a59-abef-5554-8815-48417b70fa9c\",\n  \"TopicArn\" : \"arn:aws:sns:us-west-2:418295686474:events-tenant-79267e3b4e62477e\",\n  \"Message\" : \"{\\\"event\\\":\\\"record.created\\\",\\\"id\\\":\\\"fab1d489645ef281\\\",\\\"new\\\":{\\\"workflowStatus\\\":\\\"draft\\\"}}\",\n  \"Timestamp\" : \"2026-02-25T10:26:39.055Z\",\n  \"SignatureVersion\" : \"1\",\n  \"Signature\" : \"oBi0h3caF+1LQaKtM+gzsF8BFg13DaPdlA4+BB+IHMekSZlQvFRfdxidaYtkFgaMK4DQuGARBa/TVnYVKVx0Bnq4+SBvYv722WKMSA5aZWb5y90JlW66/mnGs3MXRUIx7OKqfVeCbXUFFgOfougYHnYOxgvxjKfF83kF/VSQynP+bmJJ7lDBrvg72nCjm5NPR4Pf+RG7nxUC0BnMklXSLjsiLSfpyvuw3fbNc18q7FZ6VZ9ryPBqrFBqRp0JiDC8q7WBJaQ9UTBc//Vjw6Vel1JQclgD/1hcRQD/ikDK0ALZQBoAAHIJSiVGJv4a+kx9Dxgp5a1vcUIqDAOlMOrGCA==\",\n  \"SigningCertURL\" : \"https://sns.us-west-2.amazonaws.com/SimpleNotificationService-7506a1e35b36ef5a444dd1a8e7cc3ed8.pem\",\n  \"UnsubscribeURL\" : \"https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:418295686474:events-tenant-79267e3b4e62477e:3efe4469-7dab-40c0-87d7-d08007ba42ad\"\n}",
        "webhookUrl": "https://fabricdata.app.n8n.cloud/webhook-test/79cfc995-2b8b-4dde-8a9b-167dde182965",
        "executionMode": "test"
    }
]
```

***

## Example SNS Headers

```
x-amz-sns-message-type: Notification
x-amz-sns-topic-arn: arn:aws:sns:us-west-2:418295686474:events-tenant-79267e3b4e62477e
x-amz-sns-subscription-arn: arn:aws:sns:us-west-2:418295686474:events-tenant-79267e3b4e62477e:3efe4469-7dab-40c0-87d7-d08007ba42ad
```

These headers identify:

* The SNS topic
* The subscription
* The message type

***

## Example SNS Body (Envelope)

Your endpoint receives a JSON document like this:

```
{
  "Type": "Notification",
  "MessageId": "5f722a59-abef-5554-8815-48417b70fa9c",
  "TopicArn": "arn:aws:sns:us-west-2:418295686474:events-tenant-79267e3b4e62477e",
  "Message": "{\"event\":\"record.created\",\"id\":\"fab1d489645ef281\",\"new\":{\"workflowStatus\":\"draft\"}}",
  "Timestamp": "2026-02-25T10:26:39.055Z",
  "SignatureVersion": "1",
  "Signature": "BASE64_SIGNATURE",
  "SigningCertURL": "https://sns.us-west-2.amazonaws.com/...",
  "UnsubscribeURL": "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe..."
}
```

***

## Extracting the Actual Event

The Origin Studio event is contained inside the `Message` field.

Important:

The `Message` field is a **JSON string**, not a nested object.

It must be parsed a second time.

***

### Decoded Event Payload

After parsing the `Message` field:

```
{
  "event": "record.created",
  "id": "fab1d489645ef281",
  "new": {
    "workflowStatus": "draft"
  }
}
```

***

## Event Payload Fields

| Field   | Description                    |
| ------- | ------------------------------ |
| `event` | Event type                     |
| `id`    | Record ID                      |
| `new`   | New state (for update events)  |
| `old`   | Previous state (if applicable) |

***

## Example: record.created

```
{
  "event": "record.created",
  "id": "fab1d489645ef281",
  "new": {
    "workflowStatus": "draft"
  }
}
```

***

## Configuring Your Webhook Endpoint

<figure><img src="/files/TnnwLzliG8ZtpxlZuWSW" alt=""><figcaption></figcaption></figure>

***

## SNS Subscription Confirmation

When first subscribing, SNS may send a `SubscriptionConfirmation` message.

Example:

```
{
  "Type": "SubscriptionConfirmation",
  "SubscribeURL": "https://sns.us-west-2.amazonaws.com/?Action=ConfirmSubscription..."
}
```

You must confirm the subscription by visiting the `SubscribeURL`.

***

## Security & Validation

To ensure the message is authentic:

* Validate the SNS signature using `SigningCertURL`
* Confirm the `TopicArn` matches your expected tenant topic
* Reject unknown topics

Refer to AWS SNS documentation for signature validation best practices.

***

## Retry & Delivery Behavior

* SNS retries failed deliveries
* Retry timing follows AWS SNS retry policy
* Events are delivered at-least-once
* Your system should handle idempotency

Recommended:

Use the `MessageId` or record `id` + event type to prevent duplicate processing.
