---
title: "Manage"
description: "Create, use and manage status credentials."
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/credential-status-service/manage
generated: 2026-11-11
---
# Manage Status Credentials

In this walkthrough we take a look at how you can create a status credential configuration,
list allocated status entries, get a current status value, and update status values in the configured status credential.
Please make sure you have created a credential status service as explained [here](https://docs.walt.id/enterprise-stack/services/credential-status-service/setup.md).

**Note:**

For details on status validation, please refer to the [credential-status policy section](https://docs.walt.id/enterprise-stack/services/verifier-service/policies/parameterized-verification-policies.md#credential-status).

Our implementation covers examples for each of the following standards:

- [BitstringStatusList](https://www.w3.org/TR/vc-bitstring-status-list/)
- [StatusList2021](https://www.w3.org/TR/2023/WD-vc-status-list-20230427/)
- [RevocationList2020](https://w3c-ccg.github.io/vc-status-rl-2020/)
- [TokenStatusList](https://drafts.oauth.net/draft-ietf-oauth-status-list/draft-ietf-oauth-status-list.html)

## Create A Status Credential Configuration

The first step is to create a configuration. However, the creation of a configuration does not yet issue the actual
status credential. It's only after the first status entry has been created with a configuration that the status
credential based on the configuration is being issued and made available for verifiers and other parties to access.

When defining the configuration, we decide which key will sign the status credential (`keyReference` or inline `key`), the DID of the issuer or an X.509 chain (`x5c` / `x5cReferences`), and the
config of the status itself. The config sets up properties the depending on the status credential standard, e.g.:

- _W3C_ standards (BitstringStatusList, StatusList2021, RevocationList2020) - `purpose` of the status, e.g. revocation, the `statusSize` and more
- _IETF_ standard (TokenStatusList)

**Note:**

One status credential can host up to 32.000 status list entries.

### Link a KMS Service and X.509 Store

Before creating a configuration, attach the KMS service that owns the `keyReference` you will use as a **dependency** of the credential status service — regardless of which storage backend ([Setup](https://docs.walt.id/enterprise-stack/services/credential-status-service/setup.md)) you chose. If the configuration uses `x5cReferences`, attach the X.509 Store as well.

**Option: CURL**

Endpoint: `/v1/{target}/credential-status-service-api/dependencies/add` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Credential%20Status%20Service/post_v1__target__credential_status_service_api_dependencies_add)

**Example Request**

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/dependencies/add' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "dependency": "waltid.tenant1.kms1"
}'
```

**Body**

```text
waltid.tenant1.kms1
```

**Path Parameters**

- `orgID`: - When performing operations within an organization, it is essential to 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.walt.dev` when using the sandbox environment.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant + credential status service to which to attach the KMS
  (`{organizationID}.{tenantID}.{credentialStatusServiceID}`), e.g. `waltid.tenant1.status-service1`.

**Body Parameters**

- Specifies the ID of the KMS or X.509 Store service that should be linked.

To attach an X.509 Store, send the same request with `"dependency": "waltid.tenant1.x509-store"`.

---

**Response Codes**

- `201` - Dependency attached.

In the examples below we create a configuration for a revocation status credential.

<br>

**Option: CURL**

Endpoint: `/v1/{target}/credential-status-service-api/status-credential/create` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Credential%20Status%20Service/post_v1__target__credential_status_service_api_status_credential_create)

**Example Request**

**Option: BitstringStatusList**

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/create' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "purpose": "revocation",
    "type": "BitstringStatusList",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ]
  }
}'
```

**Option: StatusList2021**

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/create' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "purpose": "revocation",
    "type": "StatusList2021",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ]
  }
}'
```

**Option: RevocationList2020**

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/create' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "purpose": "revocation",
    "type": "RevocationList2020",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ]
  }
}'
```

**Option: TokenStatusList**

```bash
curl -X 'POST' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/create' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "type": "TokenStatusList",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "VALID"
      },
      {
        "status": "0x1",
        "message": "INVALID"
      }
    ],
    "format": "JWT",
    "ttl": 43200
  }
}'
```

---

**Path Parameters**

- `orgID`: - When performing operations within an organization, it is essential to 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.walt.dev` when using the sandbox environment.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant + credential status service in which
  to execute the status credential creation (`{organizationID}.{tenantID}.{credentialStatusServiceID}`),
  e.g. `waltid.tenant1.status-service1`

**Response**

- `200` - Credential Status config created successfully.

**Option: BODY**

**Example Request Payload**

**Option: BitstringStatusList**

**Body**

```json
{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "purpose": "revocation",
    "type": "BitstringStatusList",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ]
  }
}
```

---

**Body Parameters**

