Schema

List all credential schemas

get

Retrieves all credential schemas

Query parameters
typestringOptional

Filter by schema type

namestringOptional

Filter by schema name

versionnumber · doubleOptional

Filter by schema version

sortBystring · enumOptional

Sort field

Possible values:
sortOrderstring · enumOptional

Sort order

Possible values:
Responses
200
Found
application/json
get
GET /v1/schemas HTTP/1.1
Host: api
Accept: */*
[
  {
    "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
    "type": "https://schema.org/DriverLicense",
    "name": "DriverLicense",
    "version": 1,
    "schemaUri": "https://example.com/schemas/driver-license"
  },
  {
    "id": "5f2e7ddc-2b95-4b84-a7b8-1a87f1795c89",
    "type": "https://schema.org/Person",
    "name": "Person",
    "version": 2,
    "schemaUri": "https://example.com/schemas/person"
  }
]

Create a new credential schema

post

Creates a new credential schema

Authorizations
Body

Schema definition including name, type, version and credential subject

namestringRequired

Name of the schema

Example: DriverLicense
typestringRequired

Type of the schema

Example: https://schema.org/DriverLicense
versionnumber · doubleOptional

Schema version

Example: 1
Responses
201
Created
application/json
post
POST /v1/schemas HTTP/1.1
Host: api
x-client-secret: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 148

{
  "name": "DriverLicense",
  "type": "https://schema.org/DriverLicense",
  "version": 1,
  "credentialSubject": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    }
  }
}
{
  "id": "d290f1ee-6c54-4b01-90e6-d701748f0851",
  "type": "https://schema.org/DriverLicense",
  "name": "DriverLicense",
  "version": 1,
  "schemaUri": "https://example.com/schemas/driver-license"
}

Get a schema by ID

get

Retrieves a specific credential schema by ID

Path parameters
idstringRequired

Schema ID to retrieve

Responses
200
Found
application/json
Responseobject
get
GET /v1/schemas/{id} HTTP/1.1
Host: api
Accept: */*
{
  "$id": "https://example.com/schemas/driver-license",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "dateOfBirth": {
      "type": "string",
      "format": "date"
    },
    "licenseClass": {
      "type": "string",
      "enum": [
        "A",
        "B",
        "C",
        "D"
      ]
    }
  },
  "required": [
    "id",
    "name",
    "licenseClass"
  ]
}

Delete a schema by ID

delete

Deletes a specific credential schema

Authorizations
Path parameters
idstringRequired

Schema ID to delete

Responses
204
No Content
delete
DELETE /v1/schemas/{id} HTTP/1.1
Host: api
x-client-secret: YOUR_API_KEY
Accept: */*

No content