Sync Detected Accounts
curl --request POST \
--url https://development.knotapi.com/detected-accounts/sync \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"external_user_id": "abc",
"cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 100
}
'import requests
url = "https://development.knotapi.com/detected-accounts/sync"
payload = {
"external_user_id": "abc",
"cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 100
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_user_id: 'abc',
cursor: 'eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0',
limit: 100
})
};
fetch('https://development.knotapi.com/detected-accounts/sync', 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://development.knotapi.com/detected-accounts/sync",
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([
'external_user_id' => 'abc',
'cursor' => 'eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0',
'limit' => 100
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://development.knotapi.com/detected-accounts/sync"
payload := strings.NewReader("{\n \"external_user_id\": \"abc\",\n \"cursor\": \"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0\",\n \"limit\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://development.knotapi.com/detected-accounts/sync")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"external_user_id\": \"abc\",\n \"cursor\": \"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0\",\n \"limit\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://development.knotapi.com/detected-accounts/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_user_id\": \"abc\",\n \"cursor\": \"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0\",\n \"limit\": 100\n}"
response = http.request(request)
puts response.read_body{
"detected_accounts": [
{
"merchant": {
"id": 35,
"name": "Spotify",
"logo": "https://knot.imgix.net/merchants/KBQ5j6cN010PPpwbO7RpKGyDrCpsZ91FRhwnZp5u.png"
},
"login_method": "GOOGLE_SSO",
"account_created_at": "2025-08-24T11:53:09Z",
"detected_at": "2025-10-23T17:00:00Z"
},
{
"merchant": {
"id": 44,
"name": "Walmart",
"logo": "https://knot.imgix.net/merchants/walmart.png"
},
"login_method": "",
"account_created_at": "",
"detected_at": "2025-08-01T17:00:05Z"
}
],
"next_cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 100
}Detected Accounts
Sync Detected Accounts
deprecated
Sync a user’s detected accounts using cursor-based pagination.
Listen to this pageabout 1 min
POST
/
detected-accounts
/
sync
Sync Detected Accounts
curl --request POST \
--url https://development.knotapi.com/detected-accounts/sync \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"external_user_id": "abc",
"cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 100
}
'import requests
url = "https://development.knotapi.com/detected-accounts/sync"
payload = {
"external_user_id": "abc",
"cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 100
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
external_user_id: 'abc',
cursor: 'eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0',
limit: 100
})
};
fetch('https://development.knotapi.com/detected-accounts/sync', 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://development.knotapi.com/detected-accounts/sync",
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([
'external_user_id' => 'abc',
'cursor' => 'eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0',
'limit' => 100
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$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://development.knotapi.com/detected-accounts/sync"
payload := strings.NewReader("{\n \"external_user_id\": \"abc\",\n \"cursor\": \"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0\",\n \"limit\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://development.knotapi.com/detected-accounts/sync")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"external_user_id\": \"abc\",\n \"cursor\": \"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0\",\n \"limit\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://development.knotapi.com/detected-accounts/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"external_user_id\": \"abc\",\n \"cursor\": \"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0\",\n \"limit\": 100\n}"
response = http.request(request)
puts response.read_body{
"detected_accounts": [
{
"merchant": {
"id": 35,
"name": "Spotify",
"logo": "https://knot.imgix.net/merchants/KBQ5j6cN010PPpwbO7RpKGyDrCpsZ91FRhwnZp5u.png"
},
"login_method": "GOOGLE_SSO",
"account_created_at": "2025-08-24T11:53:09Z",
"detected_at": "2025-10-23T17:00:00Z"
},
{
"merchant": {
"id": 44,
"name": "Walmart",
"logo": "https://knot.imgix.net/merchants/walmart.png"
},
"login_method": "",
"account_created_at": "",
"detected_at": "2025-08-01T17:00:05Z"
}
],
"next_cursor": "eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0",
"limit": 100
}This endpoint is deprecated. Listen to the
NEW_DETECTED_ACCOUNTS_AVAILABLE webhook event to receive detected accounts for a user or call List Detected Accounts.Authorizations
Body
application/json
The input parameters required for syncing detected accounts.
Cursor token pointing to the last detected account retrieved. The /detected-accounts/sync endpoint uses cursor-based pagination to track which detected accounts have already been seen, minimizing data redundancy.
On the first call, the endpoint returns all detected accounts paginated. In subsequent calls, only new detected accounts are provided using the next cursor.
Example:
"eyJpZCI6MjI3ODEsIl9wb2ludHNUb05leHRJdGVtcyI6dHJ1ZX0"
Was this page helpful?