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

# Fetch Single Collection

> Retrieve one face collection by collection_id.

<div className="dj-endpoint">
  <span className={`dj-method dj-method-get`}>GET</span>
  <code>/api/v1/face/collection</code>
</div>

Look up a single face collection using its `collection_id`. The response includes enrollment counts, the face cap, and `created_at`.

## Headers

| Header          | Required | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `Authorization` | Yes      | Your app's secret key, sent as-is — *not* `Bearer`. |
| `AppId`         | Yes      | The App ID from your dashboard.                     |

## Query parameters

| Parameter       | Type   | Required | Description                 |
| --------------- | ------ | -------- | --------------------------- |
| `collection_id` | string | Yes      | The collection to retrieve. |

## Response

Returns an `entity` with the collection’s `collection_id`, `name`, enrollment counts, `max_faces`, and `created_at`.

| Field           | Type   | Description                                                       |
| --------------- | ------ | ----------------------------------------------------------------- |
| `collection_id` | string | Unique ID of the collection. Echoes the `collection_id` you sent. |
| `name`          | string | Display name of the collection.                                   |
| `face_count`    | number | Number of faces currently enrolled in the collection.             |
| `subject_count` | number | Number of unique subjects in the collection.                      |
| `max_faces`     | number | Maximum number of faces the collection can hold.                  |
| `created_at`    | string | ISO 8601 timestamp of when the collection was created.            |

## Errors

| Code  | Meaning                                                         |
| ----- | --------------------------------------------------------------- |
| `400` | Bad request — `collection_id` is missing or invalid.            |
| `401` | Unauthorized — check your key and `AppId` (no `Bearer` prefix). |
| `404` | No collection found for the supplied id.                        |
| `429` | Too many requests — back off and retry.                         |

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.dojah.io/api/v1/face/collection?collection_id=b3b838de-9c2d-4e61-ac08-4716731436db" \
    -H "Authorization: {{secret_key}}" \
    -H "AppId: {{app_id}}"
  ```

  ```js Node.js theme={null}
  const params = new URLSearchParams({
    collection_id: "b3b838de-9c2d-4e61-ac08-4716731436db",
  });

  const url = "https://api.dojah.io/api/v1/face/collection?" + params;
  const res = await fetch(url, {
    headers: {
      Authorization: process.env.DOJAH_SECRET_KEY,
      AppId: process.env.DOJAH_APP_ID,
    },
  });
  const data = await res.json();
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.get(
      "https://api.dojah.io/api/v1/face/collection",
      headers={
          "Authorization": os.environ["DOJAH_SECRET_KEY"],
          "AppId": os.environ["DOJAH_APP_ID"],
      },
      params={ "collection_id": "b3b838de-9c2d-4e61-ac08-4716731436db" },
  )
  data = res.json()
  ```
</RequestExample>

<ResponseExample>
  ```json GET /api/v1/face/collection theme={null}
  {
    "entity": {
      "collection_id": "b3b838de-9c2d-4e61-ac08-4716731436db",
      "name": "Sandbox Collection",
      "face_count": 1,
      "subject_count": 0,
      "max_faces": 50000,
      "created_at": "2026-08-27T10:27:52.249Z"
    }
  }
  ```
</ResponseExample>
