# Access And Topology

> API Kickstart for enterprise admission, master accounts, and topology resources.

Source: https://business-api-docs.youhodler.com/docs/reference/access-and-topology

This group covers the entry point into the public API and the root tenant
boundary. Read these methods in perimeter order: authenticate first, discover
or admit the enterprise second, then inspect the enterprise-owned financial
boundary through master accounts.

> **Why this group exists:** `oauth/token` establishes server-side access. `enterprises` defines the root tenant perimeter. `master-accounts` exposes the first enterprise-owned financial boundary inside that perimeter. That is why this group starts with authentication and ends with root account visibility.

## Access And Perimeter

### Issue access token

Server-side entry point. Every backend integration begins by issuing a bearer token through the client-credentials flow. Nothing else in this group is readable until that access path exists.

[API Reference: Issue access token (POST)](/docs/api/reference/auth/oauth-token)

**Request URL — POST**
```http
POST https://business-api.youhodler.com/oauth/token
```
**Request Body — application/json**
```json
{
  "client_id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "client_secret": "cs_live_abc123placeholder",
  "grant_type": "client_credentials"
}
```
**200 Success**

```json
{
  "access_token": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJiOGUyZjFhMCJ9.sig",
  "expires_in": 3600,
  "issued_token_type": "urn:ietf:params:oauth:token-type:access_token",
  "token_type": "Bearer"
}
```

**400 Bad Request**

```json
{
  "code": "invalid_request",
  "details": {
    "reason": "capability_scope_mismatch"
  },
  "message": "Request is invalid."
}
```

### List enterprises

Perimeter discovery. List enterprises when the integration needs to confirm which tenant roots already exist and which admission states are currently active.

[API Reference: List enterprises (GET)](/docs/api/reference/enterprises/enterprises-list)

**Request URL — GET**
```http
GET https://business-api.youhodler.com/enterprises?page_size=20
```
**200 Enterprise Page**

```json
{
  "items": [
    {
      "admission_state": "operational",
      "created_at": "2026-05-01T10:00:00Z",
      "default_master_account": "master-accounts/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "etag": "W/\"a1b2c3d4\"",
      "external_id": "ent-ext-0001",
      "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "jurisdiction": "DE",
      "legal_name": "Acme Fintech GmbH",
      "metadata": {
        "hq_country": "DE",
        "industry": "fintech"
      },
      "resource": "enterprise",
      "restriction_state": "none",
      "updated_at": "2026-05-01T10:00:00Z"
    }
  ],
  "next_page_token": null
}
```

### Get enterprise

Single-tenant read. Read one enterprise when later setup work needs the exact tenant root, its lifecycle posture, or its current perimeter metadata.

[API Reference: Get enterprise (GET)](/docs/api/reference/enterprises/enterprises-get)

**Request URL — GET**
```http
GET https://business-api.youhodler.com/enterprises/11111111-1111-4111-8111-111111111111
```
**200 Enterprise**

```json
{
  "admission_state": "operational",
  "created_at": "2026-05-01T10:00:00Z",
  "default_master_account": "master-accounts/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "etag": "W/\"a1b2c3d4\"",
  "external_id": "ent-ext-0001",
  "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
  "jurisdiction": "DE",
  "legal_name": "Acme Fintech GmbH",
  "metadata": {
    "hq_country": "DE",
    "industry": "fintech"
  },
  "resource": "enterprise",
  "restriction_state": "none",
  "updated_at": "2026-05-01T10:00:00Z"
}
```

### List master accounts

Root financial boundary. Inspect master accounts once the enterprise perimeter is known. This is the top-level operating account layer used for enterprise liquidity and root balance visibility.

[API Reference: List master accounts (GET)](/docs/api/reference/master-accounts/master-accounts-list)

**Request URL — GET**
```http
GET https://business-api.youhodler.com/master-accounts?scope_ref=enterprises/11111111-1111-4111-8111-111111111111
```
**200 Master Accounts**

```json
{
  "items": [
    {
      "created_at": "2026-05-01T10:00:00Z",
      "display_name": "Primary Settlement Account",
      "etag": "W/\"a1b2c3d4\"",
      "id": "b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "resource": "master_account",
      "scope_ref": "enterprises/b8e2f1a0-4c3d-4e5f-9a1b-2c3d4e5f6a7b",
      "status": "active",
      "tenant_type": "enterprise",
      "updated_at": "2026-05-01T10:00:00Z"
    }
  ],
  "next_page_token": null
}
```
