> ## 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 (deprecated)

> Deprecated: use POST /syncs/{syncid}/flows/{flowid}/execute, which runs a flow for a list of consumers or for one consumer with settings. Kept working unchanged; not removed.



## 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 (deprecated)
      description: >-
        Deprecated: use POST /syncs/{syncid}/flows/{flowid}/execute, which runs
        a flow for a list of consumers or for one consumer with settings. Kept
        working unchanged; not removed.
      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
      deprecated: true
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: ''
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      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:
        - normal
        - force_reimport
        - IMPORT_ONLY_MISSING_DAYS
        - REIMPORT_ENTIRE_PERIOD
      title: ImportMode
      description: >-
        How an execution interprets the sync state already recorded in the
        datastores.


        ``NORMAL`` treats the datastore as authoritative: anything not recorded
        as a success is

        retried. ``FORCE_REIMPORT`` ignores those records and re-exports
        everything in range; each

        sync decides how its own tracking datastores are reconciled.


        Its scope is state, not period: it never chooses which dates run, and it
        never deletes

        anything on its own.
  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.

````