Update an article
curl --request POST \
--url https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update', 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.thealmanac.ai/api/v1/articles/{linkedin_id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-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.thealmanac.ai/api/v1/articles/{linkedin_id}/update"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.thealmanac.ai/api/v1/articles/{linkedin_id}/update")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"linkedin_id": "jane-doe",
"status": "queued",
"credits_charged": 100,
"article": {
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"sources": [
{
"id": 123,
"title": "<string>",
"url": "<string>",
"publication": "<string>",
"excerpt": "<string>"
}
],
"infobox": {},
"current_version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"linkedin_id": "jane-doe",
"status": "queued",
"credits_charged": 100,
"article": {
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"sources": [
{
"id": 123,
"title": "<string>",
"url": "<string>",
"publication": "<string>",
"excerpt": "<string>"
}
],
"infobox": {},
"current_version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}API reference
Update an article
Refreshes an existing profile with a new research run for 100 credits. Requires an existing profile. Returns 202 while queued or running; a replay of a terminal job returns 200. Poll the job for the included result. Failed or cancelled jobs are refunded.
POST
/
api
/
v1
/
articles
/
{linkedin_id}
/
update
Update an article
curl --request POST \
--url https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Idempotency-Key: <idempotency-key>'import requests
url = "https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update"
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>"
}
response = requests.post(url, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Idempotency-Key': '<idempotency-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update', 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.thealmanac.ai/api/v1/articles/{linkedin_id}/update",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Idempotency-Key: <idempotency-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.thealmanac.ai/api/v1/articles/{linkedin_id}/update"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
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.thealmanac.ai/api/v1/articles/{linkedin_id}/update")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.thealmanac.ai/api/v1/articles/{linkedin_id}/update")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"linkedin_id": "jane-doe",
"status": "queued",
"credits_charged": 100,
"article": {
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"sources": [
{
"id": 123,
"title": "<string>",
"url": "<string>",
"publication": "<string>",
"excerpt": "<string>"
}
],
"infobox": {},
"current_version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"linkedin_id": "jane-doe",
"status": "queued",
"credits_charged": 100,
"article": {
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"sources": [
{
"id": 123,
"title": "<string>",
"url": "<string>",
"publication": "<string>",
"excerpt": "<string>"
}
],
"infobox": {},
"current_version": 1,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
},
"error": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Your customer API key (alm_…). Keep it on your server.
Headers
A unique value for this operation. Reuse it when retrying the same request to avoid duplicate charges.
Required string length:
1 - 200Path Parameters
The slug after linkedin.com/in/, for example jane-doe.
Response
Success
Example:
"jane-doe"
Available options:
queued, running, succeeded, failed, cancelled Credits reserved or charged for this operation. Returns 0 after a failed or cancelled job is refunded.
Example:
100
Show child attributes
Show child attributes