Webhooks and push
Import people and activity through JSON pushes or webhooks. The intake log retains deliveries for 30 days and supports replay.
Connection options
Webhook sources accept JSON from scripts and vendors. Scripts push records with an API key. Vendors send webhook deliveries. Both methods use the same intake log and mapping, and one source can accept both.
PushSTART HERE
- Your script or Zapier sends with an API key
- You choose whether a push is live or history
- Up to 1 MiB of JSON per request
- Needs an API key with write access
Webhook
- A vendor posts to a URL you give it
- The vendor signs deliveries or uses a secret URL
- Datum treats deliveries as live activity
Connect a webhook source
Open Sources
- Open Sources → Connect a source → Webhooks and push.
- Generate at least 32 random characters, for example with
openssl rand -hex 32. - Enter the result in Webhook secret.
- Leave JSON mapping empty for the standard format below, or enter your vendor mapping.
- Press Verify.
Get the URL
- Open the source’s ··· menu on Sources.
- Select Webhook URL.
- Press Prepare webhook in the dialog. The source opens on Settings.
- Press Copy URL under Webhook.
On a hosted workspace, the address is a gateway URL (
https://webhooks.ocmgr.com/…). The gateway adds retries. A signed source can also receive deliveries at your Datum address followed by/webhooks/generic/and the connection ID. Both addresses work.Set up signing
Configure HMAC-SHA256 signing with the same Webhook secret in the webhook settings of your vendor. See Signing and secret URLs for the header format. If a vendor cannot sign deliveries, use a secret URL.
At the direct Datum address, Datum refuses a delivery with a missing or incorrect signature. It returns
404, which is the same answer as for an incorrect URL. The delivery does not appear in the intake log. If the deliveries of a vendor never arrive, check its signing secret and its address.Send a delivery
Give the URL to your vendor. You can also push a file with an API key to
/v1/sources/<connectionId>/push. Over REST, the request body is the JSON itself, not JSON insidepayload. Datum refuses a body insidepayload, because that body would import nothing.ocmgr sources push <connectionId> --file people.jsonCheck the result
- Check that Verify reports Mapping and webhook secret are ready.
- Open the source on Sources.
- Select Intake log.
- Find the delivery with the status
processedunder Intake · last 30 days.
The standard JSON format
Without a mapping, the source accepts users and activities in this standard format:
{
"users": [{ "id": "ada", "email": "[email protected]", "name": "Ada", "handle": "ada", "company": "Acme" }],
"activities": [{ "id": "joined-ada", "userId": "ada", "type": "joined", "occurredAt": "2026-09-01T12:00:00Z" }]
}
Users can also include title, linkedin, location_city and location_country. Activities can include a ref link, a threadId (see Threads from a webhook source), a title and a text body.
The title of an activity is a short label for the thing that the activity is about, such as a topic or post title. It can have up to 200 characters. Datum stores it as the title of the activity, so Title contains, routing cards and Needs a reply show it. Do not put message text in title. Datum stores titles, but it never stores what people said.
Datum refuses a push with a longer title and stores nothing from it. The error names the activity, for example activities[0].title: A title is a short label of at most 200 characters.
Datum does not store the text body. When thread tone is on, Datum reads the text once without storing it. Datum ignores any payload field named verified.
Mappings use JSON pointers to find records. They assign fields such as names, emails and handles. They use the same vocabulary as CSV mappings. The supplied webhook-github-star mapping is an example for GitHub star deliveries. When you save a mapping, Datum refuses unknown keys and names their paths.
Signing and secret URLs
The default signature header is x-ocmgr-signature. Its value is sha256= followed by the hexadecimal HMAC-SHA256 of the exact body, made with your secret. In Webhook signature configuration, you can change the header name or the prefix. You can also change the encoding to base64.
If a vendor cannot sign deliveries, use /webhooks/generic/<connectionId>/<secret>. This method needs a secret of at least 32 characters. An incorrect secret returns 404.
To change an existing source to a secret URL:
- Open the source’s Settings tab.
- Press Use a secret URL instead under Webhook source.
- Press Refresh webhook URL under Webhook.
When you create a source, you can set Webhook signature configuration to {"algorithm":"none"} for the same result.
To switch back, press Use HMAC signing. A previously shared secret URL still works until you replace the secret. To retire that URL, replace the webhook secret, press Refresh webhook URL, then configure the sender with the new address and signing secret.
Webhook URL hides the secret until you press Reveal. Copy URL copies the complete address even while the secret remains hidden. The CLI also hides secret URLs by default. Use ocmgr connection webhook <connectionId> --reveal to display one.
Duplicates
Datum identifies deliveries through Delivery ID JSON pointer, a mapped delivery-ID header, or a hash of the body. Repeated deliveries return the original ID without changing records. Assign distinct event IDs through the pointer if identical bodies can represent different events.
Data Datum imports
| Members | Whatever the mapping names: name, email, handle, title, company, location and profile links |
| Activity | One activity per mapped record, with its type, time, link and title |
| Matching | Addresses remain unverified unless you enable trust. Possible matches enter your review queue |
| Not collected | Datum reads message bodies once without storing them. It discards header credentials, cookies and signatures |
The intake log
Datum stores each delivery before responding. A worker then applies the mapping. Delivery states include received, processed, failed and ignored.
Open the source on Sources. Select Intake log to see Intake · last 30 days. To show only failures, select Errors only.
Overview shows the most recent deliveries.
The intake log keeps the original payload for 30 days. Member erasure clears the payloads of that member before then. If a delivery contains many people and Datum connects it to the erased member, Datum clears the full payload.
To see payloads, turn on Include personal data in events on Event destinations. Otherwise, the log shows delivery details without the contents.
Replay applies the current mapping, and keeps the original arrival time of the delivery. It adds a new row to the log. Datum cannot replay an erased delivery. To correct a mapping that caused failures:
- Open the source’s Settings tab.
- Change JSON mapping under Webhook source.
- Press Save mapping settings.
- Replay the failed deliveries.
Datum accepts a delivery that arrives while the source is paused. The delivery waits with the status received. Datum processes it when you resume the source.
Native and piece webhooks use the same log. Run ocmgr inbound list --connection <connectionId> to inspect their deliveries.
From your terminal or agent
python3 -c 'import json,secrets; print(json.dumps({"secret": secrets.token_hex(32)}))' | \
ocmgr connection create --kind generic --secret-file - --json
ocmgr sources push <connectionId> --file people.json --json
ocmgr inbound list --connection <connectionId> --status failed --json
ocmgr inbound replay <inboundEventId> --json{ "name": "push_source_data", "arguments": { "id": "<connectionId>", "payload": { "users": [{ "id": "ada", "email": "[email protected]" }] } } }
{ "name": "list_inbound", "arguments": { "connection": "<connectionId>", "status": "failed" } }
{ "name": "replay_inbound", "arguments": { "id": "<inboundEventId>" } }curl -X POST "$OCMGR_URL/v1/sources/<connectionId>/push" \
-H "Authorization: Bearer $OCMGR_API_KEY" -H 'content-type: application/json' \
-d '{"users":[{"id":"ada","email":"[email protected]","name":"Ada"}]}'A push returns 202 and the delivery ID after Datum stores it. The settings on the Settings tab are also update_connection (PATCH /v1/connections/{id}, ocmgr connection update); it needs an admin-scope key, not a write key. See push_source_data, list_inbound, get_inbound_event and replay_inbound for every parameter.
{"name":"replay_inbound","arguments":{"id":"<inbound-event-id>","dryRun":true}}To preview a replay, send {"dryRun":true} to POST /v1/inbound/{id}/replay. It validates the stored delivery, but it does not create a replay or add one to the queue. A preview has no inbound_event_id, because it makes no new receipt. Datum refuses unknown body fields.
FAQ
Is a push live or history?
Pushes default to historical activity. Add --live or REST parameter ?live=true for current activity that routing rules can announce. Vendor webhook deliveries always count as live activity.
What if no worker is running?
Datum continues to accept and store deliveries. A worker applies their mappings when available. A sweep checks for missed deliveries every minute.
Does a push count towards hosted usage?
Yes. Pushes and webhooks count from the first event. Use a CSV for a large historical import. The first complete import of each CSV source is free.
Can the vendor send a URL challenge first?
Yes, when the mapping specifies a challenge field. Datum immediately returns its value and records the delivery as ignored.
Optional Event Gateway
Prepare webhook uses Event Gateway when the instance has it configured. Otherwise, Datum provides a direct receiver URL. Secret-URL sources preserve their private path through the gateway. Deliveries to a signed source’s prepared address use the original signature. Mappings requiring a synchronous challenge response stay direct. Copy the prepared URL into the sender’s webhook settings.
Gateway acknowledgements
A prepared gateway URL can answer a request with HTTP 200 before Datum checks it. This includes unsigned requests. It also includes requests to an old gateway URL after a secret rotation. Thus, an answer from the gateway does not prove that Datum accepted or imported the delivery. Check the intake log, because a refused delivery never appears there. The direct Datum endpoint returns 404 for missing or incorrect signatures.
A paused source holds authenticated pushes and webhook deliveries with the status received until you resume it. After a mapping change, failed deliveries keep their failure. Use Replay to apply the corrected mapping in a new log entry. If an authenticated push does not fit the mapping, or gives no records, Datum refuses it before it stores a receipt. If a webhook delivery gives no records, Datum marks it ignored with a reason.