# Contracts

## Get Consent Flow Contracts

> Gets Consent Flow Contract Details

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract":{"get":{"operationId":"contracts-getConsentFlowContract","summary":"Get Consent Flow Contracts","description":"Gets Consent Flow Contract Details","tags":["Contracts"],"parameters":[{"in":"query","name":"uri","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"contract":{"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false}},"required":["read","write"],"additionalProperties":false},"owner":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false},"name":{"type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"reasonForAccessing":{"type":"string"},"image":{"type":"string"},"uri":{"type":"string"},"needsGuardianConsent":{"type":"boolean"},"redirectUrl":{"type":"string"},"frontDoorBoostUri":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"expiresAt":{"type":"string"},"autoBoosts":{"type":"array","items":{"type":"string"}},"writers":{"type":"array","items":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false}}},"required":["contract","owner","name","uri","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Create Consent Flow Contract

> Creates a Consent Flow Contract for a profile

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract":{"post":{"operationId":"contracts-createConsentFlowContract","summary":"Create Consent Flow Contract","description":"Creates a Consent Flow Contract for a profile","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contract":{"type":"object","properties":{"read":{"default":{"credentials":{"categories":{}},"personal":{}},"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"default":{"categories":{}},"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"]}}}},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"]}}}},"write":{"default":{"credentials":{"categories":{}},"personal":{}},"type":"object","properties":{"credentials":{"default":{"categories":{}},"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"]}}}},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"]}}}}}},"name":{"type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"reasonForAccessing":{"type":"string"},"needsGuardianConsent":{"type":"boolean"},"redirectUrl":{"type":"string"},"frontDoorBoostUri":{"type":"string"},"image":{"type":"string"},"expiresAt":{"type":"string"},"autoboosts":{"type":"array","items":{"type":"object","properties":{"boostUri":{"type":"string"},"signingAuthority":{"type":"object","properties":{"endpoint":{"type":"string"},"name":{"type":"string"}},"required":["endpoint","name"]}},"required":["boostUri","signingAuthority"]}},"writers":{"type":"array","items":{"type":"string"}}},"required":["contract","name"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Delete a Consent Flow Contract

> This route deletes a Consent Flow Contract

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract":{"delete":{"operationId":"contracts-deleteConsentFlowContract","summary":"Delete a Consent Flow Contract","description":"This route deletes a Consent Flow Contract","tags":["Contracts"],"parameters":[{"in":"query","name":"uri","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get Consent Flow Contracts

> Gets Consent Flow Contracts for a profile

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts":{"post":{"operationId":"contracts-getConsentFlowContracts","summary":"Get Consent Flow Contracts","description":"Gets Consent Flow Contracts for a profile","tags":["Contracts"],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"query":{"default":{},"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"}}}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"}}}}}},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"}}}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"}}}}}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"contract":{"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false}},"required":["read","write"],"additionalProperties":false},"name":{"type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"reasonForAccessing":{"type":"string"},"image":{"type":"string"},"uri":{"type":"string"},"needsGuardianConsent":{"type":"boolean"},"redirectUrl":{"type":"string"},"frontDoorBoostUri":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"expiresAt":{"type":"string"},"autoBoosts":{"type":"array","items":{"type":"string"}},"writers":{"type":"array","items":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false}}},"required":["contract","name","uri","createdAt","updatedAt"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get the data that has been consented for a contract

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

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/data-for-contract":{"post":{"operationId":"contracts-getConsentedDataForContract","summary":"Get the data that has been consented for a contract","description":"This route grabs all the data that has been consented for a contract","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"uri":{"type":"string"},"query":{"default":{},"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}}},"required":["uri"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"date":{"type":"string"}},"required":["credentials","personal","date"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get the data that has been consented by a did

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

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/data-for-did":{"post":{"operationId":"contracts-getConsentedDataForDid","summary":"Get the data that has been consented by a did","description":"This route grabs all the data that has been consented by a did","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"did":{"type":"string"},"query":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"id":{"anyOf":[{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]},{"type":"object","properties":{"$or":{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"object","properties":{"$in":{"type":"array","items":{"type":"string"}}},"required":["$in"]}]},{"type":"object","properties":{"$regex":{"anyOf":[{"type":"string"},{"type":"string"}],"type":"string"}},"required":["$regex"]}]}}},"required":["$or"]}]}}}},"required":["did"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"credentials":{"type":"array","items":{"type":"object","properties":{"category":{"type":"string"},"uri":{"type":"string"}},"required":["category","uri"],"additionalProperties":false}},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"date":{"type":"string"},"contractUri":{"type":"string"}},"required":["credentials","personal","date","contractUri"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

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

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

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/data":{"post":{"operationId":"contracts-getConsentedData","summary":"Get the data that has been consented for all of your contracts","description":"This route grabs all the data that has been consented for all of your contracts","tags":["Contracts"],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"query":{"default":{},"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"date":{"type":"string"}},"required":["credentials","personal","date"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

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

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

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/write":{"post":{"operationId":"contracts-writeCredentialToContract","summary":"Writes a boost credential to a did that has consented to a contract","description":"Writes a boost credential to a did that has consented to a contract","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"did":{"type":"string"},"contractUri":{"type":"string"},"boostUri":{"type":"string"},"credential":{"anyOf":[{"type":"object","properties":{"@context":{"type":"array","items":{"anyOf":[{"type":"string"},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"id":{"type":"string"},"type":{"minItems":1,"type":"array","items":{"type":"string"}},"issuer":{"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"type":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},"name":{"type":"string"},"url":{"type":"string"},"phone":{"type":"string"},"description":{"type":"string"},"endorsement":{"type":"array","items":{}},"image":{"anyOf":[{"type":"string"},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"caption":{"type":"string"}},"required":["id","type"]}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"address":{"type":"object","properties":{"type":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string"}}]},"addressCountry":{"type":"string"},"addressCountryCode":{"type":"string"},"addressRegion":{"type":"string"},"addressLocality":{"type":"string"},"streetAddress":{"type":"string"},"postOfficeBoxNumber":{"type":"string"},"postalCode":{"type":"string"},"geo":{"type":"object","properties":{"type":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string"}}]},"latitude":{"type":"number"},"longitude":{"type":"number"}},"required":["type","latitude","longitude"]}},"required":["type"]},"otherIdentifier":{"type":"array","items":{"type":"object","properties":{"type":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string"}}]},"identifier":{"type":"string"},"identifierType":{"anyOf":[{"type":"string","enum":["sourcedId","systemId","productId","userName","accountId","emailAddress","nationalIdentityNumber","isbn","issn","lisSourcedId","oneRosterSourcedId","sisSourcedId","ltiContextId","ltiDeploymentId","ltiToolId","ltiPlatformId","ltiUserId","identifier"]},{"type":"string"}]}},"required":["type","identifier","identifierType"]}},"official":{"type":"string"},"parentOrg":{},"familyName":{"type":"string"},"givenName":{"type":"string"},"additionalName":{"type":"string"},"patronymicName":{"type":"string"},"honorificPrefix":{"type":"string"},"honorificSuffix":{"type":"string"},"familyNamePrefix":{"type":"string"},"dateOfBirth":{"type":"string"}},"additionalProperties":{}}]},"credentialSubject":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}},"additionalProperties":{}}}]},"refreshService":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["type"],"additionalProperties":{}}}]},"credentialSchema":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"}},"required":["id","type"],"additionalProperties":{}}}]},"issuanceDate":{"type":"string"},"expirationDate":{"type":"string"},"credentialStatus":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":{}}}]},"name":{"type":"string"},"description":{"type":"string"},"validFrom":{"type":"string"},"validUntil":{"type":"string"},"status":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":{}}}]},"termsOfUse":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type"],"additionalProperties":{}}}]},"evidence":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"minItems":1,"type":"array","items":{"type":"string"}},"name":{"type":"string"},"narrative":{"type":"string"},"description":{"type":"string"},"genre":{"type":"string"},"audience":{"type":"string"}},"required":["type"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"minItems":1,"type":"array","items":{"type":"string"}},"name":{"type":"string"},"narrative":{"type":"string"},"description":{"type":"string"},"genre":{"type":"string"},"audience":{"type":"string"}},"required":["type"],"additionalProperties":{}}}]},"renderMethod":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"TemplateRenderMethod"},"renderSuite":{"type":"string"},"template":{"type":"string"},"renderProperty":{"type":"array","items":{"type":"string"}},"outputPreference":{"type":"object","properties":{"mediaType":{"type":"string"}},"required":["mediaType"]}},"required":["type","renderSuite","template"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"TemplateRenderMethod"},"renderSuite":{"type":"string"},"template":{"type":"string"},"renderProperty":{"type":"array","items":{"type":"string"}},"outputPreference":{"type":"object","properties":{"mediaType":{"type":"string"}},"required":["mediaType"]}},"required":["type","renderSuite","template"]},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}}]},"proof":{"anyOf":[{"type":"object","properties":{"type":{"type":"string"},"created":{"type":"string"},"challenge":{"type":"string"},"domain":{"type":"string"},"nonce":{"type":"string"},"proofPurpose":{"type":"string"},"verificationMethod":{"type":"string"},"jws":{"type":"string"}},"required":["type","created","proofPurpose","verificationMethod"],"additionalProperties":{}},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"created":{"type":"string"},"challenge":{"type":"string"},"domain":{"type":"string"},"nonce":{"type":"string"},"proofPurpose":{"type":"string"},"verificationMethod":{"type":"string"},"jws":{"type":"string"}},"required":["type","created","proofPurpose","verificationMethod"],"additionalProperties":{}}}]}},"required":["@context","type","issuer","credentialSubject","proof"],"additionalProperties":{}},{"type":"object","properties":{"protected":{"type":"string"},"iv":{"type":"string"},"ciphertext":{"type":"string"},"tag":{"type":"string"},"aad":{"type":"string"},"recipients":{"type":"array","items":{"type":"object","properties":{"header":{"type":"object","properties":{"alg":{"type":"string"},"iv":{"type":"string"},"tag":{"type":"string"},"epk":{"type":"object","properties":{"kty":{"type":"string"},"crv":{"type":"string"},"x":{"type":"string"},"y":{"type":"string"},"n":{"type":"string"},"d":{"type":"string"}}},"kid":{"type":"string"},"apv":{"type":"string"},"apu":{"type":"string"}},"required":["alg","iv","tag"]},"encrypted_key":{"type":"string"}},"required":["header","encrypted_key"]}}},"required":["protected","iv","ciphertext","tag"]}]}},"required":["did","contractUri","boostUri","credential"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

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

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

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/write/via-signing-authority":{"post":{"operationId":"contracts-writeCredentialToContractViaSigningAuthority","summary":"Write credential through signing authority for a DID consented to a contract","description":"Issues and sends a boost credential via a registered signing authority to a DID that has consented to a contract.","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"did":{"type":"string"},"contractUri":{"type":"string"},"boostUri":{"type":"string"},"signingAuthority":{"type":"object","properties":{"name":{"type":"string"},"endpoint":{"type":"string"}},"required":["name","endpoint"]}},"required":["did","contractUri","boostUri","signingAuthority"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"string"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Consent To Contract

> Consents to a Contract with a hard set of terms

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/consent":{"post":{"operationId":"contracts-consentToContract","summary":"Consent To Contract","description":"Consents to a Contract with a hard set of terms","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"terms":{"type":"object","properties":{"read":{"default":{"credentials":{"categories":{}},"personal":{}},"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"default":{"categories":{}},"type":"object","properties":{"shareAll":{"type":"boolean"},"sharing":{"type":"boolean"},"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sharing":{"type":"boolean"},"shared":{"type":"array","items":{"type":"string"}},"shareAll":{"type":"boolean"},"shareUntil":{"type":"string"}}}}}},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"write":{"default":{"credentials":{"categories":{}},"personal":{}},"type":"object","properties":{"credentials":{"default":{"categories":{}},"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"deniedWriters":{"type":"array","items":{"type":"string"}}}},"contractUri":{"type":"string"},"expiresAt":{"type":"string"},"oneTime":{"type":"boolean"},"recipientToken":{"type":"string"}},"required":["terms","contractUri"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"termsUri":{"type":"string"},"redirectUrl":{"type":"string"}},"required":["termsUri"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Gets Consented Contracts

> Gets all consented contracts for a user

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/consent":{"post":{"operationId":"contracts-getConsentedContracts","summary":"Gets Consented Contracts","description":"Gets all consented contracts for a user","tags":["Contracts"],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"query":{"default":{},"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"shareAll":{"type":"boolean"},"sharing":{"type":"boolean"},"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sharing":{"type":"boolean"},"shared":{"type":"array","items":{"type":"string"}},"shareAll":{"type":"boolean"},"shareUntil":{"type":"string"}}}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}}}}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"expiresAt":{"type":"string"},"oneTime":{"type":"boolean"},"terms":{"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"shareAll":{"type":"boolean"},"sharing":{"type":"boolean"},"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sharing":{"type":"boolean"},"shared":{"type":"array","items":{"type":"string"}},"shareAll":{"type":"boolean"},"shareUntil":{"type":"string"}},"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["credentials","personal"],"additionalProperties":false},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["credentials","personal"],"additionalProperties":false},"deniedWriters":{"type":"array","items":{"type":"string"}}},"required":["read","write"],"additionalProperties":false},"contract":{"type":"object","properties":{"contract":{"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false}},"required":["read","write"],"additionalProperties":false},"owner":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false},"name":{"type":"string"},"subtitle":{"type":"string"},"description":{"type":"string"},"reasonForAccessing":{"type":"string"},"image":{"type":"string"},"uri":{"type":"string"},"needsGuardianConsent":{"type":"boolean"},"redirectUrl":{"type":"string"},"frontDoorBoostUri":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"expiresAt":{"type":"string"},"autoBoosts":{"type":"array","items":{"type":"string"}},"writers":{"type":"array","items":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false}}},"required":["contract","owner","name","uri","createdAt","updatedAt"],"additionalProperties":false},"uri":{"type":"string"},"consenter":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false},"status":{"type":"string","enum":["live","stale","withdrawn"]}},"required":["terms","contract","uri","consenter","status"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Updates Contract Terms

> Updates the terms for a consented contract

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/consent/update":{"post":{"operationId":"contracts-updateConsentedContractTerms","summary":"Updates Contract Terms","description":"Updates the terms for a consented contract","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"uri":{"type":"string"},"terms":{"type":"object","properties":{"read":{"default":{"credentials":{"categories":{}},"personal":{}},"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"default":{"categories":{}},"type":"object","properties":{"shareAll":{"type":"boolean"},"sharing":{"type":"boolean"},"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sharing":{"type":"boolean"},"shared":{"type":"array","items":{"type":"string"}},"shareAll":{"type":"boolean"},"shareUntil":{"type":"string"}}}}}},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"write":{"default":{"credentials":{"categories":{}},"personal":{}},"type":"object","properties":{"credentials":{"default":{"categories":{}},"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"deniedWriters":{"type":"array","items":{"type":"string"}}}},"expiresAt":{"type":"string"},"oneTime":{"type":"boolean"}},"required":["uri","terms"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Delete credential references from all consent terms

> Removes deleted credential URIs from any live consent terms that still reference them

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/consent/prune-deleted-uris":{"post":{"operationId":"contracts-deleteCredentialFromAllContracts","summary":"Delete credential references from all consent terms","description":"Removes deleted credential URIs from any live consent terms that still reference them","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"deletedUris":{"minItems":1,"type":"array","items":{"type":"string"}}},"required":["deletedUris"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"contractsUpdated":{"type":"number"},"removedSharedUris":{"type":"number"}},"required":["contractsUpdated","removedSharedUris"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Deletes Contract Terms

> Withdraws consent by deleting Contract Terms

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/consent/withdraw":{"delete":{"operationId":"contracts-withdrawConsent","summary":"Deletes Contract Terms","description":"Withdraws consent by deleting Contract Terms","tags":["Contracts"],"parameters":[{"in":"query","name":"uri","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Gets Transaction History

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

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/consent/history":{"post":{"operationId":"contracts-getTermsTransactionHistory","summary":"Gets Transaction History","description":"Gets the transaction history for a set of Consent Flow Contract Terms","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"uri":{"type":"string"},"query":{"default":{},"type":"object","properties":{"terms":{"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"shareAll":{"type":"boolean"},"sharing":{"type":"boolean"},"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sharing":{"type":"boolean"},"shared":{"type":"array","items":{"type":"string"}},"shareAll":{"type":"boolean"},"shareUntil":{"type":"string"}}}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}}},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}},"personal":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}}}}},"action":{"anyOf":[{"type":"string","enum":["consent","update","sync","withdraw","write"]},{"type":"array","items":{"type":"string","enum":["consent","update","sync","withdraw","write"]}}]},"date":{"anyOf":[{"anyOf":[{"type":"object","properties":{"$gt":{"type":"string"}},"required":["$gt"]},{"type":"object","properties":{"$lt":{"type":"string"}},"required":["$lt"]}]},{"type":"object","properties":{"$eq":{"type":"string"}},"required":["$eq"]}]},"expiresAt":{"anyOf":[{"anyOf":[{"type":"object","properties":{"$gt":{"type":"string"}},"required":["$gt"]},{"type":"object","properties":{"$lt":{"type":"string"}},"required":["$lt"]}]},{"type":"object","properties":{"$eq":{"type":"string"}},"required":["$eq"]}]},"oneTime":{"type":"boolean"}}}},"required":["uri"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"expiresAt":{"type":"string"},"oneTime":{"type":"boolean"},"terms":{"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"shareAll":{"type":"boolean"},"sharing":{"type":"boolean"},"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"sharing":{"type":"boolean"},"shared":{"type":"array","items":{"type":"string"}},"shareAll":{"type":"boolean"},"shareUntil":{"type":"string"}},"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["credentials","personal"],"additionalProperties":false},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}}},"required":["credentials","personal"],"additionalProperties":false},"deniedWriters":{"type":"array","items":{"type":"string"}}},"required":["read","write"],"additionalProperties":false},"id":{"type":"string"},"action":{"type":"string","enum":["consent","update","sync","withdraw","write"]},"date":{"type":"string"},"uris":{"type":"array","items":{"type":"string"}}},"required":["id","action","date"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Verifies that a profile has consented to a contract

> Checks if a profile has consented to the specified contract

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/verify":{"get":{"operationId":"contracts-verifyConsent","summary":"Verifies that a profile has consented to a contract","description":"Checks if a profile has consented to the specified contract","tags":["Contracts"],"parameters":[{"in":"query","name":"uri","schema":{"type":"string"},"required":true},{"in":"query","name":"profileId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Sync credentials to a contract

> Syncs credentials to a contract that the profile has consented to

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/sync":{"post":{"operationId":"contracts-syncCredentialsToContract","summary":"Sync credentials to a contract","description":"Syncs credentials to a contract that the profile has consented to","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"termsUri":{"type":"string"},"categories":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["termsUri","categories"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get credentials issued via a contract

> Gets all credentials that were issued via a contract

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contract/credentials":{"post":{"operationId":"contracts-getCredentialsForContract","summary":"Get credentials issued via a contract","description":"Gets all credentials that were issued via a contract","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"termsUri":{"type":"string"},"includeReceived":{"default":true,"type":"boolean"}},"required":["termsUri"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"credentialUri":{"type":"string"},"termsUri":{"type":"string"},"contractUri":{"type":"string"},"boostUri":{"type":"string"},"category":{"type":"string"},"date":{"type":"string"}},"required":["credentialUri","termsUri","contractUri","boostUri","date"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get all credentials written to any terms

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

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/credentials":{"post":{"operationId":"contracts-getAllCredentialsForTerms","summary":"Get all credentials written to any terms","description":"Gets all credentials that were written to any terms owned by this profile","tags":["Contracts"],"parameters":[],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"default":25,"type":"number"},"cursor":{"type":"string"},"sort":{"type":"string"},"includeReceived":{"default":false,"type":"boolean"}}}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"cursor":{"type":"string"},"hasMore":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"credentialUri":{"type":"string"},"termsUri":{"type":"string"},"contractUri":{"type":"string"},"boostUri":{"type":"string"},"category":{"type":"string"},"date":{"type":"string"}},"required":["credentialUri","termsUri","contractUri","boostUri","date"],"additionalProperties":false}}},"required":["hasMore","records"],"additionalProperties":false}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Add autoboosts to a contract

> 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.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/autoboosts/add":{"post":{"operationId":"contracts-addAutoBoostsToContract","summary":"Add autoboosts to a contract","description":"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.","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contractUri":{"type":"string"},"autoboosts":{"type":"array","items":{"type":"object","properties":{"boostUri":{"type":"string"},"signingAuthority":{"type":"object","properties":{"endpoint":{"type":"string"},"name":{"type":"string"}},"required":["endpoint","name"]}},"required":["boostUri","signingAuthority"]}}},"required":["contractUri","autoboosts"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Remove autoboosts from a contract

> 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.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/autoboosts/remove":{"post":{"operationId":"contracts-removeAutoBoostsFromContract","summary":"Remove autoboosts from a contract","description":"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.","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contractUri":{"type":"string"},"boostUris":{"type":"array","items":{"type":"string"}}},"required":["contractUri","boostUris"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## AI Insights, consent flow notifcation request

> Sends the targeted user an AI insights consent flow request via a notification

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/ai-insights/request":{"post":{"operationId":"contracts-sendAiInsightsContractRequest","summary":"AI Insights, consent flow notifcation request","description":"Sends the targeted user an AI insights consent flow request via a notification","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contractUri":{"type":"string"},"targetProfileId":{"type":"string"},"shareLink":{"type":"string"}},"required":["contractUri","targetProfileId","shareLink"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## AI Insights, consent flow share-notifcation request

> Sends the targeted user an AI insights share notification

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/ai-insights/share-request":{"post":{"operationId":"contracts-sendAiInsightShareRequest","summary":"AI Insights, consent flow share-notifcation request","description":"Sends the targeted user an AI insights share notification","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"childProfileId":{"type":"string"},"targetProfileId":{"type":"string"},"shareLink":{"type":"string"}},"required":["targetProfileId","shareLink"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get requests sent for a given contract

> Gets a list of users and their request statuses for a given contract.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/sent-requests":{"get":{"operationId":"contracts-getContractSentRequests","summary":"Get requests sent for a given contract","description":"Gets a list of users and their request statuses for a given contract.","tags":["Contracts"],"parameters":[{"in":"query","name":"contractUri","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"profile":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false},"status":{"anyOf":[{"type":"string","enum":["pending","accepted","denied"]},{"type":"null"}]},"readStatus":{"anyOf":[{"type":"string","enum":["unseen","seen"]},{"type":"null"}]}},"required":["profile","status"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get request status for a specific profile under a contract

> Returns the request status and read status for a given profile in a specific contract.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/request-status":{"get":{"operationId":"contracts-getRequestStatusForProfile","summary":"Get request status for a specific profile under a contract","description":"Returns the request status and read status for a given profile in a specific contract.","tags":["Contracts"],"parameters":[{"in":"query","name":"contractId","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"contractUri","schema":{"anyOf":[{"type":"string"},{"type":"null"}]}},{"in":"query","name":"targetProfileId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"profile":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false},"status":{"anyOf":[{"type":"string","enum":["pending","accepted","denied"]},{"type":"null"}]},"readStatus":{"anyOf":[{"type":"string","enum":["unseen","seen"]},{"type":"null"}]}},"required":["profile","status"],"additionalProperties":false},{"type":"null"}]}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Marks a contract request as seen

> Updates the read status of a contract request to "seen" for the specified target profile. Only contract writers are authorized to perform this action.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/mark-request-as-seen":{"post":{"operationId":"contracts-markContractRequestAsSeen","summary":"Marks a contract request as seen","description":"Updates the read status of a contract request to \"seen\" for the specified target profile. Only contract writers are authorized to perform this action.","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contractUri":{"type":"string"},"targetProfileId":{"type":"string"}},"required":["contractUri","targetProfileId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Cancels/removes a contract request

> Removes a REQUESTED\_FOR relationship, cancelling the request sent to the specified target profile. Only contract writers are authorized to perform this action.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/cancel-request":{"post":{"operationId":"contracts-cancelContractRequest","summary":"Cancels/removes a contract request","description":"Removes a REQUESTED_FOR relationship, cancelling the request sent to the specified target profile. Only contract writers are authorized to perform this action.","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"contractUri":{"type":"string"},"targetProfileId":{"type":"string"}},"required":["contractUri","targetProfileId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get all contract requests for a target profile

> Gets all contract requests from all contracts for a specified target profile. Users can query their own requests.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/all-requests-for-profile":{"get":{"operationId":"contracts-getAllContractRequestsForProfile","summary":"Get all contract requests for a target profile","description":"Gets all contract requests from all contracts for a specified target profile. Users can query their own requests.","tags":["Contracts"],"parameters":[{"in":"query","name":"targetProfileId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"contract":{"type":"object","properties":{"read":{"type":"object","properties":{"anonymize":{"type":"boolean"},"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false},"write":{"type":"object","properties":{"credentials":{"type":"object","properties":{"categories":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["categories"],"additionalProperties":false},"personal":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"required":{"type":"boolean"},"defaultEnabled":{"type":"boolean"}},"required":["required"],"additionalProperties":false}}},"required":["credentials","personal"],"additionalProperties":false},"uri":{"type":"string"}},"required":["read","write","uri"],"additionalProperties":false},"profile":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false},"status":{"anyOf":[{"type":"string","enum":["pending","accepted","denied"]},{"type":"null"}]},"readStatus":{"anyOf":[{"type":"string","enum":["unseen","seen"]},{"type":"null"}]}},"required":["contract","profile","status"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Get profiles a user has shared insights with

> Gets profiles with REQUESTED\_FOR relationships targeting the current user, including request status.

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.NOT_FOUND":{"title":"Not found error (404)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/shared-insights-requests-for-profile":{"get":{"operationId":"contracts-getSharedInsightsRequestsForProfile","summary":"Get profiles a user has shared insights with","description":"Gets profiles with REQUESTED_FOR relationships targeting the current user, including request status.","tags":["Contracts"],"parameters":[{"in":"query","name":"targetProfileId","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"profile":{"type":"object","properties":{"profileId":{"description":"Unique, URL-safe identifier for the profile.","type":"string","minLength":3,"maxLength":40},"displayName":{"description":"Human-readable display name for the profile.","default":"","type":"string"},"shortBio":{"description":"Short bio for the profile.","default":"","type":"string"},"bio":{"description":"Longer bio for the profile.","default":"","type":"string"},"did":{"description":"Decentralized Identifier for the profile. (auto-assigned)","type":"string"},"isPrivate":{"description":"Whether the profile is private or not and shows up in search results.","type":"boolean"},"profileVisibility":{"description":"Profile visibility: 'public', 'connections_only', or 'private'.","default":"public","type":"string","enum":["public","connections_only","private"]},"showEmail":{"description":"Whether to show email to connections.","default":false,"type":"boolean"},"allowConnectionRequests":{"description":"Who can send connection requests: 'anyone' or 'invite_only'.","default":"anyone","type":"string","enum":["anyone","invite_only"]},"email":{"description":"Contact email address for the profile. (deprecated)","type":"string"},"image":{"description":"Profile image URL for the profile.","type":"string"},"heroImage":{"description":"Hero image URL for the profile.","type":"string"},"websiteLink":{"description":"Website link for the profile.","type":"string"},"isServiceProfile":{"description":"Whether the profile is a service profile or not.","default":false,"type":"boolean"},"type":{"description":"Profile type: e.g. \"person\", \"organization\", \"service\".","type":"string"},"notificationsWebhook":{"description":"URL to send notifications to.","type":"string","format":"uri","pattern":"^http.*"},"display":{"description":"Display settings for the profile.","type":"object","properties":{"backgroundColor":{"type":"string"},"backgroundImage":{"type":"string"},"fadeBackgroundImage":{"type":"boolean"},"repeatBackgroundImage":{"type":"boolean"},"fontColor":{"type":"string"},"accentColor":{"type":"string"},"accentFontColor":{"type":"string"},"idBackgroundImage":{"type":"string"},"fadeIdBackgroundImage":{"type":"boolean"},"idBackgroundColor":{"type":"string"},"repeatIdBackgroundImage":{"type":"boolean"}},"additionalProperties":false},"highlightedCredentials":{"description":"Up to 5 unique boost URIs to highlight on the profile.","maxItems":5,"type":"array","items":{"type":"string"}},"role":{"description":"Role of the profile: e.g. \"teacher\", \"student\".","default":"","type":"string"},"dob":{"description":"Date of birth of the profile: e.g. \"1990-01-01\".","default":"","type":"string"},"country":{"description":"Country for the profile.","type":"string"},"approved":{"description":"Approval status for the profile.","type":"boolean"}},"required":["profileId","displayName","shortBio","bio","did"],"additionalProperties":false},"status":{"anyOf":[{"type":"string","enum":["pending","accepted","denied"]},{"type":"null"}]},"readStatus":{"anyOf":[{"type":"string","enum":["unseen","seen"]},{"type":"null"}]},"contractUri":{"type":"string"}},"required":["profile","status"],"additionalProperties":false}}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.NOT_FOUND"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```

## Forward a contract request

> Forwards a contract request to another profile

```json
{"openapi":"3.1.0","info":{"title":"LearnCloud Network API","version":"1.0.0"},"tags":[{"name":"Contracts"}],"servers":[{"url":"../api"}],"security":[{"Authorization":[]}],"components":{"securitySchemes":{"Authorization":{"type":"http","scheme":"bearer"}},"schemas":{"error.BAD_REQUEST":{"title":"Invalid input data error (400)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.UNAUTHORIZED":{"title":"Authorization not provided error (401)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.FORBIDDEN":{"title":"Insufficient access error (403)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false},"error.INTERNAL_SERVER_ERROR":{"title":"Internal server error error (500)","description":"The error information","type":"object","properties":{"message":{"description":"The error message","type":"string"},"code":{"description":"The error code","type":"string"},"issues":{"description":"An array of issues that were responsible for the error","type":"array","items":{"type":"object","properties":{"message":{"type":"string"}},"required":["message"],"additionalProperties":false}}},"required":["message","code"],"additionalProperties":false}}},"paths":{"/consent-flow-contracts/forward-request-to-profile":{"post":{"operationId":"contracts-forwardContractRequestToProfile","summary":"Forward a contract request","description":"Forwards a contract request to another profile","tags":["Contracts"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"parentProfileId":{"type":"string"},"targetProfileId":{"type":"string"},"contractUri":{"type":"string"}},"required":["parentProfileId","targetProfileId"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"Invalid input data","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.BAD_REQUEST"}}}},"401":{"description":"Authorization not provided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.UNAUTHORIZED"}}}},"403":{"description":"Insufficient access","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.FORBIDDEN"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/error.INTERNAL_SERVER_ERROR"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.learncard.com/sdks/learncard-network/contracts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
