List organizations
/api/v1/organizationsThe organizations the caller can use. An API key belongs to exactly one organization, so it lists that one.
Scope: organization:read (Read the organization's name, plan and domain.)
Authentication: Bearer token. Reads data.
Responses
200Success.Fields
organizationsarray of objectrequiredOther keys allowed (any).
idstring, uuidrequiredpattern ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-0000…
namestringrequiredslugstringrequiredrolestringrequiredplanstringrequired
400The request isn't valid.Fields
typestringrequiredA URI that identifies the kind of problem.
titlestringrequiredShort, human-readable summary.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong in this request, and how to fix it.
instancestringThe request path.
request_idstringQuote this when you contact support.
401Missing, invalid, expired or revoked API key.Fields
typestringrequiredA URI that identifies the kind of problem.
titlestringrequiredShort, human-readable summary.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong in this request, and how to fix it.
instancestringThe request path.
request_idstringQuote this when you contact support.
403The key lacks the `organization:read` scope, or its creator's role no longer allows this.Fields
typestringrequiredA URI that identifies the kind of problem.
titlestringrequiredShort, human-readable summary.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong in this request, and how to fix it.
instancestringThe request path.
request_idstringQuote this when you contact support.
404Not found, or not in this key's organization.Fields
typestringrequiredA URI that identifies the kind of problem.
titlestringrequiredShort, human-readable summary.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong in this request, and how to fix it.
instancestringThe request path.
request_idstringQuote this when you contact support.
429Rate limited. Wait for the time in Retry-After.Fields
typestringrequiredA URI that identifies the kind of problem.
titlestringrequiredShort, human-readable summary.
statusintegerrequiredThe HTTP status code.
detailstringWhat went wrong in this request, and how to fix it.
instancestringThe request path.
request_idstringQuote this when you contact support.
Example request
cURL
curl -X GET 'https://api.searchedly.com/api/v1/organizations' \
-H "Authorization: Bearer ${ACCESS_TOKEN}"JavaScript
const url = "https://api.searchedly.com/api/v1/organizations";
const response = await fetch(url, {
method: "GET",
headers: {
Authorization: `Bearer ${process.env.ACCESS_TOKEN}`,
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();Python
import os
import requests
response = requests.request(
"GET",
"https://api.searchedly.com/api/v1/organizations",
headers={"Authorization": f"Bearer {os.environ['ACCESS_TOKEN']}"},
timeout=30,
)
response.raise_for_status()
data = response.json()Example response (200)
{
"organizations": [
{
"id": "3f2b8a4e-5c1d-4e7f-9a6b-2d8c0e1f4a7b",
"name": "Example",
"slug": "string",
"role": "string",
"plan": "string"
}
]
}