Skip to main content

Endpoint

GET https://api.ugc.inc/org

Overview

Returns the organizations linked to your API key. An org-scoped key returns the single organization it belongs to. A profile-scoped key returns all organizations linked to the billing profile.

Response

data
Org[]
Array of organization objects
curl https://api.ugc.inc/org \
  -H "Authorization: Bearer YOUR_API_KEY"
import requests

response = requests.get(
    'https://api.ugc.inc/org',
    headers={
        'Authorization': 'Bearer YOUR_API_KEY'
    }
)

data = response.json()

if data['ok']:
    for org in data['data']:
        print(f"{org['name']} ({org['id']})")
const response = await fetch('https://api.ugc.inc/org', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();

if (data.ok) {
  data.data.forEach(org => {
    console.log(`${org.name} (${org.id})`);
  });
}
import { UGCClient } from 'ugcinc';

const client = new UGCClient({
  apiKey: 'YOUR_API_KEY'
});

const response = await client.org.getOrgs();

if (response.ok) {
  response.data.forEach(org => {
    console.log(`${org.name} (${org.id})`);
  });
}
{
  "ok": true,
  "code": 200,
  "message": "Success",
  "data": [
    {
      "id": "org_123456",
      "name": "My Organization"
    }
  ]
}