Verifiable Credentials HTTP API v0.3

A HTTP API for Verifiable Credentials lifecycle management

Draft Community Group Report

Latest published version:
https://www.w3.org/TR/vc-http-api/
Latest editor's draft:
https://w3c-ccg.github.io/vc-http-api/
Editor:
TBD
Author:
Participate:
GitHub w3c-ccg/vc-http-api
File an issue
Commit history
Pull requests

Abstract

Verifiable credentials provide a mechanism to express credentials on the Web in a way that is cryptographically secure, privacy respecting, and machine-verifiable. This specification provides data model and HTTP protocols to issue, verify, present, and manage data used in such an ecosystem.

Status of This Document

This is a preview

Do not attempt to implement this version of the specification. Do not reference this version as authoritative in any way. Instead, see https://w3c-ccg.github.io/vc-http-api/ for the Editor's draft.

This specification was published by the Credentials Community Group. It is not a W3C Standard nor is it on the W3C Standards Track. Please note that under the W3C Community Contributor License Agreement (CLA) there is a limited opt-out and other conditions apply. Learn more about W3C Community and Business Groups.

This specification is highly experimental and changing rapidly. Implementation in non-experimental systems is discouraged unless you are participating in the weekly meetings that coordinate activity around this specification.

Comments regarding this document are welcome. Please file issues directly on GitHub, or send them to public-credentials@w3.org ( subscribe, archives).

GitHub Issues are preferred for discussion of this specification. Alternatively, you can send comments to our mailing list. Please send them to public-credentials@w3.org (subscribe, archives).

1. Introduction

This section is non-normative.

1.1 A Simple Example

This section is non-normative.


An example of Verifiable Credential issuance.
Figure 1 A simple example of issuing a Verifiable Credential.

1.2 Design Goals

This section is non-normative.

Goal Description
TBD TBD

1.3 Architecture Overview

This section is non-normative.

This section provides a basic overview of the major components of this specification's architecture.


Diagram showing how credentials flow from issuer to holder and presentations
flow from holder to verifier where all three parties can use information from a
logical verifiable data registry
Figure 2 The roles and information flows forming the basis for this specification.
Note

The ecosystem overview above is an example ecosystem in which to ground the rest of the concepts in this specification. Other ecosystems exist, such as protected environments or proprietary systems, where verifiable credentials also provide benefit.

Issue 1

TODO: Explain example issuer architecture overview. The blue highlights around some boxes identify APIs defined by this specification.


TODO
Figure 3 A detailed view of an example issuer architecture.
Issue 2

TODO: Explain example holder architecture overview. The blue highlights around some boxes identify APIs defined by this specification.


TODO
Figure 4 A detailed view of an example holder architecture.
Issue 3

TODO: Explain example holder architecture overview. The blue highlights around some boxes identify APIs defined by this specification.


TODO
Figure 5 A detailed view of an example verifier architecture.

1.4 Conformance

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

A conforming VC API client is ...

A conforming VC API server is ...

2. Terminology

This section is non-normative.

This section defines the terms used in this specification and throughout decentralized identifier infrastructure. A link to these terms is included whenever they appear in this specification.

decentralized identifier (DID)
A globally unique persistent identifier that does not require a centralized registration authority and is often generated and/or registered cryptographically. The generic format of a DID is defined in DID Core: Syntax. Many—but not all—DID methods make use of distributed ledger technology (DLT) or some other form of decentralized network.

3. The VC HTTP API

3.1 Authorization

The VC API can be deployed in a variety of networking environments which might contain hostile actors. As a result, conforming VC API servers require conforming VC API clients to utilize secure authorization technologies when performing certain types of requests. Each HTTP endpoint defined in this document specifies whether or not authorization is required when performing a request.

This section details the authorization technologies that have been contemplated for use by conforming implementations. Other equivalent authorization technologies can be used. Implementers are cautioned against using non-standard or legacy authorization technologies.

3.2 Issuing

The following APIs are defined for issuing a Verifiable Credential:

