> ## 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 an automation

> A `POST` to the `/automation` endpoint allows your application to create an automation.



## OpenAPI

````yaml post /v3/automations
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/automations:
    post:
      tags:
        - Automation
      summary: Add an automation
      description: >-
        A `POST` to the `/automation` endpoint allows your application to create
        an automation.
      operationId: automations.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StoreAutomation'
      responses:
        '200':
          description: '`Automation`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Automation'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    StoreAutomation:
      type: object
      properties:
        name:
          type: string
        type:
          type: string
          enum:
            - date
            - scheduled
        query:
          type: string
        query_type:
          type:
            - string
            - 'null'
        date:
          type: string
          format: date
        slot:
          type: string
          enum:
            - AU-MEL-0
            - AU-MEL-1
            - AU-MEL-2
            - AU-MEL-3
            - AU-MEL-4
            - AU-MEL-5
            - AU-MEL-6
            - AU-MEL-7
            - AU-MEL-8
            - AU-MEL-9
            - AU-MEL-10
            - AU-MEL-11
            - AU-MEL-12
            - AU-MEL-13
            - AU-MEL-14
            - AU-MEL-15
            - AU-MEL-16
            - AU-MEL-17
            - AU-MEL-18
            - AU-MEL-19
            - AU-MEL-20
            - AU-MEL-21
            - AU-MEL-22
            - AU-MEL-23
            - NZ-AUK-1
            - AU-MEL-HOURLY-0
        description:
          type:
            - string
            - 'null'
        is_active:
          type:
            - boolean
            - 'null'
        notes:
          type:
            - string
            - 'null'
        frequency:
          type:
            - string
            - 'null'
          enum:
            - monthly
            - weekly
            - fortnightly
            - daily
        run_at:
          type:
            - integer
            - 'null'
        arguments:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
            required:
              - name
              - value
        actions:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              sort_order:
                type:
                  - integer
                  - 'null'
              uuid:
                type:
                  - string
                  - 'null'
              arguments:
                type:
                  - array
                  - 'null'
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    value:
                      type: string
                    is_dynamic:
                      type: boolean
                  required:
                    - name
                    - value
              description:
                type:
                  - string
                  - 'null'
              notes:
                type:
                  - string
                  - 'null'
            required:
              - name
          minItems: 1
      required:
        - name
        - type
        - query
      title: StoreAutomation
    Automation:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        type:
          type: string
        query:
          type:
            - string
            - 'null'
        query_type:
          type:
            - string
            - 'null'
        date:
          type:
            - string
            - 'null'
        arguments:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              value:
                type: string
            required:
              - name
              - value
        slot:
          type:
            - string
            - 'null'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
        description:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        is_active:
          type: boolean
        frequency:
          type:
            - string
            - 'null'
        run_at:
          type:
            - integer
            - 'null'
        last_run_at:
          type:
            - string
            - 'null'
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - type
        - query
        - query_type
        - date
        - arguments
        - slot
        - actions
        - description
        - notes
        - is_active
        - frequency
        - run_at
        - last_run_at
        - created_at
        - updated_at
      title: Automation
    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

````