---
title: "Manage Certificates"
description: "Add, list, get, update, and delete X.509 certificates and VICAL entries with the walt.id Enterprise X.509 Store Service API."
stack: "Enterprise Stack (commercial) — version 1.2.1"
stack_version: "1.2.1"
stack_comparison: https://docs.walt.id/community-vs-enterprise.md
canonical_url: https://docs.walt.id/enterprise-stack/services/x509-store-service/manage-certificates
generated: 2026-11-11
---
# Manage Certificates

Use the X.509 Store Service to store generic certificates or VICAL entries, list what is already stored, and manage individual entries by full target path.

Service reference: [Swagger API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20X.509%20Certificate%20Store)

## Shared Path Parameters

- `orgID`: When performing operations within an organization, use the organization's Base URL or another valid host alias. For example, if your organization is named `test`, your default Base URL will be `test.enterprise-sandbox.waltid.dev` when using the sandbox environment.
- `target`: For `list` and `list-ids`, use the X.509 Store service path (`{organizationID}.{tenantID}.{x509StoreServiceID}`), for example `test.tenant1.x509-store-1`. For `add`, use the store path to generate a certificate ID automatically, or use a full child certificate path to choose the ID yourself, for example `test.tenant1.x509-store-1.base-001`. For `get`, `update`, and `delete`, use the full stored certificate path.

**Note:**

Every stored-certificate object returned below (by `list`, `get`, `add`, or `update`) also carries a `data` field, shaped `{ "pem": "<same PEM as certificatePem>" }`. It is deprecated and kept only for backwards compatibility with older integrations that read `data.pem` — read `certificatePem` instead. It is omitted from the examples below for brevity but is always present in the actual response.

## List stored certificates

**Option: CURL**

Endpoint: `/v1/{target}/x509-store-api/certificates`

```bash
curl -X 'GET' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/x509-store-api/certificates?limit=50&offset=0&sort=createdDateTime' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}'
```

**Query Parameters**

- `limit`: _Integer (optional)_ – Maximum number of entries to return. Defaults to `100`.
- `offset`: _Integer (optional)_ – Number of entries to skip. Defaults to `0`.
- `sort`: _String (optional)_ – One of `createdDateTime`, `createdDateTime:asc`, `createdDateTime:desc`, `updatedDateTime`, `updatedDateTime:asc`, `updatedDateTime:desc`.