EndpointDescription
POST /credentials/issueIssues a credential and returns it in the response body.
POST /credentials/statusUpdates the status of an issued credential

3.2.1 Issue Credential

POST /credentials/issue - Issues a credential and returns it in the response body.

ResponseDescription
201Credential successfully issued!
400invalid input!
500error!

The /credentials/issue endpoint uses the following schema when receiving a POST:

{
  "credential": {
    "type": "object",
    "description": "A JSON-LD Verifiable Credential without a proof.",
    "properties": {
      "@context": {
        "type": "array",
        "description": "The JSON-LD context of the credential.",
        "items": {
          "type": "string"
        }
      },
      "id": {
        "type": "string",
        "description": "The ID of the credential."
      },
      "type": {
        "type": "array",
        "description": "The JSON-LD type of the credential.",
        "items": {
          "type": "string"
        }
      },
      "issuer": {
        "type": "object",
        "description": "A JSON-LD Verifiable Credential Issuer.",
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              }
            }
          }
        ],
        "example": {
          "id": "did:key:z6MkjRagNiMu91DduvCvgEsqLZDVzrJzFrwahc4tXLt9DoHd"
        }
      },
      "issuanceDate": {
        "type": "string",
        "description": "The issuanceDate"
      },
      "expirationDate": {
        "type": "string",
        "description": "The expirationDate"
      },
      "credentialSubject": {
        "type": "object",
        "description": "The subject"
      }
    },
    "example": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://www.w3.org/2018/credentials/examples/v1"
      ],
      "id": "http://example.gov/credentials/3732",
      "type": [
        "VerifiableCredential",
        "UniversityDegreeCredential"
      ],
      "issuer": "did:example:123",
      "issuanceDate": "2020-03-16T22:37:26.544Z",
      "credentialSubject": {
        "id": "did:example:123",
        "degree": {
          "type": "BachelorDegree",
          "name": "Bachelor of Science and Arts"
        }
      }
    }
  },
  "options": {
    "type": "object",
    "additionalProperties": false,
    "description": "Options for specifying how the LinkedDataProof is created.",
    "properties": {
      "type": {
        "type": "string",
        "description": "The type of the proof. Default is an appropriate proof type corresponding to the verification method."
      },
      "verificationMethod": {
        "type": "string",
        "description": "The URI of the verificationMethod used for the proof. Default assertionMethod URI."
      },
      "proofPurpose": {
        "type": "string",
        "description": "The purpose of the proof. Default 'assertionMethod'."
      },
      "created": {
        "type": "string",
        "description": "The date and time of the proof (with a maximum accuracy in seconds). Default current system time."
      },
      "challenge": {
        "type": "string",
        "description": "A challenge provided by the requesting party of the proof. For example 6e62f66e-67de-11eb-b490-ef3eeefa55f2"
      },
      "domain": {
        "type": "string",
        "description": "The intended domain of validity for the proof. For example website.example"
      },
      "credentialStatus": {
        "type": "object",
        "description": "The method of credential status to issue the credential including. If omitted credential status will be included.",
        "properties": {
          "type": {
            "type": "string",
            "description": "The type of credential status to issue the credential with"
          }
        }
      }
    },
    "example": {
      "type": "Ed25519Signature2018",
      "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
      "proofPurpose": "assertionMethod",
      "created": "2020-04-02T18:48:36Z",
      "domain": "revocation.example",
      "challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8",
      "credentialStatus": {
        "type": "RevocationList2020Status"
      }
    }
  }
}

3.2.2 Update Status

POST /credentials/status - Updates the status of an issued credential

ResponseDescription
200Credential status successfully updated
400Bad Request
404Credential not found
500Internal Server Error

The /credentials/status endpoint uses the following schema when receiving a POST:

{
  "credentialId": {
    "type": "string"
  },
  "credentialStatus": {
    "type": "array",
    "items": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "status": {
          "type": "string"
        }
      }
    }
  }
}

3.3 Verifying

