---
title: "Create audit record"
method: POST
path: "/wiki/rest/api/audit"
tags: ["Audit"]
---

# Create audit record

`POST /wiki/rest/api/audit`

Creates a record in the audit log.

**[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
'Confluence Administrator' global permission.

## Request body

- AuditRecordCreate
  - `author` object — The user that actioned the event. If `author` is not specified, then all `author` properties will be set to null/empty, except for `type` which will be set to 'user'.
    - `type` 'user', required — Set to 'user'.
    - `displayName` string — The name that is displayed on the audit log in the Confluence UI.
    - `operations` OperationCheckResult[] — Always defaults to null.
      - `operation` 'administer' | 'archive' | 'clear_permissions' | 'copy' | 'create' | 'create_space' | 'delete' | 'export' | 'move' | 'purge' | 'purge_version' | 'read' | 'restore' | 'restrict_content' | 'update' | 'use', required — The operation itself.
      - `targetType` string, required — The space or content type that the operation applies to. Could be one of- - application - page - blogpost - comment - attachment - space
    - `username` string, nullable — This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
    - `userKey` string, nullable — This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
  - `remoteAddress` string, required — The IP address of the computer where the event was initiated from.
  - `creationDate` integer — The creation date-time of the audit record, as a timestamp. This is converted to a date-time display in the Confluence UI. If the `creationDate` is not specified, then it will be set to the timestamp for the current date-time.
  - `summary` string — The summary of the event, which is displayed in the 'Change' column on the audit log in the Confluence UI.
  - `description` string — A long description of the event, which is displayed in the 'Description' field on the audit log in the Confluence UI.
  - `category` string — The category of the event, which is displayed in the 'Event type' column on the audit log in the Confluence UI.
  - `sysAdmin` boolean — Indicates whether the event was actioned by a system administrator.
  - `affectedObject` AffectedObject
    - `name` string, required
    - `objectType` string, required
  - `changedValues` ChangedValue[] — The values that were changed in the event.
    - `name` string, required
    - `oldValue` string, required
    - `hiddenOldValue` string
    - `newValue` string, required
    - `hiddenNewValue` string
  - `associatedObjects` AffectedObject[] — Objects that were associated with the event. For example, if the event was a space permission change then the associated object would be the space.
    - `name` string, required
    - `objectType` string, required

## Response `200`

Returned if the record is created in the audit log.

- AuditRecord
  - `author` object, required
    - `type` 'user', required
    - `displayName` string, required
    - `operations` OperationCheckResult[], nullable
      - `operation` 'administer' | 'archive' | 'clear_permissions' | 'copy' | 'create' | 'create_space' | 'delete' | 'export' | 'move' | 'purge' | 'purge_version' | 'read' | 'restore' | 'restrict_content' | 'update' | 'use', required — The operation itself.
      - `targetType` string, required — The space or content type that the operation applies to. Could be one of- - application - page - blogpost - comment - attachment - space
    - `username` string, nullable — This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
    - `userKey` string, nullable — This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details.
    - `accountId` string, nullable — The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`.
    - `accountType` string
    - `externalCollaborator` boolean — This is deprecated. Use `isGuest` instead.
    - `isExternalCollaborator` boolean — This is deprecated. Use `isGuest` instead. Whether the user is an external collaborator user
    - `isGuest` boolean — Whether the user is a guest user
    - `publicName` string — The public name or nickname of the user. Will always contain a value.
  - `remoteAddress` string, required
  - `creationDate` integer, required — The creation date-time of the audit record, as a timestamp.
  - `summary` string, required
  - `description` string, required
  - `category` string, required
  - `sysAdmin` boolean, required
  - `superAdmin` boolean
  - `affectedObject` AffectedObject, required
    - `name` string, required
    - `objectType` string, required
  - `changedValues` ChangedValue[], required
    - `name` string, required
    - `oldValue` string, required
    - `hiddenOldValue` string
    - `newValue` string, required
    - `hiddenNewValue` string
  - `associatedObjects` AffectedObject[], required
    - `name` string, required
    - `objectType` string, required

## Other responses

- `400` — Returned if the `remoteAddress` property is not specified.
- `401` — Returned if the authentication credentials are incorrect or missing from the request.

---

[API](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api.md) · [All operations](https://skmtc.net/atlassian/apis/the-confluence-cloud-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/the-confluence-cloud-rest-api/revisions/70088490f406/schema)
