Publishable keys
Every request carries a publishable key in theX-API-Key header:
Authorization: Bearer vak_pub_… works too.
A key is vak_pub_ followed by 48 hexadecimal characters. It can only:
Keys created in the dashboard have both scopes. A key cannot read learners, payments or anything unpublished, so it is safe if it ends up in page source. It is still best kept on your server (see Where to call from).
Create, list and revoke keys
An admin of the institute manages keys in the Vacademy dashboard: Settings → Integrations → Catalogue API & websites → Publishable API keys.- Create key asks for a name (for example
School website) and shows the key once. Vacademy stores only a hash. - The table shows each key’s prefix, creation date and when it was last used.
- Revoke stops a key. It can take up to 30 seconds to stop everywhere.
Where to call from
The check uses the
Origin header only; Referer is ignored. Server-side fetch in Node.js sends no Origin, so server-rendered pages never need a verified website.
Matching rules
A verified host covers itself and every subdomain below it, matched on whole labels:
Scheme and port are not part of the match.
Preview deployments
Preview URLs such asmy-site-git-feature-team.vercel.app cannot be verified: proving ownership needs a DNS record on the host, and you do not control vercel.app. On previews, call the API from the server only (server components, route handlers, server actions). That is already the case if you follow the quickstart.
A preview on your own domain (for example preview.example.org) is covered once example.org is verified.
Verify your website
Needed only for browser-side calls from your production domain.1
Add the website
In Settings → Integrations → Catalogue API & websites → Your websites, click Add website and enter the host, for example
example.org. A full link such as https://www.example.org/courses is accepted and reduced to its host.To cover www and every other subdomain with one record, add the bare domain.2
Create the DNS record
Vacademy shows a TXT record. At your DNS provider, create:
<token> is 32 hexadecimal characters, shown in the dashboard. Many DNS providers add your domain to the name for you; there, enter only _vacademy-verification.3
Verify
Click Verify now. Vacademy looks the record up over DNS-over-HTTPS (Cloudflare, then Google). The website turns Verified, or stays Pending with the reason, for example:
No TXT record found at _vacademy-verification.example.org yet. DNS changes can take up to an hour.Check the record yourself with:
Rules
- Up to 20 websites per institute.
- IP addresses, single-label names (
intranet) andlocalhostcannot be added.localhostis always allowed anyway. - Remove stops browser calls from that website within a minute. You can add it again; it needs verifying again.
- A website can be blocked by Vacademy (status Revoked). It then stops working and cannot be re-added; contact support@vacademy.io.
Course page address
Every course’surl points to its page on the institute’s hosted catalogue site. Vacademy works the address out from the institute’s course site domain; the same dashboard card shows it under Course page address, where an admin can override it (must be https://, no query or fragment).
GET /site returns it as course_base_url. When it cannot be worked out, course_base_url and every url are null.