# Verify a Verifiable Presentation

A Verifiable Presentation is a collection of multiple Verifiable Credentials that are being presented by a `holder` to a `verifier`. In addition to checking whether the Credentials are untampered, Verifiable Presentation verification also checks that the `holder` subject DID is valid.&#x20;

## Step 1: Obtain Presentation to Verify

To verify a Credential, you can either pass the full VP-JWT string or a JSON object. These can be either obtained from a Verifiable Presentation presented to the user.

## Step 2: Configure Verification Parameters

The user is able to set verification parameters to filter whether they want to verify certain aspects of a Presentation, including:

<details>

<summary>verifyStatus</summary>

* true (indicates that the user wants to verify the Credential Statuses within the Presentatiuon, requiring a credentialStatus property to be present in at least one Credential within the Presentation)
* false (Default. Indicates that the user does not want to verify the Credential Status.&#x20;

</details>

<details>

<summary>fetchRemoteContexts</summary>

When dealing with JSON-LD type Verifiable Credentials you also MUST provide the proper contexts within a Credential body. Set this to `true` ONLY if you want the `@context` URLs to be fetched in case they are a custom context.

* true
* false (default)

</details>

## Step 3: Execute the API

Use the API below to verify a Presentation

## Verify a Verifiable Presentation generated from credential(s).

> This endpoint verifies the Verifiable Presentation generated from credential(s). As input, it can take the Verifiable Presentation JWT as a string or the entire Verifiable Presentation itself.

```json
{"openapi":"3.0.0","info":{"title":"cheqd Studio API for cheqd network","version":"2.0.0"},"tags":[{"name":"Verifiable Presentations"}],"servers":[{"url":"https://studio-api.cheqd.net","description":"Main (production) server"},{"url":"https://studio-api-staging.cheqd.net","description":"Staging server for testing"},{"url":"http://localhost:3000","description":"Local server for testing"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","name":"x-api-key","in":"header"}},"schemas":{"PresentationVerifyRequest":{"type":"object","required":["presentation"],"properties":{"presentation":{"description":"Verifiable Presentation to be verified as a VP-JWT string or a JSON object.","type":"object"},"verifierDid":{"description":"Provide an optional verifier DID (also known as 'domain' parameter), if the verifier DID in the presentation is not managed in the wallet.","type":"string"},"makeFeePayment":{"description":"Automatically make fee payment (if required) based on payment conditions to unlock encrypted StatusList2021 or BitstringStatusList DID-Linked Resource.","type":"boolean","default":false},"policies":{"description":"Custom verification policies to execute when verifying presentation.","type":"object","properties":{"issuanceDate":{"description":"Policy to skip the `issuanceDate` (`nbf`) timestamp check when set to `false`.","type":"boolean","default":true},"expirationDate":{"description":"Policy to skip the `expirationDate` (`exp`) timestamp check when set to `false`.","type":"boolean","default":true},"audience":{"description":"Policy to skip the audience check when set to `false`.","type":"boolean","default":false}}}}},"VerifyPresentationResult":{"type":"object","properties":{"verified":{"type":"boolean"},"issuer":{"type":"string"},"signer":{"type":"object"},"jwt":{"type":"string"},"verifiableCredential":{"type":"object"}}},"InvalidRequest":{"description":"A problem with the input fields has occurred. Additional state information plus metadata may be available in the response body.","type":"object","properties":{"error":{"type":"string"}}},"UnauthorizedError":{"description":"Access token is missing or invalid","type":"object","properties":{"error":{"type":"string"}}},"InternalError":{"description":"An internal error has occurred. Additional state information plus metadata may be available in the response body.","type":"object","properties":{"error":{"type":"string"}}}}},"paths":{"/presentation/verify":{"post":{"tags":["Verifiable Presentations"],"summary":"Verify a Verifiable Presentation generated from credential(s).","description":"This endpoint verifies the Verifiable Presentation generated from credential(s). As input, it can take the Verifiable Presentation JWT as a string or the entire Verifiable Presentation itself.","parameters":[{"in":"query","name":"verifyStatus","description":"If set to `true` the verification will also check the status of the presentation. Requires the VP to have a `credentialStatus` property.","schema":{"type":"boolean","default":false}},{"in":"query","name":"fetchRemoteContexts","description":"When dealing with JSON-LD you also MUST provide the proper contexts. * Set this to `true` ONLY if you want the `@context` URLs to be fetched in case they are a custom context.","schema":{"type":"boolean","default":false}},{"in":"query","name":"allowDeactivatedDid","description":"If set to `true` allow to verify credential which based on deactivated DID.","schema":{"type":"boolean","default":false}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PresentationVerifyRequest"}},"application/json":{"schema":{"$ref":"#/components/schemas/PresentationVerifyRequest"}}}},"responses":{"200":{"description":"The request was successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyPresentationResult"}}}},"400":{"$ref":"#/components/schemas/InvalidRequest"},"401":{"$ref":"#/components/schemas/UnauthorizedError"},"500":{"$ref":"#/components/schemas/InternalError"}}}}}}
```