- `keyReference`: _resourceIdentifier_ - Specifies a KMS key used for signing the status credential. The key must come from a KMS
  service
  that lives under the same tenant as the credential status service.
- `key`: _Object_ (optional) - Inline signing key in the format `{"type":"jwk","jwk":{...}}`. Use instead of `keyReference` when the key is not stored in a KMS.
- `did`: _String_ - Specifies the DID related to the signing key.
- `x5c`: _Array_ (optional) - Inline X.509 certificate chain (PEM or base64). Can be used instead of `did`.
- `x5cReferences`: _Array_ (optional) - X.509 Store certificate targets, e.g. `waltid.tenant1.x509-store.cert1`. Can be used instead of `did` or `x5c`. The store must be attached as a dependency.
- `config`: _Object_ - Status credential configuration.
    - `purpose`: _String_ - Describes the type of status e.g. `revocation`, `suspension` or any other custom type.
    - `type`: _String_ - Describes the status credential standard. It should be `BitstringStatusList`.
    - `statusSize`: _String_ - Describes the size of each status entry in bits. The default value is 1, meaning
      each status is represented by a single bit. If a value greater than 1 is used, it allows for more complex status
      messages, and the number of possible status messages must equal the number of possible values (i.e.
      2^statusSize).
    - `statuses`: _Array_ - An array of objects, each representing a possible status value and its associated message.
      Each object contains:
        - `status`: A string representing the hexadecimal value of the status, prefixed with 0x.
        - `message`: A descriptive string used by developers for debugging purposes, indicating what the status value
          represents. It is not intended for end-user display.

**Info:**

  **Multiple Status Lists**

  The Credential Status service supports multiple status lists for a single credential. This is useful in scenarios where you want to manage lists for different purposes - such as a suspension list and a revocation list.

  For each list you plan to manage, you will need to create a separate configuration as shown above. The setup is the same as creating a single status list configuration.

  **Note:** Only BitstringStatusList supports multiple status lists per credential. Other status list types (StatusList2021, RevocationList2020, TokenStatusList) support only a single status list per credential.

**Option: StatusList2021**

**Body**

```json
{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "purpose": "revocation",
    "type": "StatusList2021",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ]
  }
}
```

---

**Body Parameters**

_Same as for BitstringStatusList_, except the type should be `StatusList2021`. 

**Option: RevocationList2020**

**Body**

```json
{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "purpose": "revocation",
    "type": "RevocationList2020",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ]
  }
}
```

---

**Body Parameters**

_Same as for StatusList2021_,except the type should be `RevocationList2020`.

**Option: TokenStatusList**

**Body**

```json
{
  "keyReference": "waltid.tenant1.kms1.key1",
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "type": "TokenStatusList",
    "statusSize": 1,
    "statuses": [
      {
        "status": "0x0",
        "message": "VALID"
      },
      {
        "status": "0x1",
        "message": "INVALID"
      }
    ],
    "format": "JWT",
    "ttl": 43200
  }
}
```

---

**Body Parameters**

- `keyReference`: _resourceIdentifier_ - Specifies a KMS key used for signing the status credential. The key must come from a KMS
  service
  that lives under the same tenant as the credential status service.
