job-matches

Enqueue the A-G Match Evaluation Report

ENQUEUES the 7-block A-G structured evaluator (role summary, CV match, level strategy, comp & demand, personalization plan, interview plan, posting legitimacy) and returns IMMEDIATELY - it never blocks on generation. The client polls GET /job-matches/{id}/evaluation until status leaves generating. The worker persists the assembled markdown to R2 + a user_document row with documentType=match_report and stamps the doc id on job_match.match_report_doc_id. Idempotent by construction: the row is claimed with a compare-and-swap on job_match.match_report_status against the PRIMARY before the enqueue, so at-least-once queue delivery cannot bill the user twice for one report. Supply force=true to reclaim a failed/completed row and regenerate. When the user has no token balance NOTHING is claimed or enqueued and the response carries status: out_of_tokens.

post/job-matches/{id}/evaluate

Request

  • Base URL: https://api.aiapplyd.com/api/v1
  • URL: https://api.aiapplyd.com/api/v1/job-matches/{id}/evaluate
  • Auth: HTTP bearer

Path parameters

idstring required

Job match identifier

Example:1

Query parameters

boolean
OR
'0' | '1' | 'true' | 'false'

Response

Match evaluation generated (or cached)

successtrue required

Example response

{
  "data": {
    "jobMatchId": 567,
    "retryAfterMs": 3000,
    "status": "generating"
  },
  "meta": {
    "duration": 150,
    "requestId": "req_abc123",
    "timestamp": "2026-10-13T10:27:20.268Z",
    "version": "v1"
  }
}

Changes