API Documentation

List DID Methods

GET /api/v1/did-methods

Get a paginated list of DID (Decentralized Identifier) methods with optional search and project inclusion. Each DID method represents a specific implementation of the W3C DID specification.

Request

Query Parameters

Parameter Type Required Default Description
page integer No 1 Page number (1-indexed)
per_page integer No 20 Results per page (1-100)
q string No - Search text for DID method names (without "did:" prefix)
include_projects boolean No false Include list of projects using each DID method

Example Requests

bash
# Get first page of DID methods
curl -X GET "https://www.weboftrust.org/api/v1/did-methods" \
  -H "X-API-Key: YOUR_API_KEY"

# Search for "ethr" DID method
curl -X GET "https://www.weboftrust.org/api/v1/did-methods?q=ethr" \
  -H "X-API-Key: YOUR_API_KEY"

# Get DID methods with their implementing projects
curl -X GET "https://www.weboftrust.org/api/v1/did-methods?include_projects=true" \
  -H "X-API-Key: YOUR_API_KEY"

# Get page 2 with 50 results per page
curl -X GET "https://www.weboftrust.org/api/v1/did-methods?page=2&per_page=50" \
  -H "X-API-Key: YOUR_API_KEY"

Response

Success Response (200 OK)

Response Schema

typescript
interface DidMethodListResponse {
  data: DidMethodSummary[];
  pagination: {
    page: number;       // Current page (1-indexed)
    per_page: number;   // Items per page
    total: number;      // Total number of DID methods
    total_pages: number; // Total number of pages
  };
}

interface DidMethodSummary {
  id: number;
  name: string;                    // DID method name (without "did:" prefix)
  specification_url?: string;      // URL to method specification
  contact_name?: string;           // Organization/person maintaining the method
  contact_website?: string;        // Contact website
  project_count: string;           // Number of projects using this method (as string)
  source?: string;                 // Live source URL
  archived_source?: string;        // Archived source URL
  projects?: ProjectUsage[];       // Only included when include_projects=true
}

interface ProjectUsage {
  id: number;
  title: string;
  type: "DID Project" | "Consortium";
  status?: string;
  source?: string;          // URL confirming project uses this DID method
  archived_source?: string;
  excerpt?: string;         // Text snippet explaining the usage
}

Example Response (without projects)

json
{
  "data": [
    {
      "id": 1738169370023,
      "name": "3",
      "specification_url": "https://cips.ceramic.network/CIPs/cip-79",
      "contact_name": "3Box Labs",
      "contact_website": "https://3boxlabs.com/",
      "project_count": "0",
      "source": "https://diddirectory.com/",
      "archived_source": null
    },
    {
      "id": 1738169371476,
      "name": "ethr",
      "specification_url": "https://github.com/decentralized-identity/ethr-did-resolver/blob/master/doc/did-method-spec.md",
      "contact_name": "ConsenSys",
      "contact_website": "https://consensys.net/",
      "project_count": "5",
      "source": "https://diddirectory.com/",
      "archived_source": null
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 2,
    "total": 207,
    "total_pages": 104
  }
}

Example Response (with projects)

json
{
  "data": [
    {
      "id": 1738169371476,
      "name": "ethr",
      "specification_url": "https://github.com/decentralized-identity/ethr-did-resolver/blob/master/doc/did-method-spec.md",
      "contact_name": "ConsenSys",
      "contact_website": "https://consensys.net/",
      "project_count": "5",
      "source": "https://diddirectory.com/",
      "archived_source": null,
      "projects": [
        {
          "id": 118,
          "title": "TradeTrust",
          "type": "DID Project",
          "status": "Launched",
          "source": "https://github.com/tradetrust/documentation",
          "archived_source": null,
          "excerpt": "TradeTrust uses did:ethr for decentralized identity management."
        },
        {
          "id": 237,
          "title": "uPort",
          "type": "DID Project",
          "status": "Discontinued",
          "source": "https://github.com/uport-project/ethr-did",
          "archived_source": null,
          "excerpt": "uPort pioneered the use of did:ethr for self-sovereign identity."
        }
      ]
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 1,
    "total": 207,
    "total_pages": 207
  }
}

Error Responses

400 Bad Request

Invalid query parameters

json
{
  "error": {
    "code": "invalid_parameter",
    "message": "Invalid page parameter"
  }
}

500 Internal Server Error

json
{
  "error": {
    "code": "internal_error",
    "message": "Failed to fetch DID methods"
  }
}

DID Method Naming

DID methods follow the W3C DID specification naming convention:

  • Methods are identified by their name without the "did:" prefix
  • Full DID format: did:{method}:{method-specific-id}
  • Example: did:ethr:0x1234... uses the "ethr" method
  • Search for methods without the prefix (search for "ethr" not "did:ethr")

Some commonly used DID methods include:

  • ethr - Ethereum-based DIDs
  • web - Web-hosted DIDs
  • key - Key-based DIDs
  • ion - ION (Identity Overlay Network) DIDs
  • sov - Sovrin DIDs
  • indy - Hyperledger Indy DIDs
  • pkh - Public Key Hash DIDs
  • polygon - Polygon blockchain DIDs

Data Sources

DID method data is aggregated from:

  • W3C DID Registry
  • DID Directory (diddirectory.com)
  • Project documentation and implementations
  • Method specification repositories

Performance Considerations

  • Setting include_projects=true increases response size significantly
  • Use pagination to manage large result sets
  • Results are cached for performance
  • The project_count field is returned as a string for compatibility