LearnCard Documentation
GithubStatusSupportLaunch App
  • 🚀Introduction
    • What is LearnCard?
    • Use Cases & Possibilities
    • Ecosystem Architecture
  • ⚡Quick Start
    • Setup & Prerequisites
    • Your First Integration
  • 📚Tutorials
    • Create a Credential
    • Create a Boost
    • Create a ConsentFlow
    • Create a Connected Website
    • Send xAPI Statements
    • Listen to Webhooks
  • ✅How-To Guides
    • Verify My Issuer
    • Connect Systems
      • Connect a Website
      • Connect a Game
    • Implement Flows
      • Claim Data after Guardian Consent
      • Connect via CHAPI
        • ⭐CHAPI Wallet Setup Guide
        • ↔️Translating to CHAPI documentation
        • 🖥️Demo Application
        • 🔰Using LearnCard to Interact with a CHAPI Wallet
        • 📝Cheat Sheets
          • Issuers
          • Wallets
    • Deploy Infrastructure
      • Remote Key Management
      • Generate API Tokens
      • Signing Authority
      • Connect to Independent Network
      • Build a Plugin
  • 🛠️SDKs & API Reference
    • LearnCard Wallet SDK
      • Authentication
      • Usage Examples
      • SDK Reference
      • Plugin API Reference
      • Integration Strategies
      • Deployment
      • Troubleshooting
      • Changelog
    • LearnCloud Network API
      • Authentication
      • Usage Examples
      • Architecture
      • Notifications & Webhooks
      • Profiles
      • Profile Managers
      • Credentials
      • Boosts
      • Presentations
      • Storage
      • Contracts
      • DID Metadata
      • Claim Hooks
      • Auth Grants
      • Utilities
      • Models
      • OpenAPI
    • LearnCloud Storage API
      • Authentication
      • Usage Examples
      • Architecture
      • Storage
      • Index
      • User
      • Custom Storage
      • Utilities
      • Models
      • xAPI Reference
    • Plugins
      • Crypto
      • DIDKit
      • DID Key
      • Dynamic Loader
      • VC
        • Expiration Sub-Plugin
      • VC-Templates
      • VC-API
      • Ceramic
      • IDX
      • VPQR
      • Ethereum
      • CHAPI
      • LearnCard Network
      • LearnCloud
      • LearnCard
      • Simple Signing
      • Claimable Boosts
    • LearnCard CLI
  • 🧠Core Concepts
    • Identities & Keys
      • Decentralized Identifiers (DIDs)
      • Seed Phrases
      • Network Profiles
      • Signing Authorities
      • Trust Registries
    • Credentials & Data
      • Verifiable Credentials (VCs)
      • Credential Lifecycle
      • Schemas, Types, & Categories
      • Building Verifiable Credentials
      • Boost Credentials
      • Getting Started with Boosts
      • Credential URIs
      • xAPI Data
      • General Best Practices & Troubleshooting
    • Consent & Permissions
      • ConsentFlow Overview
      • Consent Contracts
      • User Consent & Terms
      • Consent Transactions
      • Auto-Boosts
      • Writing Consented Data
      • Accessing Consented Data
      • GameFlow Overview
    • Network & Interactions
      • Network Vision & Principles
      • Key Network Procedures
      • Core Interaction Workflows
    • Architecture & Principles
      • Control Planes
      • Plugin System
      • Auth Grants and API Tokens
  • 🔗Development
    • Contributing
Powered by GitBook
On this page

Was this helpful?

  1. SDKs & API Reference
  2. LearnCloud Network API

Contracts

PreviousStorageNextDID Metadata

Was this helpful?

🛠️

Delete a Consent Flow Contract

delete

This route deletes a Consent Flow Contract

Authorizations
Query parameters
uristringRequired
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
delete
DELETE /api/consent-flow-contract?uri=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true

Deletes Contract Terms

delete

Withdraws consent by deleting Contract Terms

Authorizations
Query parameters
uristringRequired
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
delete
DELETE /api/consent-flow-contract/consent/withdraw?uri=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true

Verifies that a profile has consented to a contract

