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

# Add a trigger

> A `POST` to the `/trigger` endpoint allows your application to create a trigger.



## OpenAPI

````yaml post /v3/triggers
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/triggers:
    post:
      tags:
        - Trigger
      summary: Add a trigger
      description: >-
        A `POST` to the `/trigger` endpoint allows your application to create a
        trigger.
      operationId: triggers.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreTrigger'
      responses:
        '200':
          description: '`Trigger`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Trigger'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreTrigger:
      type: object
      properties:
        name:
          type: string
        trigger:
          type: string
        description:
          type:
            - string
            - 'null'
        is_active:
          type:
            - boolean
            - 'null'
        notes:
          type:
            - string
            - 'null'
        actions:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              sort_order:
                type:
                  - integer
                  - 'null'
              arguments:
                type:
                  - array
                  - 'null'
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    value:
                      type: string
                    is_dynamic:
                      type:
                        - boolean
                        - 'null'
                  required:
                    - name
                    - value
              description:
                type:
                  - string
                  - 'null'
              notes:
                type:
                  - string
                  - 'null'
            required:
              - name
          minItems: 1
      required:
        - name
        - trigger
      title: StoreTrigger
    Trigger:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        trigger:
          type: string
        description:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
        is_active:
          type: boolean
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - trigger
        - description
        - notes
        - actions
        - is_active
        - created_at
        - updated_at
      title: Trigger
    Action:
      type: object
      properties:
        id:
          type: integer
        uuid:
          type: string
        references_id:
          type:
            - string
            - 'null'
        name:
          type: string
        sort_order:
          type:
            - integer
            - 'null'
        description:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        arguments:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
              is_dynamic:
                type:
                  - string
                  - 'null'
            required:
              - name
              - value
              - is_dynamic
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - uuid
        - references_id
        - name
        - sort_order
        - description
        - notes
        - arguments
        - created_at
        - updated_at
      title: Action
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````