Browse API documentation
API REFERENCEv1

Create an application session

Create a short-lived, signed session before uploading files or submitting answers.

On this page
POST/api/auth/public/v1/jobs/{job_id}/application-session

Requires applications:write. Only your company's eligible public postings are accessible. Read the implementation guide →

How to use this endpoint

Start a session from your server before the first file upload or application submission. Retain its token in that applicant's server-side flow state. Sessions normally last 20 minutes; use the returned expiry rather than assuming the duration. They are bound to your credential version, server IP, company brand, job and posting. A secret reset or egress IP change requires a new session. No browser Turnstile token or JSON body is required here.

Authentication

Send both headers from your server. An app key or application token alone does not authorize a request.

http
X-Karwa-App-Key: <APP_KEY>
Authorization: Bearer <SECRET_KEY>

Parameters

Path parameters

job_idstringRequired

The public job ID from a jobs response. Internal numeric IDs cannot be used.

Query parameters

posting_idstring or nullOptional

The selected posting ID. Pass the same value throughout detail, form, session, upload and submission. Omission selects the default eligible posting.

Request body

No request body is required.

Request example

Set KARWA_API_BASE to your HTTPS gateway origin followed by /api/auth/public/v1. Local development uses http://localhost:8000/api/auth/public/v1. Replace job, posting, question and token values where shown.

bash
curl --fail-with-body -X POST "$KARWA_API_BASE/jobs/$JOB_ID/application-session?posting_id=$POSTING_ID" \
  -H "X-Karwa-App-Key: $KARWA_APP_KEY" \
  -H "Authorization: Bearer $KARWA_SECRET_KEY"

Response

200 · application/json · Successful Response

tokenstringRequired
Sensitive flow token. Store it in your server's applicant-flow state and redact it from logs.
expires_atdate-timeRequired
UTC expiry timestamp. Obtain a fresh session after expiry, IP changes or secret reset.
json · example response
{
  "token": "<APPLICATION_TOKEN>",
  "expires_at": "2026-11-06T09:20:00Z"
}

Errors and recovery

401
Invalid credential or application session
403
Missing permission, scope or plan access
404
Posting unavailable
413
Request exceeds upload or JSON size limit
422
Validation Error
429
Rate limited; observe Retry-After
503
Temporary service failure
json · example error response
{
  "detail": "Invalid API key"
}

Inspect the HTTP status before using the body. Validation detail can be a string or an array. For submission timeouts, retain the same Idempotency-Key. For 429 responses, wait for Retry-After. See error handling and quotas →