Discord Audit Log API

Operations on guild audit logs

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/discord-audit-log-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

discord-audit-log-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Discord Interactions Application Commands Audit Log API
  description: The Discord Interactions API enables applications to create and respond to application commands (slash commands), message components, and modals. It supports both Gateway-based and webhook-based interaction handling, allowing bots to build rich, interactive user experiences within Discord.
  version: '10'
  contact:
    name: Discord Support
    url: https://support-dev.discord.com/hc/en-us
    email: support@discord.com
  termsOfService: https://discord.com/developers/docs/policies-and-agreements/developer-terms-of-service
servers:
- url: https://discord.com/api/v10
  description: Discord API v10
security:
- BotToken: []
tags:
- name: Audit Log
  description: Operations on guild audit logs
paths:
  /guilds/{guild_id}/audit-logs:
    get:
      operationId: getGuildAuditLog
      summary: Discord Get guild audit log
      description: Returns an audit log object for the guild.
      tags:
      - Audit Log
      parameters:
      - $ref: '#/components/parameters/guildId'
      - name: user_id
        in: query
        schema:
          type: string
      - name: action_type
        in: query
        schema:
          type: integer
      - name: before
        in: query
        schema:
          type: string
      - name: after
        in: query
        schema:
          type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      responses:
        '200':
          description: Audit log object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AuditLog'
        4XX:
          $ref: '#/components/responses/ClientError'
components:
  schemas:
    Overwrite:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Snowflake'
        type:
          type: integer
          description: 0=role, 1=member
        allow:
          type: string
        deny:
          type: string
    ThreadMetadata:
      type: object
      properties:
        archived:
          type: boolean
        auto_archive_duration:
          type: integer
        archive_timestamp:
          type: string
          format: date-time
        locked:
          type: boolean
        invitable:
          type: boolean
        create_timestamp:
          type: string
          format: date-time
          nullable: true
    Channel:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Snowflake'
        type:
          type: integer
          description: 0=GUILD_TEXT, 1=DM, 2=GUILD_VOICE, 3=GROUP_DM, 4=GUILD_CATEGORY, 5=GUILD_ANNOUNCEMENT, 10=ANNOUNCEMENT_THREAD, 11=PUBLIC_THREAD, 12=PRIVATE_THREAD, 13=GUILD_STAGE_VOICE, 14=GUILD_DIRECTORY, 15=GUILD_FORUM, 16=GUILD_MEDIA
        guild_id:
          $ref: '#/components/schemas/Snowflake'
        position:
          type: integer
        permission_overwrites:
          type: array
          items:
            $ref: '#/components/schemas/Overwrite'
        name:
          type: string
          nullable: true
        topic:
          type: string
          nullable: true
        nsfw:
          type: boolean
        last_message_id:
          $ref: '#/components/schemas/Snowflake'
        bitrate:
          type: integer
        user_limit:
          type: integer
        rate_limit_per_user:
          type: integer
        recipients:
          type: array
          items:
            $ref: '#/components/schemas/User'
        icon:
          type: string
          nullable: true
        owner_id:
          $ref: '#/components/schemas/Snowflake'
        parent_id:
          $ref: '#/components/schemas/Snowflake'
        last_pin_timestamp:
          type: string
          format: date-time
          nullable: true
        rtc_region:
          type: string
          nullable: true
        video_quality_mode:
          type: integer
        message_count:
          type: integer
        member_count:
          type: integer
        thread_metadata:
          $ref: '#/components/schemas/ThreadMetadata'
        default_auto_archive_duration:
          type: integer
        flags:
          type: integer
        total_message_sent:
          type: integer
      required:
      - id
      - type
    Webhook:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Snowflake'
        type:
          type: integer
          description: 1=Incoming, 2=Channel Follower, 3=Application
        guild_id:
          $ref: '#/components/schemas/Snowflake'
        channel_id:
          $ref: '#/components/schemas/Snowflake'
        user:
          $ref: '#/components/schemas/User'
        name:
          type: string
          nullable: true
        avatar:
          type: string
          nullable: true
        token:
          type: string
        application_id:
          $ref: '#/components/schemas/Snowflake'
        url:
          type: string
          format: uri
      required:
      - id
      - type
    User:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/Snowflake'
        username:
          type: string
        discriminator:
          type: string
        global_name:
          type: string
          nullable: true
        avatar:
          type: string
          nullable: true
        bot:
          type: boolean
        system:
          type: boolean
        mfa_enabled:
          type: boolean
        banner:
          type: string
          nullable: true
        accent_color:
          type: integer
          nullable: true
        locale:
          type: string
        verified:
          type: boolean
        email:
          type: string
          nullable: true
        flags:
          type: integer
        premium_type:
          type: integer
        public_flags:
          type: integer
        avatar_decoration_data:
          type: object
          nullable: true
      required:
      - id
      - username
    Snowflake:
      type: string
      description: Discord unique ID represented as a string
      pattern: ^[0-9]+$
    AuditLog:
      type: object
      properties:
        application_commands:
          type: array
          items:
            type: object
        audit_log_entries:
          type: array
          items:
            type: object
            properties:
              id:
                $ref: '#/components/schemas/Snowflake'
              target_id:
                type: string
                nullable: true
              user_id:
                $ref: '#/components/schemas/Snowflake'
              action_type:
                type: integer
              reason:
                type: string
        integrations:
          type: array
          items:
            type: object
        threads:
          type: array
          items:
            $ref: '#/components/schemas/Channel'
        users:
          type: array
          items:
            $ref: '#/components/schemas/User'
        webhooks:
          type: array
          items:
            $ref: '#/components/schemas/Webhook'
  responses:
    ClientError:
      description: Client error response
      content:
        application/json:
          schema:
            type: object
            properties:
              code:
                type: integer
              message:
                type: string
              errors:
                type: object
  parameters:
    guildId:
      name: guild_id
      in: path
      required: true
      schema:
        type: string
      description: The ID of the guild (Snowflake)
  securitySchemes:
    BotToken:
      type: http
      scheme: bearer
      description: Bot token authentication
externalDocs:
  description: Discord Interactions Documentation
  url: https://discord.com/developers/docs/interactions/overview