get

Checks if a profile has consented to the specified contract

Authorizations
Query parameters
uristringRequired
profileIdstringRequired
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
get
GET /api/consent-flow-contract/verify?uri=text&profileId=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
true
  • GETGet Consent Flow Contracts
  • POSTCreate Consent Flow Contract
  • DELETEDelete a Consent Flow Contract
  • POSTGet Consent Flow Contracts
  • POSTGet the data that has been consented for a contract
  • POSTGet the data that has been consented by a did
  • POSTGet the data that has been consented for all of your contracts
  • POSTWrites a boost credential to a did that has consented to a contract
  • POSTWrite credential through signing authority for a DID consented to a contract
  • POSTConsent To Contract
  • POSTGets Consented Contracts
  • POSTUpdates Contract Terms
  • DELETEDeletes Contract Terms
  • POSTGets Transaction History
  • GETVerifies that a profile has consented to a contract
  • POSTSync credentials to a contract
  • POSTGet credentials issued via a contract
  • POSTGet all credentials written to any terms
  • POSTAdd autoboosts to a contract
  • POSTRemove autoboosts from a contract

Get Consent Flow Contracts

get

Gets Consent Flow Contract Details

Authorizations
Query parameters
uristringRequired
Responses
200
Successful response
application/json
default
Error response
application/json
get
GET /api/consent-flow-contract?uri=text HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "contract": {
    "read": {
      "anonymize": true,
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "required": true
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": {
          "required": true
        }
      }
    },
    "write": {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "required": true
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": {
          "required": true
        }
      }
    }
  },
  "owner": {
    "profileId": "text",
    "displayName": "",
    "shortBio": "",
    "bio": "",
    "did": "text",
    "isPrivate": true,
    "email": "text",
    "image": "text",
    "heroImage": "text",
    "websiteLink": "text",
    "isServiceProfile": false,
    "type": "text",
    "notificationsWebhook": "https://example.com",
    "display": {
      "backgroundColor": "text",
      "backgroundImage": "text",
      "fadeBackgroundImage": true,
      "repeatBackgroundImage": true,
      "fontColor": "text",
      "accentColor": "text",
      "accentFontColor": "text",
      "idBackgroundImage": "text",
      "fadeIdBackgroundImage": true,
      "idBackgroundColor": "text",
      "repeatIdBackgroundImage": true
    },
    "role": "",
    "dob": ""
  },
  "name": "text",
  "subtitle": "text",
  "description": "text",
  "reasonForAccessing": "text",
  "image": "text",
  "uri": "text",
  "needsGuardianConsent": true,
  "redirectUrl": "text",
  "frontDoorBoostUri": "text",
  "createdAt": "text",
  "updatedAt": "text",
  "expiresAt": "text",
  "autoBoosts": [
    "text"
  ],
  "writers": [
    {
      "profileId": "text",
      "displayName": "",
      "shortBio": "",
      "bio": "",
      "did": "text",
      "isPrivate": true,
      "email": "text",
      "image": "text",
      "heroImage": "text",
      "websiteLink": "text",
      "isServiceProfile": false,
      "type": "text",
      "notificationsWebhook": "https://example.com",
      "display": {
        "backgroundColor": "text",
        "backgroundImage": "text",
        "fadeBackgroundImage": true,
        "repeatBackgroundImage": true,
        "fontColor": "text",
        "accentColor": "text",
        "accentFontColor": "text",
        "idBackgroundImage": "text",
        "fadeIdBackgroundImage": true,
        "idBackgroundColor": "text",
        "repeatIdBackgroundImage": true
      },
      "role": "",
      "dob": ""
    }
  ]
}

Create Consent Flow Contract

post

Creates a Consent Flow Contract for a profile

Authorizations
Body
namestringRequired
subtitlestringOptional
descriptionstringOptional
reasonForAccessingstringOptional
needsGuardianConsentbooleanOptional
redirectUrlstringOptional
frontDoorBoostUristringOptional
imagestringOptional
expiresAtstringOptional
writersstring[]Optional
Responses
200
Successful response
application/json
Responsestring
default
Error response
application/json
post
POST /api/consent-flow-contract HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 612

