/v1/apps/{app_id}/audit-sinkAuthCurrent audit sink for this app, or 404 when none is configured. Never returns the signing secret — only its last-4 hint.
Path parameters
app_id*stringId of the app.
Response · 200
id*stringUnique identifier of the audit sink.
app_id*stringThe Auth app the audit sink belongs to.
url*stringHTTPS endpoint that receives the batched audit rows.
signing_secret_hint*stringLast 4 chars of the signing secret.
enabled*booleanWhether the audit sink is enabled.
disabled_at*string · date-timeWhen the audit sink was disabled (ISO 8601), or `null` while enabled.
disabled_reason*string`manual` (switched off by a caller) or `failing` (switched off after failed deliveries); `null` while enabled.
consecutive_failures*numberFailed deliveries in a row; a success resets it.
last_delivered_at*string · date-timeWhen a batch was last accepted (2xx) by the receiver.
state*object`active`: sending. `paused`: switched off with `PATCH { enabled: false }`. `auto_disabled`: stopped after repeated failures (`disabled_reason` says which); `PATCH { enabled: true }` or a `PUT` turns it back on.
Example: "active"
last_attempt_at*string · date-timeMost recent POST to the receiver, accepted or not (a real batch or a test).
last_attempt_kind*object`batch`: a real delivery. `test`: "Send test batch".
last_attempt_ok*booleanWhether the receiver accepted the most recent attempt (2xx).
last_attempt_status_code*numberHTTP status of the most recent attempt; null when no response arrived (DNS, TLS, timeout, refused address).
Example: 200
last_error*stringWhy the most recent attempt failed, in a short sentence; null after a success.
Example: "Your receiver answered HTTP 401: invalid signature"
last_test_succeeded_at*string · date-timeWhen the receiver last accepted a test batch. Cleared when the address or the signing secret changes.
created_at*string · date-timeWhen the audit sink was created (ISO 8601).
updated_at*string · date-timeWhen the audit sink was last changed (ISO 8601).
Example
Request
GET https://api.auth.productcraft.co/v1/apps/{app_id}/audit-sink
Authorization: Bearer YOUR_TOKENimport { Auth } from "@productcraft/auth";
// Admin routes read PRODUCTCRAFT_API_KEY; consumer routes need no key
const auth = new Auth();
const auditSink = await auth.admin.app("3f0c3c1e-8a2b-4c55-9d3f-0a1b2c3d4e5f").auditSink.retrieve();auth.admin.app(…).auditSink.retrieve(options?): Auth.AuditSink
Response
{
"id": "string",
"app_id": "string",
"url": "string",
"signing_secret_hint": "string",
"enabled": false,
"disabled_at": "2026-01-01T00:00:00.000Z",
"disabled_reason": "string",
"consecutive_failures": 0,
"last_delivered_at": "2026-01-01T00:00:00.000Z",
"state": "active",
"last_attempt_at": "2026-01-01T00:00:00.000Z",
"last_attempt_kind": {},
"last_attempt_ok": false,
"last_attempt_status_code": 200,
"last_error": "Your receiver answered HTTP 401: invalid signature",
"last_test_succeeded_at": "2026-01-01T00:00:00.000Z",
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z"
}