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

# Create an automation

> Creates an automation. Get repository, integration, and resource IDs from `GET /integrations` and secret IDs from `GET /secrets`. Model settings you leave out use the defaults.



## OpenAPI

````yaml /api-reference/openapi.json post /automations
openapi: 3.1.0
info:
  description: >-
    Manage a Superlog workspace's automations, runs, tag mode, model access, and
    secrets. Every request acts as the member who created the API key.
  title: Superlog management API
  version: 1.0.0
servers:
  - url: https://superlog.sh/api/v1
security:
  - bearerAuth: []
tags:
  - description: The workspace and its members.
    name: Workspace
  - description: Keys that authenticate the management API and MCP server.
    name: API keys
  - description: Connected integrations and the IDs automations and tag mode use.
    name: Integrations
  - description: Create and change automations.
    name: Automations
  - description: Start, follow, and cancel automation runs.
    name: Runs
  - description: What Superlog can use and change when someone mentions it in Slack.
    name: Tag mode
  - description: Model API keys, subscriptions, and available models.
    name: Models
  - description: Credentials agents can use without seeing them.
    name: Secrets
paths:
  /automations:
    post:
      tags:
        - Automations
      summary: Create an automation
      description: >-
        Creates an automation. Get repository, integration, and resource IDs
        from `GET /integrations` and secret IDs from `GET /secrets`. Model
        settings you leave out use the defaults.
      operationId: create_automation
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                configuration:
                  type: object
                  properties:
                    contextAccountIds:
                      default: []
                      description: >-
                        Integration account IDs the agent can read from, besides
                        GitHub. See `GET /integrations`.
                      maxItems: 50
                      type: array
                      items:
                        type: string
                        format: uuid
                    harness:
                      description: Defaults to `codex`.
                      type: string
                      enum:
                        - codex
                        - claude_agent_sdk
                        - opencode
                    maxModelRequests:
                      description: Defaults to `500`.
                      type: integer
                      minimum: 1
                      maximum: 1000
                    maxOutputTokensPerRequest:
                      description: Defaults to `16000`.
                      type: integer
                      minimum: 256
                      maximum: 100000
                    maxRuntimeSeconds:
                      description: Defaults to `1800`.
                      type: integer
                      minimum: 60
                      maximum: 3600
                    model:
                      description: Defaults to `gpt-5.4`.
                      type: string
                      minLength: 1
                      maxLength: 255
                      pattern: ^[A-Za-z0-9][A-Za-z0-9._:/-]*$
                    modelProvider:
                      description: Defaults to `openai`.
                      type: string
                      enum:
                        - openai
                        - anthropic
                        - google
                        - xai
                        - mistral
                        - deepseek
                    notifications:
                      default: []
                      description: >-
                        Slack channels that receive the result of each scheduled
                        or Sentry run.
                      maxItems: 10
                      type: array
                      items:
                        oneOf:
                          - type: object
                            properties:
                              channelId:
                                type: string
                                minLength: 1
                                maxLength: 255
                              integrationAccountId:
                                type: string
                                format: uuid
                              kind:
                                type: string
                                const: slack
                            required:
                              - channelId
                              - integrationAccountId
                              - kind
                    prompt:
                      type: string
                      minLength: 1
                      maxLength: 50000
                      description: The agent instructions.
                    repositoryIds:
                      minItems: 1
                      maxItems: 10
                      type: array
                      items:
                        type: string
                        format: uuid
                      description: >-
                        Repositories checked out in the sandbox. See `GET
                        /integrations`.
                    toolPolicy:
                      description: Defaults to `full`.
                      type: string
                      const: full
                    triggers:
                      minItems: 1
                      maxItems: 10
                      type: array
                      items:
                        oneOf:
                          - type: object
                            properties:
                              channelIds:
                                minItems: 1
                                maxItems: 50
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                description: Slack channel IDs, such as C0123456789.
                              eventMode:
                                type: string
                                enum:
                                  - mentions
                                  - every_message
                                  - both
                                description: >-
                                  Run when the app is mentioned, on every new
                                  message, or both.
                              integrationAccountId:
                                type: string
                                format: uuid
                              kind:
                                type: string
                                const: slack
                            required:
                              - channelIds
                              - eventMode
                              - integrationAccountId
                              - kind
                            description: Runs on Slack messages in the selected channels.
                          - type: object
                            properties:
                              eventTypes:
                                minItems: 1
                                maxItems: 2
                                type: array
                                items:
                                  type: string
                                  enum:
                                    - new_issue
                                    - regression
                                description: Run on new issues, regressions, or both.
                              excludedEnvironments:
                                description: >-
                                  Issues from these environments do not start a
                                  run.
                                maxItems: 100
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 64
                              integrationAccountId:
                                type: string
                                format: uuid
                              kind:
                                type: string
                                const: sentry
                              projectIds:
                                minItems: 1
                                maxItems: 100
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                description: Sentry project IDs.
                            required:
                              - eventTypes
                              - integrationAccountId
                              - kind
                              - projectIds
                            description: >-
                              Runs on new or regressed Sentry issues in the
                              selected projects.
                          - type: object
                            properties:
                              channelIds:
                                minItems: 1
                                maxItems: 50
                                type: array
                                items:
                                  type: string
                                  minLength: 1
                                  maxLength: 255
                                description: Discord channel IDs.
                              integrationAccountId:
                                type: string
                                format: uuid
                              kind:
                                type: string
                                const: discord
                            required:
                              - channelIds
                              - integrationAccountId
                              - kind
                            description: >-
                              Runs when someone uses `/automate` in the selected
                              Discord channels.
                          - type: object
                            properties:
                              frequency:
                                type: string
                                enum:
                                  - hourly
                                  - daily
                                  - weekly
                              hour:
                                type: integer
                                minimum: 0
                                maximum: 23
                                description: Local hour for daily and weekly runs, 0 to 23.
                              kind:
                                type: string
                                const: schedule
                              timezone:
                                type: string
                                minLength: 1
                                maxLength: 64
                                description: IANA time zone, such as Europe/Paris.
                              weekday:
                                type: integer
                                minimum: 0
                                maximum: 6
                                description: Local day for weekly runs. 0 is Sunday.
                            required:
                              - frequency
                              - hour
                              - kind
                              - timezone
                              - weekday
                            description: >-
                              Runs on the hour, or at a local time each day or
                              week.
                      description: What starts a run. Each trigger starts runs on its own.
                    workspaceSecretIds:
                      default: []
                      description: >-
                        Workspace secrets available to the agent. See `GET
                        /secrets`.
                      maxItems: 20
                      type: array
                      items:
                        type: string
                        format: uuid
                  required:
                    - prompt
                    - repositoryIds
                    - triggers
                description:
                  default: ''
                  description: A short description shown in the automation list.
                  type: string
                  maxLength: 2000
                enabled:
                  default: true
                  description: Whether triggers start runs. Defaults to `true`.
                  type: boolean
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                  description: Unique within the workspace.
              required:
                - configuration
                - name
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                type: object
                properties:
                  automation:
                    type: object
                    properties:
                      configuration:
                        type: object
                        properties:
                          contextAccountIds:
                            type: array
                            items:
                              type: string
                              format: uuid
                            description: >-
                              Integration accounts the agent can read from,
                              besides GitHub.
                          harness:
                            type: string
                            enum:
                              - codex
                              - claude_agent_sdk
                              - opencode
                            description: The agent program that runs the model.
                          maxModelRequests:
                            type: integer
                            description: Most model requests in one run.
                          maxOutputTokensPerRequest:
                            type: integer
                          maxRuntimeSeconds:
                            type: integer
                          model:
                            type: string
                          modelProvider:
                            type: string
                            enum:
                              - openai
                              - anthropic
                              - google
                              - xai
                              - mistral
                              - deepseek
                          notifications:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    channelId:
                                      type: string
                                      minLength: 1
                                      maxLength: 255
                                    integrationAccountId:
                                      type: string
                                      format: uuid
                                    kind:
                                      type: string
                                      const: slack
                                  required:
                                    - channelId
                                    - integrationAccountId
                                    - kind
                                  additionalProperties: false
                            description: >-
                              Slack channels that receive the result of
                              scheduled and Sentry runs.
                          prompt:
                            type: string
                            description: The agent instructions.
                          repositoryIds:
                            type: array
                            items:
                              type: string
                              format: uuid
                          toolPolicy:
                            type: string
                            const: full
                          triggers:
                            type: array
                            items:
                              oneOf:
                                - type: object
                                  properties:
                                    channelIds:
                                      minItems: 1
                                      maxItems: 50
                                      type: array
                                      items:
                                        type: string
                                        minLength: 1
                                        maxLength: 255
                                      description: Slack channel IDs, such as C0123456789.
                                    eventMode:
                                      type: string
                                      enum:
                                        - mentions
                                        - every_message
                                        - both
                                      description: >-
                                        Run when the app is mentioned, on every
                                        new message, or both.
                                    integrationAccountId:
                                      type: string
                                      format: uuid
                                    kind:
                                      type: string
                                      const: slack
                                  required:
                                    - channelIds
                                    - eventMode
                                    - integrationAccountId
                                    - kind
                                  additionalProperties: false
                                  description: >-
                                    Runs on Slack messages in the selected
                                    channels.
                                - type: object
                                  properties:
                                    eventTypes:
                                      minItems: 1
                                      maxItems: 2
                                      type: array
                                      items:
                                        type: string
                                        enum:
                                          - new_issue
                                          - regression
                                      description: Run on new issues, regressions, or both.
                                    excludedEnvironments:
                                      description: >-
                                        Issues from these environments do not
                                        start a run.
                                      maxItems: 100
                                      type: array
                                      items:
                                        type: string
                                        minLength: 1
                                        maxLength: 64
                                    integrationAccountId:
                                      type: string
                                      format: uuid
                                    kind:
                                      type: string
                                      const: sentry
                                    projectIds:
                                      minItems: 1
                                      maxItems: 100
                                      type: array
                                      items:
                                        type: string
                                        minLength: 1
                                        maxLength: 255
                                      description: Sentry project IDs.
                                  required:
                                    - eventTypes
                                    - integrationAccountId
                                    - kind
                                    - projectIds
                                  additionalProperties: false
                                  description: >-
                                    Runs on new or regressed Sentry issues in
                                    the selected projects.
                                - type: object
                                  properties:
                                    channelIds:
                                      minItems: 1
                                      maxItems: 50
                                      type: array
                                      items:
                                        type: string
                                        minLength: 1
                                        maxLength: 255
                                      description: Discord channel IDs.
                                    integrationAccountId:
                                      type: string
                                      format: uuid
                                    kind:
                                      type: string
                                      const: discord
                                  required:
                                    - channelIds
                                    - integrationAccountId
                                    - kind
                                  additionalProperties: false
                                  description: >-
                                    Runs when someone uses `/automate` in the
                                    selected Discord channels.
                                - type: object
                                  properties:
                                    frequency:
                                      type: string
                                      enum:
                                        - hourly
                                        - daily
                                        - weekly
                                    hour:
                                      type: integer
                                      minimum: 0
                                      maximum: 23
                                      description: >-
                                        Local hour for daily and weekly runs, 0
                                        to 23.
                                    kind:
                                      type: string
                                      const: schedule
                                    timezone:
                                      type: string
                                      minLength: 1
                                      maxLength: 64
                                      description: IANA time zone, such as Europe/Paris.
                                    weekday:
                                      type: integer
                                      minimum: 0
                                      maximum: 6
                                      description: Local day for weekly runs. 0 is Sunday.
                                  required:
                                    - frequency
                                    - hour
                                    - kind
                                    - timezone
                                    - weekday
                                  additionalProperties: false
                                  description: >-
                                    Runs on the hour, or at a local time each
                                    day or week.
                          workspaceSecretIds:
                            type: array
                            items:
                              type: string
                              format: uuid
                        required:
                          - contextAccountIds
                          - harness
                          - maxModelRequests
                          - maxOutputTokensPerRequest
                          - maxRuntimeSeconds
                          - model
                          - modelProvider
                          - notifications
                          - prompt
                          - repositoryIds
                          - toolPolicy
                          - triggers
                          - workspaceSecretIds
                        additionalProperties: false
                      createdAt:
                        type: string
                        format: date-time
                        description: When the automation was created.
                      description:
                        type: string
                      enabled:
                        type: boolean
                      id:
                        type: string
                        format: uuid
                        description: Automation ID.
                      name:
                        type: string
                      updatedAt:
                        type: string
                        format: date-time
                        description: When the automation was last changed.
                      version:
                        type: integer
                        description: Increases each time the configuration is saved.
                    required:
                      - configuration
                      - createdAt
                      - description
                      - enabled
                      - id
                      - name
                      - updatedAt
                      - version
                    additionalProperties: false
                required:
                  - automation
                additionalProperties: false
          description: Created
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The request is invalid. `issues` lists each invalid field.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: The API key is missing, revoked, or its creator left the workspace.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            The resource does not exist in this workspace, or automations are
            not enabled.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            The request conflicts with the current state, such as a name already
            in use.
      security:
        - bearerAuth: []
components:
  schemas:
    Error:
      type: object
      properties:
        code:
          description: A stable machine-readable error code, when there is one.
          type: string
        error:
          type: string
          description: What went wrong.
        issues:
          description: Validation problems, one per invalid field.
          type: array
          items:
            type: object
            properties:
              message:
                type: string
              path:
                type: array
                items:
                  anyOf:
                    - type: string
                    - type: number
            required:
              - message
              - path
            additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      description: A workspace API key, created in Superlog under Settings → API keys.
      scheme: bearer
      type: http

````

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