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

# Delete a credential

> Delete a Vault credential.

`DELETE /api/v1/cloud/vaults/{vault_id}/credentials/{credential_id}`

Deletes a Vault credential and returns a deletion confirmation.

## Path parameters

| Parameter       | Type   | Description                            |
| --------------- | ------ | -------------------------------------- |
| `vault_id`      | string | Vault ID with the `vault_` prefix      |
| `credential_id` | string | Credential ID with the `vcred_` prefix |

## Headers

| Header          | Required | Description         |
| --------------- | -------- | ------------------- |
| `Authorization` | Yes      | `Bearer $QODER_PAT` |

## Example request

```bash theme={null}
curl -X DELETE "https://api.qoder.com/api/v1/cloud/vaults/vault_019e3bb940277f0db05ab74291acf6ef/credentials/vcred_019e3bb98877759e862750b495c1fce8" \
  -H "Authorization: Bearer $QODER_PAT"
```

## Example response

**HTTP 200 OK**

```json theme={null}
{
  "id": "vcred_019e3bb98877759e862750b495c1fce8",
  "type": "vault_credential_deleted"
}
```

Successful deletion is signalled by `"type": "vault_credential_deleted"` in the response body.

## Errors

| HTTP | Type              | Trigger                                 |
| ---- | ----------------- | --------------------------------------- |
| 401  | `TOKEN_INVALID`   | Missing or invalid authentication token |
| 404  | `not_found_error` | Vault or credential does not exist      |

See [Errors](/cloud-agents/api/conventions/errors) for the full error envelope.

## Related

<CardGroup cols={2}>
  <Card title="Authenticate with vaults" icon="key" href="/cloud-agents/vaults">
    Store and inject secrets safely into agent sessions.
  </Card>
</CardGroup>
