Auth API reference

Auth API · App-Audit-Sink

get/v1/apps/{app_id}/audit-sinkAuth

Current 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*string

Id of the app.

Response · 200

id*string

Unique identifier of the audit sink.

app_id*string

The Auth app the audit sink belongs to.

url*string

HTTPS endpoint that receives the batched audit rows.

signing_secret_hint*string

Last 4 chars of the signing secret.

enabled*boolean

Whether the audit sink is enabled.

disabled_at*string · date-time

When 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*number

Failed deliveries in a row; a success resets it.

last_delivered_at*string · date-time

When 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-time

Most 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*boolean

Whether the receiver accepted the most recent attempt (2xx).

last_attempt_status_code*number

HTTP status of the most recent attempt; null when no response arrived (DNS, TLS, timeout, refused address).

Example: 200

last_error*string

Why 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-time

When the receiver last accepted a test batch. Cleared when the address or the signing secret changes.

created_at*string · date-time

When the audit sink was created (ISO 8601).

updated_at*string · date-time

When 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_TOKEN

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"
}