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

# Create an object store trigger

> Creates a trigger that starts a flow when an object store bucket changes.



## OpenAPI

````yaml /api-reference/endpoint/trigger/openapi.json post /trigger/obj
openapi: 3.0.3
info:
  title: quiva.ai Triggers API
  description: >-
    Manages the triggers that start automation in response to events — create,
    retrieve and delete gateway triggers (custom API endpoints that kick off a
    flow) and stream triggers (real-time data flowing from a source into a
    target).
  contact:
    name: quiva.ai Support
  version: '1.0'
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearerAuth: []
  - apiKeyAuth: []
tags:
  - name: Triggers
    description: Gateway, stream and object store triggers
  - name: Email triggers
    description: Emails received by email triggers
paths:
  /trigger/obj:
    post:
      tags:
        - Object Store Triggers
      summary: Create an object store trigger
      description: >-
        Creates a trigger that starts a flow when an object store bucket
        changes.
      operationId: createObjectStoreTrigger
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ObjectStoreTriggerRequest'
      responses:
        '200':
          description: Trigger created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectStoreTriggerResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ObjectStoreTriggerRequest:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Unique trigger name
        collection:
          type: string
        description:
          type: string
        flow_subject:
          type: string
          description: Subject of the flow the trigger starts
    ObjectStoreTriggerResponse:
      type: object
      properties:
        body:
          type: object
          properties:
            body:
              type: object
              properties:
                name:
                  type: string
                collection:
                  type: string
                description:
                  type: string
                subject:
                  type: string
                trigger_type:
                  type: string
                  enum:
                    - obj
                type:
                  type: string
                flow_subject:
                  type: string
        status_code:
          type: integer
    Error:
      type: object
      properties:
        error:
          type: string
          description: >-
            Detailed error message explaining what went wrong and potential
            solutions.
          example: 'Invalid request: Missing required field'
        status_code:
          type: integer
          description: HTTP status code indicating the specific error type.
          example: 400
  responses:
    BadRequest:
      description: >-
        Invalid request. Occurs when required parameters are missing, validation
        fails, or the request format is incorrect.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: >-
              Invalid request: Missing required field 'name' in trigger
              definition
            status_code: 400
    Unauthorized:
      description: >-
        Unauthorized access. Occurs when authentication is missing or invalid,
        or when the authenticated user lacks permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Unauthorized: Invalid or missing authentication token'
            status_code: 401
    InternalServerError:
      description: >-
        Internal server error. Occurs when an unexpected condition prevents the
        server from fulfilling the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Internal server error: Unable to process request at this time'
            status_code: 500
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.