Enqueue comments
Enqueue LinkedIn profiles and get back only the comments each one left.
https://api.up2data.ai/api/open-refresh/commentsEnqueue LinkedIn profiles and get back only the comments each one left, at a lower rate than a full profiles-activity call. Takes the same body and behaves identically - same normalization, same queue, same callbacks - but returns only the comments list. The callback and queues-list both carry the profile plus that single list; the other two lists are absent from the payload rather than empty, and partial carries only the flag for the list you asked for.
Ensure you have sufficient credits before making requests - see the credit pill above.
The callback envelope's type is "ActivityComments", and its result holds the profile plus a comments array - the same comment shape as the Activity record.
#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/comments" \
-H "Authorization: YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Q1 Leads Comments",
"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/comments"
headers = {
"Authorization": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
}
payload = {
"name": "Q1 Leads Comments",
"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/comments";
const headers = {
"Authorization": "YOUR_ACCESS_TOKEN",
"Content-Type": "application/json",
};
const body = {
"name": "Q1 Leads Comments",
"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/comments"
body := bytes.NewBufferString(`{
"name": "Q1 Leads Comments",
"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 comments items have been enqueued (6 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 Comments",
"url": "https://www.linkedin.com/in/johndoe",
"type": "ActivityComments",
"status": 200,
"_id": "8f14e45fceea167a5a36dedd4bea2546",
"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.