The following APIs are defined for verifyig a Verifiable Credential:

EndpointDescription
POST /credentials/verifyVerifies a verifiableCredential and returns a verificationResult in the response body.
POST /presentations/verifyVerifies a Presentation with or without proofs attached and returns a verificationResult in the response body.

3.3.1 Verify Credential

POST /credentials/verify - Verifies a verifiableCredential and returns a verificationResult in the response body.

ResponseDescription
200Verifiable Credential successfully verified!
400invalid input!
500error!

The /credentials/verify endpoint uses the following schema when receiving a POST:

{
  "verifiableCredential": {
    "type": "object",
    "description": "A JSON-LD Verifiable Credential with a proof.",
    "allOf": [
      {
        "type": "object",
        "description": "A JSON-LD Verifiable Credential without a proof.",
        "properties": {
          "@context": {
            "type": "array",
            "description": "The JSON-LD context of the credential.",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string",
            "description": "The ID of the credential."
          },
          "type": {
            "type": "array",
            "description": "The JSON-LD type of the credential.",
            "items": {
              "type": "string"
            }
          },
          "issuer": {
            "type": "object",
            "description": "A JSON-LD Verifiable Credential Issuer.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            ],
            "example": {
              "id": "did:key:z6MkjRagNiMu91DduvCvgEsqLZDVzrJzFrwahc4tXLt9DoHd"
            }
          },
          "issuanceDate": {
            "type": "string",
            "description": "The issuanceDate"
          },
          "expirationDate": {
            "type": "string",
            "description": "The expirationDate"
          },
          "credentialSubject": {
            "type": "object",
            "description": "The subject"
          }
        },
        "example": {
          "@context": [
            "https://www.w3.org/2018/credentials/v1",
            "https://www.w3.org/2018/credentials/examples/v1"
          ],
          "id": "http://example.gov/credentials/3732",
          "type": [
            "VerifiableCredential",
            "UniversityDegreeCredential"
          ],
          "issuer": "did:example:123",
          "issuanceDate": "2020-03-16T22:37:26.544Z",
          "credentialSubject": {
            "id": "did:example:123",
            "degree": {
              "type": "BachelorDegree",
              "name": "Bachelor of Science and Arts"
            }
          }
        }
      },
      {
        "type": "object",
        "properties": {
          "proof": {
            "type": "object",
            "description": "A JSON-LD Linked Data proof.",
            "properties": {
              "type": {
                "type": "string",
                "description": "Linked Data Signature Suite used to produce proof."
              },
              "created": {
                "type": "string",
                "description": "Date the proof was created."
              },
              "verificationMethod": {
                "type": "string",
                "description": "Verification Method used to verify proof."
              },
              "proofPurpose": {
                "type": "string",
                "description": "The purpose of the proof to be used with verificationMethod."
              },
              "jws": {
                "type": "string",
                "description": "Detached JSON Web Signature"
              }
            },
            "example": {
              "type": "Ed25519Signature2018",
              "created": "2020-04-02T18:28:08Z",
              "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
              "proofPurpose": "assertionMethod",
              "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA"
            }
          }
        }
      }
    ],
    "example": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://www.w3.org/2018/credentials/examples/v1"
      ],
      "id": "http://example.gov/credentials/3732",
      "type": [
        "VerifiableCredential",
        "UniversityDegreeCredential"
      ],
      "issuer": "did:example:123",
      "issuanceDate": "2020-03-16T22:37:26.544Z",
      "credentialSubject": {
        "id": "did:example:123",
        "degree": {
          "type": "BachelorDegree",
          "name": "Bachelor of Science and Arts"
        }
      },
      "proof": {
        "type": "Ed25519Signature2018",
        "created": "2020-04-02T18:28:08Z",
        "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
        "proofPurpose": "assertionMethod",
        "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA"
      }
    }
  },
  "options": {
    "type": "object",
    "additionalProperties": false,
    "description": "Options for specifying how the LinkedDataProof is verified.",
    "properties": {
      "verificationMethod": {
        "type": "string",
        "description": "The URI of the verificationMethod used for the proof. Default assertionMethod URI."
      },
      "proofPurpose": {
        "type": "string",
        "description": "The purpose of the proof. Default 'assertionMethod'."
      },
      "created": {
        "type": "string",
        "description": "The date and time of the proof (with a maximum accuracy in seconds). Default current system time."
      },
      "challenge": {
        "type": "string",
        "description": "A challenge provided by the requesting party of the proof. For example 6e62f66e-67de-11eb-b490-ef3eeefa55f2"
      },
      "domain": {
        "type": "string",
        "description": "The intended domain of validity for the proof. For example website.example"
      }
    },
    "example": {
      "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
      "proofPurpose": "assertionMethod",
      "created": "2020-04-02T18:48:36Z",
      "domain": "example.com",
      "challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8"
    }
  }
}

