Register a webhook on a scraper
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.
Authorization
apiKey Your 48 character API key, sent as is (a Bearer prefix is tolerated). Create it at https://v3.emelia.io/settings/api.
In: header
Path Parameters
Scrapper id (_id returned by POST /linkedin-scrappers or GET /linkedin-scrappers). 24 hexadecimal characters.
^[0-9a-fA-F]{24}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
Callbacks
curl -X POST "https://example.com/linkedin-scrappers/66f1a2b3c4d5e6f7a8b9c0d1/webhook" \ -H "Authorization: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "webhookUrl": "https://hooks.acme.example/emelia/scrapper", "events": [ "FINISHED", "ERROR" ] }'{}