How to use the API?

How to use
the API?


Step-by-step guide explaining the automation of exchanging offers via API:


How to usethe API?

What is the API used for?

Job Search REST API allows advertisers to create, update, and delete sponsored packages based on a script or their own application — without manual clicking in the panel.


The account password is not sent to the API as only the Bearer token is used.


  • Base URL: /api/job-search ·
  • Format: JSON ·
  • Limit: 60 requests / minute ·
  • Rule: one request = one package.


Step 1 — Account and Permissions

  1. Create an employer account and choose a plan with the Job Search module.
  2. Log in to the panel. The user must have Administrator account permission.
  3. Open Job Search → API Tokens at /admin/job-search/api-tokens.


Step 2 — Create a Token (Personal Access Token)

  1. Provide a name (e.g. “API production”) and optionally an expiration date.
  2. Click Create token. The full token will be shown only once — copy it immediately and remember it. You won't see it again in the future!
  3. The token has a scope (ability): job-search:visibility. Tokens with just the ability * (e.g. mobile application) do not work with this API.


Step 3 — Headers for Each Request

Authorization: Bearer YOUR_TOKEN
Accept: application/json
Content-Type: application/json

Without a correct bearer token with the scope (ability) job-search:visibility, the API will respond with 403 and the code job_search_api_ability_required.


Step 4 — Endpoints

  • GET /api/job-search/visibility-packages — list of packages + summary of limit (usage).
  • GET /api/job-search/visibility-packages/usage — just the usage of the plan limit.
  • POST /api/job-search/visibility-packages — create a package (response 201).
  • GET /api/job-search/visibility-packages/{id} — details of a single package.
  • PUT or PATCH /api/job-search/visibility-packages/{id} — full update of package fields and creation.
  • DELETE /api/job-search/visibility-packages/{id} — delete a package (response 204 with no content).

Packages of other users are not visible — the API returns 404 in that case.


Step 5 — JSON Fields (Validation Rules)

  • name (required) — name of the campaign, max 255 characters.
  • status (required) — draft, active, paused, or ended.
  • starts_on / ends_on — dates in YYYY-MM-DD. With status: active, both are required; ends_on ≥ starts_on.
  • keywords — array of targeting phrases (e.g. “SAP SD”). Match candidate's search phrase.
  • locations — array of locations; value remote includes the “remote only” mode. Narrow down with location filters.
  • creative (required) — creation object:
  • title (required) — title of the card,
  • body (optional) — description, max 2000 characters,
  • cta_label (optional) — button text, max 120 characters,
  • cta_url (required) — full target URL (http/https).

Drafts (draft) do not consume the limit of active campaigns. Activating beyond the plan limit is blocked.


Step 6 — Example: Creating a Package (curl)

curl -X POST "https://jobsearch.fringen.com/api/job-search/visibility-packages" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d @job-search-visibility-package-sample.json

Sample JSON file (status defaults to draft to avoid consuming the limit):

{
    "name": "Sample SAP campaign",
    "status": "draft",
    "starts_on": "2026-11-14",
    "ends_on": "2026-12-14",
    "keywords": [
        "SAP SD",
        "SAP MM"
    ],
    "locations": [
        "remote",
        "Warsaw"
    ],
    "creative": {
        "title": "We are hiring SAP specialists",
        "body": "Join the team — remote or hybrid work. Apply in a few clicks.",
        "cta_label": "Check the offer",
        "cta_url": "https://example.com/careers/sap"
    }
}

You can download the same template from the panel: API Tokens → Sample JSON.


Step 7 — Activation and Plan Limit

To make the card appear to candidates, set "status": "active" and the dates starts_on / ends_on (POST or PUT/PATCH). The limit of simultaneously active packages comes from the tariff plan (max_active_visibility_packages; null = no limit).

When the limit is exhausted, the API returns 422 and does not save anything:

{
  "message": "The tariff plan allows a maximum of …",
  "code": "plan_limit_exceeded",
  "limit": 1,
  "active_count": 1,
  "remaining": 0,
  "errors": { "status": ["…"] }
}

Solution: pause another package (paused), wait for the end date, or upgrade the plan. You can check usage via GET …/usage — fields limit, activeCount, canActivateAnother.


Step 8 — Edit, Read, Delete

# List
curl -H "Authorization: Bearer YOUR_TOKEN" -H "Accept: application/json" \
  "https://jobsearch.fringen.com/api/job-search/visibility-packages"

# Details
curl -H "Authorization: Bearer YOUR_TOKEN" -H "Accept: application/json" \
  "https://jobsearch.fringen.com/api/job-search/visibility-packages/42"

# Update (PUT or PATCH) — send the full set of fields as during creation
curl -X PUT "https://jobsearch.fringen.com/api/job-search/visibility-packages/42" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d @package.json

# Deletion
curl -X DELETE -H "Authorization: Bearer YOUR_TOKEN" -H "Accept: application/json" \
  "https://jobsearch.fringen.com/api/job-search/visibility-packages/42"


Step 9 — Package Response (JSON Shape)

After creating / reading / updating, in data you get among others: id, name, status, starts_on, ends_on, keywords, locations, click_count, creative (id, title, body, cta_label, cta_url). Often, when listing and saving, usage is also included.


Step 10 — Security and Best Practices

  • Keep the token outside the code repository and assign an expiration date.
  • When the integration is to end — invalidate the token from the list in the panel. The account password remains unchanged.
  • Do not send multiple packages in a single body — each package is a separate POST/PUT.
  • Respect the throttle: above 60 requests per minute, you will receive 429.
  • CTA must lead to a real offer; cards are labeled as sponsored content.


Rules and Frequently Asked Questions

Can I use a token from a mobile application (*)?
No. Middleware requires an explicit ability job-search:visibility. A token with just the ability “*” gets 403 (code: job_search_api_ability_required). Create a dedicated PAT in the API Tokens panel.
Can one request create multiple packages?
No. The API is designed as a single submission: one body = one package. Send a separate POST for each campaign.
When do I need to provide starts_on and ends_on?
Always when status = active. For draft / paused / ended, dates are optional. ends_on must be equal to or later than starts_on.
What happens when the limit of active packages is exhausted?
POST or update with an active status ends with 422 and code=plan_limit_exceeded (limit, active_count, remaining). The record is neither created nor changed. Pause another package or upgrade the plan.
How can I check how many slots I have left?
GET /api/job-search/visibility-packages/usage or the usage field when listing / saving. Includes limit, activeCount, and canActivateAnother.
Can I see packages from another tenant?
No. Each token operates in the context of your tenant. A foreign package identifier results in 404.
How do I cut off the integration without changing the password?
On the token list in /admin/job-search/api-tokens click Invalidate. ATS will cease to function until you generate a new token.
What is the limit on the number of requests?
API Throttle: 60 requests per minute per user/token. Exceeding the limit will yield HTTP 429.