APILegacy
Legacy API. These endpoints keep working. New integrations should use the current API.
Legacy guide

Webhooks

Instead of polling, pass a webhook_url in the JSON body when starting a run and we'll POST the results to your URL when it finishes.

  1. Include webhook_url in the JSON body of your /run_new_enrichment or /run_enrichment request
  2. Your run executes normally
  3. When complete, we POST the full results (same format as /run_data) to your webhook URL
curl -X POST "https://api.riveterhq.com/v1/run_enrichment?enrichment_uuid=xxx" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_url": "https://your-server.com/webhook",
    "input": {"Company": ["Apple", "Google"]}
  }'

Webhook payload:

{
  "event": "run.completed",
  "run_key": "abc-123",
  "status": "success",
  "project_uuid": "...",
  "project_name": "My Enrichment",
  "enrichment_uuid": "...",
  "enrichment_name": "My Enrichment",
  "credits_used": 2.5,
  "completed_at": "2024-01-15T12:00:00Z",
  "formatted_data": {
    "Company": [{"value": "Apple"}, {"value": "Google"}],
    "Revenue": [{"value": "383000000000"}, {"value": "307000000000"}]
  },
  "status_details": { "status": "success", "credits_used": 2.5, "total_cells_expected": 2, "completed_cells": 2, "...": "..." },
  "run_status": { "run_key": "abc-123", "run_type": "external_api", "status": "success", "...": "..." }
}

status_details carries the same flat fields as /run_status; run_status is the stable nested status object (same shape on every run type and endpoint — see the RunStatusObject schema).

Events: run.completed (success), run.stopped (manually stopped), run.finished (any other terminal state). Extraction plan runs use extraction_plan_run.completed / extraction_plan_run.stopped / extraction_plan_run.finished, and their payload also carries extraction_plan_uuid, extraction_plan_name, run_state, and records_count.

Retries: Your endpoint should return a 2xx status code. Transient failures (network errors, 5xx, 408, 425, 429) are retried up to 2 times; any other 4xx response is treated as a rejection of the payload and is not retried. A delivery that was rejected or ran out of retries is recorded on the run: error_message on /run_status carries the response status and the first 1,000 characters of its body.

Dataset builds also support webhooks — pass dataset_webhook_url to /build_dataset.