3.3.2 Verify Presentation

POST /presentations/verify - Verifies a Presentation with or without proofs attached and returns a verificationResult in the response body.

ResponseDescription
200Verifiable Presentation successfully verified!
400Invalid or malformed input
413Payload too large
429Request rate limit exceeded.
500Internal Server Error

The /presentations/verify endpoint uses the following schema when receiving a POST:

undefined

3.4 Presenting

The following APIs are defined for presenting a Verifiable Credential:

EndpointDescription
POST /credentials/deriveDerives a credential and returns it in the response body.
POST /presentations/proveProves a presentation and returns it in the response body.
POST /presentations/availableNotifies a holder of an available presentation.
POST /presentations/submissionsProvide a presentation for a holder to store.

3.4.1 Derive Credential

POST /credentials/derive - Derives a credential and returns it in the response body.

ResponseDescription
201Credential derived successfully.
400Invalid Request
500Internal Error
501Not Implemented

The /credentials/derive endpoint uses the following schema when receiving a POST:

{
  "verifiableCredential": {
    "type": "object",
    "description": "A JSON-LD Verifiable Credential with a proof.",
    "allOf": [
      {
        "type": "object",
        "description": "A JSON-LD Verifiable Credential without a proof.",
        "properties": {
          "@context": {
            "type": "array",
            "description": "The JSON-LD context of the credential.",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string",
            "description": "The ID of the credential."
          },
          "type": {
            "type": "array",
            "description": "The JSON-LD type of the credential.",
            "items": {
              "type": "string"
            }
          },
          "issuer": {
            "type": "object",
            "description": "A JSON-LD Verifiable Credential Issuer.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string"
                  }
                }
              }
            ],
            "example": {
              "id": "did:key:z6MkjRagNiMu91DduvCvgEsqLZDVzrJzFrwahc4tXLt9DoHd"
            }
          },
          "issuanceDate": {
            "type": "string",
            "description": "The issuanceDate"
          },
          "expirationDate": {
            "type": "string",
            "description": "The expirationDate"
          },
          "credentialSubject": {
            "type": "object",
            "description": "The subject"
          }
        },
        "example": {
          "@context": [
            "https://www.w3.org/2018/credentials/v1",
            "https://www.w3.org/2018/credentials/examples/v1"
          ],
          "id": "http://example.gov/credentials/3732",
          "type": [
            "VerifiableCredential",
            "UniversityDegreeCredential"
          ],
          "issuer": "did:example:123",
          "issuanceDate": "2020-03-16T22:37:26.544Z",
          "credentialSubject": {
            "id": "did:example:123",
            "degree": {
              "type": "BachelorDegree",
              "name": "Bachelor of Science and Arts"
            }
          }
        }
      },
      {
        "type": "object",
        "properties": {
          "proof": {
            "type": "object",
            "description": "A JSON-LD Linked Data proof.",
            "properties": {
              "type": {
                "type": "string",
                "description": "Linked Data Signature Suite used to produce proof."
              },
              "created": {
                "type": "string",
                "description": "Date the proof was created."
              },
              "verificationMethod": {
                "type": "string",
                "description": "Verification Method used to verify proof."
              },
              "proofPurpose": {
                "type": "string",
                "description": "The purpose of the proof to be used with verificationMethod."
              },
              "jws": {
                "type": "string",
                "description": "Detached JSON Web Signature"
              }
            },
            "example": {
              "type": "Ed25519Signature2018",
              "created": "2020-04-02T18:28:08Z",
              "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
              "proofPurpose": "assertionMethod",
              "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA"
            }
          }
        }
      }
    ],
    "example": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://www.w3.org/2018/credentials/examples/v1"
      ],
      "id": "http://example.gov/credentials/3732",
      "type": [
        "VerifiableCredential",
        "UniversityDegreeCredential"
      ],
      "issuer": "did:example:123",
      "issuanceDate": "2020-03-16T22:37:26.544Z",
      "credentialSubject": {
        "id": "did:example:123",
        "degree": {
          "type": "BachelorDegree",
          "name": "Bachelor of Science and Arts"
        }
      },
      "proof": {
        "type": "Ed25519Signature2018",
        "created": "2020-04-02T18:28:08Z",
        "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
        "proofPurpose": "assertionMethod",
        "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA"
      }
    }
  },
  "frame": {
    "type": "object",
    "description": "A JSON-LD frame used for selective disclosure."
  },
  "options": {
    "type": "object",
    "additionalProperties": false,
    "description": "Options for specifying how the derived credential is created.",
    "properties": {
      "nonce": {
        "type": "string",
        "description": "An encoded nonce provided by the holder of the credential to be included into the LinkedDataProof."
      }
    },
    "example": {
      "nonce": "lEixQKDQvRecCifKl789TQj+Ii6YWDLSwn3AxR0VpPJ1QV5htod/0VCchVf1zVM0y2E="
    }
  }
}

