> ## 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.

# View Credential

### Description

This endpoint allows you to **view an existing credential** issued to a recipient. The credential key is passed as a URL path parameter.

### Headers

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

### Path Parameters

<ParamField path="document_id" type="string" required="true">
  The unique ID (key) of the credential to retrieve.
</ParamField>

### Success Response Fields

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

<ResponseField name="document_id" type="string">
  The unique ID of the credential.
</ResponseField>

<ResponseField name="document_url" type="string">
  The URL where the credential can be accessed.
</ResponseField>

<ResponseField name="recipient" type="object">
  Object containing `name` and `email` of the recipient.
</ResponseField>

<ResponseField name="group" type="object">
  Object containing `title`, `key`, and `code` of the credential group.
</ResponseField>

<ResponseField name="issued_on" type="string">
  ISO 8601 timestamp of when the credential was issued.
</ResponseField>

<ResponseField name="valid_until" type="string">
  ISO 8601 expiry timestamp. `null` if the credential does not expire.
</ResponseField>

<ResponseField name="metadata" type="object">
  Custom attribute values stored with the credential.
</ResponseField>

<ResponseField name="status" type="string">
  The current status of the credential. Possible values: `"active"`, `"suspended"`, `"expired"`, `"revoked"`, `"unpublished"`.
</ResponseField>

<ResponseField name="privacy" type="string">
  Visibility of the credential — `"public"` or `"private"`.
</ResponseField>

### Responses

<ResponseExample>
  ```json 200 Success theme={null}
  {
    "success": true,
    "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 404 Not Found theme={null}
  {
    "success": false,
    "error": "Document does not exists in your account"
  }
  ```

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

```bash theme={null}
curl -X GET "https://api.thehyperstack.com/v1/credential/j4nDvaxF6ehodPXI84p4X1yhQe7lrYgx/view" \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

"status": "active",
"privacy": "public"
}
