error field and an optional code field for programmatic handling.
Error response format
details array with field-level information:
HTTP status codes
400 Bad Request
The request body is malformed or missing required fields.- Missing required fields (
title,role,taskBrief) - Invalid field types (string where number expected)
- Values out of range (
timeLimitMinutesmust be positive) taskBriefnot provided and noissueIdspecified
401 Unauthorized
The API key is missing, invalid, expired, or revoked.- Missing
Authorizationheader - Malformed Bearer token
- Revoked API key
- Using a candidate key (
PST-XXXX) instead of an org API key (psk_live_...)
402 Payment Required
The organization does not have an active subscription.code values:
403 Forbidden
The API key lacks the required scope or the organization has exceeded its quota.- API key has only
readscope but the operation requireswrite - Monthly assessment quota exceeded
404 Not Found
The requested resource does not exist or does not belong to your organization.- Invalid or non-existent resource ID
- Resource belongs to a different organization
- Resource has been soft-deleted
409 Conflict
The resource already exists (e.g., creating a session with a duplicate ID).429 Too Many Requests
Rate limit exceeded. See Rate Limits.x-ratelimit-reset response header for when you can retry.
