API ReferenceOrganizations
List Organizations
Retrieve a paginated list of organizations with optional filtering and sorting.
Endpoint
GET /v1/organizationsBase URL: https://api-id.avnology.net
Authentication: API Key or OAuth token with admin:orgs:read scope
Request
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page_size | integer | No | Results per page (default: 25, max: 100) |
page_token | string | No | Cursor from previous response |
filter | string | No | Filter expression |
order_by | string | No | Sort field (default: create_time desc) |
Example Request
curl -G "https://api-id.avnology.net/v1/organizations" \
--data-urlencode 'filter=member_count >= 10' \
--data-urlencode 'page_size=25' \
-H "Authorization: Bearer ak_live_..."Response
Success (200 OK)
{
"organizations": [
{
"id": "org_7a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "acme-corp",
"display_name": "Acme Corporation",
"slug": "acme",
"logo_url": "https://cdn.id.avnology.net/logos/org_7a2b3c4d.png",
"registration_mode": "invite_only",
"member_count": 142,
Errors
| Status | Code | Description |
|---|---|---|
| 401 | AVNOLOGY_AUTH_005 | Invalid authentication |
| 403 | AVNOLOGY_AUTH_100 | Insufficient permissions |
Code Examples
JavaScript (fetch)
async function listOrganizations(apiKey) {
const response = await fetch('https://api-id.avnology.net/v1/organizations', {
headers: { 'Authorization': `Bearer ${apiKey}` },
});
return response.json();
}Python (httpx)
import httpx
def list_organizations(api_key: str) -> dict:
return httpx.get("https://api-id.avnology.net/v1/organizations",
headers={"Authorization": f"Bearer {Go (net/http)
func listOrganizations(ctx context.Context, apiKey string) (*ListOrgsResponse, error) {
req, _ := http.NewRequestWithContext(ctx,
Related
- Create Organization -- create a new org
- Get Organization -- get org details
- SDK:
client.admin.listOrganizations()(TypeScript)