/v1/apps/{app_id}/audit-sink/testAuthSend 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*stringId of the app.
Headers
Idempotency-KeystringA 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*booleanTrue when the receiver answered 2xx.
Example: true
status_code*numberThe receiver's HTTP status; null when no response arrived.
Example: 200
error*stringWhy it was not accepted, in a short sentence; null on success.
Example: null
duration_ms*numberRound trip in milliseconds.
Example: 182
attempted_at*string · date-timeWhen the test delivery was attempted (ISO 8601).
sink*objectThe sink after recording this test.
Example
Request
POST https://api.auth.productcraft.co/v1/apps/{app_id}/audit-sink/test
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const auditSinkTestResult = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").auditSink.test();auth.admin.app(…).auditSink.test(options?): Auth.AuditSinkTestResult
Response
{
"delivered": true,
"status_code": 200,
"error": null,
"duration_ms": 182,
"attempted_at": "2026-01-01T00:00:00.000Z",
"sink": {}
}