Audit Logs

Audit Logs Endpoint

The Audit Logs endpoint allows users to retrieve and interpret Discord server audit logs. This endpoint processes the raw audit log data from Discord's API and returns it in a human-readable format. It is ideal for analyzing server events, tracking changes, and monitoring user actions within a Discord guild.

Endpoint

  • URL: https://api.erensko.xyz/v1/audit-logs

  • Method: GET

  • Description: Retrieves and formats audit log data from a Discord server. This endpoint returns the 50 most recent events in your audit log.

URL Parameters

Key
Value

server-id

The Discord server ID from which to retrieve the audit logs.

Headers

Key
Value

Authorization

Your own personal API key, create one by clicking here.

bot-token

The plain raw token of your Discord bot

We require your bot token to authenticate with Discord's API and fetch audit logs from your server. You can generate or retrieve your bot token in the Discord Developer Portal under the Bot section of your application.

Request Example

GET https://api.erensko.xyz/v1/audit-logs?server-id={server_id}

Response Example

[
  {
    "actionType": "Invite Create",
    "user": "123456789012345678",
    "target": "987654321098765432",
    "changes": [
      {
        "key": "max_uses",
        "oldValue": null,
        "newValue": 5
      },
      {
        "key": "expires_at",
        "oldValue": null,
        "newValue": "2024-11-30T12:00:00.000Z"
      }
    ],
    "reason": "Temporary invite created for event coordination"
  }
]

Last updated