# Subscribe to Tracking Plan changes with webhooks

After setting up Webhook integration in [Tracking Plan Publishing](https://www.avo.app/docs/publishing/publishing/overview.md), your endpoint provided there will be called with a JSON payload representing the state of your tracking plan when your tracking plan is published.

You can examine and download the exact JSON in the Publishing tab of your [Avo workspace](https://www.avo.app/schemas/).

> To see your exact Webhook payload in your Avo workspace choose `Tracking plan` - `Publishing` in the sidebar, then pick you Webhook in the menu and expand the `Payload preview` section.

[The format is documented here](https://www.avo.app/docs/publishing/publishing/overview.md#tracking-plan-model), an example payload is:

```JSON
{
  "name": "Avo",
  "events": [
    {
      "id": "_",
      "name": "Debugger Started",
      "description": "Sent when the web debugger is started.",
      "tags": [],
      "categories": [
        "categoryId"
      ],
      "rules": {
        "$schema": "http://json-schema.org/draft-06/schema#",
        "type": "object",
        "required": [
          "properties",
          "nameMapping"
        ],
        "properties": {
          "properties": {
            "type": "object",
            "properties": {
              "Property Name 1": {
                "id": "_",
                "description": "Describes from where the debugger was started.",
                "type": "string",
                "nameMapping": [
                  {
                    "name": "Mapped Property Name",
                    "destinationId": "anotherDestinationId"
                  }
                ]
              },
              "Property Name 2": {
                "id": "_",
                "description": "",
                "type": "string",
                "enum": [
                  "Option 1",
                  "Option 2"
                ]
              }
            },
            "additionalProperties": false,
            "required": [
              "Property Name 1",
              "Property Name 2"
            ]
          }
        },
        "nameMapping": [
          {
            "name": "Mapped Event Name",
            "destinationId": "all"
          }
        ]
      }
    }
  ],
  "metrics": {
    "metricId": {
      "id": "metricId",
      "name": "Proportion of weekly active workspaces with published integrations",
      "description": "",
      "categories": [
        "categoryId"
      ],
      "type": "Proportion",
      "items": [
        {
          "eventId": "_",
          "where": [
            {
              "propertyId": "_",
              "operation": "greater",
              "values": [
                0
              ]
            }
          ],
          "groupBy": []
        },
        {
          "eventId": "_",
          "where": [],
          "groupBy": []
        }
      ]
    },
    "anotherMetricId": {
      "id": "anotherMetricId",
      "name": "Number of integrations – segmented by integration type",
      "description": "",
      "categories": [
        "categoryId"
      ],
      "type": "EventSegmentation",
      "items": [
        {
          "eventId": "_",
          "where": [],
          "groupBy": [
            {
              "propertyId": "_"
            }
          ]
        }
      ]
    },
    "yetAnotherMetricId": {
      "id": "yetAnotherMetricId",
      "name": "Data Design Funnel",
      "description": "",
      "categories": [
        "categoryId"
      ],
      "type": "Funnel",
      "items": [
        {
          "eventId": "_",
          "where": [],
          "groupBy": []
        },
        {
          "eventId": "_",
          "where": [],
          "groupBy": []
        },
        {
          "eventId": "_",
          "where": [],
          "groupBy": []
        },
        {
          "eventId": "_",
          "where": [],
          "groupBy": []
        },
        {
          "eventId": "_",
          "where": [],
          "groupBy": []
        }
      ]
    }
  },
  "sources": {
    "sourceId": {
      "id": "sourceId",
      "name": "Web",
      "programmingLanguage": "Reason_V2",
      "developmentPlatform": "Web",
      "destinations": [
        "destinationId",
        "anotherDestinationId"
      ]
    },
    "anotherSourceId": {
      "id": "anotherSourceId",
      "name": "Functions",
      "programmingLanguage": "Reason_V2",
      "developmentPlatform": "Node",
      "destinations": [
        "destinationId",
        "anotherDestinationId"
      ]
    }
  },
  "destinations": {
    "destinationId": {
      "id": "mixpanel",
      "name": "Web Mixpanel",
      "type": "Mixpanel"
    },
    "anotherDestinationId": {
      "id": "anotherDestinationId",
      "name": "Backend Segment",
      "type": "Segment"
    }
  },
  "categories": {
    "categoryId": {
      "id": "categoryId",
      "name": "Onboarding",
      "description": "",
      "metrics": [
        "metricId",
        "anotherMetricId"
      ],
      "events": [
        "eventId",
        "anotherEventId"
      ]
    },
    "anotherCategoryId": {
      "id": "anotherCategoryId",
      "name": "CLI",
      "description": "",
      "metrics": [
        "metricId",
        "anotherMetricId"
      ],
      "events": [
        "eventId",
        "anotherEventId"
      ]
    }
  },
  "context": {
    "publishInfo": {
      "branchId": "master",
      "branchName": "main",
      "integrationId": "_",
      "integrationName": "Webhook",
      "publishDate": "Fri, 18 Jun 2021 13:54:01 GMT",
      "publishMethod": {
        "type": "Manual"
      }
    }
  }
}
```

## What's next?

Now when you've set up a webhook we recommend to [integrate Avo Inspector](https://www.avo.app/docs/reference/avo-inspector-sdks/overview.md).