3.4.2 Prove Presentation

POST /presentations/prove - Proves a presentation and returns it in the response body.

ResponseDescription
201Presentation successfully proved!
400invalid input!
500error!

The /presentations/prove endpoint uses the following schema when receiving a POST:

{
  "presentation": {
    "type": "object",
    "description": "A JSON-LD Verifiable Presentation without a proof.",
    "properties": {
      "@context": {
        "type": "array",
        "description": "The JSON-LD context of the presentation.",
        "items": {
          "type": "string"
        }
      },
      "id": {
        "type": "string",
        "description": "The ID of the presentation."
      },
      "type": {
        "type": "array",
        "description": "The JSON-LD type of the presentation.",
        "items": {
          "type": "string"
        }
      },
      "holder": {
        "type": "object",
        "description": "The holder - will be ignored if no proof is present since there is no proof of authority over the credentials",
        "nullable": true
      },
      "verifiableCredential": {
        "type": "array",
        "description": "The Verifiable Credentials",
        "items": {
          "type": "object",
          "description": "A JSON-LD Verifiable Credential with a proof.",
          "allOf": [
            {
              "type": "object",
              "description": "A JSON-LD Verifiable Credential without a proof.",
              "properties": {
                "@context": {
                  "type": "array",
                  "description": "The JSON-LD context of the credential.",
                  "items": {
                    "type": "string"
                  }
                },
                "id": {
                  "type": "string",
                  "description": "The ID of the credential."
                },
                "type": {
                  "type": "array",
                  "description": "The JSON-LD type of the credential.",
                  "items": {
                    "type": "string"
                  }
                },
                "issuer": {
                  "type": "object",
                  "description": "A JSON-LD Verifiable Credential Issuer.",
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "id": {
                          "type": "string"
                        }
                      }
                    }
                  ],
                  "example": {
                    "id": "did:key:z6MkjRagNiMu91DduvCvgEsqLZDVzrJzFrwahc4tXLt9DoHd"
                  }
                },
                "issuanceDate": {
                  "type": "string",
                  "description": "The issuanceDate"
                },
                "expirationDate": {
                  "type": "string",
                  "description": "The expirationDate"
                },
                "credentialSubject": {
                  "type": "object",
                  "description": "The subject"
                }
              },
              "example": {
                "@context": [
                  "https://www.w3.org/2018/credentials/v1",
                  "https://www.w3.org/2018/credentials/examples/v1"
                ],
                "id": "http://example.gov/credentials/3732",
                "type": [
                  "VerifiableCredential",
                  "UniversityDegreeCredential"
                ],
                "issuer": "did:example:123",
                "issuanceDate": "2020-03-16T22:37:26.544Z",
                "credentialSubject": {
                  "id": "did:example:123",
                  "degree": {
                    "type": "BachelorDegree",
                    "name": "Bachelor of Science and Arts"
                  }
                }
              }
            },
            {
              "type": "object",
              "properties": {
                "proof": {
                  "type": "object",
                  "description": "A JSON-LD Linked Data proof.",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Linked Data Signature Suite used to produce proof."
                    },
                    "created": {
                      "type": "string",
                      "description": "Date the proof was created."
                    },
                    "verificationMethod": {
                      "type": "string",
                      "description": "Verification Method used to verify proof."
                    },
                    "proofPurpose": {
                      "type": "string",
                      "description": "The purpose of the proof to be used with verificationMethod."
                    },
                    "jws": {
                      "type": "string",
                      "description": "Detached JSON Web Signature"
                    }
                  },
                  "example": {
                    "type": "Ed25519Signature2018",
                    "created": "2020-04-02T18:28:08Z",
                    "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
                    "proofPurpose": "assertionMethod",
                    "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA"
                  }
                }
              }
            }
          ],
          "example": {
            "@context": [
              "https://www.w3.org/2018/credentials/v1",
              "https://www.w3.org/2018/credentials/examples/v1"
            ],
            "id": "http://example.gov/credentials/3732",
            "type": [
              "VerifiableCredential",
              "UniversityDegreeCredential"
            ],
            "issuer": "did:example:123",
            "issuanceDate": "2020-03-16T22:37:26.544Z",
            "credentialSubject": {
              "id": "did:example:123",
              "degree": {
                "type": "BachelorDegree",
                "name": "Bachelor of Science and Arts"
              }
            },
            "proof": {
              "type": "Ed25519Signature2018",
              "created": "2020-04-02T18:28:08Z",
              "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
              "proofPurpose": "assertionMethod",
              "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA"
            }
          }
        }
      }
    },
    "example": {
      "@context": [
        "https://www.w3.org/2018/credentials/v1",
        "https://www.w3.org/2018/credentials/examples/v1"
      ],
      "holder": "did:example:123",
      "type": "VerifiablePresentation",
      "verifiableCredential": [
        {
          "@context": [
            "https://www.w3.org/2018/credentials/v1",
            "https://www.w3.org/2018/credentials/examples/v1"
          ]
        },
        {
          "id": "http://example.gov/credentials/3732"
        },
        {
          "type": [
            "VerifiableCredential",
            "UniversityDegreeCredential"
          ]
        },
        {
          "issuer": "did:example:123"
        },
        {
          "issuanceDate": "2020-03-16T22:37:26.544Z"
        },
        {
          "credentialSubject": {
            "id": "did:example:123",
            "degree": {
              "type": "BachelorDegree",
              "name": "Bachelor of Science and Arts"
            }
          }
        },
        {
          "proof": {
            "type": "Ed25519Signature2018",
            "created": "2020-04-02T18:28:08Z",
            "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
            "proofPurpose": "assertionMethod",
            "jws": "eyJhbGciOiJFZERTQSIsImI2NCI6ZmFsc2UsImNyaXQiOlsiYjY0Il19..YtqjEYnFENT7fNW-COD0HAACxeuQxPKAmp4nIl8jYAu__6IH2FpSxv81w-l5PvE1og50tS9tH8WyXMlXyo45CA"
          }
        }
      ]
    }
  },
  "options": {
    "type": "object",
    "additionalProperties": false,
    "description": "Options for specifying how the LinkedDataProof is created.",
    "properties": {
      "type": {
        "type": "string",
        "description": "The type of the proof. Default is an appropriate proof type corresponding to the verification method."
      },
      "verificationMethod": {
        "type": "string",
        "description": "The URI of the verificationMethod used for the proof. Default assertionMethod URI."
      },
      "proofPurpose": {
        "type": "string",
        "description": "The purpose of the proof. Default 'assertionMethod'."
      },
      "created": {
        "type": "string",
        "description": "The date and time of the proof (with a maximum accuracy in seconds). Default current system time."
      },
      "challenge": {
        "type": "string",
        "description": "A challenge provided by the requesting party of the proof. For example 6e62f66e-67de-11eb-b490-ef3eeefa55f2"
      },
      "domain": {
        "type": "string",
        "description": "The intended domain of validity for the proof. For example website.example"
      }
    },
    "example": {
      "type": "Ed25519Signature2018",
      "verificationMethod": "did:example:123#z6MksHh7qHWvybLg5QTPPdG2DgEjjduBDArV9EF9mRiRzMBN",
      "proofPurpose": "assertionMethod",
      "created": "2020-04-02T18:48:36Z",
      "domain": "example.com",
      "challenge": "d436f0c8-fbd9-4e48-bbb2-55fc5d0920a8"
    }
  }
}

