---
title: "Register a webhook on a scraper"
method: POST
path: "/linkedin-scrappers/{id}/webhook"
tags: ["LinkedIn scraper"]
---

# Register a webhook on a scraper

`POST /linkedin-scrappers/{id}/webhook`

## Request

- Base URL: `https://api.emelia.io`
- URL: `https://api.emelia.io/linkedin-scrappers/{id}/webhook`
- Auth: API key in header `Authorization`

Registers a URL that Emelia calls when this scraper finishes or stops on an error. Register it right after creating the scraper. Several URLs can be registered on the same scraper; the same URL cannot be added twice.

**What is sent**: a `POST` with a JSON body `{ "event", "id", "name", "error" }` (see `ScrapperWebhookEvent`). `FINISHED` is sent when the extraction ends (`status` `done`, all chunks included). `ERROR` is sent when the scraper stops with an error code, at most once per hour for the same scraper and code.

**Current behavior to know**: every registered URL receives every event, whatever its `events` list; `ERROR` is only sent if at least one registered URL asked for `ERROR`. One attempt only: no retry, no signature, no custom header, so check the scraper with `GET /linkedin-scrappers/{id}` when you receive a call. Nothing is sent at the end of an enrichment.

`events` must contain `FINISHED` or `ERROR`; other values are accepted and ignored.

Known issue: the success response is currently an empty JSON object `{}` (no `success` field). Treat HTTP 200 as success.

## Path parameters

- `id` string, required

## Request body

- ScrapperWebhookRequest
  - `webhookUrl` string, uri, required: Public URL that accepts a POST with a JSON body.
  - `events` string[], required: At least one of `FINISHED`, `ERROR`. Today every registered URL receives every event anyway.

## Response `200`

Registered. Current body: `{}`.

- ScrapperEmptyResponse: Current behavior of the webhook routes: an empty object. Treat HTTP 200 as success.

## Other responses

- `400`: Invalid webhook or unknown scraper.
- `401`: Missing or invalid API key (`Authorization` header).
- `500`: Unexpected server error. Current behavior: also returned when the per-minute API quota of the workspace is exceeded (30 requests per minute without subscription, 100 on Start, 300 on Grow, 1,000 on Scale). A 429 would be expected; retry after a minute.

---

[API](https://skmtc.dev/emelia/apis/emelia-api.md) · [All operations](https://skmtc.dev/emelia/apis/emelia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/emelia/apis/emelia-api/revisions/8c0cb435f2c4?raw)
