> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yorlet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create an application event



## OpenAPI

````yaml openapi-leasing.json POST /v1/applications/{id}/events
openapi: 3.1.0
info:
  title: Yorlet Leasing API
  description: >-
    APIs for managing applications, deposits, guarantors, references, and
    tenancies.
  version: 1.0.0
servers:
  - url: https://api.yorlet.com
    description: Production
  - url: https://api.yorlet.io
    description: Sandbox
security: []
paths:
  /v1/applications/{id}/events:
    post:
      tags:
        - Application Events
      summary: Create an application event
      operationId: application_events_create
      parameters:
        - schema:
            type: string
            description: The id identifier.
          required: true
          description: The id identifier.
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                action:
                  type: string
                  description: The action of the event.
                type:
                  type: string
                  description: The type of the event.
              required:
                - action
                - type
      responses:
        '200':
          description: Returns the application event object if the request succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Unique identifier for the object.
                  created:
                    type: number
                    description: >-
                      Time at which the object was created. Measured in seconds
                      since the Unix epoch.
                  account:
                    type: string
                    description: >-
                      The account that the object belongs to. Only returned if
                      the request is made with a valid Yorlet-Context header.
                  deleted:
                    type: boolean
                    default: false
                    description: Only returned if the object has been deleted.
                  object:
                    type: string
                    enum:
                      - application.event
                  action:
                    type: string
                    description: The action of the event.
                  application:
                    type: string
                    pattern: ^[a-zA-Z0-9_]+$
                    description: The identifier of the application the event belongs to.
                  customer:
                    type: string
                    pattern: ^[a-zA-Z0-9_]+$
                    description: The identifier of the customer the event belongs to.
                  remote_ip:
                    type: string
                    description: The IP address of the event.
                  remote_ip_location:
                    type: object
                    properties:
                      city:
                        type: string
                        description: The location of the event.
                      country:
                        type: string
                        description: The country of the event.
                      geo_point:
                        type: array
                        items:
                          type: number
                        minItems: 2
                        maxItems: 2
                        description: The geo point of the event.
                      region:
                        type: string
                        description: The region of the event.
                    required:
                      - city
                      - country
                      - geo_point
                      - region
                  type:
                    type: string
                    description: The type of the event.
                required:
                  - id
                  - created
                  - object
                  - action
                  - application
                  - customer
                  - remote_ip
                  - remote_ip_location
                  - type
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: API Key authentication. Use "Bearer YOUR_API_KEY".

````