---
title: "migration.completed — Webhooks"
canonical: "https://repull.dev/docs/webhooks/migration-completed"
description: "The migration.completed webhook: fired when an import into a Repull Migrate workspace finishes, with the workspaceId. Payload and patterns."
updated: "2026-11-30T00:48:58.694Z"
commit: "18314c12fefb59a7545ef7607c0893919de20aa9"
---

# `migration.completed`

An import into a Repull Migrate workspace finished. The envelope carries `workspaceId` — the property manager's workspace.

## When it fires

After the first import that follows the property manager connecting their old system, and again after every re-run from `POST /v1/migrations/{workspaceId}/import`. `data.results` lists what was processed per entity. Every other event about that workspace (new reservations, guest messages) also reaches your webhooks with the same `workspaceId`.

## Payload

Every delivery uses the same outer envelope (`event`, `eventId`, `apiVersion`, `timestamp`, `account`, `data`, plus a numeric `workspaceId` on events from a [customer workspace](https://repull.dev/docs/webhooks-introduction.md#routing-events-to-a-workspace)). Dedupe on `eventId` — it stays stable across retries and replays, while the `X-Repull-Delivery-Id` header changes on every attempt.

```
{
  "event": "migration.completed",
  "eventId": "3f1c9a2e-8b7d-4c6a-9e0f-1a2b3c4d5e6f",
  "apiVersion": "2026-04",
  "timestamp": "2026-05-01T12:34:56.000Z",
  "data": {
    "workspaceId": 1204,
    "provider": "guesty",
    "connectionId": 812,
    "status": "completed",
    "startedAt": "2026-09-24T18:02:11.000Z",
    "finishedAt": "2026-09-24T18:06:47.000Z",
    "entities": [
      "listings",
      "reservations"
    ],
    "results": [
      {
        "entityType": "listings",
        "processed": 48,
        "errors": 0
      },
      {
        "entityType": "reservations",
        "processed": 1312,
        "errors": 2
      }
    ]
  }
}
```

## Verifying signatures

Every delivery includes a timestamped `X-Repull-Signature` header of the form `t=<unix_ts>,v1=<hex>`, where `v1` is ``HMAC-SHA256(signing_secret, `${t}.${raw_body}`)``. Verify it before processing — see [Verify Signatures](https://repull.dev/docs/verify-webhook-signatures.md) for full Node.js and Python examples.

> **Warning: Use the raw body**
>
> Sign the raw request body exactly as received, not a re-stringified JSON object. Re-serialisation can reorder keys or change whitespace and break the signature.

## Example handler

```
app.post('/webhooks/repull', express.raw({ type: 'application/json' }), async (req, res) => {
  if (!verifyRepullSignature(req)) return res.sendStatus(401)
  const event = JSON.parse(req.body.toString())

  if (event.event === 'migration.completed') {
    // Pull the property manager's data with your own key + their workspace.
    const props = await repull.get('/v1/properties?limit=100', { headers: { 'X-Workspace-Id': event.workspaceId } })
    await onboarding.importProperties(event.workspaceId, props.data)
  }
  res.sendStatus(200)
})
```

## Common patterns

- Move the property manager to the next onboarding step (review the migration report, reconnect channels).
- Fetch `GET /v1/migrations/{workspaceId}/report` and show the issues that need a decision.

## Related

- [Repull Migrate](https://repull.dev/docs/migrate.md)
- [Channel links & cutover](https://repull.dev/docs/migrate/cutover.md)
- [migration.failed](https://repull.dev/docs/webhooks/migration-failed.md)

**Tip:** Acknowledge with a 2xx status within 10 seconds. Failed deliveries are retried 7 times over 24 hours, with backoff.[Webhook reliability →](https://repull.dev/docs/webhooks-introduction.md)
