> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blobhub.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Accounts

List the active accounts owned by a user or an organization — see
[Service Accounts](/general/service-accounts) for the ownership model.

## **GET** `/users/target/:target/:target_id`

### Path Parameters

| Parameter   | Type   | Required | Description                                                |
| :---------- | :----- | :------- | :--------------------------------------------------------- |
| `target`    | string | Yes      | Owner type: `user` or `org`.                               |
| `target_id` | string | Yes      | The unique ID or alias of the owning user or organization. |

### Response

| Parameter | Type  | Description                   |
| :-------- | :---- | :---------------------------- |
| `users`   | array | The target's active accounts. |

Retired accounts never appear here — see [Lifecycle](/general/service-accounts#lifecycle). A human
target always returns an empty list: a human has no owner, so nothing is ever stored against one.

### Errors

| Status | Error             | Cause                                                                   |
| :----- | :---------------- | :---------------------------------------------------------------------- |
| 400    | `invalid_target`  | `target` is not `user` or `org` (e.g. `blob`).                          |
| 400    | `owner_not_found` | The user or organization named by `target`/`target_id` does not exist.  |
| 403    | `forbidden`       | Missing `admin` access to the target — see [Permissions](#permissions). |

### Example

<CodeGroup>
  ```bash Request theme={null}
  curl https://api.blobhub.io/v1/users/target/org/d7bd017b-0b15-4869-adff-9f11cbceda1e \
    -H "X-API-Key: $ORG_API_KEY"
  ```

  ```json Response theme={null}
  {
    "status": "success",
    "users": [
      {
        "id": "fe827336-3548-429c-a37c-a06d9b689eac",
        "name": "CI Bot",
        "type": "service",
        "status": "active",
        "owner_target": "org",
        "owner_target_id": "d7bd017b-0b15-4869-adff-9f11cbceda1e",
        "owner_target_target_id": "org#d7bd017b-0b15-4869-adff-9f11cbceda1e"
      }
    ]
  }
  ```
</CodeGroup>

`owner_target_target_id` is an internal index key the API happens to serialize — safe to ignore.

### Identifier

`target_id` accepts a UUID or an alias. When `target=user` it also accepts
[`me`](/rest-api/conventions#the-me-alias).

### Permissions

| Caller                                                          | Access                                    |
| :-------------------------------------------------------------- | :---------------------------------------- |
| The owning user, signed in as themselves                        | Allowed.                                  |
| An admin of the owning organization                             | Allowed.                                  |
| An org-scoped API key with the `admin` role, for the owning org | Allowed — the path most CI pipelines use. |

Unlike [Create Account](/rest-api/users/create-account), listing does not separately require a human
behind the request — `admin` access to the target is enough on its own.
