---
title: "Create Authentication failure logs"
url: "https://nov18-dev.movespot.fyi/apis/konnect-audit-log-settings-internal-2/versions/41703cf0-d404-4948-a8b7-cb49d97fcaee/operations/create-authn-failure-audit-logs"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-audit-log-settings-internal-2/versions/41703cf0-d404-4948-a8b7-cb49d97fcaee.md

# Create Authentication failure logs

`POST` `/internal/logstreams`

Operation ID: `create-authn-failure-audit-logs`

This webhook endpoint Creates login failure audit logs using log stream sent by external vendor services (Currently Auth0).

## Request body

Content types: `application/json`

## Responses

- `204` - No Content
- `403` - Forbidden

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Audit Log Settings
  version: 2.0.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /internal/logstreams:
    post:
      operationId: create-authn-failure-audit-logs
      summary: Create Authentication failure logs
      description: This webhook endpoint Creates login failure audit logs using log
        stream sent by external vendor services (Currently Auth0).
      requestBody:
        $ref: "#/components/requestBodies/AuthFailureLogs"
      responses:
        "204":
          description: No Content
        "403":
          $ref: "#/components/responses/Forbidden"
      tags:
        - Audit Logs
security:
  - personalAccessToken: []
  - systemAccountAccessToken: []
components:
  requestBodies:
    AuthFailureLogs:
      description: The request schema to create authentication failure audit logs.
      content:
        application/json:
          schema:
            type: object
            properties:
              logs:
                type: array
                items:
                  $ref: "#/components/schemas/StreamLog"
          examples:
            Auth-Failure-Logs:
              $ref: "#/components/examples/Auth-Failure-Logs"
  responses:
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
  schemas:
    StreamLog:
      description: Auth Failure Log Stream Schema
      type: object
      properties:
        data:
          description: Log data
          type: object
          properties:
            user_id:
              description: Auth0 user ID
              type: string
            date:
              description: Date when the log is created
              type: string
              format: date-time
              readOnly: true
            ip:
              description: IP address of the client which failed to authenticate
              type: string
            type:
              description: Type of authentication failure
              type: string
            user_agent:
              description: User Agent of client which failed to authenticate
              type: string
      title: StreamLog
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  examples:
    Auth-Failure-Logs:
      value:
        logs:
          - data:
              user_id: auth0|1234
              date: 2024-09-03T04:23:06.115Z
              ip: 127.0.0.1
              type: fp
              user_agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36
                (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
  securitySchemes:
    personalAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs.

        You can generate a Personal Access Token (PAT) from the [personal access
        token page](https://cloud.konghq.com/global/account/tokens/) in the
        Konnect dashboard.

        The PAT token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer kpat_xgfT...'`
    systemAccountAccessToken:
      type: http
      scheme: bearer
      bearerFormat: Token
      description: >
        The system account access token is meant for automations and
        integrations that are not directly associated with a human identity.

        You can generate a system account Access Token by creating a system
        account and then obtaining a system account access token for that
        account.

        The access token must be passed in the header of a request, for example:

        `curl -X GET 'https://global.api.konghq.com/v2/users/' --header
        'Authorization: Bearer spat_i2Ej...'`
```
