Enqueue activity
Enqueue LinkedIn profiles for activity enrichment.
https://api.up2data.ai/api/open-refresh/activityEnqueue LinkedIn profiles for activity enrichment: the posts they published, the comments they left and the posts they reacted to. Send the same profile URLs or LinkedIn slugs you would send to profiles-bulk, and get back one Activity record per profile.
Asking for posts, comments and reactions separately through profiles-posts, profiles-comments and profiles-reactions costs more in total than one activity call - see the credit pills.
Ensure you have sufficient credits before making requests - see the credit pill above.
Your profiles array is normalized and de-duplicated before anything is charged, so you pay for enqueued, not for what you sent. skipped reports what was removed and why. If nothing survives filtering, you get a 400 and no queue is created.
An activity queue's results belong to the queue itself. Read them back with queues-list or wait for the webhook callback, and see Activity for the shape.
partial tells you which of the three lists the last scrape could not read. A list flagged true was not refreshed: queues-list returns the values from the most recent successful scrape of that list, while the webhook callback carries it empty. scrapedAt always describes the latest scrape, so it can be newer than the contents of a flagged list. Check the flags before reading an empty list as "this person has none".
#Request
| Field | Type | Notes |
|---|---|---|
profilesrequired | string[] | LinkedIn profile URLs or bare slugs. |
name | string | Optional. |
priority | number | Optional, 1 = High, 2 = Normal, 3 = Low, defaults to 2. |
webhookTags | string[] | Optional, defaults to every webhook on the team. Send [] to switch callbacks off - see the Webhooks guide. |
#Call it
curl -X POST "https://api.up2data.ai/api/open-refresh/activity" \
-H "Authorization: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Q1 Leads Activity",
"profiles": [
"https://www.linkedin.com/in/johndoe",
"https://www.linkedin.com/in/janedoe",
"johndoe123"
],
"priority": 2
}'import requests
url = "https://api.up2data.ai/api/open-refresh/activity"
headers = {
"Authorization": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
}
payload = {
"name": "Q1 Leads Activity",
"profiles": [
"https://www.linkedin.com/in/johndoe",
"https://www.linkedin.com/in/janedoe",
"johndoe123"
],
"priority": 2
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())const url = "https://api.up2data.ai/api/open-refresh/activity";
const headers = {
"Authorization": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
};
const body = {
"name": "Q1 Leads Activity",
"profiles": [
"https://www.linkedin.com/in/johndoe",
"https://www.linkedin.com/in/janedoe",
"johndoe123"
],
"priority": 2
};
const response = await fetch(url, {
method: "POST",
headers,
body: JSON.stringify(body),
});
const data = await response.json();
console.log(data);package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.up2data.ai/api/open-refresh/activity"
body := bytes.NewBufferString(`{
"name": "Q1 Leads Activity",
"profiles": [
"https://www.linkedin.com/in/johndoe",
"https://www.linkedin.com/in/janedoe",
"johndoe123"
],
"priority": 2
}`)
req, err := http.NewRequest("POST", url, body)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "YOUR_ACCESS_TOKEN")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
respBody, _ := io.ReadAll(resp.Body)
fmt.Println(string(respBody))
}#Response
{
"message": "3 activity items have been enqueued (12 credits).",
"queueId": "507f1f77bcf86cd799439011",
"enqueued": 3,
"skipped": {
"invalid": 0,
"duplicates": 0
},
"webhooks": [
{
"_id": "6512c1a4f1b2c3d4e5f60789",
"name": "Production",
"url": "https://api.example.com/hooks/up2data"
}
]
}{
"message": "No valid profiles to enqueue: of 4 submitted, 1 were invalid and 3 were duplicates."
}#Webhook payload
{
"queueId": "507f1f77bcf86cd799439011",
"name": "Q1 Leads Activity",
"url": "https://www.linkedin.com/in/johndoe",
"type": "Activity",
"status": 200,
"_id": "8f14e45fceea167a5a36dedd4bea2544",
"result": { ... }
}#Errors
| Status | Type | When |
|---|---|---|
| 400 | No valid profiles to enqueue | Every entry in profiles was invalid or a duplicate after normalization, so no queue was created. |
| 400 | No webhook matches webhookTags | One or more webhookTags do not match any webhook on the team. |
See the Errors guide for every error type this version can return.