Skip to content

Improve API Documentation for Anoncreds  #232

Open

Description

@mineme0110

https://discord.com/channels/905194001349627914/1252629630763012116/1420415377212571648

The documentation for creating an Anoncreds Presentation Request is currently incomplete and somewhat misleading. The example payload shown in the tutorial
does not align with what the API actually expects in release v2.0.0.

Issues identified:

Missing proofs field
The request body must include a top-level proofs attribute (an array), even if it is empty.
Without this field, the API returns:

400 RequestBodyDecodingFailure (missing at 'proofs')

This requirement is not mentioned in the tutorial, so users following it will consistently encounter this error.

Incorrect cred_def_id format
The documentation shows cred_def_id as a simple identifier (e.g. 3fc80ccf-d8da-3215-a626-8712f73d5101).
In practice, the API requires a full URL to the credential definition, such as:

${agent.url}/credential-definition-registry/definitions/${anoncredGuid}/definition

Without the correct format, proof requests cannot be resolved.

Recommendation:
The API and Swagger docs should clearly define the expected formats for cred_def_id, schema_id, and other fields. This would make error messages (such as Bad Request) more meaningful and significantly reduce confusion for developers.

Activity

  1. changed the title [-]Anoncreds documentation API documentation[/-] [+]Improve API Documentation for Anoncreds [/+] on Sep 25, 2025
  2. added
    documentation
    on Sep 25, 2025
  3. TheSeydiCharyyev commented on Jun 16, 2026

    @TheSeydiCharyyev
    Member

    Fixed in hyperledger-identus/cloud-agent#1810 (merged) — the AnonCreds present-proof example now includes the required proofs field and uses the full registry URLs for cred_def_id and schema_id.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions