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

# Report events

> A local building’s node mirrors its own events up with the owner’s key.


## OpenAPI

```yaml openapi.json post /v1/companies/{campus}/events
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.4.0
servers:
  - url: https://api.plungeai.com
paths:
  /v1/companies/{campus}/events:
    post:
      operationId: post-v1-companies-campus-events
      tags:
        - Companies
      summary: Report events from a local building
      description: "A local building’s node (`factoryd`) mirrors its own events up with the owner’s key; the rows join the log in order. Only a building with `location: local` that belongs to the company is accepted."
      security:
        - ozkBearer: []
      parameters:
        - name: campus
          in: path
          required: true
          schema:
            type: string
          description: The company’s slug (`plunge`), never a row id
        - name: format
          in: query
          schema:
            type: string
            enum:
              - json
              - yaml
              - markdown
              - text
          description: Response format; overrides Accept (an unknown value is 400 invalid_format)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                events:
                  type: array
                  items:
                    type: object
                    properties:
                      building:
                        type: string
                      item_id:
                        type: string
                      office:
                        type: string
                      type:
                        type: string
                        enum:
                          - item.created
                          - step.enter
                          - step.exit
                          - run.start
                          - run.end
                          - desk.progress
                          - handoff
                          - approval.requested
                          - approval.decided
                          - item.parked
                          - item.resumed
                          - item.done
                          - budget.warn
                          - budget.stop
                          - config.changed
                          - building.connected
                          - item.then
                          - error
                      data:
                        type: object
                        additionalProperties: true
                      at:
                        type: string
                        description: When it happened on the node (ISO 8601); defaults to receipt
                    required:
                      - building
                      - type
                  minItems: 1
                  maxItems: 200
              required:
                - events
          text/yaml:
            schema:
              type: object
              properties:
                events:
                  type: array
                  items:
                    type: object
                    properties:
                      building:
                        type: string
                      item_id:
                        type: string
                      office:
                        type: string
                      type:
                        type: string
                        enum:
                          - item.created
                          - step.enter
                          - step.exit
                          - run.start
                          - run.end
                          - desk.progress
                          - handoff
                          - approval.requested
                          - approval.decided
                          - item.parked
                          - item.resumed
                          - item.done
                          - budget.warn
                          - budget.stop
                          - config.changed
                          - building.connected
                          - item.then
                          - error
                      data:
                        type: object
                        additionalProperties: true
                      at:
                        type: string
                        description: When it happened on the node (ISO 8601); defaults to receipt
                    required:
                      - building
                      - type
                  minItems: 1
                  maxItems: 200
              required:
                - events
      responses:
        "200":
          description: How many were taken Response format negotiates via the `format` field, an Accept header (application/json, text/yaml, text/markdown, text/plain), or the request Content-Type mirror; default JSON.
          content:
            application/json:
              schema:
                type: object
                properties:
                  accepted:
                    type: integer
                  head_seq:
                    type: integer
            text/yaml:
              schema:
                type: string
            text/markdown:
              schema:
                type: string
            text/plain:
              schema:
                type: string
        "400":
          description: invalid_json — body is not valid JSON or YAML; invalid_format — format must be one of json, yaml, markdown, text
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: unauthorized — missing, invalid or revoked ozk_ key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "company_not_found — no company with that slug for this account (a foreign slug answers the same); not_found — no route for this method on this path: every other method answers it"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: invalid_params — a field failed validation; nothing was written
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "502":
          description: upstream_error — the company service is unavailable; retry
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: not_enabled — the company service is not deployed on this tier
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Error:
      type: object
      description: Standard error envelope. Every error response also carries an `X-Error-Code` response header equal to error.code, so a client branches on the header regardless of the negotiated body format (json | yaml | markdown | text). When the request created an execution, the `X-Execution-Id` response header is also set. Errors follow the negotiated format like success bodies.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            connect:
              type: object
              description: "On a 424 connection_required / credential_required: where the missing connection is made."
              properties:
                provider:
                  type: string
                method:
                  type: string
                  enum:
                    - oauth
                    - api_key
                    - wallet
                link:
                  type: string
                  example: POST /v1/connections/stripe/link
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
```
