curl --request POST \
--url https://public-api.lonescale.com/todays-accounts/refresh \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"scope": "<string>"
}
'import requests
url = "https://public-api.lonescale.com/todays-accounts/refresh"
payload = { "scope": "<string>" }
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({scope: '<string>'})
};
fetch('https://public-api.lonescale.com/todays-accounts/refresh', 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://public-api.lonescale.com/todays-accounts/refresh",
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([
'scope' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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://public-api.lonescale.com/todays-accounts/refresh"
payload := strings.NewReader("{\n \"scope\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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://public-api.lonescale.com/todays-accounts/refresh")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.lonescale.com/todays-accounts/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "none",
"scope": "<string>",
"crm": "hubspot",
"requested_at": "2023-11-07T05:31:56Z",
"generated_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"owner_linked": true,
"book_size": 123,
"accounts": [
{
"rank": 1,
"domain": "pennylane.com",
"name": "<string>",
"location": "Paris, France",
"industry": "<string>",
"angle": "Nouveau VP Sales depuis 8 jours : il choisit ses outils maintenant.",
"crm_id": "<string>",
"owner": {
"id": "<string>",
"name": "<string>"
},
"signal": {
"type": "JOB_CHANGE",
"reason": "Charlotte C. just moved here as Team Lead BDR",
"detected_at": "2023-11-07T05:31:56Z"
},
"person": {
"role": "DECISION_MAKER",
"full_name": "<string>",
"job_title": "<string>",
"linkedin_url": "<string>",
"crm_id": "<string>",
"email": "<string>",
"phone": "<string>"
},
"people": [
{
"role": "DECISION_MAKER",
"full_name": "<string>",
"job_title": "<string>",
"linkedin_url": "<string>",
"crm_id": "<string>",
"email": "<string>",
"phone": "<string>"
}
],
"last_activity_at": "2023-11-07T05:31:56Z",
"open_deal": true,
"looks_like_your_wins": true,
"former_customer": true,
"score": 10.4,
"score_parts": [
{
"label": "Job change, 10 d old",
"points": 6.1
}
]
}
]
}{
"message": "Invalid API Key",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Today's accounts is not enabled for this user: ask LoneScale to turn it on.",
"error": "Forbidden",
"statusCode": 403
}Refresh today's accounts
Ranks the book again. The ranking runs in the background (a few seconds to a minute): the answer has status: pending; poll GET /todays-accounts with the same scope until it is ended. A refresh while one is running returns the running one.
Rate limited to 10 requests per minute.
curl --request POST \
--url https://public-api.lonescale.com/todays-accounts/refresh \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"scope": "<string>"
}
'import requests
url = "https://public-api.lonescale.com/todays-accounts/refresh"
payload = { "scope": "<string>" }
headers = {
"x-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-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({scope: '<string>'})
};
fetch('https://public-api.lonescale.com/todays-accounts/refresh', 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://public-api.lonescale.com/todays-accounts/refresh",
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([
'scope' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-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://public-api.lonescale.com/todays-accounts/refresh"
payload := strings.NewReader("{\n \"scope\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-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://public-api.lonescale.com/todays-accounts/refresh")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scope\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://public-api.lonescale.com/todays-accounts/refresh")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scope\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "none",
"scope": "<string>",
"crm": "hubspot",
"requested_at": "2023-11-07T05:31:56Z",
"generated_at": "2023-11-07T05:31:56Z",
"error": "<string>",
"owner_linked": true,
"book_size": 123,
"accounts": [
{
"rank": 1,
"domain": "pennylane.com",
"name": "<string>",
"location": "Paris, France",
"industry": "<string>",
"angle": "Nouveau VP Sales depuis 8 jours : il choisit ses outils maintenant.",
"crm_id": "<string>",
"owner": {
"id": "<string>",
"name": "<string>"
},
"signal": {
"type": "JOB_CHANGE",
"reason": "Charlotte C. just moved here as Team Lead BDR",
"detected_at": "2023-11-07T05:31:56Z"
},
"person": {
"role": "DECISION_MAKER",
"full_name": "<string>",
"job_title": "<string>",
"linkedin_url": "<string>",
"crm_id": "<string>",
"email": "<string>",
"phone": "<string>"
},
"people": [
{
"role": "DECISION_MAKER",
"full_name": "<string>",
"job_title": "<string>",
"linkedin_url": "<string>",
"crm_id": "<string>",
"email": "<string>",
"phone": "<string>"
}
],
"last_activity_at": "2023-11-07T05:31:56Z",
"open_deal": true,
"looks_like_your_wins": true,
"former_customer": true,
"score": 10.4,
"score_parts": [
{
"label": "Job change, 10 d old",
"points": 6.1
}
]
}
]
}{
"message": "Invalid API Key",
"error": "Unauthorized",
"statusCode": 401
}{
"message": "Today's accounts is not enabled for this user: ask LoneScale to turn it on.",
"error": "Forbidden",
"statusCode": 403
}Authorizations
Provide your API key in the x-api-key header.
Body
Which CRM book to rank: omit it for the API key holder's own accounts (their linked CRM owner), all for every account with a domain, unassigned for accounts nobody owns (HubSpot only), or a CRM owner id from GET /todays-accounts/owners.
Response
The book's list, whatever its status
none: never ranked, call refresh. pending: ranking, poll again.
none, pending, ended, error The book: all, unassigned, owner:<CRM owner id>, or unlinked:<user id> when the caller has no CRM owner.
hubspot, salesforce False when the caller's own book was asked and no CRM owner matches their email.
Accounts with a domain in the book.
Show child attributes
Show child attributes