- `key`: _Object_ (optional) - Inline signing key in the format `{"type":"jwk","jwk":{...}}`. Use instead of `keyReference` when the key is not stored in a KMS.
- `did`: _String_ - Specifies the DID related to the signing key.
- `x5c`: _Array_ (optional) - Inline X.509 certificate chain (PEM or base64). Can be used instead of `did` for the TokenStatusList standard.
- `x5cReferences`: _Array_ (optional) - X.509 Store certificate targets, e.g. `waltid.tenant1.x509-store.cert1`. Can be used instead of `did` or `x5c`. The store must be attached as a dependency.
- `config`: _Object_ - Configuration details for the Status List Token:
    - `type`: _String_ - Describes the status list standard. It should be `TokenStatusList`.
    - `statusSize`: _String_ -Describes the size of each status entry in bits. Allowed values are 1, 2, 4, and 8.
      Default is 1, meaning each status is represented by a single bit. Larger values allow for more complex status
      messages, with the number of possible status messages equaling `2^statusSize`.
    - `statuses`: _Array_ - This parameter is a JSON array that defines the possible statuses for the Referenced Tokens.
      Each entry in the array has:
        - `status`: _String_ This indicates the bit representation of the status. It uses a hexadecimal representation 
      (e.g., "0x0", "0x1")
        - `message`: _String_ This provides a human-readable label for the status (e.g., "VALID", "INVALID")
        - **_Important!_** Values from 0x0 to 0x2 are reserved and cannot have a different message than the one defined
      by the standard. 
    - `format`: _String_ This parameter indicates the format of the Status List Token. We support both `JWT` and `CWT`.
    - `ttl`: _Integer_ (optional) - IETF Token Status List `ttl` claim, in seconds. Relying parties should not cache the published status-list token longer than this value. Defaults to `43200` (12 hours). The Credential Status service also sets `Cache-Control: public, max-age=<ttl>` on the object in AWS S3, Azure Blob Storage, and Google Cloud Storage so CDNs and [Verifier2](https://docs.walt.id/enterprise-stack/services/verifier2-service/policies/available-policies.md#credential-status) honor the same lifetime.

**Inline `key` example** (TokenStatusList without a KMS dependency):

```json
{
  "key": {
    "type": "jwk",
    "jwk": {
      "kty": "EC",
      "crv": "P-256",
      "d": "AEb4k1BeTR9xt2NxYZggdzkFLLUkhyyWvyUOq3qSiwA",
      "x": "G_TgBc0BkmMipiQ_6gkamIn3mmp7hcTrZuyrLTmknP0",
      "y": "VkRMZdXYXSMff5AJLrnHiN0x5MV6u_8vrAcytGUe4z4"
    }
  },
  "did": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiMW1rQnBEYWZqVk9ONm9XVmlIZGREZXNEYXpKaXk1R0NTYko3VDU4QkJ3cyIsIngiOiJzZ1BiZWRPQjl1WEMtVG54LUVhV1IxRmg1Y25JLUxRLU43NUV1UE8wV2VFIn0",
  "config": {
    "type": "TokenStatusList",
    "format": "JWT"
  }
}
```

**`x5cReferences` example** (TokenStatusList signed with a stored certificate):

```json
{
  "keyReference": "waltid.tenant1.kms1.key1",
  "x5cReferences": [
    "waltid.tenant1.x509-store.cert1"
  ],
  "config": {
    "type": "TokenStatusList",
    "format": "JWT"
  }
}
```

## Create A Status Entry From The Issuer Service

Although we can use the credential status service to create a new status entry, it's quite a cumbersome process.
That's why the [issuer service](https://docs.walt.id/enterprise-stack/services/issuer-service/overview.md) was built to directly communicate &
use the credential status service. This way when you make a credential issuance request, you can reference
a credential status service config + the initial status in the body of the request. The issuer service then makes the
same call we just made above to create a new status entry and the result of the call then gets directly embedded into
the credential.

**Example Issuance Request Body With Status**

**Option: BitstringStatusList**

Notice the `credentialData` represents a W3C VCDM1.1 or VCMD2.0 credential.

**Option: Single**

```json
{
  "issuerKeyId": "waltid.tenant1.kms1.key1",
  "issuerDid": "did:key:z6MkjoRhq1jSNJdLiruSXrFFxagqrztZaXHqHGUTKJbcNywp",
  "authenticationMethod": "PRE_AUTHORIZED",
  "credentialConfigurationId": "UniversityDegree_jwt_vc_json",
  "credentialData": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://www.w3.org/2018/credentials/examples/v1"
    ],
    "id": "http://example.gov/credentials/3732",
    "type": [
      "VerifiableCredential",
      "UniversityDegree"
    ],
    "issuer": {
      "id": "did:web:vc.transmute.world"
    },
    "issuanceDate": "2020-03-10T04:24:12.164Z",
    "credentialSubject": {
      "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
      "degree": {
        "type": "BachelorDegree",
        "name": "Bachelor of Science and Arts"
      }
    }
  },
  // STATUS
  "status": {
    "statusCredentialConfig": "waltid.tenant1.credential-status-service1.config1",
    "initialStatus": "0x0"
  },
  //
  "mapping": {
    "id": "<uuid>",
    "issuer": {
      "id": "<issuerDid>"
    },
    "credentialSubject": {
      "id": "<subjectDid>"
    },
    "issuanceDate": "<timestamp>",
    "expirationDate": "<timestamp-in:365d>"
  }
}
```

**Option: Multiple**

```json
{
  "issuerKeyId": "waltid.tenant1.kms1.key1",
  "issuerDid": "did:key:z6MkjoRhq1jSNJdLiruSXrFFxagqrztZaXHqHGUTKJbcNywp",
  "authenticationMethod": "PRE_AUTHORIZED",
  "credentialConfigurationId": "UniversityDegree_jwt_vc_json",
  "credentialData": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      "https://www.w3.org/2018/credentials/examples/v1"
    ],
    "id": "http://example.gov/credentials/3732",
    "type": [
      "VerifiableCredential",
      "UniversityDegree"
    ],
    "issuer": {
      "id": "did:web:vc.transmute.world"
    },
    "issuanceDate": "2020-03-10T04:24:12.164Z",
    "credentialSubject": {
      "id": "did:example:ebfeb1f712ebc6f1c276e12ec21",
      "degree": {
        "type": "BachelorDegree",
        "name": "Bachelor of Science and Arts"
      }
    }
  },
  // STATUS
  "status": [
    {
      "statusCredentialConfig": "waltid.tenant1.credential-status-service1.config1",
      "initialStatus": "0x0"
    },
    {
      "statusCredentialConfig": "waltid.tenant1.credential-status-service1.config2",
      "initialStatus": "0x0"
    }
  ],
  //
  "mapping": {
    "id": "<uuid>",
    "issuer": {
      "id": "<issuerDid>"
    },
    "credentialSubject": {
      "id": "<subjectDid>"
    },
    "issuanceDate": "<timestamp>",
    "expirationDate": "<timestamp-in:365d>"
  }
}
```

---

To learn about the issuance requests + the other parameters, please go [here](https://docs.walt.id/enterprise-stack/services/issuer-service/credential-issuance/vc-oid4vc.md).

**Option: StatusList2021**

_Same as for BitstringStatusList_.

**Info:**

  Only single status supported by standard. It is not possible to have multiple statuses for a single credential.

**Option: RevocationList2020**

_Same as for StatusList2021_.

**Info:**

  Only single status supported by standard. It is not possible to have multiple statuses for a single credential.

**Option: TokenStatusList**

Notice the `credentialData` represents an IETF SD-JWT-VC credential.

**Info:**

  Only single status supported by standard. It is not possible to have multiple statuses for a single credential.

```json
{
  "issuerKeyId": "waltid.tenant1.key-service-1.FtZSNCOUNcqPhGRX9xkBr5HZEGQbFRwnRtcrgbh-KmI",
  "credentialConfigurationId": "identity_credential_vc+sd-jwt",
  "credentialData": {
    "given_name": "John",
    "family_name": "Doe",
    "email": "johndoe@example.com",
    "phone_number": "+1-202-555-0101",
    "address": {
      "street_address": "123 Main St",
      "locality": "Anytown",
      "region": "Anystate",
      "country": "US"
    },
    "birthdate": "1940-01-01",
    "is_over_18": true,
    "is_over_21": true,
    "is_over_65": true
  },
  "mapping": {
    "id": "<uuid>",
    "iat": "<timestamp-seconds>",
    "nbf": "<timestamp-seconds>",
    "exp": "<timestamp-in-seconds:365d>"
  },
  "selectiveDisclosure": {
    "fields": {
      "birthdate": {
        "sd": true
      },
      "family_name": {
        "sd": false
      }
    },
    "decoyMode": "NONE",
    "decoys": 0
  },
  // STATUS
  "status": {
    "statusCredentialConfig": "waltid.tenant1.credential-status-1.f4ce5c992c12216bbe47540c22ee99d7",
    "initialStatus": "0x0"
  },
  //
  "authenticationMethod": "PRE_AUTHORIZED",
  "standardVersion": "DRAFT13",
  "expiresInSeconds": 300
}
```

To learn about the issuance requests + the other parameters, please go [here](https://docs.walt.id/enterprise-stack/services/issuer-service/credential-issuance/sd-jwt-vc-oid4vc.md).

---

**Body Parameters**

- `status` - Object defining the status service config + initial status
    - `statusCredentialConfig`: The ID of the status credential config,
      e.g. `waltid.tenant1.credential-status-service1.config1`.
    - `initialStatus`: The string representing the hexadecimal value of the status, e.g. `0x0`.

**_Note!_** To ensure compatibility with the issued holder credential, the provided status credential configuration and
the requested holder credential must reference the same standard. Providing any other status credential reference will
cause an error due to incompatibility between the holder and status credential formats.

<details><summary>Click to expand and see an example of how to manually create a status entry</summary>

  ## Create A Status Entry

**Error:**

  **We do not recommend manually creating status entries, as you will not be able to update the status later through our stack.**

  With our Status Credential configuration we can now create a status entry. With the following call we will allocate
  an index within the status credential encoded list for a credential we want to issue with status. The response is
  the status entry plus `statusListRef`, the configuration that holds the index. Copy the status-entry fields into the
  holder credential and leave `statusListRef` out. Enterprise issuers remove `statusListRef` from `credentialStatus`
  and `status` in the credential data they receive, so a pasted response does not reach the issued credential. When
  automatic rollover is enabled, `statusListRef` can name a
  versioned list such as `waltid.tenant1.status-service1.revocation-config-v2`. Later index updates for that entry
  must address `statusListRef`. Session updates may still address the configuration used in this request.

**Option: CURL**

  Endpoint: `/v1/{target}/credential-status-service-api/status-credential/status/create` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Credential%20Status%20Service/post_v1__target__credential_status_service_api_status_credential_status_create)

  **Example Request**

  ```bash
  curl -X 'POST' \
    'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/status/create' \
    -H 'accept: */*' \
    -H 'Authorization: Bearer {yourToken}' \
    -H 'Content-Type: application/json' \
    -d '{
    "initialStatus": "0x0"
  }' 
  ```

  ---

  **Path Parameters**

  - `orgID`: - When performing operations within an organization, it is essential to 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.walt.dev` when using the sandbox environment.
  - `target`: _resourceIdentifier_ - The target indicates the organization + tenant + credential status service +
    credential
    status config ID in which to create a new status list
    entry. `{organizationID}.{tenantID}.{credentialStatusServiceID}.{statusCredentialConfigID}`),
    e.g. `waltid.tenant1.status-service1.revocation-config`

**Option: BODY**

  **Body**

  ```json
  {
    "initialStatus": "0x0"
  }
  ```

  ---

  **Body Parameters**

  - `initialStatus`: The string representing the hexadecimal value of the status, e.g. `0x0`

**Option: RESPONSE**

  **Response**

  - `201` - Status entry created successfully.

**Option: BitstringStatusList**

  The returned status-entry object that can be added to the "credentialStatus" property of the holder credential.

  ```json
  {
    "id": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b#11597",
    "type": "BitstringStatusList",
    "statusPurpose": "revocation",
    "statusListIndex": "11597",
    "statusSize": 1,
    "statusListCredential": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b",
    "statusMessage": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ],
    "statusListRef": "waltid.tenant1.status-service1.revocation-config"
  }
  ```

  **Example of a holder credential with Status**

  ```json
  {
    "@context":
    [
      "https://www.w3.org/ns/credentials/v2",
      "https://www.w3.org/ns/credentials/examples/v2"
    ],
    "id": "https://example.com/credentials/23894672394",
    "type":
    [
      "VerifiableCredential",
      "EmployeeIdCredential"
    ],
    "issuer": "did:example:12345",
    "validFrom": "2024-04-05T14:27:42Z",
    "credentialStatus":
    [
      {
        "id": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b#11597",
        "type": "BitstringStatusListEntry",
        "statusPurpose": "revocation",
        "statusListIndex": "11597",
        "statusSize": 1,
        "statusListCredential": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b",
        "statusMessage":
        [
          {
            "status": "0x0",
            "message": "unset"
          },
          {
            "status": "0x1",
            "message": "set"
          }
        ]
      }
    ],
    "credentialSubject":
    {
      "id": "did:example:6789",
      "type": "Person",
      "employeeId": "A-123456"
    }
  }
  ```

**Option: StatusList2021**

  ```json
  {
    "id": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b#11597",
    "type": "StatusList2021",
    "statusPurpose": "revocation",
    "statusListIndex": "11597",
    "statusSize": 1,
    "statusListCredential": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b",
    "statusMessage": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ],
    "statusListRef": "waltid.tenant1.status-service1.revocation-config"
  }
  ```

  **Example of a holder credential with Status**

  ```json
  {
    "@context":
    [
      "https://www.w3.org/ns/credentials/v2",
      "https://www.w3.org/ns/credentials/examples/v2"
    ],
    "id": "https://example.com/credentials/23894672394",
    "type":
    [
      "VerifiableCredential",
      "EmployeeIdCredential"
    ],
    "issuer": "did:example:12345",
    "validFrom": "2024-04-05T14:27:42Z",
    "credentialStatus":
    {
      "id": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b#11597",
      "type": "StatusList2021Entry",
      "statusPurpose": "revocation",
      "statusListIndex": "11597",
      "statusSize": 1,
      "statusListCredential": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b",
      "statusMessage":
      [
        {
          "status": "0x0",
          "message": "unset"
        },
        {
          "status": "0x1",
          "message": "set"
        }
      ]
    },
    "credentialSubject":
    {
      "id": "did:example:6789",
      "type": "Person",
      "employeeId": "A-123456"
    }
  }
  ```

**Option: RevocationList2020**

  ```json
  {
    "id": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b#11597",
    "type": "RevocationList2020",
    "statusPurpose": "revocation",
    "statusListIndex": "11597",
    "statusSize": 1,
    "statusListCredential": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b",
    "statusMessage": [
      {
        "status": "0x0",
        "message": "unset"
      },
      {
        "status": "0x1",
        "message": "set"
      }
    ],
    "statusListRef": "waltid.tenant1.status-service1.revocation-config"
  }
  ```

  **Example of a holder credential with Status**

  ```json
  {
    "@context":
    [
      "https://www.w3.org/ns/credentials/v2",
      "https://www.w3.org/ns/credentials/examples/v2"
    ],
    "id": "https://example.com/credentials/23894672394",
    "type":
    [
      "VerifiableCredential",
      "EmployeeIdCredential"
    ],
    "issuer": "did:example:12345",
    "validFrom": "2024-04-05T14:27:42Z",
    "credentialStatus":
    {
      "id": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b#11597",
      "type": "RevocationList2020Status",
      "statusPurpose": "revocation",
      "statusListIndex": "11597",
      "statusSize": 1,
      "statusListCredential": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b",
      "statusMessage":
      [
        {
          "status": "0x0",
          "message": "unset"
        },
        {
          "status": "0x1",
          "message": "set"
        }
      ]
    },
    "credentialSubject":
    {
      "id": "did:example:6789",
      "type": "Person",
      "employeeId": "A-123456"
    }
  }
  ```

**Option: TokenStatusList**

  ```json
  {
    "status_list": {
      "idx": 11597,
      "uri": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b"
    },
    "statusListRef": "waltid.tenant1.status-service1.revocation-config"
  }
  ```

  **Example of a holder credential with Status**

  ```json
  {
      "given_name": "John",
      "family_name": "Doe",
      "email": "johndoe@example.com",
      "phone_number": "+1-202-555-0101",
      "address":
      {
          "street_address": "123 Main St",
          "locality": "Anytown",
          "region": "Anystate",
          "country": "US"
      },
      "is_over_18": true,
      "is_over_21": true,
      "is_over_65": true,
      "id": "urn:uuid:9cd6c1eb-4bb4-4128-82e0-520c527d23ff",
      "iat": 1741013911,
      "nbf": 1741013911,
      "exp": 1772549911,
      "iss": "http://waltid.enterprise.localhost:3000/v1/waltid.tenant1.issuer-service-2/issuer-service-api/openid4vc/draft13",
      "cnf":
      {
          "jwk":
          {
              "kty": "OKP",
              "crv": "Ed25519",
              "kid": "zxIo0ognSmR6GCy9rJblqE7UbvcQnt2vMPMzsuXXBcs",
              "x": "KzUaZhZaRqp2C_fEieU1VTUPF1XqJxqTIxSQgxRKJcs"
          }
      },
      "vct": "http://waltid.enterprise.localhost:3000/v1/waltid.tenant1.issuer-service-2/issuer-service-api/openid4vc/draft13/identity_credential",
      "_sd":
      [
          "WwLfN74YKWfsPK8jEqDIFESZ-dwhmXWyQeaRfFddZZM"
      ],
      "status":
      {
          "status_list":
          {
              "idx": 11597,
              "uri": "http://localhost:3000/credentials/99914b932bd37a50b983c5e7c90ae93b"
          }
      }
  }
  ```

</details>

## Check Status List Capacity

Monitor the capacity of your status lists to ensure you don't run out of entries. Each status list can hold up to 32,000 entries.

**Option: CURL**

Endpoint: `/v1/{target}/credential-status-service-api/status-credential/capacity` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Credential%20Status%20Service)

**Example Request**

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

---

**Path Parameters**

- `orgID`: Your organization's Base URL.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant + credential status service + credential status config ID (`{organizationID}.{tenantID}.{credentialStatusServiceID}.{statusCredentialConfigID}`), e.g. `waltid.tenant1.status-service1.revocation-config`

**Option: RESPONSE**

**Response**

```json
{
  "statusListId": "waltid.tenant1.status-service1.revocation-config",
  "usedEntries": 1500,
  "maxEntries": 32000,
  "availableEntries": 30500,
  "usagePercent": 4.69,
  "status": "HEALTHY"
}
```

**Status Values**

| Status | Description |
|--------|-------------|
| `HEALTHY` | Usage below warning threshold |
| `WARNING` | Usage at or above warning threshold |
| `CRITICAL` | Usage at or above critical threshold |
| `FULL` | Status list has reached maximum capacity |

## List Status Entries

Use the entries endpoint to inspect the allocated indices in a status list. This is useful for audits,
for finding entries with a specific status value, and for getting the index you can use with direct
status reads or updates.

The endpoint returns allocated entries only. It does not return empty slots from the status list capacity.

**Option: CURL**

Endpoint: `GET /v1/{target}/credential-status-service-api/status-credential/entries`

**Example Request**

```bash
curl -X 'GET' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/entries?limit=100&offset=0&status=0x1&sort=index-' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}'
```

---

**Path Parameters**

- `orgID`: Your organization's Base URL.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant + credential status service + credential status config ID (`{organizationID}.{tenantID}.{credentialStatusServiceID}.{statusCredentialConfigID}`), e.g. `waltid.tenant1.status-service1.revocation-config`

**Query Parameters**

| Parameter | Required | Description |
|---|---|---|
| `limit` | No | Maximum number of entries to return. Defaults to `100`; maximum is `1000`. |
| `offset` | No | Number of entries to skip. Defaults to `0`. |
| `status` | No | Filter entries by status value, for example `0x0` or `0x1`. |
| `sort` | No | Sort by index. Supported values are `index`, `index+`, and `index-`. Defaults to ascending index order. |

**Option: RESPONSE**

**Response**

```json
{
  "entries": [
    {
      "index": "47",
      "status": {
        "status": "0x1",
        "message": "INVALID"
      }
    },
    {
      "index": "2",
      "status": {
        "status": "0x1",
        "message": "INVALID"
      }
    }
  ],
  "total": 2,
  "limit": 100,
  "offset": 0,
  "hasMore": false
}
```

**Response Fields**

| Field | Description |
|---|---|
| `entries` | Status entries for the requested page. |
| `entries[].index` | Status list index assigned to a credential. Use this value as `index` when getting or updating a status directly. |
| `entries[].status.status` | Current status value stored at that index. |
| `entries[].status.message` | Human-readable label configured for the status value. |
| `total` | Number of entries matching the filter before pagination. |
| `limit` | Page size used for this response. |
| `offset` | Offset used for this response. |
| `hasMore` | `true` when more entries are available after this page. |

## Get A Credential Status

Use the get endpoint to inspect the current status value for one allocated entry. Provide exactly one of
`session` or `index`.

Both lookup modes require the `credential-status.get` permission on the status configuration. Session lookups also
require access to the issuer session.

Use `session` when the credential was issued through the issuer service and you want the API to resolve the
status index from the issuance session. The session id is available:

- at issuance (by parsing the credential offer URL)
- during issuance (via callback mechanism)
- post-issuance by retrieving it from the list of events through the /v1/events/query endpoint.

Use `index` when you already know the status list index, for example from the holder credential's status entry or from
the [entries endpoint](#list-status-entries). This reads that index in the status list directly and does not require an
issuance session.

**Option: CURL**

Endpoint: `GET /v1/{target}/credential-status-service-api/status-credential/status` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Credential%20Status%20Service/get_v1__target__credential_status_service_api_status_credential_status)

**Example Request**

**Option: By Session**

```bash
curl -X 'GET' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/status?session=waltid.tenant1.issuer-service.session1' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}'
```

**Option: By Index**

```bash
curl -X 'GET' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/status?index=11597' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer {yourToken}'
```

---

**Path Parameters**

- `orgID`: - When performing operations within an organization, it is essential to 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.walt.dev` when using the sandbox environment.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant + credential status service +
  credential
  status config ID (`{organizationID}.{tenantID}.{credentialStatusServiceID}.{statusCredentialConfigID}`),
  e.g. `waltid.tenant1.status-service1.revocation-config`