{
  "contract": {
    "read": {
      "anonymize": true,
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "required": true
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": {
          "required": true
        }
      }
    },
    "write": {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "required": true
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": {
          "required": true
        }
      }
    }
  },
  "name": "text",
  "subtitle": "text",
  "description": "text",
  "reasonForAccessing": "text",
  "needsGuardianConsent": true,
  "redirectUrl": "text",
  "frontDoorBoostUri": "text",
  "image": "text",
  "expiresAt": "text",
  "autoboosts": [
    {
      "boostUri": "text",
      "signingAuthority": {
        "endpoint": "text",
        "name": "text"
      }
    }
  ],
  "writers": [
    "text"
  ]
}
text

Get Consent Flow Contracts

post

Gets Consent Flow Contracts for a profile

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contracts HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 352

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "query": {
    "read": {
      "anonymize": true,
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "required": true
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": {
          "required": true
        }
      }
    },
    "write": {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "required": true
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": {
          "required": true
        }
      }
    }
  }
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "contract": {
        "read": {
          "anonymize": true,
          "credentials": {
            "categories": {
              "ANY_ADDITIONAL_PROPERTY": {
                "required": true
              }
            }
          },
          "personal": {
            "ANY_ADDITIONAL_PROPERTY": {
              "required": true
            }
          }
        },
        "write": {
          "credentials": {
            "categories": {
              "ANY_ADDITIONAL_PROPERTY": {
                "required": true
              }
            }
          },
          "personal": {
            "ANY_ADDITIONAL_PROPERTY": {
              "required": true
            }
          }
        }
      },
      "name": "text",
      "subtitle": "text",
      "description": "text",
      "reasonForAccessing": "text",
      "image": "text",
      "uri": "text",
      "needsGuardianConsent": true,
      "redirectUrl": "text",
      "frontDoorBoostUri": "text",
      "createdAt": "text",
      "updatedAt": "text",
      "expiresAt": "text",
      "autoBoosts": [
        "text"
      ],
      "writers": [
        {
          "profileId": "text",
          "displayName": "",
          "shortBio": "",
          "bio": "",
          "did": "text",
          "isPrivate": true,
          "email": "text",
          "image": "text",
          "heroImage": "text",
          "websiteLink": "text",
          "isServiceProfile": false,
          "type": "text",
          "notificationsWebhook": "https://example.com",
          "display": {
            "backgroundColor": "text",
            "backgroundImage": "text",
            "fadeBackgroundImage": true,
            "repeatBackgroundImage": true,
            "fontColor": "text",
            "accentColor": "text",
            "accentFontColor": "text",
            "idBackgroundImage": "text",
            "fadeIdBackgroundImage": true,
            "idBackgroundColor": "text",
            "repeatIdBackgroundImage": true
          },
          "role": "",
          "dob": ""
        }
      ]
    }
  ]
}

Get the data that has been consented for a contract

post

This route grabs all the data that has been consented for a contract

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
uristringRequired
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contract/data-for-contract HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 188

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "uri": "text",
  "query": {
    "anonymize": true,
    "credentials": {
      "categories": {
        "ANY_ADDITIONAL_PROPERTY": true
      }
    },
    "personal": {
      "ANY_ADDITIONAL_PROPERTY": true
    }
  }
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": [
            "text"
          ]
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "date": "text"
    }
  ]
}

Get the data that has been consented by a did

post

This route grabs all the data that has been consented by a did

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
didstringRequired
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contract/data-for-did HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 183

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "did": "text",
  "query": {
    "credentials": {
      "categories": {
        "ANY_ADDITIONAL_PROPERTY": true
      }
    },
    "personal": {
      "ANY_ADDITIONAL_PROPERTY": true
    },
    "id": "text"
  }
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "credentials": [
        {
          "category": "text",
          "uri": "text"
        }
      ],
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "date": "text",
      "contractUri": "text"
    }
  ]
}

Get the data that has been consented for all of your contracts

post

