---
title: "Create new auditEvents"
method: POST
path: "/auditEvents"
tags: ["auditEvents"]
---

# Create new auditEvents

`POST /auditEvents`

Create new auditEvents.

## Request body

- object[]
  - `details` object — A JSON object with additional event details.
  - `loggedAt` string — The timestamp when the event was logged.
  - `isError` boolean — True if this auditEvent represents an error.
  - `resourceName` string, required — The name of the resource associated with this event.
  - `resourceType` string, required — The type of the resource associated with this event, e.g. "Collector", "Subject", etc.

## Response `200`

Created.

- BulkUpsertResponse — Status of bulk upsert request.
  - `status` 'OK' — Status.
  - `jobId` integer — Optionally a jobId is returned with the response when the bulk upsert request is enqueued as a job for the workers to process it asynchronously. The returned jobId can be used to check the status of the bulk upsert request.

## Other responses

- `400` — Bad Request
- `401` — Authentication Error
- `404` — Resource Not Found
- `default` — Error

---

[API](https://skmtc.dev/salesforce/apis/refocus-api.md) · [All operations](https://skmtc.dev/salesforce/apis/refocus-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/salesforce/refocus-api/revisions/42c2153b047e/schema)
