Create Page
curl --request POST \
--url https://api.lightsage.com/v2/library/pages \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"url": "<string>",
"title": "<string>",
"published_on": "2023-12-25",
"task_id": "<string>"
}
'import requests
url = "https://api.lightsage.com/v2/library/pages"
payload = {
"url": "<string>",
"title": "<string>",
"published_on": "2023-12-25",
"task_id": "<string>"
}
headers = {
"X-Lightsage-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Lightsage-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
title: '<string>',
published_on: '2023-12-25',
task_id: '<string>'
})
};
fetch('https://api.lightsage.com/v2/library/pages', 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.lightsage.com/v2/library/pages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'title' => '<string>',
'published_on' => '2023-12-25',
'task_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Lightsage-Api-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lightsage.com/v2/library/pages"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"title\": \"<string>\",\n \"published_on\": \"2023-12-25\",\n \"task_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Lightsage-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lightsage.com/v2/library/pages")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"title\": \"<string>\",\n \"published_on\": \"2023-12-25\",\n \"task_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/library/pages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"title\": \"<string>\",\n \"published_on\": \"2023-12-25\",\n \"task_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"status": "published",
"channel": "<string>",
"url": "<string>",
"provider": "<string>",
"task_id": "<string>",
"published_at": "<string>",
"added_at": "<string>",
"updated_at": "<string>",
"tracking": {
"is_cited": true,
"citations_30d": 123,
"cited_prompts_30d": 123,
"citations_change_30d": 123,
"platforms": [
"<string>"
],
"agent_visits_30d": 123
},
"milestones": {
"published_on": "2023-12-25",
"first_cited_on": "2023-12-25",
"first_citation_is_baseline": false,
"first_cited_platform": "<string>",
"first_cited_prompt": "<string>",
"days_to_citation": 123,
"first_agent_visit_on": "2023-12-25"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Library
Create Page
Adds a live page to the Library to track its citations and agent visits. Tracking fills in within a few minutes.
POST
/
v2
/
library
/
pages
Create Page
curl --request POST \
--url https://api.lightsage.com/v2/library/pages \
--header 'Content-Type: application/json' \
--header 'X-Lightsage-Api-Key: <api-key>' \
--data '
{
"url": "<string>",
"title": "<string>",
"published_on": "2023-12-25",
"task_id": "<string>"
}
'import requests
url = "https://api.lightsage.com/v2/library/pages"
payload = {
"url": "<string>",
"title": "<string>",
"published_on": "2023-12-25",
"task_id": "<string>"
}
headers = {
"X-Lightsage-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Lightsage-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: '<string>',
title: '<string>',
published_on: '2023-12-25',
task_id: '<string>'
})
};
fetch('https://api.lightsage.com/v2/library/pages', 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.lightsage.com/v2/library/pages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'url' => '<string>',
'title' => '<string>',
'published_on' => '2023-12-25',
'task_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Lightsage-Api-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lightsage.com/v2/library/pages"
payload := strings.NewReader("{\n \"url\": \"<string>\",\n \"title\": \"<string>\",\n \"published_on\": \"2023-12-25\",\n \"task_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Lightsage-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.lightsage.com/v2/library/pages")
.header("X-Lightsage-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"<string>\",\n \"title\": \"<string>\",\n \"published_on\": \"2023-12-25\",\n \"task_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/library/pages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"<string>\",\n \"title\": \"<string>\",\n \"published_on\": \"2023-12-25\",\n \"task_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"title": "<string>",
"status": "published",
"channel": "<string>",
"url": "<string>",
"provider": "<string>",
"task_id": "<string>",
"published_at": "<string>",
"added_at": "<string>",
"updated_at": "<string>",
"tracking": {
"is_cited": true,
"citations_30d": 123,
"cited_prompts_30d": 123,
"citations_change_30d": 123,
"platforms": [
"<string>"
],
"agent_visits_30d": 123
},
"milestones": {
"published_on": "2023-12-25",
"first_cited_on": "2023-12-25",
"first_citation_is_baseline": false,
"first_cited_platform": "<string>",
"first_cited_prompt": "<string>",
"days_to_citation": 123,
"first_agent_visit_on": "2023-12-25"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Body
application/json
Response
Successful Response