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

# Create automation



## OpenAPI

````yaml /openapi.json post /api/v1/automations
openapi: 3.1.0
info:
  title: Harly API
  version: 1.0.0
servers:
  - url: https://{instance}
    variables:
      instance:
        default: app.harly.dev
        description: Hostname of your Harly installation
security: []
paths:
  /api/v1/automations:
    post:
      tags:
        - Automations
      summary: Create automation
      operationId: createAutomation
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                description:
                  type: string
                  maxLength: 2000
                enabled:
                  default: true
                  type: boolean
                trigger:
                  type: object
                  properties:
                    event:
                      type: string
                      enum:
                        - application.created
                        - application.stage_changed
                        - application.hired
                        - application.rejected
                        - candidate.created
                        - candidate.updated
                        - interview.scheduled
                        - interview.completed
                        - job.published
                    filter:
                      type: object
                      propertyNames:
                        type: string
                      additionalProperties:
                        anyOf:
                          - type: string
                          - type: number
                          - type: boolean
                          - type: 'null'
                          - type: array
                            items:
                              type: string
                  required:
                    - event
                  additionalProperties: false
                conditions: {}
                actions:
                  minItems: 1
                  maxItems: 10
                  type: array
                  items:
                    type: object
                    properties:
                      type:
                        type: string
                        enum:
                          - move_stage
                          - set_status
                          - add_note
                          - add_tag
                          - remove_tag
                          - send_email
                          - send_slack
                          - send_telegram
                          - send_discord
                          - schedule_interview
                          - create_offer
                          - send_offer
                          - create_task
                          - http_request
                          - ai_score
                          - ai_summarize
                          - ai_decide
                      config:
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties: {}
                      continueOnError:
                        default: false
                        type: boolean
                    required:
                      - type
                      - config
                      - continueOnError
                    additionalProperties: false
                maxRunsPerMinute:
                  type: integer
                  minimum: 1
                  maximum: 10000
                maxExternalActionsPerMinute:
                  type: integer
                  minimum: 1
                  maximum: 10000
                circuitBreakerThreshold:
                  type: integer
                  minimum: 1
                  maximum: 100
                circuitBreakerCooldownSeconds:
                  type: integer
                  minimum: 30
                  maximum: 86400
              required:
                - name
                - enabled
                - trigger
                - actions
              additionalProperties: false
      responses:
        '201':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      name:
                        type: string
                      description:
                        anyOf:
                          - type: string
                          - type: 'null'
                      enabled:
                        type: boolean
                      status:
                        type: string
                        enum:
                          - draft
                          - published
                          - paused
                      triggerEvent:
                        type: string
                      trigger: {}
                      conditions: {}
                      actions: {}
                      createdById:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                      definitionVersion:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      approvalRequestedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      approvedById:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                      approvedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      publishedById:
                        anyOf:
                          - type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          - type: 'null'
                      publishedAt:
                        anyOf:
                          - type: string
                          - type: 'null'
                      maxRunsPerMinute:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      maxExternalActionsPerMinute:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      circuitBreakerThreshold:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      circuitBreakerCooldownSeconds:
                        type: integer
                        exclusiveMinimum: 0
                        maximum: 9007199254740991
                      circuitOpenUntil:
                        anyOf:
                          - type: string
                          - type: 'null'
                      createdAt:
                        type: string
                      updatedAt:
                        type: string
                    required:
                      - id
                      - name
                      - description
                      - enabled
                      - status
                      - triggerEvent
                      - trigger
                      - conditions
                      - actions
                      - createdById
                      - definitionVersion
                      - approvalRequestedAt
                      - approvedById
                      - approvedAt
                      - publishedById
                      - publishedAt
                      - maxRunsPerMinute
                      - maxExternalActionsPerMinute
                      - circuitBreakerThreshold
                      - circuitBreakerCooldownSeconds
                      - circuitOpenUntil
                      - createdAt
                      - updatedAt
                    additionalProperties: false
                  meta:
                    type: object
                    properties:
                      pagination:
                        type: object
                        properties:
                          nextCursor:
                            anyOf:
                              - type: string
                              - type: 'null'
                          hasMore:
                            type: boolean
                          limit:
                            type: number
                        required:
                          - nextCursor
                          - hasMore
                          - limit
                        additionalProperties: false
                    additionalProperties: false
                required:
                  - data
                additionalProperties: false
        '401':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '403':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
        '422':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      details: {}
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Harly API key

````