Accounts
Detect Organization IDs
Find the organization ID your app already sends in events or contact attributes
GET
/
api
/
v1
/
account-suggestions
/
organization-ids
Detect Organization IDs
curl --request GET \
--url https://api.sequenzy.com/api/v1/account-suggestions/organization-ids \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/account-suggestions/organization-ids"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/account-suggestions/organization-ids', 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.sequenzy.com/api/v1/account-suggestions/organization-ids",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sequenzy.com/api/v1/account-suggestions/organization-ids"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.sequenzy.com/api/v1/account-suggestions/organization-ids")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/account-suggestions/organization-ids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"candidates": [
{
"source": "event",
"propertyKey": "organization_id",
"nameKey": null,
"eventCount": 2518,
"accountCount": 843,
"eventNames": ["signed_in", "project_created"]
}
]
}
{ "success": false, "error": "Unauthorized" }
{ "success": false, "error": "No company selected" }
Detect Organization IDs
If your app already sends an organization ID, such asworkspaceId on events or account_id on contacts, you can create accounts from it without writing code. This endpoint finds those keys. Preview a key to see the accounts it would create, then create them. See Accounts.
It looks at event properties from the last 180 days and at contact attributes whose names look like an organization ID, such as workspaceId, organization_id, team_id, tenantId or account_id. A key needs at least two distinct values. Nothing is created.
Requires the subscribers:read scope.
Request
curl "https://api.sequenzy.com/api/v1/account-suggestions/organization-ids" \
-H "Authorization: Bearer API_KEY"
Response
array
Detected keys, most useful first. Empty when none are found.
Show properties
Show properties
string
event for an event property, attribute for a contact attribute.string
The property or attribute holding the organization ID.
string | null
A sibling property holding the organization name, such as
workspaceName, when one is found.number
Events carrying the key for
event, contacts with the attribute for
attribute.number
Distinct organizations, which is how many accounts creating would make.
string[]
Up to 8 event names carrying the key. Empty for attributes.
{
"success": true,
"candidates": [
{
"source": "event",
"propertyKey": "organization_id",
"nameKey": null,
"eventCount": 2518,
"accountCount": 843,
"eventNames": ["signed_in", "project_created"]
}
]
}
{ "success": false, "error": "Unauthorized" }
{ "success": false, "error": "No company selected" }
⌘I
Detect Organization IDs
curl --request GET \
--url https://api.sequenzy.com/api/v1/account-suggestions/organization-ids \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.sequenzy.com/api/v1/account-suggestions/organization-ids"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sequenzy.com/api/v1/account-suggestions/organization-ids', 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.sequenzy.com/api/v1/account-suggestions/organization-ids",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.sequenzy.com/api/v1/account-suggestions/organization-ids"
req, _ := http.NewRequest("GET", url, nil)
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.get("https://api.sequenzy.com/api/v1/account-suggestions/organization-ids")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/account-suggestions/organization-ids")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"candidates": [
{
"source": "event",
"propertyKey": "organization_id",
"nameKey": null,
"eventCount": 2518,
"accountCount": 843,
"eventNames": ["signed_in", "project_created"]
}
]
}
{ "success": false, "error": "Unauthorized" }
{ "success": false, "error": "No company selected" }