Invalid values return `400 Bad Request` — see the [pagination reference](https://docs.walt.id/enterprise-stack/setup/configurations/config-files/pagination.md) for the full contract.

**Example Response**

```json
[
  {
    "_id": "org1.tenant1.x509-store-1.base-001",
    "createdAt": "2026-08-20T12:34:13.453521061Z",
    "updatedAt": "2026-08-20T12:34:13.453521061Z",
    "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
    "issuerDn": "C=US,CN=Example IACA",
    "issuerDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
    "subjectDn": "C=US,CN=Example DS",
    "subjectDnHex": "3022310b30090603550406130255533113301106035504030c0a4578616d706c65204453",
    "validFrom": "2025-05-29T07:18:39Z",
    "validTo": "2026-08-29T07:18:39Z",
    "parent": "org1.tenant1.x509-store-1"
  },
  {
    "_id": "org1.tenant1.x509-store-1.vical-001",
    "createdAt": "2026-08-20T12:34:13.454642800Z",
    "updatedAt": "2026-08-20T12:34:13.454642800Z",
    "metadata": {
      "vicalDocType": [
        "org.iso.18013.5.1.mDL"
      ],
      "vicalCertProfile": [
        "1.0.18013.5.1.7"
      ]
    },
    "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
    "issuerDn": "C=US,CN=Example IACA",
    "issuerDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
    "subjectDn": "C=US,CN=Example IACA",
    "subjectDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
    "validFrom": "2025-05-28T12:23:01Z",
    "validTo": "2040-05-24T12:23:01Z",
    "parent": "org1.tenant1.x509-store-1"
  }
]
```

**Response Codes**

- `200` - Stored certificates retrieved successfully.

## List stored certificate IDs

**Option: CURL**

Endpoint: `/v1/{target}/x509-store-api/certificates/ids`

```bash
curl -X 'GET' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/x509-store-api/certificates/ids?limit=50&offset=0' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}'
```

**Query Parameters**

- `limit`: _Integer (optional)_ – Maximum number of entries to return. Defaults to `100`.
- `offset`: _Integer (optional)_ – Number of entries to skip. Defaults to `0`.

`sort` is not supported on this endpoint. Invalid values return `400 Bad Request` — see the [pagination reference](https://docs.walt.id/enterprise-stack/setup/configurations/config-files/pagination.md) for the full contract.

**Example Response**

```json
[
  "test.tenant1.x509-store-1.base-001",
  "test.tenant1.x509-store-1.vical-001"
]
```

**Response Codes**

- `200` - Stored certificate IDs retrieved successfully.

## Add a certificate

Use the store target to generate a certificate ID automatically. Use a full child certificate target, such as `test.tenant1.x509-store-1.base-001`, when you want to choose the stored certificate ID.

**Option: CURL**

Endpoint: `/v1/{target}/x509-store-api/certificates`

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/x509-store-api/certificates' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----"
}'
```

**Body Parameters**

- `certificatePem`: PEM-encoded X.509 certificate to store.

**Example Response**

```json
{
  "_id": "org1.tenant1.x509-store-1.base-001",
  "createdAt": "2026-08-20T12:34:13.453521061Z",
  "updatedAt": "2026-08-20T12:34:13.453521061Z",
  "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
  "issuerDn": "C=US,CN=Example IACA",
  "issuerDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
  "subjectDn": "C=US,CN=Example DS",
  "subjectDnHex": "3022310b30090603550406130255533113301106035504030c0a4578616d706c65204453",
  "validFrom": "2025-05-29T07:18:39Z",
  "validTo": "2026-08-29T07:18:39Z",
  "parent": "org1.tenant1.x509-store-1"
}
```

**Response Codes**

- `201` - Certificate stored successfully.

The stored certificate ID comes from the request target. When the target is the store itself, the service generates a UUID child ID.

## Add a certificate with VICAL metadata

Use the store target to generate a certificate ID automatically. Use a full child certificate target, such as `test.tenant1.x509-store-1.vical-001`, when you want to choose the stored certificate ID.

**Option: CURL**

Endpoint: `/v1/{target}/x509-store-api/certificates`

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/x509-store-api/certificates' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
  "metadata": {
    "vicalDocType": [
      "org.iso.18013.5.1.mDL"
    ],
    "vicalCertProfile": [
      "1.0.18013.5.1.7"
    ]
  }
}'
```

**Body Parameters**

- `certificatePem`: PEM-encoded IACA root certificate to store.
- `metadata.vicalDocType`: Required list of document types covered by the IACA root certificate.
- `metadata.vicalCertProfile`: Optional list of certificate-profile identifiers to store with the entry.

**Example Response**

```json
{
  "_id": "org1.tenant1.x509-store-1.vical-001",
  "createdAt": "2026-08-20T12:34:13.454642800Z",
  "updatedAt": "2026-08-20T12:34:13.454642800Z",
  "metadata": {
    "vicalDocType": [
      "org.iso.18013.5.1.mDL"
    ],
    "vicalCertProfile": [
      "1.0.18013.5.1.7"
    ]
  },
  "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
  "issuerDn": "C=US,CN=Example IACA",
  "issuerDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
  "subjectDn": "C=US,CN=Example IACA",
  "subjectDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
  "validFrom": "2025-05-28T12:23:01Z",
  "validTo": "2040-05-24T12:23:01Z",
  "parent": "org1.tenant1.x509-store-1"
}
```

**Response Codes**

- `201` - VICAL entry stored successfully.

## Get a stored certificate

**Option: CURL**

Endpoint: `/v1/{target}/x509-store-api/certificates`

```bash
curl -X 'GET' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/x509-store-api/certificates' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}'
```

**Example Response**

```json
{
  "_id": "org1.tenant1.x509-store-1.vical-001",
  "createdAt": "2026-08-20T12:34:13.454642800Z",
  "updatedAt": "2026-08-20T12:34:13.454642800Z",
  "metadata": {
    "vicalDocType": [
      "org.iso.18013.5.1.mDL"
    ],
    "vicalCertProfile": [
      "1.0.18013.5.1.7"
    ]
  },
  "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
  "issuerDn": "C=US,CN=Example IACA",
  "issuerDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
  "subjectDn": "C=US,CN=Example IACA",
  "subjectDnHex": "3024310b30090603550406130255533115301306035504030c0c4578616d706c652049414341",
  "validFrom": "2025-05-28T12:23:01Z",
  "validTo": "2040-05-24T12:23:01Z",
  "parent": "org1.tenant1.x509-store-1"
}
```

**Response Codes**

- `200` - Stored certificate retrieved successfully.

## Insert or update a stored certificate (idempotent)

**Option: CURL**

Endpoint: `/v1/{target}/x509-store-api/certificates`

```bash
curl -X 'PUT' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/x509-store-api/certificates' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "certificatePem": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----",
  "metadata": {
    "vicalDocType": [
      "org.iso.18013.5.1.mDL"
    ],
    "vicalCertProfile": [
      "1.0.18013.5.1.7"
    ]
  }
}'
```

**Body Parameters**

- `certificatePem`: PEM-encoded certificate that should replace the current stored payload.
- `metadata`: Required when certificate should be exported as VICAL.

The target identifies which stored certificate is updated. You can add or remove VICAL metadata on update by including or omitting the `metadata` field.

**Response Codes**

- `200` - Certificate updated successfully.
- `201` - Certificate was created.

## Delete a stored certificate

**Option: CURL**

Endpoint: `/v1/{target}/x509-store-api/certificates`

```bash
curl -X 'DELETE' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/x509-store-api/certificates' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}'
```

**Response Codes**

- `200` - Certificate deleted successfully.
