For the complete documentation index, see llms.txt. This page is also available as Markdown.

Index

Get CredentialRecords index

post

This endpoint allows the user to query their CredentialRecords index

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
limitnumberOptionalDefault: 25
cursorstringOptional
queryany ofOptional
or
encryptbooleanOptionalDefault: true
sortstring · enumOptionalDefault: newestFirstPossible values:
includeAssociatedDidsbooleanOptionalDefault: true
Responses
200

Successful response

application/json
or
post/index/get
POST /api/index/get HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 140

{
  "limit": 25,
  "cursor": "text",
  "query": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "encrypt": true,
  "sort": "newestFirst",
  "includeAssociatedDids": true
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "encryptedRecord": {
        "protected": "text",
        "iv": "text",
        "ciphertext": "text",
        "tag": "text",
        "aad": "text",
        "recipients": [
          {
            "header": {
              "alg": "text",
              "iv": "text",
              "tag": "text",
              "epk": {
                "kty": "text",
                "crv": "text",
                "x": "text",
                "y": "text",
                "n": "text",
                "d": "text"
              },
              "kid": "text",
              "apv": "text",
              "apu": "text"
            },
            "encrypted_key": "text"
          }
        ]
      },
      "fields": [
        "text"
      ],
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ]
}

Count records in index for query

post

This endpoint allows the user to see how many records they have in their index for a query

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
queryany ofOptional
or
encryptbooleanOptionalDefault: true
includeAssociatedDidsbooleanOptionalDefault: true
Responses
200

Successful response

application/json
integer · max: 9007199254740991Optional
or
post/index/count
POST /api/index/count HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 92

{
  "query": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "encrypt": true,
  "includeAssociatedDids": true
}
1

Add to index

post

This endpoint adds a CredentialRecord to the user's index

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
recordany ofRequired
or
Responses
200

Successful response

application/json
booleanOptional
post/index/add
POST /api/index/add HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 370

{
  "record": {
    "encryptedRecord": {
      "protected": "text",
      "iv": "text",
      "ciphertext": "text",
      "tag": "text",
      "aad": "text",
      "recipients": [
        {
          "header": {
            "alg": "text",
            "iv": "text",
            "tag": "text",
            "epk": {
              "kty": "text",
              "crv": "text",
              "x": "text",
              "y": "text",
              "n": "text",
              "d": "text"
            },
            "kid": "text",
            "apv": "text",
            "apu": "text"
          },
          "encrypted_key": "text"
        }
      ]
    },
    "fields": [
      "text"
    ],
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
true

Add many to index

post

This endpoint adds multiple CredentialRecords to the user's index

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
recordsany ofRequired
or
Responses
200

Successful response

application/json
booleanOptional
post/index/addMany
POST /api/index/addMany HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 373

{
  "records": [
    {
      "encryptedRecord": {
        "protected": "text",
        "iv": "text",
        "ciphertext": "text",
        "tag": "text",
        "aad": "text",
        "recipients": [
          {
            "header": {
              "alg": "text",
              "iv": "text",
              "tag": "text",
              "epk": {
                "kty": "text",
                "crv": "text",
                "x": "text",
                "y": "text",
                "n": "text",
                "d": "text"
              },
              "kid": "text",
              "apv": "text",
              "apu": "text"
            },
            "encrypted_key": "text"
          }
        ]
      },
      "fields": [
        "text"
      ],
      "ANY_ADDITIONAL_PROPERTY": "anything"
    }
  ]
}
true

Deletes a CredentialRecord

delete

This endpoint deletes a CredentialRecord

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Responses
200

Successful response

application/json
booleanOptional
delete/index/{id}
DELETE /api/index/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true

Update a CredentialRecord

patch

This endpoint updates a CredentialRecord

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired
Body
updatesany ofRequired
or
Responses
200

Successful response

application/json
booleanOptional
patch/index/{id}
PATCH /api/index/{id} HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 383

{
  "updates": {
    "encryptedRecord": {
      "protected": "text",
      "iv": "text",
      "ciphertext": "text",
      "tag": "text",
      "aad": "text",
      "recipients": [
        {
          "header": {
            "alg": "text",
            "iv": "text",
            "tag": "text",
            "epk": {
              "kty": "text",
              "crv": "text",
              "x": "text",
              "y": "text",
              "n": "text",
              "d": "text"
            },
            "kid": "text",
            "apv": "text",
            "apu": "text"
          },
          "encrypted_key": "text"
        }
      ]
    },
    "fields": [
      "text"
    ],
    "id": "text",
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
true

Deletes all CredentialRecords

delete

This endpoint deletes all CredentialRecords

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Successful response

application/json
booleanOptional
delete/index
DELETE /api/index HTTP/1.1
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true

Last updated

Was this helpful?