Ingestion APIAPI v1 ReferenceIngestion

Create new ingestion

Creates a new ingestion job for processing product data. Supports two modes: - insert: Process only products in the feed, existing products remain unchanged - replace: Full sync mode - products not in feed will be disabled Authentication: send your private key (`sk_...`) in the `X-PSYKHE-API-KEY` header. Ingestion must run from a trusted backend; never embed private keys in client-side code.

POST
/ingestion/

Creates a new ingestion job for processing product data.

Supports two modes:

  • insert: Process only products in the feed, existing products remain unchanged
  • replace: Full sync mode - products not in feed will be disabled

Authentication: send your private key (sk_...) in the X-PSYKHE-API-KEY header. Ingestion must run from a trusted backend; never embed private keys in client-side code.

Authorization

PrivateApiKeyHeader
X-PSYKHE-API-KEY<token>

Private API key (sk_...). Server-to-server only; never expose in client-side code.

In: header

Request Body

application/x-ndjson

Product feed

TypeScript Definitions

Use the request body type in TypeScript.

body*string

JSONL formatted product data, one product per line

Response Body

application/json

curl -X post "https://api.psykhe.dev/v1/ingestion/" \  -H "Content-Type: application/x-ndjson" \  -d '{"action":"insert","product_data":{"identifier":"sku_1001","main_image":"https://cdn.psykhe.dev/products/sku_1001.jpg"}}  {"action":"insert","product_data":{"identifier":"sku_1002","main_image":"https://cdn.psykhe.dev/products/sku_1002.jpg"}}  '
{
  "ingestion_id": 1231
}