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

# List All Credentials

### Description

This endpoint allows you to **retrieve all credentials** issued by your organization, ordered by most recently published, with support for pagination.

### Headers

<ParamField header="Authorization" type="string" required="true">
  Bearer YOUR\_API\_TOKEN — obtainable from **Hyperstack Dashboard → Settings → API Access**
</ParamField>

### Body Parameters

<ParamField body="page" type="number" required="false">
  The page number for pagination (default is `1`).
</ParamField>

<ParamField body="page_size" type="number" required="false">
  The number of credentials to return per page (default is `50`).
</ParamField>

### Success Response Fields

<ResponseField name="success" type="boolean">
  Indicates whether the request was successful.
</ResponseField>

<ResponseField name="total" type="number">
  Total number of credentials issued by your organization.
</ResponseField>

<ResponseField name="credentials" type="array[object]">
  Array of credential objects. Each object contains:

  * `document_id` — unique credential ID
  * `document_url` — public URL of the credential
  * `recipient` — object with `name` and `email`
  * `group` — object with `title`, `key`, and `code`
  * `issued_on` — ISO 8601 timestamp
  * `valid_until` — ISO 8601 expiry timestamp, or `null`
  * `metadata` — custom attribute values
  * `status` — `"active"`, `"suspended"`, `"expired"`, `"revoked"`, or `"unpublished"`
  * `privacy` — `"public"` or `"private"`
</ResponseField>

<ResponseField name="page" type="number">
  Current page number.
</ResponseField>

<ResponseField name="page_size" type="number">
  Number of credentials returned per page.
</ResponseField>

### Responses

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "total": 1,
    "page": 1,
    "page_size": 50,
    "credentials": [
      {
        "document_id": "j4nDvaxF6ehodPXI84p4X1yhQe7lrYgx",
        "document_url": "https://hyperstack.id/credential/j4nDvaxF6ehodPXI84p4X1yhQe7lrYgx",
        "recipient": { "name": "John Doe", "email": "john@example.com" },
        "group": { "title": "Cloud Certification", "key": "GcI6H5b66a3v", "code": "CC-2024" },
        "issued_on": "2024-03-15T10:30:00Z",
        "valid_until": null,
        "metadata": { "custom_location": "Mars" },
        "status": "active",
        "privacy": "public"
      }
    ]
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "detail": "Invalid token or organization not found"
  }
  ```
</ResponseExample>

```bash theme={null}
curl -X POST "https://api.thehyperstack.com/v1/credentials/all" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "page": 1,
    "page_size": 50
  }'
```
