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

Was this helpful?

  1. SDKs & API Reference
  2. LearnCloud Network API

Claim Hooks

PreviousDID MetadataNextAuth Grants

Was this helpful?

🛠️
  • POSTCreates a claim hook
  • POSTGets Claim Hooks
  • POSTDelete a Claim Hook

Creates a claim hook

post

This route creates a claim hook. Claim hooks are an atomic action that will be performed when a boost is claimed

Authorizations
Body
hookany ofRequired
or
Responses
200
Successful response
application/json
Responsestring
default
Error response
application/json
post
POST /api/claim-hook/create HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 390

{
  "hook": {
    "type": "GRANT_PERMISSIONS",
    "data": {
      "claimUri": "text",
      "targetUri": "text",
      "permissions": {
        "role": "text",
        "canEdit": true,
        "canIssue": true,
        "canRevoke": true,
        "canManagePermissions": true,
        "canIssueChildren": "text",
        "canCreateChildren": "text",
        "canEditChildren": "text",
        "canRevokeChildren": "text",
        "canManageChildrenPermissions": "text",
        "canManageChildrenProfiles": false,
        "canViewAnalytics": true
      }
    }
  }
}
text

Gets Claim Hooks

post

This route gets claim hooks attached to a given boost

Authorizations
Body
limitnumberOptionalDefault: 25
cursorstringOptional
sortstringOptional
uristringRequired
Responses
200
Successful response
application/json
default
Error response
application/json
post
POST /api/claim-hook/get HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 431

{
  "limit": 25,
  "cursor": "text",
  "sort": "text",
  "query": {
    "type": "text",
    "data": {
      "claimUri": "text",
      "targetUri": "text",
      "permissions": {
        "role": "text",
        "canEdit": true,
        "canIssue": true,
        "canRevoke": true,
        "canManagePermissions": true,
        "canIssueChildren": "text",
        "canCreateChildren": "text",
        "canEditChildren": "text",
        "canRevokeChildren": "text",
        "canManageChildrenPermissions": "text",
        "canManageChildrenProfiles": true,
        "canViewAnalytics": true
      }
    }
  },
  "uri": "text"
}
{
  "cursor": "text",
  "hasMore": true,
  "records": [
    {
      "id": "text",
      "createdAt": "text",
      "updatedAt": "text",
      "type": "GRANT_PERMISSIONS",
      "data": {
        "claimUri": "text",
        "targetUri": "text",
        "permissions": {
          "role": "text",
          "canEdit": true,
          "canIssue": true,
          "canRevoke": true,
          "canManagePermissions": true,
          "canIssueChildren": "text",
          "canCreateChildren": "text",
          "canEditChildren": "text",
          "canRevokeChildren": "text",
          "canManageChildrenPermissions": "text",
          "canManageChildrenProfiles": false,
          "canViewAnalytics": true
        }
      }
    }
  ]
}

Delete a Claim Hook

post

This route deletes a claim hook

Authorizations
Body
idstringRequired
Responses
200
Successful response
application/json
Responseboolean
default
Error response
application/json
post
POST /api/claim-hook/update HTTP/1.1
Host: ..
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 13

{
  "id": "text"
}
true