# Retrieve a credential

`GET https://api.cademi.com.br/api/v3/credentials/{credential_id}`

Operation ID: `credentials.get` · API v3

Retrieves a credential by its public ID.

The `secret` object exposes only metadata, such as the last four characters and the rotation date. The secret value itself is never returned by this operation.

The response includes an `ETag` representing the current revision. Send this value in the `If-Match` header when updating the credential to avoid overwriting a newer version.

Required permissions: `credentials.read`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `credential_id` | path | string | yes |  |

## Responses

### 200

Returns the requested credential.

Body: `data`: Credential.

Fields of Credential:

| Field | Type | Required | Description |
|---|---|---|---|
| `auth_mode` | string, one of `autonomous`, `human_required`, `both` | yes |  |
| `created_at` | string (date-time) | yes |  |
| `created_by` | object | yes |  |
| `environment` | string, one of `production`, `sandbox` | yes |  |
| `expires_at` | string or null (date-time) | yes |  |
| `human` | object or null | yes | The administrator on whose behalf the current call is made, when the credential acts in human mode. null when the credential acts autonomously. |
| `id` | string | yes |  |
| `name` | string | yes |  |
| `object` | string, one of `credential` | yes |  |
| `policy` | object | yes |  |
| `purpose` | string or null | yes |  |
| `revision` | integer | yes |  |
| `revoked_at` | string or null (date-time) | yes |  |
| `revoked_by` | object or null | yes |  |
| `secret` | object or null | yes |  |
| `status` | string, one of `active`, `suspended`, `revoked` | yes |  |
| `updated_at` | string (date-time) | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 404

The credential was not found or is not accessible with the current credentials.

Body: Error.

Full schema: https://cademi.dev/openapi/v3.json
