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

# Webhook events

> The event types you can subscribe to, what each one tells you, and which ones reach you.

Every event below can be subscribed to through the Webhooks endpoints. You only receive events for your own tenant.

<Note>
  This page is a snapshot, kept by hand so it can be read without calling the API. `GET /emsp/v1/webhooks/event_types` is the authoritative list, and returns the available versions for each type.
</Note>

| Event | Reaches | What it tells you |
| - | - | - |
| `location.added` | Anyone whose network it falls in | A CPO has created a new site, and it falls within one of your networks. This is the first you'll hear of that location |
| `location.updated` | Anyone whose network it falls in | Something about a location changed. Re-read it to find out what |
| `location.removed` | Anyone whose network it fell in | A location has been withdrawn by its operator and should no longer be offered to drivers |
| `network.created` | The owner | A network was created |
| `network.updated` | The owner | A network's details changed. Carries the *names* of the fields that changed, not their values |
| `network.deleted` | The owner | A network was deleted, and how many token groups were unassigned as a result |
| `network.published` | The publisher | A base network was published and is now visible to other tenants |
| `network.unpublishing.started` | The publisher | A published network has begun winding down. It stays visible until the deadline in the event, so consumers have time to move |
| `network.unpublishing.completed` | The publisher | The wind-down finished and the network is no longer published |
| `network.consumer.attached` | The publisher | Another tenant has started consuming your published network |
| `network.consumer.detached` | The publisher | That tenant no longer consumes it |

## Payload shapes

The table above says what each event *means*. For the exact fields, fetch the schema:

```
GET /emsp/v1/webhooks/event_types/{type}
```

It returns every available `api_version` for that type and its payload JSON schema. Those schemas are served live — read them from the API rather than copying them into your code.

The envelope around `data` is identical for every event and is described on [Webhook delivery](/api-reference/emsp/webhook-delivery).

## Versioning

A subscription is pinned to one `api_version`, and that version's payload will not change shape underneath you. A field being removed or retyped means a new version, published alongside the old one, which you migrate to when you're ready.

## Related

<Columns cols={3}>
  <Card title="Webhook delivery" icon="webhook" href="/api-reference/emsp/webhook-delivery">
    Verify signatures, respond correctly, and keep a subscription healthy.
  </Card>

  <Card title="Authentication" icon="key-round" href="/api-reference/emsp/authentication">
    Get a token and the scopes needed to manage subscriptions.
  </Card>

  <Card title="Errors" icon="triangle-alert" href="/developers/errors">
    The status codes the management endpoints return.
  </Card>
</Columns>