This route grabs all the data that has been consented for all of your contracts

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contract/data HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 175

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "query": {
    "anonymize": true,
    "credentials": {
      "categories": {
        "ANY_ADDITIONAL_PROPERTY": true
      }
    },
    "personal": {
      "ANY_ADDITIONAL_PROPERTY": true
    }
  }
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": [
            "text"
          ]
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      },
      "date": "text"
    }
  ]
}

Writes a boost credential to a did that has consented to a contract

post

Writes a boost credential to a did that has consented to a contract

Authorizations
Body
didstringRequired
contractUristringRequired
boostUristringRequired
credentialany ofRequired
or
Responses
200
Successful response
application/json
Responsestring
default
Error response
application/json
post
POST /api/consent-flow-contract/write HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1029

{
  "did": "text",
  "contractUri": "text",
  "boostUri": "text",
  "credential": {
    "@context": [
      "text"
    ],
    "id": "text",
    "type": [
      "text"
    ],
    "issuer": "text",
    "credentialSubject": {
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "refreshService": {
      "id": "text",
      "type": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "credentialSchema": {
      "id": "text",
      "type": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "issuanceDate": "text",
    "expirationDate": "text",
    "credentialStatus": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "name": "text",
    "description": "text",
    "validFrom": "text",
    "validUntil": "text",
    "status": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "termsOfUse": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "evidence": {
      "type": "text",
      "id": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "proof": {
      "type": "text",
      "created": "text",
      "challenge": "text",
      "domain": "text",
      "nonce": "text",
      "proofPurpose": "text",
      "verificationMethod": "text",
      "jws": "text",
      "ANY_ADDITIONAL_PROPERTY": "anything"
    },
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}
text

Write credential through signing authority for a DID consented to a contract

post

Issues and sends a boost credential via a registered signing authority to a DID that has consented to a contract.

Authorizations
Body
didstringRequired
contractUristringRequired
boostUristringRequired
Responses
200
Successful response
application/json
Responsestring
default
Error response
application/json
post
POST /api/consent-flow-contract/write/via-signing-authority HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 106

{
  "did": "text",
  "contractUri": "text",
  "boostUri": "text",
  "signingAuthority": {
    "name": "text",
    "endpoint": "text"
  }
}
text

Consent To Contract

post

Consents to a Contract with a hard set of terms

Authorizations
Body
contractUristringRequired
expiresAtstringOptional
oneTimebooleanOptional
Responses
200
Successful response
application/json
Responsestring
default
Error response
application/json
post
POST /api/consent-flow-contract/consent HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 438

{
  "terms": {
    "read": {
      "anonymize": true,
      "credentials": {
        "shareAll": true,
        "sharing": true,
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "sharing": true,
            "shared": [
              "text"
            ],
            "shareAll": true,
            "shareUntil": "text"
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "write": {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": true
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": true
      }
    },
    "deniedWriters": [
      "text"
    ]
  },
  "contractUri": "text",
  "expiresAt": "text",
  "oneTime": true
}
text

Gets Consented Contracts

post

Gets all consented contracts for a user

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contracts/consent HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 333

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "query": {
    "read": {
      "anonymize": true,
      "credentials": {
        "shareAll": true,
        "sharing": true,
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": null
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "write": {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": true
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": true
      }
    }
  }
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "expiresAt": "text",
      "oneTime": true,
      "terms": {
        "read": {
          "anonymize": true,
          "credentials": {
            "shareAll": true,
            "sharing": true,
            "categories": {
              "ANY_ADDITIONAL_PROPERTY": {
                "sharing": true,
                "shared": [
                  "text"
                ],
                "shareAll": true,
                "shareUntil": "text"
              }
            }
          },
          "personal": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          }
        },
        "write": {
          "credentials": {
            "categories": {
              "ANY_ADDITIONAL_PROPERTY": true
            }
          },
          "personal": {
            "ANY_ADDITIONAL_PROPERTY": true
          }
        },
        "deniedWriters": [
          "text"
        ]
      },
      "contract": {
        "contract": {
          "read": {
            "anonymize": true,
            "credentials": {
              "categories": {
                "ANY_ADDITIONAL_PROPERTY": {
                  "required": true
                }
              }
            },
            "personal": {
              "ANY_ADDITIONAL_PROPERTY": {
                "required": true
              }
            }
          },
          "write": {
            "credentials": {
              "categories": {
                "ANY_ADDITIONAL_PROPERTY": {
                  "required": true
                }
              }
            },
            "personal": {
              "ANY_ADDITIONAL_PROPERTY": {
                "required": true
              }
            }
          }
        },
        "owner": {
          "profileId": "text",
          "displayName": "",
          "shortBio": "",
          "bio": "",
          "did": "text",
          "isPrivate": true,
          "email": "text",
          "image": "text",
          "heroImage": "text",
          "websiteLink": "text",
          "isServiceProfile": false,
          "type": "text",
          "notificationsWebhook": "https://example.com",
          "display": {
            "backgroundColor": "text",
            "backgroundImage": "text",
            "fadeBackgroundImage": true,
            "repeatBackgroundImage": true,
            "fontColor": "text",
            "accentColor": "text",
            "accentFontColor": "text",
            "idBackgroundImage": "text",
            "fadeIdBackgroundImage": true,
            "idBackgroundColor": "text",
            "repeatIdBackgroundImage": true
          },
          "role": "",
          "dob": ""
        },
        "name": "text",
        "subtitle": "text",
        "description": "text",
        "reasonForAccessing": "text",
        "image": "text",
        "uri": "text",
        "needsGuardianConsent": true,
        "redirectUrl": "text",
        "frontDoorBoostUri": "text",
        "createdAt": "text",
        "updatedAt": "text",
        "expiresAt": "text",
        "autoBoosts": [
          "text"
        ],
        "writers": [
          {
            "profileId": "text",
            "displayName": "",
            "shortBio": "",
            "bio": "",
            "did": "text",
            "isPrivate": true,
            "email": "text",
            "image": "text",
            "heroImage": "text",
            "websiteLink": "text",
            "isServiceProfile": false,
            "type": "text",
            "notificationsWebhook": "https://example.com",
            "display": {
              "backgroundColor": "text",
              "backgroundImage": "text",
              "fadeBackgroundImage": true,
              "repeatBackgroundImage": true,
              "fontColor": "text",
              "accentColor": "text",
              "accentFontColor": "text",
              "idBackgroundImage": "text",
              "fadeIdBackgroundImage": true,
              "idBackgroundColor": "text",
              "repeatIdBackgroundImage": true
            },
            "role": "",
            "dob": ""
          }
        ]
      },
      "uri": "text",
      "consenter": {
        "profileId": "text",
        "displayName": "",
        "shortBio": "",
        "bio": "",
        "did": "text",
        "isPrivate": true,
        "email": "text",
        "image": "text",
        "heroImage": "text",
        "websiteLink": "text",
        "isServiceProfile": false,
        "type": "text",
        "notificationsWebhook": "https://example.com",
        "display": {
          "backgroundColor": "text",
          "backgroundImage": "text",
          "fadeBackgroundImage": true,
          "repeatBackgroundImage": true,
          "fontColor": "text",
          "accentColor": "text",
          "accentFontColor": "text",
          "idBackgroundImage": "text",
          "fadeIdBackgroundImage": true,
          "idBackgroundColor": "text",
          "repeatIdBackgroundImage": true
        },
        "role": "",
        "dob": ""
      },
      "status": "live"
    }
  ]
}

Updates Contract Terms

post

Updates the terms for a consented contract

Authorizations
Body
uristringRequired
expiresAtstringOptional
oneTimebooleanOptional
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
post
POST /api/consent-flow-contract/consent/update HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 430

{
  "uri": "text",
  "terms": {
    "read": {
      "anonymize": true,
      "credentials": {
        "shareAll": true,
        "sharing": true,
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": {
            "sharing": true,
            "shared": [
              "text"
            ],
            "shareAll": true,
            "shareUntil": "text"
          }
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": "text"
      }
    },
    "write": {
      "credentials": {
        "categories": {
          "ANY_ADDITIONAL_PROPERTY": true
        }
      },
      "personal": {
        "ANY_ADDITIONAL_PROPERTY": true
      }
    },
    "deniedWriters": [
      "text"
    ]
  },
  "expiresAt": "text",
  "oneTime": true
}
true

Gets Transaction History

post

Gets the transaction history for a set of Consent Flow Contract Terms

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
uristringRequired
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contract/consent/history HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 439

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "uri": "text",
  "query": {
    "terms": {
      "read": {
        "anonymize": true,
        "credentials": {
          "shareAll": true,
          "sharing": true,
          "categories": {
            "ANY_ADDITIONAL_PROPERTY": null
          }
        },
        "personal": {
          "ANY_ADDITIONAL_PROPERTY": "text"
        }
      },
      "write": {
        "credentials": {
          "categories": {
            "ANY_ADDITIONAL_PROPERTY": true
          }
        },
        "personal": {
          "ANY_ADDITIONAL_PROPERTY": true
        }
      }
    },
    "action": "consent",
    "date": {
      "$gt": "text"
    },
    "expiresAt": {
      "$gt": "text"
    },
    "oneTime": true
  }
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "expiresAt": "text",
      "oneTime": true,
      "terms": {
        "read": {
          "anonymize": true,
          "credentials": {
            "shareAll": true,
            "sharing": true,
            "categories": {
              "ANY_ADDITIONAL_PROPERTY": {
                "sharing": true,
                "shared": [
                  "text"
                ],
                "shareAll": true,
                "shareUntil": "text"
              }
            }
          },
          "personal": {
            "ANY_ADDITIONAL_PROPERTY": "text"
          }
        },
        "write": {
          "credentials": {
            "categories": {
              "ANY_ADDITIONAL_PROPERTY": true
            }
          },
          "personal": {
            "ANY_ADDITIONAL_PROPERTY": true
          }
        },
        "deniedWriters": [
          "text"
        ]
      },
      "id": "text",
      "action": "consent",
      "date": "text",
      "uris": [
        "text"
      ]
    }
  ]
}

