# W3C Credentials

A `W3CCredential` is a member of the `Credential` union type, representing a credential which follows the W3C Verifiable Credentials Data Model 1.1 specification. W3C credentials can be managed using the same queries and mutations as for any credential.

## View W3C credentials

View held W3C credentials, with pagination and filtering options. Returns a `nextToken` which can be passed into the same query in order to fetch subsequent pages.

```graphql
query MyQuery {
  credentials(
    page: {
      nextToken: null
    }
    filter: {
      credentialFormats: [W3C]
    }
  ) {
    items {
      __typename
      ... on W3CCredential {
        id
        credentialJson
      }
    }
    nextToken
  }
}
```

Alternatively, view a single W3C credential, referenced by its unique ID.

```graphql
query MyQuery {
  credential(
    credentialId: "19d8917d9fd44d09b93eb5a1a71282dd"
  ) {
    __typename
    ... on W3CCredential {
      id
      credentialJson
    }
  }
}
```

## Delete a W3C credential

Delete a held W3C credential.

```graphql
mutation MyMutation {
  deleteCredential(
    credentialId: "19d8917d9fd44d09b93eb5a1a71282dd"
  )
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sudoplatform.com/guides/decentralized-identity/cloud-agent/cloud-agent-admin-api/credentials/w3c-credentials.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
