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

# Create Event



## OpenAPI

````yaml /openapi/groundforge-openapi-v1.json post /v1/events
openapi: 3.1.0
info:
  title: GroundForge REST API
  version: 86Y.5p.6v.6aq
  description: >-
    Current GroundForge SaaS administration, Agent, Channel, MCP, governance,
    observability, and LangChain integration endpoints.
servers:
  - url: https://platform.groundforge.ai
    description: GroundForge SaaS
security: []
paths:
  /v1/events:
    post:
      summary: Create Event
      operationId: create_event_v1_events_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAuditRecordRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    CreateAuditRecordRequest:
      properties:
        session_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Session Id
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        tenant_id:
          type: string
          title: Tenant Id
        principal_type:
          $ref: '#/components/schemas/ActorType'
          default: service
        principal_id:
          type: string
          title: Principal Id
        resource_type:
          type: string
          title: Resource Type
        resource_ref:
          type: string
          title: Resource Ref
        action:
          type: string
          title: Action
        outcome:
          type: string
          title: Outcome
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Request Id
        trace_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Trace Id
        before_json:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Before Json
        after_json:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: After Json
        created_at_ms:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At Ms
      type: object
      required:
        - tenant_id
        - principal_id
        - resource_type
        - resource_ref
        - action
        - outcome
      title: CreateAuditRecordRequest
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ActorType:
      type: string
      enum:
        - user
        - service
        - serviceAccount
      title: ActorType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OIDC access token for users and CLI clients.
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Scoped service-account API key for external Agents and runtime clients.

````

## Related topics

- [Get Event](/api-reference/endpoints/get-event.md)
- [List Events](/api-reference/endpoints/list-events.md)
- [Search Events](/api-reference/endpoints/search-events.md)
- [Record Langchain Agent Event](/api-reference/endpoints/integrations/record-langchain-agent-event.md)