3.4.3 Presentation Availability

POST /presentations/available - Notifies a holder of an available presentation.

ResponseDescription
200Proceed with presentation
400Request for presentation is malformed
500internal error
501Not implemented

The /presentations/available endpoint uses the following schema when receiving a POST:

{
  "query": {
    "type": "object",
    "description": "See https://w3c-ccg.github.io/vp-request-spec/#format",
    "properties": {
      "type": {
        "type": "string",
        "description": "The type of query the server should reply with."
      },
      "credentialQuery": {
        "type": "object",
        "description": "Details of the client's available presentation"
      }
    }
  }
}

3.4.4 Submit Presentation

POST /presentations/submissions - Provide a presentation for a holder to store.

ResponseDescription
202Presentation accepted
400Presentation is malformed
401Presentation did not contain a proof
402Payment required
403Presentation verification failed
425Server is unwilling to risk processing a request that might be replayed
500internal error
501Not implemented

The /presentations/submissions endpoint uses the following schema when receiving a POST:

undefined

A. Privacy Considerations

B. Security Considerations

C. Acknowledgements

The Working Group thanks the following individuals for their contributions to this specification: The final list of acknowledgements will be compiled at the end of the Candidate Recommendation phase.

Portions of the work on this specification have been funded by the United States Department of Homeland Security's Silicon Valley Innovation Program under contracts 70RSAT20T00000003, 70RSAT20T00000010, 70RSAT20T00000029, 70RSAT20T00000031, 70RSAT20T00000033, and 70RSAT20T00000043. The content of this specification does not necessarily reflect the position or the policy of the U.S. Government and no official endorsement should be inferred.

Development of this specification has also been supported by the W3C Credentials Community Group, chaired by Kim Hamilton Duffy, Heather Vescent, and Wayne Chang.

D. References

D.1 Informative references

[RFC3986]
Uniform Resource Identifier (URI): Generic Syntax. T. Berners-Lee; R. Fielding; L. Masinter. IETF. January 2005. Internet Standard. URL: https://www.rfc-editor.org/rfc/rfc3986
[RFC4122]
A Universally Unique IDentifier (UUID) URN Namespace. P. Leach; M. Mealling; R. Salz. IETF. July 2005. Proposed Standard. URL: https://www.rfc-editor.org/rfc/rfc4122
[VC-DATA-MODEL]
Verifiable Credentials Data Model 1.0. Manu Sporny; Grant Noble; Dave Longley; Daniel Burnett; Brent Zundel. W3C. 2019-11-19. W3C Recommendation. URL: https://www.w3.org/TR/vc-data-model/