---
title: "Add offers to FAISS index"
method: POST
path: "/v1/internal/offers/index"
tags: ["index"]
---

# Add offers to FAISS index

`POST /v1/internal/offers/index`

## Request

- Base URL: `https://api.getyourjob.pro` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getyourjob.pro/v1/internal/offers/index`
- Auth: none declared

Add or update offers in the FAISS vector index.

One offer that cannot be embedded is skipped and listed in `failed_ids`; the
rest of the batch is indexed (2026-10-05). 500 only when nothing could be.

## Request body

- IndexOffersRequest: Request to add offers to the FAISS index. Batch size: the local MiniLM embeds ~30 ms per offer on the production CPU, so a request of N offers takes about N x 30 ms plus the index save. Send at most ~500 offers per request (~15 s); 2 000-3 300 per request (the nightly sync until 2026-10-05) takes one to two minutes and trips client timeouts. The limit below is a hard ceiling, not a recommended size.
  - `offers` object[], required: List of offer dicts with external_id, title, required_skills, etc. Recommended: <= 500 per request (~30 ms per offer).

## Response `200`

Successful Response

- IndexOffersResponse: Response from indexing offers.
  - `success` boolean
  - `indexed` integer, required: Number of offers indexed
  - `total_in_index` integer, required: Total offers now in index
  - `failed` integer: Offers skipped (could not be embedded)
  - `failed_ids` string[]: external_ids of the skipped offers; the rest of the batch is indexed

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getyourjob/apis/matchingagent-api.md) · [All operations](https://skmtc.dev/getyourjob/apis/matchingagent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/getyourjob/apis/matchingagent-api/revisions/3a2d9ceb7c84?raw)
