NUDG3 Admin - Audit Logs API
The Admin - Audit Logs API from NUDG3 — 2 operation(s) for admin - audit logs.
The Admin - Audit Logs API from NUDG3 — 2 operation(s) for admin - audit logs.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/nudg3-ai:nudg3-ai-admin-audit-logs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Nudg3 Admin - Audit Logs API
description: '# Nudg3 Brand Intelligence API
The Nudg3 API provides programmatic access to brand visibility analytics across AI providers.
## Public API v1
The Public API (`/api/v1/`) is designed for third-party integrations and provides:
### Analytics Endpoints (Tier 1 - Basic)
- Brand visibility scores and trends
- Sentiment analysis across AI responses
- Source citation tracking
- Prompt performance metrics
- Google AI Overview (AIO) coverage
### Export Endpoints (Tier 2 - Premium)
- Full response data exports (CSV/TSV)
- Source citations bulk download
- Dashboard time-series data
- Prompt-mention pair exports
## Authentication
### API Key (Public API v1)
```bash
curl -H "Authorization: Bearer nudg3_live_ak_xxx..." \
https://api.nudg3.com/api/v1/dashboard
```
### JWT (Dashboard API)
```bash
curl -H "Authorization: Bearer eyJ..." \
https://api.nudg3.com/analytics/dashboard
```
## Rate Limits
| Tier | Per Minute | Per Hour | Monthly Quota |
|------|------------|----------|---------------|
| Basic | 60 | 600 | 5,000 |
| Premium | 300 | 3,000 | 50,000 |
## Response Format
All responses follow a standard envelope:
```json
{
"success": true,
"data": { ... },
"message": "Success"
}
```
## Support
- Documentation: https://docs.nudg3.com
- API Status: https://status.nudg3.com
- Support: support@nudg3.com'
version: 1.1.0
termsOfService: https://nudg3.com/terms
contact:
name: Nudg3 API Support
url: https://nudg3.com/support
email: support@nudg3.com
license:
name: Proprietary
url: https://nudg3.com/license
servers:
- url: https://api.nudg3.com
description: Production API
- url: https://api-staging.nudg3.com
description: Staging API (for testing)
- url: http://localhost:8000
description: Local Development
tags:
- name: Admin - Audit Logs
paths:
/admin/audit-logs:
post:
tags:
- Admin - Audit Logs
summary: Create Audit Log
description: 'Create a new audit log entry.
**Security**:
- User ID extracted from JWT token (not client-provided)
- IP address and user agent automatically captured from request headers
- All audit logs are append-only (cannot be modified or deleted)
**Use Cases**:
- Log admin actions (trial extensions, user creation, etc.)
- Track security events
- Compliance and debugging
**Parameters**:
- action: Action type (e.g., ''admin_trial_extended'')
- resource_type: Type of resource affected (optional)
- resource_id: ID of affected resource (optional)
- details: Additional action-specific context (optional)
**Returns**: Created audit log entry'
operationId: create_audit_log_admin_audit_logs_post
security:
- HTTPBearer: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateAuditLogRequest'
responses:
'201':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/schemas__audit_log__AuditLogResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Admin - Audit Logs
summary: List Audit Logs
description: 'List audit logs with optional filtering (enriched with user and resource details).
**Authorization**: Super users only
**Filters**:
- user_id: Filter by user who performed the action
- action: Filter by action type
- resource_type: Filter by resource type
- resource_id: Filter by specific resource
- start_date: Filter logs after this date (inclusive)
- end_date: Filter logs before this date (inclusive)
**Pagination**:
- page: Page number (1-indexed, default: 1)
- page_size: Results per page (1-200, default: 50)
**Returns**: Paginated list of enriched audit logs with user names, resource names, and status'
operationId: list_audit_logs_admin_audit_logs_get
security:
- HTTPBearer: []
parameters:
- name: user_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: User Id
- name: action
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Action
- name: resource_type
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Resource Type
- name: resource_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Resource Id
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start Date
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Date
- name: page
in: query
required: false
schema:
type: integer
default: 1
title: Page
- name: page_size
in: query
required: false
schema:
type: integer
default: 50
title: Page Size
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/schemas__audit_log__AuditLogListResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/admin/audit-logs/export:
get:
tags:
- Admin - Audit Logs
summary: Export Audit Logs
description: 'Export audit logs to CSV or JSON.
**Authorization**: Super users only
**Filters**: Same as list_audit_logs endpoint
**Formats**:
- csv: Comma-separated values (default)
- json: JSON array
**Returns**: File download response'
operationId: export_audit_logs_admin_audit_logs_export_get
security:
- HTTPBearer: []
parameters:
- name: user_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: User Id
- name: action
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Action
- name: resource_type
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Resource Type
- name: resource_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Resource Id
- name: start_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: Start Date
- name: end_date
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
title: End Date
- name: format
in: query
required: false
schema:
type: string
default: csv
title: Format
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
CreateAuditLogRequest:
properties:
action:
type: string
maxLength: 100
title: Action
description: Action type (e.g., 'admin_trial_extended', 'admin_user_created')
examples:
- admin_trial_extended
- admin_user_created
- admin_company_created
resource_type:
anyOf:
- type: string
maxLength: 50
- type: 'null'
title: Resource Type
description: Type of resource affected (e.g., 'workspace', 'user', 'company')
examples:
- workspace
- user
- company
- agency
resource_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Resource Id
description: ID of the resource affected
details:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Details
description: Additional action-specific details (e.g., days_extended, old_status)
examples:
- days_extended: 7
previous_expiry: '2025-01-14'
type: object
required:
- action
title: CreateAuditLogRequest
description: Schema for creating an audit log entry.
example:
action: admin_trial_extended
details:
days_extended: 7
previous_expiry: '2025-01-14'
resource_id: 550e8400-e29b-41d4-a716-446655440000
resource_type: workspace
schemas__audit_log__AuditLogListResponse:
properties:
logs:
items:
$ref: '#/components/schemas/schemas__audit_log__AuditLogResponse'
type: array
title: Logs
total:
type: integer
title: Total
page:
type: integer
title: Page
page_size:
type: integer
title: Page Size
pages:
type: integer
title: Pages
description: Total number of pages
type: object
required:
- logs
- total
- page
- page_size
- pages
title: AuditLogListResponse
description: Schema for paginated audit log list responses.
example:
logs:
- action: admin_trial_extended
details:
days_extended: 7
id: 660e8400-e29b-41d4-a716-446655440000
ip_address: 192.168.1.1
resource_id: 550e8400-e29b-41d4-a716-446655440000
resource_name: Acme Corp Workspace
resource_type: workspace
status: success
timestamp: '2025-01-07T12:00:00'
user_email: john@example.com
user_id: 770e8400-e29b-41d4-a716-446655440000
user_name: John Doe
page: 1
page_size: 50
pages: 1
total: 1
schemas__audit_log__AuditLogResponse:
properties:
id:
type: string
format: uuid
title: Id
user_id:
type: string
format: uuid
title: User Id
user_name:
type: string
title: User Name
description: Name of user who performed the action
user_email:
type: string
title: User Email
description: Email of user who performed the action
action:
type: string
title: Action
resource_type:
anyOf:
- type: string
- type: 'null'
title: Resource Type
resource_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Resource Id
resource_name:
anyOf:
- type: string
- type: 'null'
title: Resource Name
description: Name of the affected resource
timestamp:
type: string
format: date-time
title: Timestamp
ip_address:
anyOf:
- type: string
- type: 'null'
title: Ip Address
user_agent:
anyOf:
- type: string
- type: 'null'
title: User Agent
details:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Details
status:
type: string
title: Status
description: Action status (success or failed)
default: success
type: object
required:
- id
- user_id
- user_name
- user_email
- action
- timestamp
title: AuditLogResponse
description: Schema for audit log API responses (enriched with user and resource details).
example:
action: admin_trial_extended
details:
days_extended: 7
previous_expiry: '2025-01-14'
id: 660e8400-e29b-41d4-a716-446655440000
ip_address: 192.168.1.1
resource_id: 550e8400-e29b-41d4-a716-446655440000
resource_name: Acme Corp Workspace
resource_type: workspace
status: success
timestamp: '2025-01-07T12:00:00'
user_agent: Mozilla/5.0...
user_email: john@example.com
user_id: 770e8400-e29b-41d4-a716-446655440000
user_name: John Doe
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
securitySchemes:
ApiKeyAuth:
type: http
scheme: bearer
bearerFormat: API Key
description: '
API Key authentication for Public API v1 endpoints.
**Format:** `nudg3_live_ak_xxx...` or `nudg3_test_ak_xxx...`
**Usage:**
```
Authorization: Bearer nudg3_live_ak_your_key_here
```
Or use the header:
```
X-API-Key: nudg3_live_ak_your_key_here
```
**Obtain API Keys:**
Generate API keys from your Nudg3 dashboard under Settings > API Keys.
**Tiers:**
- **Basic:** `read:analytics` scope - Analytics endpoints only
- **Premium:** `read:analytics` + `export:data` scopes - Analytics + Exports
'
BearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: '
JWT authentication for internal dashboard endpoints.
Obtain tokens via `/auth/login` endpoint.
'
externalDocs:
description: Nudg3 API Documentation
url: https://docs.nudg3.com/api