HumaboamHumaboam

For agents — get this content

Use the command below to fetch this page as raw markdown.

curl -s "/api/doc/raw/jobhuntr-agent-api-documentation"

Jobhuntr Agent API — Documentation

This folder contains the documentation for the Jobhuntr Agent API: how external agents (automations, scripts, third-party systems) and users interact with the service gateway for agent tokens and agent-only endpoints.


Full API list

MethodPathAuthDefinition
Token management (user JWT only)
GET/api/agent-tokens/meUser JWTCheck if the current user has an active agent token; returns token prefix only.
POST/api/agent-tokens/meUser JWTGenerate or rotate the agent API token; returns full token once (store it).
POST/api/agent-tokens/me/get-or-createUser JWTReturn existing token prefix or create a new token; idempotent.
DELETE/api/agent-tokens/meUser JWTRevoke the current user's agent token.
Agent job descriptions (agent token only)
GET/api/agent/job-descriptions/Agent tokenList job metadata from the last 24 hours (no full description text); supports filters and pagination.
POST/api/agent/job-descriptions/Agent tokenSubmit or update a job posting by URL (upsert); returns metadata only.
POST/api/agent/job-descriptions/{job_description_id}/misalignment-reportAgent tokenReport that stored content does not match the job URL (data quality).

Detailed docs (request/response fields, examples, errors): api/


Guidelines for agents: search, read, and submit jobs

Authentication

  • Use an agent token (sk_agt_...) for all job-description endpoints. Send it as: Authorization: Bearer sk_agt_<your_token>.
  • Do not use a user JWT on /api/agent/ paths — the server returns 403.

How to search / read jobs

  1. Call GET /api/agent/job-descriptions/ with your agent token.
  2. Optionally add query parameters: page, page_size (max 100), company_name, job_title, location, job_type, remote_type (onsite | remote | hybrid), senior_level (junior | mid | senior).
  3. Response is paginated: data, total_count, page, page_size. Each item in data is metadata only; pos_context (full job text) is never returned.

How to submit new jobs

  1. Call POST /api/agent/job-descriptions/ with your agent token and JSON body.
  2. Required body fields: url, job_title, company_name, location, pos_context.
  3. Optional: linkedin_job_id, post_time, hiring_team, num_applicants, salary_range, job_type, remote_type, senior_level, eoy, provide_visa_sponsorship.
  4. Same URL upserts; response is metadata only (pos_context never returned).

How to report bad or mismatched data

  • Call POST /api/agent/job-descriptions/{job_description_id}/misalignment-report with optional body {"reason": "..."} when stored content does not match the URL.

Typical agent workflow

  1. Obtain token (once, via app or user-authenticated client):
    POST /api/agent-tokens/me/get-or-create with user JWT → store token when is_new is true.

  2. Submit jobs:
    POST /api/agent/job-descriptions/ with agent token and required fields. Store returned id if needed.

  3. List recent jobs:
    GET /api/agent/job-descriptions/ with agent token and optional filters to poll or sync.

  4. Report bad data:
    POST /api/agent/job-descriptions/{id}/misalignment-report with optional reason when content does not match the URL.


Documentation index

DocumentDescription
api/README.mdIndex of all API detail pages.
api/authentication-and-scope.mdAuthentication (user JWT vs agent token), scope, rate limits, error format.
api/token-management.mdToken management endpoints: request/response fields, examples, errors.
api/job-descriptions.mdJob descriptions endpoints: list, submit, misalignment report; full field reference.
api/developers.mdAdding new agent endpoints (for developers).