> For the complete documentation index, see [llms.txt](https://docs.cheqd.io/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cheqd.io/product/sdk/aca-py/credentials/json-ld/present-credential.md).

# Present a Verifiable Credential

Using the `/present-proof-2.0` API endpoints, it is possible to present Verifiable Credentials, signed by a cheqd DID, in a few clicks or lines of code. This process enables secure and trustworthy sharing of verifiable credentials within the ACA-Py framework and cheqd ecosystem.

## Step 1: Create a Connection with Holder

Use any supported method to create a connection with the Holder. Automated [out-of-band protocol](https://identity.foundation/didcomm-messaging/spec/#out-of-band-messages) is recommended. You can follow the same steps as described in [Issue a Verifiable Credential](/product/sdk/aca-py/credentials/json-ld/issue-credential.md#step-1-create-a-connection-with-holder).

## Step 2: Send Proof Request

After connection is established, the Verifier can send a proof request to the Holder.

## POST /present-proof-2.0/send-request

> Sends a free presentation request not bound to any proposal

```json
{"openapi":"3.1.1","info":{"title":"cheqd","version":"v1.1.1"},"tags":[{"name":"present-proof v2.0","description":"Proof presentation v2.0"}],"paths":{"/present-proof-2.0/send-request":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V20PresExRecord"}}}}},"tags":["present-proof v2.0"],"summary":"Sends a free presentation request not bound to any proposal","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V20PresSendRequestRequest"}}},"required":false}}}},"components":{"schemas":{"V20PresExRecord":{"properties":{"auto_present":{"description":"Prover choice to auto-present proof as verifier requests","type":"boolean"},"auto_remove":{"description":"Verifier choice to remove this presentation exchange record when complete","type":"boolean"},"auto_verify":{"description":"Verifier choice to auto-verify proof presentation","type":"boolean"},"by_format":{"allOf":[{"$ref":"#/components/schemas/V20PresExRecordByFormat"}],"description":"Attachment content by format for proposal, request, and presentation","readOnly":true},"connection_id":{"description":"Connection identifier","type":"string"},"created_at":{"description":"Time of record creation","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"error_msg":{"description":"Error message","type":"string"},"initiator":{"description":"Present-proof exchange initiator: self or external","enum":["self","external"],"type":"string"},"pres":{"allOf":[{"$ref":"#/components/schemas/V20Pres"}],"description":"Presentation message"},"pres_ex_id":{"description":"Presentation exchange identifier","type":"string"},"pres_proposal":{"allOf":[{"$ref":"#/components/schemas/V20PresProposal"}],"description":"Presentation proposal message"},"pres_request":{"allOf":[{"$ref":"#/components/schemas/V20PresRequest"}],"description":"Presentation request message"},"role":{"description":"Present-proof exchange role: prover or verifier","enum":["prover","verifier"],"type":"string"},"state":{"description":"Present-proof exchange state","enum":["proposal-sent","proposal-received","request-sent","request-received","presentation-sent","presentation-received","done","abandoned","deleted"],"type":"string"},"thread_id":{"description":"Thread identifier","type":"string"},"trace":{"description":"Record trace information, based on agent configuration","type":"boolean"},"updated_at":{"description":"Time of last record update","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"verified":{"description":"Whether presentation is verified: 'true' or 'false'","enum":["true","false"],"type":"string"},"verified_msgs":{"items":{"description":"Proof verification warning or error information","type":"string"},"type":"array"}},"type":"object"},"V20PresExRecordByFormat":{"properties":{"pres":{"type":"object"},"pres_proposal":{"type":"object"},"pres_request":{"type":"object"}},"type":"object"},"V20Pres":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"presentations~attach":{"items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"}},"required":["formats","presentations~attach"],"type":"object"},"V20PresFormat":{"properties":{"attach_id":{"description":"Attachment identifier","type":"string"},"format":{"description":"Attachment format specifier","type":"string"}},"required":["attach_id","format"],"type":"object"},"AttachDecorator":{"properties":{"@id":{"description":"Attachment identifier","type":"string"},"byte_count":{"description":"Byte count of data included by reference","type":"integer"},"data":{"$ref":"#/components/schemas/AttachDecoratorData"},"description":{"description":"Human-readable description of content","type":"string"},"filename":{"description":"File name","type":"string"},"lastmod_time":{"description":"Hint regarding last modification datetime, in ISO-8601 format","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"mime-type":{"description":"MIME type","type":"string"}},"required":["data"],"type":"object"},"AttachDecoratorData":{"properties":{"base64":{"description":"Base64-encoded data","pattern":"^[a-zA-Z0-9+/]*={0,2}$","type":"string"},"json":{"description":"JSON-serialized data"},"jws":{"allOf":[{"$ref":"#/components/schemas/AttachDecoratorDataJWS"}],"description":"Detached Java Web Signature"},"links":{"description":"List of hypertext links to data","items":{"type":"string"},"type":"array"},"sha256":{"description":"SHA256 hash (binhex encoded) of content","pattern":"^[a-fA-F0-9+/]{64}$","type":"string"}},"type":"object"},"AttachDecoratorDataJWS":{"properties":{"header":{"$ref":"#/components/schemas/AttachDecoratorDataJWSHeader"},"protected":{"description":"protected JWS header","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signature":{"description":"signature","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signatures":{"description":"List of signatures","items":{"$ref":"#/components/schemas/AttachDecoratorData1JWS"},"type":"array"}},"type":"object"},"AttachDecoratorDataJWSHeader":{"properties":{"kid":{"description":"Key identifier, in W3C did:key or DID URL format","pattern":"^did:(?:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+|sov:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}(;.*)?(\\?.*)?#.+)$","type":"string"}},"required":["kid"],"type":"object"},"AttachDecoratorData1JWS":{"properties":{"header":{"$ref":"#/components/schemas/AttachDecoratorDataJWSHeader"},"protected":{"description":"protected JWS header","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signature":{"description":"signature","pattern":"^[-_a-zA-Z0-9]*$","type":"string"}},"required":["header","signature"],"type":"object"},"V20PresProposal":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"proposals~attach":{"description":"Attachment per acceptable format on corresponding identifier","items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"}},"required":["formats","proposals~attach"],"type":"object"},"V20PresRequest":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"request_presentations~attach":{"description":"Attachment per acceptable format on corresponding identifier","items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"},"will_confirm":{"description":"Whether verifier will send confirmation ack","type":"boolean"}},"required":["formats","request_presentations~attach"],"type":"object"},"V20PresSendRequestRequest":{"properties":{"auto_remove":{"description":"Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)","type":"boolean"},"auto_verify":{"description":"Verifier choice to auto-verify proof presentation","type":"boolean"},"comment":{"type":"string"},"connection_id":{"description":"Connection identifier","type":"string"},"presentation_request":{"$ref":"#/components/schemas/V20PresRequestByFormat"},"trace":{"description":"Whether to trace event (default false)","type":"boolean"}},"required":["connection_id","presentation_request"],"type":"object"},"V20PresRequestByFormat":{"properties":{"anoncreds":{"allOf":[{"$ref":"#/components/schemas/AnoncredsPresentationRequest"}],"description":"Presentation proposal for anoncreds"},"dif":{"allOf":[{"$ref":"#/components/schemas/DIFProofRequest"}],"description":"Presentation request for DIF"},"indy":{"allOf":[{"$ref":"#/components/schemas/IndyProofRequest"}],"description":"Presentation request for indy"}},"type":"object"},"AnoncredsPresentationRequest":{"properties":{"name":{"description":"Proof request name","type":"string"},"non_revoked":{"$ref":"#/components/schemas/AnoncredsPresentationRequestNonRevoked"},"nonce":{"description":"Nonce","pattern":"^[1-9][0-9]*$","type":"string"},"requested_attributes":{"additionalProperties":{"$ref":"#/components/schemas/AnoncredsPresentationReqAttrSpec"},"description":"Requested attribute specifications of proof request","type":"object"},"requested_predicates":{"additionalProperties":{"$ref":"#/components/schemas/AnoncredsPresentationReqPredSpec"},"description":"Requested predicate specifications of proof request","type":"object"},"version":{"description":"Proof request version","pattern":"^[0-9.]+$","type":"string"}},"required":["requested_attributes","requested_predicates"],"type":"object"},"AnoncredsPresentationRequestNonRevoked":{"properties":{"from":{"description":"Earliest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"},"to":{"description":"Latest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"}},"type":"object"},"AnoncredsPresentationReqAttrSpec":{"properties":{"name":{"description":"Attribute name","type":"string"},"names":{"description":"Attribute name group","items":{"type":"string"},"type":"array"},"non_revoked":{"$ref":"#/components/schemas/AnoncredsPresentationReqAttrSpecNonRevoked"},"restrictions":{"description":"If present, credential must satisfy one of given restrictions: specify schema_id, schema_issuer_did, schema_name, schema_version, issuer_did, cred_def_id, and/or attr::<attribute-name>::value where <attribute-name> represents a credential attribute name","items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}},"type":"object"},"AnoncredsPresentationReqAttrSpecNonRevoked":{"properties":{"from":{"description":"Earliest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"},"to":{"description":"Latest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"}},"type":"object"},"AnoncredsPresentationReqPredSpec":{"properties":{"name":{"description":"Attribute name","type":"string"},"non_revoked":{"$ref":"#/components/schemas/AnoncredsPresentationReqPredSpecNonRevoked"},"p_type":{"description":"Predicate type ('<', '<=', '>=', or '>')","enum":["<","<=",">=",">"],"type":"string"},"p_value":{"description":"Threshold value","type":"integer"},"restrictions":{"description":"If present, credential must satisfy one of given restrictions: specify schema_id, schema_issuer_did, schema_name, schema_version, issuer_did, cred_def_id, and/or attr::<attribute-name>::value where <attribute-name> represents a credential attribute name","items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}},"required":["name","p_type","p_value"],"type":"object"},"AnoncredsPresentationReqPredSpecNonRevoked":{"properties":{"from":{"description":"Earliest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"},"to":{"description":"Latest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"}},"type":"object"},"DIFProofRequest":{"additionalProperties":true,"properties":{"options":{"$ref":"#/components/schemas/DIFOptions"},"presentation_definition":{"$ref":"#/components/schemas/PresentationDefinition"}},"required":["presentation_definition"],"type":"object"},"DIFOptions":{"properties":{"challenge":{"description":"Challenge protect against replay attack","pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}","type":"string"},"domain":{"description":"Domain protect against replay attack","type":"string"}},"type":"object"},"PresentationDefinition":{"properties":{"format":{"$ref":"#/components/schemas/ClaimFormat"},"id":{"description":"Unique Resource Identifier","pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}","type":"string"},"input_descriptors":{"items":{"$ref":"#/components/schemas/InputDescriptors"},"type":"array"},"name":{"description":"Human-friendly name that describes what the presentation definition pertains to","type":"string"},"purpose":{"description":"Describes the purpose for which the Presentation Definition's inputs are being requested","type":"string"},"submission_requirements":{"items":{"$ref":"#/components/schemas/SubmissionRequirements"},"type":"array"}},"type":"object"},"ClaimFormat":{"properties":{"di_vc":{"type":"object"},"jwt":{"type":"object"},"jwt_vc":{"type":"object"},"jwt_vp":{"type":"object"},"ldp":{"type":"object"},"ldp_vc":{"type":"object"},"ldp_vp":{"type":"object"}},"type":"object"},"InputDescriptors":{"properties":{"constraints":{"$ref":"#/components/schemas/Constraints"},"group":{"items":{"description":"Group","type":"string"},"type":"array"},"id":{"description":"ID","type":"string"},"metadata":{"description":"Metadata dictionary","type":"object"},"name":{"description":"Name","type":"string"},"purpose":{"description":"Purpose","type":"string"},"schema":{"allOf":[{"$ref":"#/components/schemas/SchemasInputDescriptorFilter"}],"description":"Accepts a list of schema or a dict containing filters like oneof_filter."}},"type":"object"},"Constraints":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/DIFField"},"type":"array"},"is_holder":{"items":{"$ref":"#/components/schemas/DIFHolder"},"type":"array"},"limit_disclosure":{"description":"LimitDisclosure","type":"string"},"status_active":{"enum":["required","allowed","disallowed"],"type":"string"},"status_revoked":{"enum":["required","allowed","disallowed"],"type":"string"},"status_suspended":{"enum":["required","allowed","disallowed"],"type":"string"},"subject_is_issuer":{"description":"SubjectIsIssuer","enum":["required","preferred"],"type":"string"}},"type":"object"},"DIFField":{"properties":{"filter":{"$ref":"#/components/schemas/Filter"},"id":{"description":"ID","type":"string"},"path":{"items":{"description":"Path","type":"string"},"type":"array"},"predicate":{"description":"Preference","enum":["required","preferred"],"type":"string"},"purpose":{"description":"Purpose","type":"string"}},"type":"object"},"Filter":{"properties":{"const":{"description":"Const"},"enum":{"items":{"description":"Enum"},"type":"array"},"exclusiveMaximum":{"description":"ExclusiveMaximum"},"exclusiveMinimum":{"description":"ExclusiveMinimum"},"format":{"description":"Format","type":"string"},"maxLength":{"description":"Max Length","type":"integer"},"maximum":{"description":"Maximum"},"minLength":{"description":"Min Length","type":"integer"},"minimum":{"description":"Minimum"},"not":{"description":"Not","type":"boolean"},"pattern":{"description":"Pattern","type":"string"},"type":{"description":"Type","type":"string"}},"type":"object"},"DIFHolder":{"properties":{"directive":{"description":"Preference","enum":["required","preferred"],"type":"string"},"field_id":{"items":{"description":"FieldID","pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}","type":"string"},"type":"array"}},"type":"object"},"SchemasInputDescriptorFilter":{"properties":{"oneof_filter":{"description":"oneOf","type":"boolean"},"uri_groups":{"items":{"items":{"$ref":"#/components/schemas/SchemaInputDescriptor"},"type":"array"},"type":"array"}},"type":"object"},"SchemaInputDescriptor":{"properties":{"required":{"description":"Required","type":"boolean"},"uri":{"description":"URI","type":"string"}},"type":"object"},"SubmissionRequirements":{"properties":{"count":{"description":"Count Value","type":"integer"},"from":{"description":"From","type":"string"},"from_nested":{"items":{"$ref":"#/components/schemas/SubmissionRequirements"},"type":"array"},"max":{"description":"Max Value","type":"integer"},"min":{"description":"Min Value","type":"integer"},"name":{"description":"Name","type":"string"},"purpose":{"description":"Purpose","type":"string"},"rule":{"description":"Selection","enum":["all","pick"],"type":"string"}},"type":"object"},"IndyProofRequest":{"properties":{"name":{"description":"Proof request name","type":"string"},"non_revoked":{"$ref":"#/components/schemas/IndyProofRequestNonRevoked"},"nonce":{"description":"Nonce","pattern":"^[1-9][0-9]*$","type":"string"},"requested_attributes":{"additionalProperties":{"$ref":"#/components/schemas/IndyProofReqAttrSpec"},"description":"Requested attribute specifications of proof request","type":"object"},"requested_predicates":{"additionalProperties":{"$ref":"#/components/schemas/IndyProofReqPredSpec"},"description":"Requested predicate specifications of proof request","type":"object"},"version":{"description":"Proof request version","pattern":"^[0-9.]+$","type":"string"}},"required":["requested_attributes","requested_predicates"],"type":"object"},"IndyProofRequestNonRevoked":{"properties":{"from":{"description":"Earliest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"},"to":{"description":"Latest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"}},"type":"object"},"IndyProofReqAttrSpec":{"properties":{"name":{"description":"Attribute name","type":"string"},"names":{"description":"Attribute name group","items":{"type":"string"},"type":"array"},"non_revoked":{"$ref":"#/components/schemas/IndyProofReqAttrSpecNonRevoked"},"restrictions":{"description":"If present, credential must satisfy one of given restrictions: specify schema_id, schema_issuer_did, schema_name, schema_version, issuer_did, cred_def_id, and/or attr::<attribute-name>::value where <attribute-name> represents a credential attribute name","items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}},"type":"object"},"IndyProofReqAttrSpecNonRevoked":{"properties":{"from":{"description":"Earliest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"},"to":{"description":"Latest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"}},"type":"object"},"IndyProofReqPredSpec":{"properties":{"name":{"description":"Attribute name","type":"string"},"non_revoked":{"$ref":"#/components/schemas/IndyProofReqPredSpecNonRevoked"},"p_type":{"description":"Predicate type ('<', '<=', '>=', or '>')","enum":["<","<=",">=",">"],"type":"string"},"p_value":{"description":"Threshold value","type":"integer"},"restrictions":{"description":"If present, credential must satisfy one of given restrictions: specify schema_id, schema_issuer_did, schema_name, schema_version, issuer_did, cred_def_id, and/or attr::<attribute-name>::value where <attribute-name> represents a credential attribute name","items":{"additionalProperties":{"type":"string"},"type":"object"},"type":"array"}},"required":["name","p_type","p_value"],"type":"object"},"IndyProofReqPredSpecNonRevoked":{"properties":{"from":{"description":"Earliest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"},"to":{"description":"Latest time of interest in non-revocation interval","maximum":18446744073709552000,"minimum":0,"type":"integer"}},"type":"object"}}}}
```

#### Sample Request Body

The request body will depend on the credential; for our citizenship credential, this is a sample.

```json
{
    "auto_verify": false,
    "connection_id": "{{issuer-conn-id}}",
    "comment": "Proof request for json-ld credential.",
    "presentation_request": {
        "dif": {
            "options": {
                "challenge": "{{$randomUUID}}",
                "domain": "test-citizenship"
            },
            "presentation_definition": {
                "id": "{{$randomUUID}}",
                "format": {
                    "ldp_vp": {
                        "proof_type": [
                            "Ed25519Signature2020"
                        ]
                    }
                },
                "input_descriptors": [
                    {
                        "id": "citizenship_input_1",
                        "name": "EU Driver's License",
                        "schema": [
                            {
                                "uri": "https://www.w3.org/2018/credentials#VerifiableCredential"
                            },
                            {
                                "uri": "https://w3id.org/citizenship#PermanentResident"
                            }
                        ],
                        "constraints": {
                            "fields": [
                                {
                                    "path": [
                                        "$.credentialSubject.familyName"
                                    ],
                                    "purpose": "The claim must be from one of the specified issuers",
                                    "filter": {
                                        "const": "SMITH"
                                    }
                                },
                                {
                                    "path": [
                                        "$.credentialSubject.givenName"
                                    ],
                                    "filter": {
                                        "const": "ALICE"
                                    },
                                    "purpose": "The claim must be from one of the specified issuers"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    }
}
```

## Step 3: Holder sends Presentation Proof

Holder can get the stored credentials from own wallet and format a proof to send to the Verifier.

## POST /present-proof-2.0/records/{pres\_ex\_id}/send-presentation

> Sends a proof presentation

```json
{"openapi":"3.1.1","info":{"title":"cheqd","version":"v1.1.1"},"tags":[{"name":"present-proof v2.0","description":"Proof presentation v2.0"}],"paths":{"/present-proof-2.0/records/{pres_ex_id}/send-presentation":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V20PresExRecord"}}}}},"parameters":[{"in":"path","name":"pres_ex_id","type":"string","pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}","description":"Presentation exchange identifier","required":true}],"tags":["present-proof v2.0"],"summary":"Sends a proof presentation","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V20PresSpecByFormatRequest"}}},"required":false}}}},"components":{"schemas":{"V20PresExRecord":{"properties":{"auto_present":{"description":"Prover choice to auto-present proof as verifier requests","type":"boolean"},"auto_remove":{"description":"Verifier choice to remove this presentation exchange record when complete","type":"boolean"},"auto_verify":{"description":"Verifier choice to auto-verify proof presentation","type":"boolean"},"by_format":{"allOf":[{"$ref":"#/components/schemas/V20PresExRecordByFormat"}],"description":"Attachment content by format for proposal, request, and presentation","readOnly":true},"connection_id":{"description":"Connection identifier","type":"string"},"created_at":{"description":"Time of record creation","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"error_msg":{"description":"Error message","type":"string"},"initiator":{"description":"Present-proof exchange initiator: self or external","enum":["self","external"],"type":"string"},"pres":{"allOf":[{"$ref":"#/components/schemas/V20Pres"}],"description":"Presentation message"},"pres_ex_id":{"description":"Presentation exchange identifier","type":"string"},"pres_proposal":{"allOf":[{"$ref":"#/components/schemas/V20PresProposal"}],"description":"Presentation proposal message"},"pres_request":{"allOf":[{"$ref":"#/components/schemas/V20PresRequest"}],"description":"Presentation request message"},"role":{"description":"Present-proof exchange role: prover or verifier","enum":["prover","verifier"],"type":"string"},"state":{"description":"Present-proof exchange state","enum":["proposal-sent","proposal-received","request-sent","request-received","presentation-sent","presentation-received","done","abandoned","deleted"],"type":"string"},"thread_id":{"description":"Thread identifier","type":"string"},"trace":{"description":"Record trace information, based on agent configuration","type":"boolean"},"updated_at":{"description":"Time of last record update","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"verified":{"description":"Whether presentation is verified: 'true' or 'false'","enum":["true","false"],"type":"string"},"verified_msgs":{"items":{"description":"Proof verification warning or error information","type":"string"},"type":"array"}},"type":"object"},"V20PresExRecordByFormat":{"properties":{"pres":{"type":"object"},"pres_proposal":{"type":"object"},"pres_request":{"type":"object"}},"type":"object"},"V20Pres":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"presentations~attach":{"items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"}},"required":["formats","presentations~attach"],"type":"object"},"V20PresFormat":{"properties":{"attach_id":{"description":"Attachment identifier","type":"string"},"format":{"description":"Attachment format specifier","type":"string"}},"required":["attach_id","format"],"type":"object"},"AttachDecorator":{"properties":{"@id":{"description":"Attachment identifier","type":"string"},"byte_count":{"description":"Byte count of data included by reference","type":"integer"},"data":{"$ref":"#/components/schemas/AttachDecoratorData"},"description":{"description":"Human-readable description of content","type":"string"},"filename":{"description":"File name","type":"string"},"lastmod_time":{"description":"Hint regarding last modification datetime, in ISO-8601 format","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"mime-type":{"description":"MIME type","type":"string"}},"required":["data"],"type":"object"},"AttachDecoratorData":{"properties":{"base64":{"description":"Base64-encoded data","pattern":"^[a-zA-Z0-9+/]*={0,2}$","type":"string"},"json":{"description":"JSON-serialized data"},"jws":{"allOf":[{"$ref":"#/components/schemas/AttachDecoratorDataJWS"}],"description":"Detached Java Web Signature"},"links":{"description":"List of hypertext links to data","items":{"type":"string"},"type":"array"},"sha256":{"description":"SHA256 hash (binhex encoded) of content","pattern":"^[a-fA-F0-9+/]{64}$","type":"string"}},"type":"object"},"AttachDecoratorDataJWS":{"properties":{"header":{"$ref":"#/components/schemas/AttachDecoratorDataJWSHeader"},"protected":{"description":"protected JWS header","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signature":{"description":"signature","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signatures":{"description":"List of signatures","items":{"$ref":"#/components/schemas/AttachDecoratorData1JWS"},"type":"array"}},"type":"object"},"AttachDecoratorDataJWSHeader":{"properties":{"kid":{"description":"Key identifier, in W3C did:key or DID URL format","pattern":"^did:(?:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+|sov:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}(;.*)?(\\?.*)?#.+)$","type":"string"}},"required":["kid"],"type":"object"},"AttachDecoratorData1JWS":{"properties":{"header":{"$ref":"#/components/schemas/AttachDecoratorDataJWSHeader"},"protected":{"description":"protected JWS header","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signature":{"description":"signature","pattern":"^[-_a-zA-Z0-9]*$","type":"string"}},"required":["header","signature"],"type":"object"},"V20PresProposal":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"proposals~attach":{"description":"Attachment per acceptable format on corresponding identifier","items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"}},"required":["formats","proposals~attach"],"type":"object"},"V20PresRequest":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"request_presentations~attach":{"description":"Attachment per acceptable format on corresponding identifier","items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"},"will_confirm":{"description":"Whether verifier will send confirmation ack","type":"boolean"}},"required":["formats","request_presentations~attach"],"type":"object"},"V20PresSpecByFormatRequest":{"properties":{"anoncreds":{"allOf":[{"$ref":"#/components/schemas/IndyPresSpec"}],"description":"Presentation specification for anoncreds"},"auto_remove":{"description":"Whether to remove the presentation exchange record on completion (overrides --preserve-exchange-records configuration setting)","type":"boolean"},"dif":{"allOf":[{"$ref":"#/components/schemas/DIFPresSpec"}],"description":"Optional Presentation specification for DIF, overrides the PresentationExchange record's PresRequest"},"indy":{"allOf":[{"$ref":"#/components/schemas/IndyPresSpec"}],"description":"Presentation specification for indy"},"trace":{"description":"Record trace information, based on agent configuration","type":"boolean"}},"type":"object"},"IndyPresSpec":{"properties":{"requested_attributes":{"additionalProperties":{"$ref":"#/components/schemas/IndyRequestedCredsRequestedAttr"},"description":"Nested object mapping proof request attribute referents to requested-attribute specifiers","type":"object"},"requested_predicates":{"additionalProperties":{"$ref":"#/components/schemas/IndyRequestedCredsRequestedPred"},"description":"Nested object mapping proof request predicate referents to requested-predicate specifiers","type":"object"},"self_attested_attributes":{"additionalProperties":{"description":"Self-attested attribute values to use in requested-credentials structure for proof construction","type":"string"},"description":"Self-attested attributes to build into proof","type":"object"},"trace":{"description":"Whether to trace event (default false)","type":"boolean"}},"required":["requested_attributes","requested_predicates","self_attested_attributes"],"type":"object"},"IndyRequestedCredsRequestedAttr":{"properties":{"cred_id":{"description":"Wallet credential identifier (typically but not necessarily a UUID)","type":"string"},"revealed":{"description":"Whether to reveal attribute in proof (default true)","type":"boolean"}},"required":["cred_id"],"type":"object"},"IndyRequestedCredsRequestedPred":{"properties":{"cred_id":{"description":"Wallet credential identifier (typically but not necessarily a UUID)","type":"string"},"timestamp":{"description":"Epoch timestamp of interest for non-revocation proof","maximum":18446744073709552000,"minimum":0,"type":"integer"}},"required":["cred_id"],"type":"object"},"DIFPresSpec":{"properties":{"issuer_id":{"description":"Issuer identifier to sign the presentation, if different from current public DID","type":"string"},"presentation_definition":{"$ref":"#/components/schemas/PresentationDefinition"},"record_ids":{"description":"Mapping of input_descriptor id to list of stored W3C credential record_id","type":"object"},"reveal_doc":{"description":"reveal doc [JSON-LD frame] dict used to derive the credential when selective disclosure is required","type":"object"}},"type":"object"},"PresentationDefinition":{"properties":{"format":{"$ref":"#/components/schemas/ClaimFormat"},"id":{"description":"Unique Resource Identifier","pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}","type":"string"},"input_descriptors":{"items":{"$ref":"#/components/schemas/InputDescriptors"},"type":"array"},"name":{"description":"Human-friendly name that describes what the presentation definition pertains to","type":"string"},"purpose":{"description":"Describes the purpose for which the Presentation Definition's inputs are being requested","type":"string"},"submission_requirements":{"items":{"$ref":"#/components/schemas/SubmissionRequirements"},"type":"array"}},"type":"object"},"ClaimFormat":{"properties":{"di_vc":{"type":"object"},"jwt":{"type":"object"},"jwt_vc":{"type":"object"},"jwt_vp":{"type":"object"},"ldp":{"type":"object"},"ldp_vc":{"type":"object"},"ldp_vp":{"type":"object"}},"type":"object"},"InputDescriptors":{"properties":{"constraints":{"$ref":"#/components/schemas/Constraints"},"group":{"items":{"description":"Group","type":"string"},"type":"array"},"id":{"description":"ID","type":"string"},"metadata":{"description":"Metadata dictionary","type":"object"},"name":{"description":"Name","type":"string"},"purpose":{"description":"Purpose","type":"string"},"schema":{"allOf":[{"$ref":"#/components/schemas/SchemasInputDescriptorFilter"}],"description":"Accepts a list of schema or a dict containing filters like oneof_filter."}},"type":"object"},"Constraints":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/DIFField"},"type":"array"},"is_holder":{"items":{"$ref":"#/components/schemas/DIFHolder"},"type":"array"},"limit_disclosure":{"description":"LimitDisclosure","type":"string"},"status_active":{"enum":["required","allowed","disallowed"],"type":"string"},"status_revoked":{"enum":["required","allowed","disallowed"],"type":"string"},"status_suspended":{"enum":["required","allowed","disallowed"],"type":"string"},"subject_is_issuer":{"description":"SubjectIsIssuer","enum":["required","preferred"],"type":"string"}},"type":"object"},"DIFField":{"properties":{"filter":{"$ref":"#/components/schemas/Filter"},"id":{"description":"ID","type":"string"},"path":{"items":{"description":"Path","type":"string"},"type":"array"},"predicate":{"description":"Preference","enum":["required","preferred"],"type":"string"},"purpose":{"description":"Purpose","type":"string"}},"type":"object"},"Filter":{"properties":{"const":{"description":"Const"},"enum":{"items":{"description":"Enum"},"type":"array"},"exclusiveMaximum":{"description":"ExclusiveMaximum"},"exclusiveMinimum":{"description":"ExclusiveMinimum"},"format":{"description":"Format","type":"string"},"maxLength":{"description":"Max Length","type":"integer"},"maximum":{"description":"Maximum"},"minLength":{"description":"Min Length","type":"integer"},"minimum":{"description":"Minimum"},"not":{"description":"Not","type":"boolean"},"pattern":{"description":"Pattern","type":"string"},"type":{"description":"Type","type":"string"}},"type":"object"},"DIFHolder":{"properties":{"directive":{"description":"Preference","enum":["required","preferred"],"type":"string"},"field_id":{"items":{"description":"FieldID","pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}","type":"string"},"type":"array"}},"type":"object"},"SchemasInputDescriptorFilter":{"properties":{"oneof_filter":{"description":"oneOf","type":"boolean"},"uri_groups":{"items":{"items":{"$ref":"#/components/schemas/SchemaInputDescriptor"},"type":"array"},"type":"array"}},"type":"object"},"SchemaInputDescriptor":{"properties":{"required":{"description":"Required","type":"boolean"},"uri":{"description":"URI","type":"string"}},"type":"object"},"SubmissionRequirements":{"properties":{"count":{"description":"Count Value","type":"integer"},"from":{"description":"From","type":"string"},"from_nested":{"items":{"$ref":"#/components/schemas/SubmissionRequirements"},"type":"array"},"max":{"description":"Max Value","type":"integer"},"min":{"description":"Min Value","type":"integer"},"name":{"description":"Name","type":"string"},"purpose":{"description":"Purpose","type":"string"},"rule":{"description":"Selection","enum":["all","pick"],"type":"string"}},"type":"object"}}}}
```

**Request Body**

For our citizenship credential example, the following is a sample request body.

```postman_json
{
    "dif": {
        "issuer_id": "{{issuer-did}}",
        "presentation_definition": {
            "id": "6d55f3ac-1dae-4306-a4bf-cf4fb93138b7",
            "format": {
                "ldp_vp": {
                    "proof_type": [
                        "Ed25519Signature2020"
                    ]
                }
            },
            "input_descriptors": [
                {
                    "id": "citizenship_input_1",
                    "name": "EU Driver's License",
                    "schema": [
                        {
                            "uri": "https://www.w3.org/2018/credentials#VerifiableCredential"
                        },
                        {
                            "uri": "https://w3id.org/citizenship#PermanentResident"
                        }
                    ],
                    "constraints": {
                        "fields": [
                            {
                                "path": [
                                    "$.credentialSubject.familyName"
                                ],
                                "purpose": "The claim must be from one of the specified issuers",
                                "filter": {
                                    "const": "SMITH"
                                }
                            },
                            {
                                "path": [
                                    "$.credentialSubject.givenName"
                                ],
                                "filter": {
                                    "const": "ALICE"
                                },
                                "purpose": "The claim must be from one of the specified issuers"
                            }
                        ]
                    }
                }
            ]
        }
    }
}
```

## Step 4: Verifier verifies Presentation

Verifier receives the presentation via the connection, and can use the following API to verify. The response must have `verified: true` .

## POST /present-proof-2.0/records/{pres\_ex\_id}/verify-presentation

> Verify a received presentation

```json
{"openapi":"3.1.1","info":{"title":"cheqd","version":"v1.1.1"},"tags":[{"name":"present-proof v2.0","description":"Proof presentation v2.0"}],"paths":{"/present-proof-2.0/records/{pres_ex_id}/verify-presentation":{"post":{"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V20PresExRecord"}}}}},"parameters":[{"in":"path","name":"pres_ex_id","type":"string","pattern":"[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}","description":"Presentation exchange identifier","required":true}],"tags":["present-proof v2.0"],"summary":"Verify a received presentation"}}},"components":{"schemas":{"V20PresExRecord":{"properties":{"auto_present":{"description":"Prover choice to auto-present proof as verifier requests","type":"boolean"},"auto_remove":{"description":"Verifier choice to remove this presentation exchange record when complete","type":"boolean"},"auto_verify":{"description":"Verifier choice to auto-verify proof presentation","type":"boolean"},"by_format":{"allOf":[{"$ref":"#/components/schemas/V20PresExRecordByFormat"}],"description":"Attachment content by format for proposal, request, and presentation","readOnly":true},"connection_id":{"description":"Connection identifier","type":"string"},"created_at":{"description":"Time of record creation","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"error_msg":{"description":"Error message","type":"string"},"initiator":{"description":"Present-proof exchange initiator: self or external","enum":["self","external"],"type":"string"},"pres":{"allOf":[{"$ref":"#/components/schemas/V20Pres"}],"description":"Presentation message"},"pres_ex_id":{"description":"Presentation exchange identifier","type":"string"},"pres_proposal":{"allOf":[{"$ref":"#/components/schemas/V20PresProposal"}],"description":"Presentation proposal message"},"pres_request":{"allOf":[{"$ref":"#/components/schemas/V20PresRequest"}],"description":"Presentation request message"},"role":{"description":"Present-proof exchange role: prover or verifier","enum":["prover","verifier"],"type":"string"},"state":{"description":"Present-proof exchange state","enum":["proposal-sent","proposal-received","request-sent","request-received","presentation-sent","presentation-received","done","abandoned","deleted"],"type":"string"},"thread_id":{"description":"Thread identifier","type":"string"},"trace":{"description":"Record trace information, based on agent configuration","type":"boolean"},"updated_at":{"description":"Time of last record update","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"verified":{"description":"Whether presentation is verified: 'true' or 'false'","enum":["true","false"],"type":"string"},"verified_msgs":{"items":{"description":"Proof verification warning or error information","type":"string"},"type":"array"}},"type":"object"},"V20PresExRecordByFormat":{"properties":{"pres":{"type":"object"},"pres_proposal":{"type":"object"},"pres_request":{"type":"object"}},"type":"object"},"V20Pres":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"presentations~attach":{"items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"}},"required":["formats","presentations~attach"],"type":"object"},"V20PresFormat":{"properties":{"attach_id":{"description":"Attachment identifier","type":"string"},"format":{"description":"Attachment format specifier","type":"string"}},"required":["attach_id","format"],"type":"object"},"AttachDecorator":{"properties":{"@id":{"description":"Attachment identifier","type":"string"},"byte_count":{"description":"Byte count of data included by reference","type":"integer"},"data":{"$ref":"#/components/schemas/AttachDecoratorData"},"description":{"description":"Human-readable description of content","type":"string"},"filename":{"description":"File name","type":"string"},"lastmod_time":{"description":"Hint regarding last modification datetime, in ISO-8601 format","pattern":"^\\d{4}-\\d\\d-\\d\\d[T ]\\d\\d:\\d\\d(?:\\:(?:\\d\\d(?:\\.\\d{1,6})?))?(?:[+-]\\d\\d:?\\d\\d|Z|)$","type":"string"},"mime-type":{"description":"MIME type","type":"string"}},"required":["data"],"type":"object"},"AttachDecoratorData":{"properties":{"base64":{"description":"Base64-encoded data","pattern":"^[a-zA-Z0-9+/]*={0,2}$","type":"string"},"json":{"description":"JSON-serialized data"},"jws":{"allOf":[{"$ref":"#/components/schemas/AttachDecoratorDataJWS"}],"description":"Detached Java Web Signature"},"links":{"description":"List of hypertext links to data","items":{"type":"string"},"type":"array"},"sha256":{"description":"SHA256 hash (binhex encoded) of content","pattern":"^[a-fA-F0-9+/]{64}$","type":"string"}},"type":"object"},"AttachDecoratorDataJWS":{"properties":{"header":{"$ref":"#/components/schemas/AttachDecoratorDataJWSHeader"},"protected":{"description":"protected JWS header","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signature":{"description":"signature","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signatures":{"description":"List of signatures","items":{"$ref":"#/components/schemas/AttachDecoratorData1JWS"},"type":"array"}},"type":"object"},"AttachDecoratorDataJWSHeader":{"properties":{"kid":{"description":"Key identifier, in W3C did:key or DID URL format","pattern":"^did:(?:key:z[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]+|sov:[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{21,22}(;.*)?(\\?.*)?#.+)$","type":"string"}},"required":["kid"],"type":"object"},"AttachDecoratorData1JWS":{"properties":{"header":{"$ref":"#/components/schemas/AttachDecoratorDataJWSHeader"},"protected":{"description":"protected JWS header","pattern":"^[-_a-zA-Z0-9]*$","type":"string"},"signature":{"description":"signature","pattern":"^[-_a-zA-Z0-9]*$","type":"string"}},"required":["header","signature"],"type":"object"},"V20PresProposal":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"proposals~attach":{"description":"Attachment per acceptable format on corresponding identifier","items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"}},"required":["formats","proposals~attach"],"type":"object"},"V20PresRequest":{"properties":{"@id":{"description":"Message identifier","type":"string"},"@type":{"description":"Message type","type":"string"},"comment":{"description":"Human-readable comment","type":"string"},"formats":{"description":"Acceptable attachment formats","items":{"$ref":"#/components/schemas/V20PresFormat"},"type":"array"},"request_presentations~attach":{"description":"Attachment per acceptable format on corresponding identifier","items":{"$ref":"#/components/schemas/AttachDecorator"},"type":"array"},"will_confirm":{"description":"Whether verifier will send confirmation ack","type":"boolean"}},"required":["formats","request_presentations~attach"],"type":"object"}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cheqd.io/product/sdk/aca-py/credentials/json-ld/present-credential.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
