Auth API reference

Auth API · App-Audit-Sink

post/v1/apps/{app_id}/audit-sink/testAuth

Send a test batch to the receiver now and report what it answered.

POSTs one signed batch, shaped exactly like a real one (`type: audit.batch`, same headers and signature), with `test: true` and a single synthetic record whose `id` starts with `test_`. Works while export is paused or stopped, so a fix can be proven before export is turned back on. The outcome is recorded on the sink (`last_attempt_*`, `last_test_succeeded_at`) but never moves the position in the audit log or counts toward the automatic stop. A refused test is still a 200 with `delivered: false`. At most 20 tests per app per hour.

Path parameters

app_id*string

Id of the app.

Headers

Idempotency-Keystring

A retried request with the same key returns the first result instead of sending a second test. 24h TTL.

Response · 200 What the receiver answered.

delivered*boolean

True when the receiver answered 2xx.

Example: true

status_code*number

The receiver's HTTP status; null when no response arrived.

Example: 200

error*string

Why it was not accepted, in a short sentence; null on success.

Example: null

duration_ms*number

Round trip in milliseconds.

Example: 182

attempted_at*string · date-time

When the test delivery was attempted (ISO 8601).

sink*object

The sink after recording this test.

Example

Request

POST https://api.auth.productcraft.co/v1/apps/{app_id}/audit-sink/test
Authorization: Bearer YOUR_TOKEN

Response

{
  "delivered": true,
  "status_code": 200,
  "error": null,
  "duration_ms": 182,
  "attempted_at": "2026-01-01T00:00:00.000Z",
  "sink": {}
}