Quickstart: Send a Credential
Send a verifiable credential to any email address with one command, curl, or one short script.
Send a badge to an email address. The recipient gets a claim link and does not need an account until they claim it.
Choose one option.
You need Node.js 20 or newer. In an empty folder, run:
npx @learncard/cli sendThe command:
Ask where to send the badge — use a real email address you can open (or pass it directly:
npx @learncard/cli send you@yourdomain.com)Ask for your issuer name and a badge name (Enter accepts the defaults)
Generate a secret seed and write it to
.env(and add.envto.gitignore)Create your profile on the LearnCard Network
Sign a "Quickstart Complete" badge and send it
Write the generated code to
./send.mjs
Then skip to What you should see.
LearnCard signs the credential; this option requires no installation or key management.
Sign in at learncard.app and open learncard.app/app-store/developer. Create an Integration if you don't have one.
Open Guides → Issue Credentials and work down the steps:
API Token — create one and copy it. It's shown once.
Signing Authority — create one. This is the key LearnCard signs with for you (who signs?).
Create Templates — make a badge (any name). The template URI shown under the template selector — copy it exactly.
Send it:
export TOKEN=... # from the API Token step
export TEMPLATE_URI=lc:network:... # paste the template URI shown under the template selector
export RECIPIENT_EMAIL=you@example.comcurl -X POST https://network.learncard.com/api/send \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d "{
\"type\": \"boost\",
\"recipient\": \"$RECIPIENT_EMAIL\",
\"templateUri\": \"$TEMPLATE_URI\"
}"The response is JSON. inbox.status is PENDING (new person — they get an email with inbox.claimUrl) or ISSUED (already a LearnCard user — it's in their wallet). Skip to What you should see.
Set up. You need Node.js 20 or newer. In an empty folder:
Create a .env file with a secret seed and a profile ID:
The seed is your issuer identity. Anyone with it can issue credentials as you. Never commit it or share it.
Send a credential. Save this as send.mjs:
Run it with a real email address you can open. Placeholder domains like example.com are rejected by the mail provider.
What you should see

Your terminal shows one of two results:
Open the email, tap Claim, and sign in or create an account. "Quickstart Complete", a verifiable Open Badges 3.0 credential signed by you, appears in the wallet.
The recipient already has a verified account, so the credential is in their wallet.
Both are followed by:
You can rerun the script; it creates the profile only once.
The response is JSON:
inbox.status is PENDING for a new recipient — email them inbox.claimUrl to claim it — or ISSUED if they already use LearnCard, meaning it was auto-delivered with no claimUrl.
Every send saves the badge as a template (a Boost). To send the same badge to more people, pass templateUri: result.uri instead of signedCredential. LearnCard fills in and signs each one server-side once you set up a signing authority.
See it in the app
The seed in your .env is a LearnCard account. Open it:
That copies your seed to the clipboard and opens the app's developer sign-in page — click Paste from clipboard and you're in as the same profile that just sent the badge, with your template in the Developer Portal. open template, open contract, and open integration jump straight to what other commands created.
Your seed is only ever copied, never put in a URL. It also means anyone with your .env can sign in as your issuer — keep it out of git.
If something goes wrong
Cannot use import statement outside a module
File is named .js
Name it send.mjs
Key must be a hexadecimal string!
SECURE_SEED isn't 64 hex characters
Generate it with the command in step 1
A LearnCard has been initialized with a seed that is less than 32 bytes
Seed is too short
Same — generate a full 64-character seed
Profile already exists!
Someone else already took your PROFILE_ID
Pick a more specific one
Usage: node --env-file=.env send.mjs you@example.com
No recipient given
Add the email address as the last argument
Sending credentials via phone is a feature reserved for members of the LearnCard Trusted Registry
You passed a phone number as the recipient
Email works for everyone; phone needs issuer verification
Failed to send email via Postmark: … marked as inactive
The address is a placeholder (example.com) or has bounced before
Use a real address you can open
You must register a signing authority before using send without a pre-signed credential
You passed template or templateUri (server-signed) without a signing authority
Sign locally (signedCredential) or pick who signs
Next steps
Sign locally, send over HTTP — sign credentials yourself and deliver them from any language via the REST API.
The fields that make a credential yours — add an image, criteria, and skills.
Issue at scale with templates — issue the same badge to many people.
Know when a credential is claimed — get a webhook when it's delivered and when it's claimed.
What Do You Want to Build? — choose an integration path.
Last updated
Was this helpful?