Skip to main content
GET
https://api-dev.weir.ai/
/
admin
/
organizations
curl -X GET 'https://api.weir.ai/admin/organizations' \
  -H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
  "data": {
    "organizations": [
      {
        "organizationId": "org_123456789",
        "name": "Acme Corporation",
        "type": "Platform",
        "status": "active",
        "memberCount": 15,
        "platformCount": 3,
        "createdAt": "2024-01-01T00:00:00Z"
      }
    ],
    "total": 1
  },
  "message": "Organizations retrieved successfully",
  "status": "success"
}

Get All Organizations

Retrieve a list of all organizations in the system (admin only).
curl -X GET 'https://api.weir.ai/admin/organizations' \
  -H 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN'
{
  "data": {
    "organizations": [
      {
        "organizationId": "org_123456789",
        "name": "Acme Corporation",
        "type": "Platform",
        "status": "active",
        "memberCount": 15,
        "platformCount": 3,
        "createdAt": "2024-01-01T00:00:00Z"
      }
    ],
    "total": 1
  },
  "message": "Organizations retrieved successfully",
  "status": "success"
}

Response Fields

data.organizations
array
required
Array of organization objects.

Usage Examples

const getAllOrganizations = async (accessToken) => {
  const response = await fetch('https://api.weir.ai/admin/organizations', {
    headers: { 'Authorization': `Bearer ${accessToken}` }
  });
  if (!response.ok) throw new Error(`HTTP error! status: ${response.status}`);
  return await response.json();
};