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

# Send a custom event for a specific flow

> Route that can be used to send a specific event for a flow



## OpenAPI

````yaml post /syncs/{syncid}/flows/{flowid}/event
openapi: 3.1.0
info:
  title: Chift API
  description: >-
    The Chift API is a universal API giving you access to financial data from
    the software of your clients. It helps software companies to offer native
    integrations to their clients without the effort needed to maintain those
    native integrations. By using the APIs (Accounting, POS, eCommerce) of
    Chift, you connect once and allow your clients to use their software
    packages.
  version: 1.0.0
servers:
  - url: https://api.chift.eu
    description: Chift
security:
  - bearerAuth: []
paths:
  /syncs/{syncid}/flows/{flowid}/event:
    post:
      tags:
        - Syncs
      summary: Send a custom event for a specific flow
      description: Route that can be used to send a specific event for a flow
      operationId: syncs_send_custom_event
      parameters:
        - name: syncid
          in: path
          required: true
          schema:
            type: string
            title: Syncid
        - name: flowid
          in: path
          required: true
          schema:
            type: string
            title: Flowid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostSyncFlowEvent'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerResponse'
        '400':
          content:
            application/json:
              example:
                message: No consumers found
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Bad Request
        '404':
          content:
            application/json:
              example:
                message: The chain does not exist
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Not Found
        '422':
          content:
            application/json:
              example:
                message: >-
                  Error while validating context data; the field
                  {field.get('name')} does not seem to be of type {fieldtype}
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Unprocessable Entity
components:
  schemas:
    PostSyncFlowEvent:
      properties:
        consumers:
          items:
            anyOf:
              - type: string
                format: uuid
              - type: string
          type: array
          title: Consumers
        data:
          $ref: '#/components/schemas/PostSyncFlowEventData'
      type: object
      title: PostSyncFlowEvent
    TriggerResponse:
      properties:
        status:
          type: string
          title: Status
        message:
          type: string
          title: Message
        data:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Data
      type: object
      required:
        - status
        - message
      title: TriggerResponse
    ChiftError:
      properties:
        message:
          type: string
          title: Message
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: error
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          default: ''
      type: object
      required:
        - message
      title: ChiftError
    PostSyncFlowEventData:
      properties:
        is_preview:
          type: boolean
          title: Is Preview
          description: Whether to preview the sync
          default: false
        force_restart:
          type: boolean
          title: Force Restart
          description: Whether to force restart the sync from the specified dates
          default: false
        start_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Start Date
          description: Start date for sync range
        end_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: End Date
          description: End date for sync range
        force_from_date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Force From Date
          description: Force sync from this specific date, overriding flow configuration
        import_mode:
          anyOf:
            - $ref: '#/components/schemas/ImportMode'
            - type: 'null'
          description: 'Import mode: reimport all data or only missing days'
      additionalProperties: true
      type: object
      title: PostSyncFlowEventData
    ImportMode:
      type: string
      enum:
        - IMPORT_ONLY_MISSING_DAYS
        - REIMPORT_ENTIRE_PERIOD
      title: ImportMode
      description: Enumeration of import modes for flow execution.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This access token needs to be included in each of your request to the
        Chift API.

````