# Webhooks overview

Source: https://swapcard.dev/webhooks/about-webhooks


Webhooks notify your server when something changes in your event, such as a profile update or a new session, so you don't have to poll the Content API for changes.

## What a webhook is
A webhook is a subscription. You give Swapcard the URL of an endpoint on your server and choose the event types you care about. When one of those events happens in your Swapcard event, Swapcard sends an HTTP `POST` request with the details of the change to that URL. Your server reads the request and reacts to it.

You register once, and you keep receiving data as events happen.

## Webhooks or polling

Polling means calling the Content API on a schedule to check whether something changed. Webhooks reverse that: Swapcard tells you when it happens.

Use webhooks when you want to:

- Get alerted when a profile is created or modified.
- React to activity in your event, such as an attendee registering for a session or an exhibitor updating their page.
- Replace frequent lookup queries for people, exhibitors and sessions, which reduces your API usage.

Use the [Content API](/content-api/about-the-graphql-api) when you want to:

- Read data that no webhook covers. See [Event types](/webhooks/webhooks-events) for the list of what webhooks cover.
- Import or export data in bulk, or fetch data that changed before you subscribed.
- Create or update data in Swapcard. Webhooks only send data to you.

Most integrations combine both: an initial import with the Content API, then webhooks to stay in sync.

## How delivery works
1. **You subscribe.** In Swapcard Studio or with the Content API, you create a webhook for one event with your endpoint URL, the event types you want, and an optional secret. See [Subscribe to webhooks](/webhooks/using-webhooks/subscribe).
2. **Something changes.** For example, an attendee updates their profile, or an organizer creates a session.
3. **Swapcard sends a request.** Your endpoint receives an HTTP `POST` request with a JSON body that describes the change. The `action` field tells you what happened, for example `profile_update`.
4. **You verify and process it.** Check the `X-Signature-256` header to make sure the request comes from Swapcard, then update your records, send content or start a workflow.

:::note
You can create up to 20 webhook subscriptions per event.
:::

## Next steps

- [Subscribe to webhooks](/webhooks/using-webhooks/subscribe): create, list, update and delete subscriptions in Studio or with the Content API.
- [Event types](/webhooks/webhooks-events): the changes you can subscribe to, with example payloads.
- [Payload and signature](/webhooks/webhooks-payload): the headers and fields of each request, and how to verify the signature.
- [Object reference](/webhooks/reference/context): every object that can appear in a payload.
