PubDaily — API Reference

Sync people and pull scores with one API.

Push employees and roles in, pull competency scores out. This page documents authentication, the employees and scores endpoints, webhook events, and the response schema.

Authentication

Every request is authenticated with an API key, scoped to your workspace. Pass it as a bearer token in the Authorization header.

Authorization: Bearer rk_live_••••••••••••••••

Keys are environment-scoped. Use an rk_test_ key against the sandbox while you integrate, and an rk_live_ key once you're ready to sync real employees.

Employees and scores

Two endpoints cover most integrations: push a person and their role in, and pull their current scores back out. Most teams call these from a nightly HR sync rather than in real time.

PUT https://api.pubdaily.app/v1/employees/:external_id
GET https://api.pubdaily.app/v1/teams/:team_id/scores

Request

The :external_id in the employees endpoint is your own system's identifier, so a repeated call updates the same person rather than creating a duplicate. Role changes take effect the next morning's lesson.

curl -X PUT https://api.pubdaily.app/v1/employees/emp_4471 \ -H "Authorization: Bearer $PUBDAILY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "A. Belkacem", "email": "a.belkacem@example.org", "role": "icu-nurse", "team_id": "team_icu", "start_date": "2026-09-15" }'
# pip install pubdaily from pubdaily import PubDaily client = PubDaily(api_key="PUBDAILY_API_KEY") client.employees.upsert( external_id="emp_4471", name="A. Belkacem", role="icu-nurse", team_id="team_icu", ) scores = client.teams.scores("team_icu") print(scores.knowledge, scores.judgment)
// npm install @pubdaily/sdk import { PubDaily } from "@pubdaily/sdk"; const client = new PubDaily({ apiKey: process.env.PUBDAILY_API_KEY }); await client.employees.upsert("emp_4471", { name: "A. Belkacem", role: "icu-nurse", teamId: "team_icu", }); const scores = await client.teams.scores("team_icu"); console.log(scores.knowledge, scores.judgment);
// npm install @pubdaily/sdk import { PubDaily, type TeamScores } from "@pubdaily/sdk"; const client = new PubDaily({ apiKey: process.env.PUBDAILY_API_KEY! }); const scores: TeamScores = await client.teams.scores("team_icu");

Response schema

The scores endpoint returns structured JSON per team, with each employee broken out individually.

{ "team_id": "team_icu", "employees": 18, "knowledge_score": 0.87, "judgment_score": 0.79, "fast_wrong_rate": 0.04, "weakest_topic": "sepsis escalation", "updated_at": "2026-09-17T07:00:00Z" }
FieldTypeDescription
knowledge_scorenumberShare of factual questions answered correctly, 0–1. See Scoring below.
judgment_scorenumberRanked score on scenario questions, 0–1.
fast_wrong_ratenumberShare of answers given too quickly to have been read.
weakest_topicstringThe folder this team scores lowest on right now.
updated_atstringISO 8601 timestamp of the last completed lesson counted in this score.

Webhooks

Subscribe to lesson.completed and threshold.breached to push results into your own systems instead of polling. Configure an endpoint URL from your workspace settings.

EventFires when
lesson.completedAn employee finishes a daily lesson.
threshold.breachedA team's score drops below the alert level you configured.
employee.role_changedA role change from your HR sync updates someone's curriculum.

Errors

StatusMeaning
401Missing or invalid API key.
403Key valid but not authorized for this team or employee.
422Request body missing required fields, or role unrecognised.
429Rate limit exceeded. See Rate limits below.
500Something went wrong on our end. Safe to retry with backoff.

Rate limits

Rate limits are scoped per API key and set during onboarding based on your expected volume. Every response includes standard X-RateLimit-Limit and X-RateLimit-Remaining headers so you can back off proactively.

Frequently asked questions

How do I get an API key?

Ask for API access and we'll issue sandbox and production keys for your workspace.

Is there a sandbox environment?

Yes, rk_test_ keys hit a sandbox with synthetic employees and teams, no real data required.

Do I have to use the API to sync employees?

No. Most teams connect an HR system directly from the dashboard; the API is for teams who want to script it themselves or push results into another tool.

Do you offer official SDKs?

Python, JavaScript, and TypeScript SDKs are available; other languages can call the REST endpoint directly.

Ready to integrate?

Get sandbox access and start syncing employees today.

Request API access →