**Query Parameters**

- `session`: _String_ (optional) - The full path of the issuance session corresponding to the credential-offer-url, e.g. `waltid.tenant1.issuer-service.session1`.
- `index`: _Number_ (optional) - The numeric status list index to read directly, e.g. `11597`.

Provide exactly one of `session` or `index`.

**Option: RESPONSE**

**Response**

- `200` - Status retrieved successfully.

```json
{
  "index": "11597",
  "status": {
    "status": "0x0",
    "message": "unset"
  }
}
```

**Response Fields**

- `index`: _String_ - The status list index assigned to the credential.
- `status.status`: _String_ - The current status value stored at that index, e.g. `0x0` or `0x1`.
- `status.message`: _String_ - The human-readable label configured for the status value.

- `400` - Bad Request Exception:
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Exactly one of 'session' or 'index' must be provided."
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Status index '999999' not found for config 'waltid.tenant1.status-service1.revocation-config'"
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Credential Status List 'waltid.tenant1.status-service1.revocation-config' is not associated with issuance session 'waltid.tenant1.issuer-service.session1'"
}
```

- `401` - Invalid or missing authentication token.
- `403` - Insufficient permissions. Both lookup modes require `credential-status.get`. Session lookups also require access to the issuer session.

## Update A Credential Status

**Option: CURL**

Endpoint: `/v1/{target}/credential-status-service-api/status-credential/status/update` | [API Reference](https://enterprise.sandbox.walt.id/swagger/index.html#/Service%20%7C%20Credential%20Status%20Service/put_v1__target__credential_status_service_api_status_credential_status_update)

**Example Request**

**Option: By Session**

```bash
curl -X 'PUT' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/status/update' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "session": "waltid.tenant1.issuer-service.session1",
  "status": "0x1"
}' 
```

**Option: By Index**

**Info:**

  Update by Index requires elevated permissions, as it allows the caller to update any index in the status list directly even if they are not the issuer of the credential that set that index in the status lists.

```bash
curl -X 'PUT' \
  'https://{orgID}.enterprise-sandbox.waltid.dev/v1/{target}/credential-status-service-api/status-credential/status/update' \
  -H 'accept: */*' \
  -H 'Authorization: Bearer {yourToken}' \
  -H 'Content-Type: application/json' \
  -d '{
  "index": 11597,
  "status": "0x1"
}' 
```

---

**Path Parameters**

- `orgID`: - When performing operations within an organization, it is essential to 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.walt.dev` when using the sandbox environment.
- `target`: _resourceIdentifier_ - The target indicates the organization + tenant + credential status service +
  credential
  status config ID in which to create a new status list
  entry. `{organizationID}.{tenantID}.{credentialStatusServiceID}.{statusCredentialConfigID}`),
  e.g. `waltid.tenant1.status-service1.revocation-config`

