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

# Kalenderereignis erstellen

> Erstelle ein Pharen Hub Kalenderereignis aus Automationen oder Importjobs mit Titel, Start- und Endzeit, Teilnehmern und Standortangabe.

Erstellt ein lokales Kalenderereignis. Nutze diesen Endpunkt fur Termin-Automatisierungen und Importe.

<Note>
  Erforderlicher API-Key-Scope: `calendar:create`.
</Note>

## Body-Parameter

<ParamField body="calendar_id" type="string" required>
  UUID des Zielkalenders.
</ParamField>

<ParamField body="title" type="string">
  Titel des Ereignisses. Leere Titel sind erlaubt.
</ParamField>

<ParamField body="starts_at" type="string" required>
  ISO-8601-Datetime fur den Beginn.
</ParamField>

<ParamField body="ends_at" type="string" required>
  ISO-8601-Datetime fur das Ende.
</ParamField>

<ParamField body="is_all_day" type="boolean">
  Gibt an, ob das Ereignis ganztagig ist.
</ParamField>

<ParamField body="location" type="string">
  Ort des Ereignisses.
</ParamField>

<ParamField body="conference_url" type="string">
  Meeting- oder Konferenz-URL.
</ParamField>

<ParamField body="notes" type="string">
  Interne Notizen.
</ParamField>

## Beispiel-Body

```json theme={null}
{
  "calendar_id": "2de9d72d-9077-4cb6-9836-5fc821cf1b71",
  "title": "Quartalsplanung",
  "starts_at": "2026-07-03T09:00:00Z",
  "ends_at": "2026-07-03T10:00:00Z"
}
```


## OpenAPI

````yaml openapi.json POST /api/calendar/events/
openapi: 3.1.0
info:
  title: Pharen Hub API
  version: 1.0.0
  description: >-
    Scoped REST API for Pharen Hub workspaces, calendars, lists, docs,
    workflows, and agents.
servers:
  - url: '{baseUrl}'
    description: Pharen Hub API base URL
    variables:
      baseUrl:
        default: https://pharen.app
        description: >-
          The Pharen Hub API origin. Keep the default for production, or enter
          another environment such as http://localhost:8000.
security:
  - bearerAuth: []
tags:
  - name: Calendar
    description: Calendar source and event operations.
  - name: Lists
    description: Saved list data and metadata operations.
  - name: Docs
    description: Document and collection operations.
  - name: Workflows
    description: Workflow definition and execution operations.
  - name: Agents
    description: Agent catalog and chat operations.
paths:
  /api/calendar/events/:
    post:
      tags:
        - Calendar
      summary: Create calendar event
      description: >-
        Create a local calendar event from scheduling automations or import
        jobs. Requires the `calendar:create` scope.
      operationId: createCalendarEvent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCalendarEventRequest'
            examples:
              planning:
                summary: Planning meeting
                value:
                  calendar_id: 2de9d72d-9077-4cb6-9836-5fc821cf1b71
                  title: Quarterly planning
                  starts_at: '2026-07-03T09:00:00Z'
                  ends_at: '2026-07-03T10:00:00Z'
                  location: Berlin
                  conference_url: https://meet.example.com/planning
      responses:
        '201':
          description: Calendar event created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CalendarEvent'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    CreateCalendarEventRequest:
      type: object
      required:
        - calendar_id
        - starts_at
        - ends_at
      properties:
        calendar_id:
          type: string
          format: uuid
        title:
          type: string
        starts_at:
          type: string
          format: date-time
        ends_at:
          type: string
          format: date-time
        is_all_day:
          type: boolean
        location:
          type: string
        conference_url:
          type: string
          format: uri
        notes:
          type: string
        reminder_minutes_before_start:
          type: integer
          minimum: 0
          maximum: 10080
        attendees:
          type: array
          items:
            $ref: '#/components/schemas/EventAttendee'
    CalendarEvent:
      type: object
      properties:
        id:
          type: string
          format: uuid
        calendar_id:
          type: string
          format: uuid
        title:
          type: string
          example: Quarterly planning
        starts_at:
          type: string
          format: date-time
        ends_at:
          type: string
          format: date-time
        is_all_day:
          type: boolean
        location:
          type: string
        conference_url:
          type: string
          format: uri
        attendees:
          type: array
          items:
            $ref: '#/components/schemas/EventAttendee'
    EventAttendee:
      type: object
      properties:
        email:
          type: string
          format: email
        name:
          type: string
        status:
          type: string
          enum:
            - needs_action
            - accepted
            - declined
            - tentative
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: forbidden
            message:
              type: string
              example: This API key does not have the required scope.
            details:
              type: object
              additionalProperties: true
  responses:
    BadRequest:
      description: The request was malformed or missing required fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: The request did not include a valid API key.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: >-
        The API key is valid but does not have the required scope or workspace
        access.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Paste your Pharen API key without the Bearer prefix.
      x-default: phk_your_api_key

````