---
updatedAt: 2025-04-03T21:41:23.000Z
agentTools:
  projectIndex: https://replicated.readme.io/llms.txt
---

# Audit API

The Audit API provides endpoints for your application to read and write audit events into the audit log.

> 📘 Audit API Endpoint
>
> The Audit API is part of the [Integration API](https://replicated.readme.io/docs/integration-api-reference).  To discover the Integration API base endpoint, query the `REPLICATED_INTEGRATIONAPI` environment variable from inside your container.

## /audit/v1/event

Records audit event information.

<Table align={["left","left","left"]}>
  <thead>
    <tr>
      <th>
        Name
      </th>

      <th>
        Type
      </th>

      <th>
        Description
      </th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>
        name
      </td>

      <td>
        String
      </td>

      <td>
        Name of the event.
      </td>
    </tr>

    <tr>
      <td>
        title
      </td>

      <td>
        String
      </td>

      <td>
        Title of the event
      </td>
    </tr>

    <tr>
      <td>
        description
      </td>

      <td>
        String
      </td>

      <td>
        Human readable description of the event.
      </td>
    </tr>

    <tr>
      <td>
        ip\_address
      </td>

      <td>
        String
      </td>

      <td>
        IP Address of the user who took the action.
      </td>
    </tr>

    <tr>
      <td>
        action
      </td>

      <td>
        String
      </td>

      <td>
        Machine readable name of the event.
      </td>
    </tr>
  </tbody>
</Table>

### Example request:

```curl
curl -k -X POST $REPLICATED_INTEGRATIONAPI/audit/v1/event -H "Content-Type: application/json" -d '{"action":"user.login.success", "description":"john@example.com logged in", "title":"User Login Success", "name":"login"}'
```

```json
{  
    "name":"user.login",
    "description":"john@example.com logged in successfully",
  	"title":"User Login Success",
    "action":"user.login.success",
  	"ip_address":"192.30.252.12"
}
```

### Example response:

```http
HTTP/1.1 201 Created
Date: Tue, 16 Jun 2015 17:59:25 GMT
Content-Length: 0
Content-Type: text/plain; charset=utf-8
```