**Option: BODY**

**Body**

**Option: By Session**

```json
{
  "session": "waltid.tenant1.issuer-service.session1",
  "status": "0x1"
}
```

**Option: By Index**

```json
{
  "index": 11597,
  "status": "0x1"
}
```

**Body Parameters**

- `session`: _String_ (optional) - The full path of the issuance session corresponding to the credential-offer-url, e.g. `waltid.tenant1.issuer-service.session1`.
- `index`: _Number_ (optional) - The numeric status list index to update directly, e.g. `11597`.
- `status`: _String_ (required) - The string representing the hexadecimal value of the updated status, e.g. `0x1`.
- `reasonCode`: _String_ (optional) - The string representing the reason code for the status update which is logged within the [audit log](https://docs.walt.id/enterprise-stack/administration/events-and-metrics/eidas-audit-log/overview.md). e.g. `key_compromise`

Provide exactly one of `session` or `index`.

Use `session` when the credential was issued through the issuer service and you want the API to resolve the status index
from the issuance session. The session id is available:

- at issuance (by parsing the credential offer URL) 
- during issuance (via callback mechanism)
- post-issuance by retrieving it from the list of events through the /v1/events/query endpoint.

Use `index` when you already know the status list index, for example from the holder credential's status entry or from
the [entries endpoint](#list-status-entries). This updates that index in the status list directly and does not require an
issuance session. To inspect the current value first, use the [get endpoint](#get-a-credential-status).

After automatic rollover, an index update must target the list named by the create response `statusListRef`. Addressing
the base configuration does not move that update onto a rolled-over list. A session update may address the original
configuration; the issuer resolves the list that holds each bound index.

Issuer2 batch issuance (`proofs.jwt`) allocates one status entry per issued copy. Use `index` to change a single copy. A `session` update applies to every entry bound to that issuance session for the targeted status configuration.

**Info:**

  **Updating Multiple Status Lists**

  When a credential has multiple status lists (only supported for BitstringStatusList), you can update any of the status lists associated with the credential by specifying the target status list in the `target` path parameter. The `target` should be the resource identifier of the specific status list you want to update (e.g. `waltid.tenant1.credential-status-service1.config1`). <br><br> Each status list can be updated independently using the same session ID, allowing you to manage different status purposes (such as revocation and suspension) separately.

**Option: RESPONSE**

**Response**

- `200` - Status updated successfully.

```json
{
  "successful": true
}
```

- `400` - Bad Request Exception:
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Expected index (Index(value=11597)) for status (Status(type=0x1, message=set)), but none found"
}
```
```json
{
  "exception": true,
  "status": "Bad Request Exception",
  "code": "400",
  "message": "Failed to find a unique record for 99914b932bd37a50b983c5e7c90ae93b1"
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Invalid status has been provided: StatusValue(value=0x10). Expected - unset, set"
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Status size must be one of: [1, 2, 4, 8]"
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Missing or multiple values for valid status"
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Missing or multiple values for invalid status"
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "Missing or multiple values for suspended status"
}
```
```json
{
    "exception": true,
    "status": "Bad Request Exception",
    "code": "400",
    "message": "No (or multiple) index(es) found in session: waltid.tenant1.issuer-service.session1 for status: waltid.tenant1.status-service1.revocation-config"
}
```
