Flatfile subpackage_events API

The subpackage_events API from Flatfile — 4 operation(s) for subpackage_events.

OpenAPI Specification

flatfile-subpackage-events-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: API Reference subpackage_accounts subpackage_events API
  version: 1.0.0
servers:
- url: https://api.x.flatfile.com/v1
tags:
- name: subpackage_events
paths:
  /events:
    get:
      operationId: list
      summary: List events
      description: Event topics that the Flatfile Platform emits.
      tags:
      - subpackage_events
      parameters:
      - name: environmentId
        in: query
        description: Filter by environment
        required: false
        schema:
          $ref: '#/components/schemas/type_commons:EnvironmentId'
      - name: spaceId
        in: query
        description: Filter by space
        required: false
        schema:
          $ref: '#/components/schemas/type_commons:SpaceId'
      - name: domain
        in: query
        description: Filter by event domain
        required: false
        schema:
          type: string
      - name: topic
        in: query
        description: Filter by event topic
        required: false
        schema:
          type: string
      - name: since
        in: query
        description: Filter by event timestamp
        required: false
        schema:
          type: string
          format: date-time
      - name: pageSize
        in: query
        description: Number of results to return in a page (default 10)
        required: false
        schema:
          type: integer
      - name: pageNumber
        in: query
        description: Based on pageSize, which page of results to return
        required: false
        schema:
          type: integer
      - name: includeAcknowledged
        in: query
        description: Include acknowledged events
        required: false
        schema:
          type: boolean
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_events:ListAllEventsResponse'
    post:
      operationId: create
      summary: Create an event
      tags:
      - subpackage_events
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_events:EventResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons:Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons:Errors'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/type_events:CreateEventConfig'
  /events/{eventId}:
    get:
      operationId: get
      summary: Get an event
      tags:
      - subpackage_events
      parameters:
      - name: eventId
        in: path
        description: The event id
        required: true
        schema:
          $ref: '#/components/schemas/type_commons:EventId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_events:EventResponse'
  /events/{eventId}/ack:
    post:
      operationId: ack
      summary: Acknowledge an event
      tags:
      - subpackage_events
      parameters:
      - name: eventId
        in: path
        description: The event id
        required: true
        schema:
          $ref: '#/components/schemas/type_commons:EventId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons:Success'
  /subscription:
    get:
      operationId: get-event-token
      summary: Get subscription credentials
      description: Get a token which can be used to subscribe to events for this space
      tags:
      - subpackage_events
      parameters:
      - name: scope
        in: query
        description: The resource ID of the event stream (space or environment id)
        required: false
        schema:
          type: string
      - name: spaceId
        in: query
        description: The space ID of the event stream
        required: false
        schema:
          $ref: '#/components/schemas/type_commons:SpaceId'
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      - name: X-Disable-Hooks
        in: header
        required: true
        schema:
          type: string
          enum:
          - 'true'
      responses:
        '200':
          description: Response with status 200
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_spaces:EventTokenResponse'
        '400':
          description: Error response with status 400
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons:Errors'
        '404':
          description: Error response with status 404
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_commons:Errors'
components:
  schemas:
    type_commons:EventId:
      type: string
      description: Event ID
      title: EventId
    type_commons:Success:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/type_commons:SuccessData'
      description: Informs whether or not a request was successful
      title: Success
    type_spaces:EventToken:
      type: object
      properties:
        accountId:
          $ref: '#/components/schemas/type_commons:AccountId'
          description: The ID of the Account.
        subscribeKey:
          type: string
          description: The id of the event bus to subscribe to
        ttl:
          type: integer
          description: Time to live in minutes
        token:
          type: string
          description: This should be your API key.
      description: Properties used to allow users to connect to the event bus
      title: EventToken
    type_events:Event:
      oneOf:
      - type: object
        properties:
          topic:
            type: string
            enum:
            - agent:created
            description: 'Discriminator value: agent:created'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - agent:updated
            description: 'Discriminator value: agent:updated'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - agent:deleted
            description: 'Discriminator value: agent:deleted'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - space:created
            description: 'Discriminator value: space:created'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - space:updated
            description: 'Discriminator value: space:updated'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - space:deleted
            description: 'Discriminator value: space:deleted'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - space:archived
            description: 'Discriminator value: space:archived'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - space:expired
            description: 'Discriminator value: space:expired'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - space:guestAdded
            description: 'Discriminator value: space:guestAdded'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - space:guestRemoved
            description: 'Discriminator value: space:guestRemoved'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - document:created
            description: 'Discriminator value: document:created'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - document:updated
            description: 'Discriminator value: document:updated'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - document:deleted
            description: 'Discriminator value: document:deleted'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
            description: The callback url to acknowledge the event
          dataUrl:
            type: string
            description: The url to retrieve the data associated with the event
          target:
            type: string
          origin:
            $ref: '#/components/schemas/type_events:Origin'
          namespaces:
            type: array
            items:
              type: string
          id:
            $ref: '#/components/schemas/type_commons:EventId'
          createdAt:
            type: string
            format: date-time
            description: Date the event was created
          deletedAt:
            type: string
            format: date-time
            description: Date the event was deleted
          acknowledgedAt:
            type: string
            format: date-time
            description: Date the event was acknowledged
          acknowledgedBy:
            type: string
            description: The actor (user or system) who acknowledged the event
          payload:
            type: object
            additionalProperties:
              description: Any type
        required:
        - topic
        - domain
        - context
        - id
        - createdAt
        - payload
      - type: object
        properties:
          topic:
            type: string
            enum:
            - workbook:created
            description: 'Discriminator value: workbook:created'
          domain:
            $ref: '#/components/schemas/type_events:Domain'
            description: The domain of the event
          context:
            $ref: '#/components/schemas/type_events:Context'
            description: The context of the event
          attributes:
            $ref: '#/components/schemas/type_events:EventAttributes'
            description: The attributes of the event
          callbackUrl:
            type: string
         

# --- truncated at 32 KB (150 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/flatfile/refs/heads/main/openapi/flatfile-subpackage-events-api-openapi.yml