Poll Events
curl --request GET \
--url https://api.linkupapi.com/v2/webhooks/{webhook_id}/events \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.linkupapi.com/v2/webhooks/{webhook_id}/events"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.linkupapi.com/v2/webhooks/{webhook_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkupapi.com/v2/webhooks/{webhook_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.linkupapi.com/v2/webhooks/{webhook_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.linkupapi.com/v2/webhooks/{webhook_id}/events")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v2/webhooks/{webhook_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"items": [
{
"event_id": "6789abcdef0123456789ab01",
"event": {
"account_id": "69c127c37cae0494dd827286",
"account_name": "My Account",
"platform": "linkedin",
"event": {
"type": "message",
"sender_name": "John Doe",
"message_text": "Hello!",
"sender_profile": "https://www.linkedin.com/in/johndoe"
},
"timestamp": "2025-01-15T10:31:00Z"
},
"created_at": "2025-01-15T10:31:00.123Z"
}
]
},
"metadata": {
"action": "poll_webhook_events",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:35:00.000000"
}
}
{
"success": true,
"data": {
"items": []
},
"metadata": {
"action": "poll_webhook_events",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:35:00.000000"
}
}
Webhooks (Real-Time)
Poll Events
Retrieve stored webhook events by polling — the catch-up path for hosted and custom webhooks
GET
/
v2
/
webhooks
/
{webhook_id}
/
events
Poll Events
curl --request GET \
--url https://api.linkupapi.com/v2/webhooks/{webhook_id}/events \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.linkupapi.com/v2/webhooks/{webhook_id}/events"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.linkupapi.com/v2/webhooks/{webhook_id}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.linkupapi.com/v2/webhooks/{webhook_id}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <x-api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.linkupapi.com/v2/webhooks/{webhook_id}/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.linkupapi.com/v2/webhooks/{webhook_id}/events")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v2/webhooks/{webhook_id}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"items": [
{
"event_id": "6789abcdef0123456789ab01",
"event": {
"account_id": "69c127c37cae0494dd827286",
"account_name": "My Account",
"platform": "linkedin",
"event": {
"type": "message",
"sender_name": "John Doe",
"message_text": "Hello!",
"sender_profile": "https://www.linkedin.com/in/johndoe"
},
"timestamp": "2025-01-15T10:31:00Z"
},
"created_at": "2025-01-15T10:31:00.123Z"
}
]
},
"metadata": {
"action": "poll_webhook_events",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:35:00.000000"
}
}
{
"success": true,
"data": {
"items": []
},
"metadata": {
"action": "poll_webhook_events",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:35:00.000000"
}
}
Fetch the stored events of the webhook’s account, oldest first, filtered exactly like the webhook itself (
events subscription and message_type for custom webhooks, message_type only for hosted ones). Served from our store: no LinkedIn traffic on the account.
Use it as a polling alternative to the SSE stream (hosted mode), or to catch up after an outage on your side (custom mode) instead of re-syncing the inbox.
Available for hosted and custom webhooks. Events are stored for 30 days then automatically deleted. To re-push missed events to your URL instead, see Delivery & retries.
Header Parameters
string
required
Your API key
Path Parameters
string
required
The unique identifier of the webhook
Query Parameters
string
ISO 8601 datetime to fetch events after. Only events created after this timestamp are returned.Example:
2025-01-15T10:30:00Zstring
ISO 8601 datetime. Only events created at or before this timestamp are returned.
string
Cursor: the
event_id of the last event you processed. Returns the events stored after it. Prefer this over since for paging — it is stable even when several events share a timestamp.integer
default:"50"
Maximum number of events to return. Between 1 and 200.
Response
boolean
Whether the request was successful
object
Show Properties
Show Properties
array
List of events, sorted by
created_at ascendingShow Event Object
Show Event Object
string
Unique event identifier
object
The full event payload (see Event Types)
string
ISO 8601 timestamp of when the event was stored
string
event_id of the last item when the page is full — pass it as after to get the next page. null when there is nothing more.{
"success": true,
"data": {
"items": [
{
"event_id": "6789abcdef0123456789ab01",
"event": {
"account_id": "69c127c37cae0494dd827286",
"account_name": "My Account",
"platform": "linkedin",
"event": {
"type": "message",
"sender_name": "John Doe",
"message_text": "Hello!",
"sender_profile": "https://www.linkedin.com/in/johndoe"
},
"timestamp": "2025-01-15T10:31:00Z"
},
"created_at": "2025-01-15T10:31:00.123Z"
}
]
},
"metadata": {
"action": "poll_webhook_events",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:35:00.000000"
}
}
{
"success": true,
"data": {
"items": []
},
"metadata": {
"action": "poll_webhook_events",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:35:00.000000"
}
}
Polling Pattern
let lastPollTime = new Date().toISOString();
setInterval(async () => {
const res = await fetch(
`https://api.linkupapi.com/v2/webhooks/${webhookId}/events?since=${lastPollTime}&limit=100`,
{ headers: { 'x-api-key': 'YOUR_API_KEY' } }
);
const { data } = await res.json();
for (const item of data.items) {
console.log('Event:', item.event);
lastPollTime = item.created_at; // move cursor forward
}
}, 10000); // poll every 10 seconds
Notes
- Events are stored for 30 days (TTL) then automatically deleted
- Polling does not consume additional credits beyond the monitoring cost
- Use the
sinceparameter to avoid re-processing events - For real-time delivery, prefer the SSE Stream endpoint
Was this page helpful?