Sync credentials to a contract

post

Syncs credentials to a contract that the profile has consented to

Authorizations
Body
termsUristringRequired
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
post
POST /api/consent-flow-contract/sync HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 69

{
  "termsUri": "text",
  "categories": {
    "ANY_ADDITIONAL_PROPERTY": [
      "text"
    ]
  }
}
true

Get credentials issued via a contract

post

Gets all credentials that were issued via a contract

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
termsUristringRequired
includeReceivedbooleanOptionalDefault: true
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contract/credentials HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 83

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "termsUri": "text",
  "includeReceived": true
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "credentialUri": "text",
      "termsUri": "text",
      "contractUri": "text",
      "boostUri": "text",
      "category": "text",
      "date": "text"
    }
  ]
}

Get all credentials written to any terms

post

Gets all credentials that were written to any terms owned by this profile

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
includeReceivedbooleanOptionalDefault: false
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/consent-flow-contracts/credentials HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 66

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "includeReceived": false
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "credentialUri": "text",
      "termsUri": "text",
      "contractUri": "text",
      "boostUri": "text",
      "category": "text",
      "date": "text"
    }
  ]
}

Add autoboosts to a contract

post

Adds one or more autoboost configurations to an existing consent flow contract. The caller must be the contract owner or a designated writer. The signing authority for each autoboost must be registered to the caller.

Authorizations
Body
contractUristringRequired
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
post
POST /api/consent-flow-contracts/autoboosts/add HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 110

{
  "contractUri": "text",
  "autoboosts": [
    {
      "boostUri": "text",
      "signingAuthority": {
        "endpoint": "text",
        "name": "text"
      }
    }
  ]
}
true

Remove autoboosts from a contract

post

Removes one or more autoboosts from an existing consent flow contract, identified by their boost URIs. The caller must be the contract owner or a designated writer.

Authorizations
Body
contractUristringRequired
boostUrisstring[]Required
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
post
POST /api/consent-flow-contracts/autoboosts/remove HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 43

{
  "contractUri": "text",
  "boostUris": [
    "text"
  ]
}
true