What are candidate keys?
Candidate keys are one-time access codes in the formatPST-XXXX-XXXX. Each key links a specific candidate to an assessment. When a candidate runs promptster start PST-XXXX-XXXX, their session is automatically associated with your assessment and your organization’s scoring rubric.
Keys are valid until their expiry date (set by the assessment’s expiresInDays value) or until they are revoked.
Generate keys
POST /v1/assessments/:id/keys
Generates one or more candidate keys for an assessment. If you supply candidateEmails, invite emails are sent automatically.
Request body
Number of keys to generate. Must be between
1 and 50.Candidate email addresses. When provided, Promptster sends each candidate an invite email containing their key. Must have the same number of entries as
count if provided.Candidate display names used in invite emails and the reviewer dashboard. Must match the length of
candidateEmails if provided.Your company name as it appears in the invite email.
Example request
Example response
Returns201 Created with an array of generated key objects.
Response fields (per key)
Internal ID for the candidate key record. Use this to revoke a specific key.
The
PST-XXXX-XXXX access code you send to the candidate.UUID of the associated assessment.
Candidate email address, or
null if not provided.Candidate display name, or
null if not provided.Current key status. See Key lifecycle below.
ISO 8601 timestamp after which the key can no longer be redeemed.
ISO 8601 timestamp of when the candidate ran
promptster start, or null if not yet redeemed.ISO 8601 timestamp of when the candidate ran
promptster done, or null if not yet completed.List keys
GET /v1/assessments/:id/keys
Returns all active (non-revoked) keys for an assessment, ordered by creation date, with their current status.
Revoke a key
DELETE /v1/assessments/:id/keys/:keyId
Soft-deletes a single candidate key. The candidate can no longer use this key to start an assessment. Revoked keys do not appear in subsequent list responses.
{ "ok": true, "id": "<keyId>" } on success.
Key lifecycle
Every candidate key moves through a defined set of statuses:| Status | Meaning |
|---|---|
pending | Generated but not yet redeemed. The candidate has not run promptster start. |
redeemed | The candidate ran promptster start — their session is in progress. |
completed | The candidate ran promptster done — the session has been submitted for scoring. |
expired | The key passed its expiry date without the session being completed. |
hired | Manually marked by a reviewer to indicate the candidate was hired. |
List all candidates across assessments
GET /v1/candidates
Returns a paginated list of all candidates across your entire organization, joined with their assessment details.
Query parameters
Number of results per page. Defaults to
50, maximum 200.Number of results to skip for pagination. Defaults to
0.Example request
Example response
Response fields
Array of candidate key records, each enriched with
assessmentId and assessmentTitle from the linked assessment.Total number of candidates across your organization (before pagination).
The effective page size used for this response.
The offset applied for this response.