Your keys and secrets
Lynxin uses two kinds of API key plus a webhook signing secret, each with one job. The client key (pk_) goes in your web page or app for the SDK; the server key (sk_) and the signing secret stay on your own servers.
| Credential | Prefix | Where it lives | What it's for |
|---|---|---|---|
| Client key | pk_ | Front-end SDK (browser/app) | Required, Behavioral Sensing: upload and submit recordings (upload:presign, signal:write). On by default, Personality Profiling: trigger analysis and check progress (analyze:trigger, status:read). Optional, report reading (result:read:own): off by default, and turning it on asks for confirmation. |
| Server key | sk_ | Your back-end server | Everything a client key can do, plus fetching reports, reading usage and managing webhooks. Permission to delete uploaded videos is off by default; turn it on in the key's row in the console when you need it. |
| Webhook signing secret | whsec_ | Your back-end server | Verify a callback really came from Lynxin (HMAC signature). Not an API key — you generate one per webhook in the console (see Webhooks). |
Rules
Base URL. The /v1 endpoints on this page and the SDK pages all sit under https://open.hslingxin.com (background checks have their own base URL — see that page). The smallest call looks like this:
curl -H "X-API-Key: $LYNXIN_SK" https://open.hslingxin.com/v1/limits # 200 — JSON with rate, burst, concurrency, daily_quota # 401 — empty body (missing or invalid key); the X-Request-Id response header is still there
- Keep
sk_only on your own servers — never put it in browser code, a mobile bundle, or a public repo. - Usage generated with a client key is charged to your account, and once Personality Profiling is enabled it can also trigger analyses. Treat it as a credential that can incur charges; revoke any key you suspect in the console.
- Permissions. Client key (
pk_): Behavioral Sensing —upload:presign·signal:write(required); Personality Profiling —analyze:trigger·status:read(on by default); report reading —result:read:own(optional, off by default). Server key (sk_): all of the above, plusreport:read/list·result:pull·usage:read·webhook:config;upload:deleteis off by default. - What the extra server-key permissions do:
report:read/listreads and lists Lynxin Affect reports;result:pullfetches analysis results byclient_ref;usage:readreads usage;webhook:configmanages webhooks;upload:deletedeletes uploaded videos. - Header. Every request carries an
X-API-Keyheader with yourpk_orsk_; the gateway resolves your tenant from the key. Keys are bound to yourtenant_id— cross-tenant access returns 404. - What a browser can call. In the browser, use only your client key, through the SDK, to upload and submit recordings. A client key calling an account endpoint (keys, balance, limits and so on) or any delete endpoint gets
403. Browser requests can only carry theX-API-KeyandContent-Typeheaders, so headers such asIdempotency-Keycan't be sent. Call every server-key-only endpoint, background checks included, from your backend. - Where keys come from. When your account is set up, the console issues one client key (pk_) and one server key (sk_). The client key is shown in full; the server key is partly hidden in the list, and you can view the full value again in the console when you need it.
Self-service endpoints (your backend · server key)
These tenant-scoped endpoints are the small set your back end calls directly to manage its account — everything else (collection, analysis, report delivery) is handled by the SDK and webhooks.
| Endpoint | Use |
|---|---|
GET /v1/keys · POST /v1/keys · DELETE /v1/keys/{id} | Manage keys (usually done in the console). |
GET /v1/usage · GET /v1/usage/export | Usage detail (CSV export available). |
GET /v1/credits · GET /v1/limits | Balance & rate tier. |
GET /v1/webhook · PUT /v1/webhook · POST /v1/webhook/secret · POST /v1/webhook/test · GET /v1/webhook/deliveries · POST /v1/webhook/deliveries/{delivery_id}/resend | Manage webhooks: read and change the callback settings, rotate the signing secret, send a test event, and view and resend deliveries. |
GET /v1/results?client_ref= | Fetch analysis results from the last 30 days by client_ref (needs result:pull). |
GET /v1/rdp/{session_id}/report | Read the Lynxin Affect report (needs report:read). |