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

# Sync automation from latest Git release

> Reconciles automation registry metadata and trigger projections from the latest Git source release. This operation is idempotent for unchanged source state: repeated calls against the same latest release leave the same automation registry state and may repeat the same warnings. Requires a Bearer API token for the organization and a user-backed API key. It does not publish source; it reads the already-published latest release manifest. Versioned targets are rejected with 400, missing organization/source/release/manifest state returns 404, invalid manifests return 400, and provider or persistence failures return 5xx.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/automations/{id}/sync
openapi: 3.1.0
info:
  title: Eigenpal API
  version: 1.0.0
  description: >-
    Public REST API for inspecting automations, starting and monitoring runs,
    managing files, collecting human reviews, and running evaluations.
  contact:
    name: Eigenpal
    url: https://eigenpal.com
  license:
    name: Apache-2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
  - url: https://api.eigenpal.com
    description: Production (canonical API hostname)
security:
  - bearerAuth: []
tags:
  - name: Metadata
    description: Authenticate and inspect the current API context.
  - name: Automations
    description: >-
      Inspect runnable workflow and agent automations, their versions, triggers,
      and source sync state.
  - name: Runs
    description: >-
      Start, monitor, retry, review, and debug automation runs, including
      artifacts.
  - name: Reviews
    description: >-
      Record human review verdicts, manage corrected outputs, and monitor review
      health.
  - name: Files
    description: Upload reusable files for later run or dataset use.
  - name: Evaluation
    description: >-
      Manage datasets, examples, evaluators, experiment batches, evaluator
      scores, and run promotion workflows.
paths:
  /v1/automations/{id}/sync:
    post:
      tags:
        - Automations
      summary: Sync automation from latest Git release
      description: >-
        Reconciles automation registry metadata and trigger projections from the
        latest Git source release. This operation is idempotent for unchanged
        source state: repeated calls against the same latest release leave the
        same automation registry state and may repeat the same warnings.
        Requires a Bearer API token for the organization and a user-backed API
        key. It does not publish source; it reads the already-published latest
        release manifest. Versioned targets are rejected with 400, missing
        organization/source/release/manifest state returns 404, invalid
        manifests return 400, and provider or persistence failures return 5xx.
      operationId: automations.sync
      parameters:
        - in: path
          name: id
          schema:
            type: string
            description: >-
              Automation target to sync, such as agents.invoice-agent or
              workflows.extract. Do not include a version; sync always uses the
              latest Git release.
          required: true
          description: >-
            Automation target to sync, such as agents.invoice-agent or
            workflows.extract. Do not include a version; sync always uses the
            latest Git release.
      responses:
        '200':
          description: >-
            Automation metadata, latest release information, and non-fatal sync
            warnings.
          content:
            application/json:
              schema:
                type: object
                properties:
                  automation:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Automation id after reconciliation.
                      type:
                        type: string
                        enum:
                          - agent
                          - workflow
                        description: Automation kind inferred from the source package path.
                      slug:
                        type: string
                        description: Source package slug within agents/ or workflows/.
                      status:
                        type: string
                        enum:
                          - active
                          - archived
                        description: Current automation registry status.
                      updatedAt:
                        type: string
                        description: ISO timestamp for the reconciled automation row.
                    required:
                      - id
                      - type
                      - slug
                      - status
                      - updatedAt
                    additionalProperties: false
                  release:
                    type: object
                    properties:
                      version:
                        type: string
                        description: >-
                          Latest released source package version that was
                          synced.
                      tag:
                        type: string
                        description: Git release tag read during sync.
                      commit:
                        type: string
                        description: Git commit for the release tag.
                    required:
                      - version
                      - tag
                      - commit
                    additionalProperties: false
                  warnings:
                    type: array
                    items:
                      type: string
                    description: >-
                      Non-fatal source-state warnings, such as unsupported email
                      alias domains.
                required:
                  - automation
                  - release
                  - warnings
                additionalProperties: false
        '400':
          description: Validation error. Request shape did not match the spec.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '403':
          description: API key lacks required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '413':
          description: Payload too large. Upload exceeded the per-request size cap.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '429':
          description: Rate limit exceeded
          headers:
            Retry-After:
              description: Seconds until the next request may succeed
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
components:
  schemas:
    ApiErrorEnvelope:
      type: object
      properties:
        issues:
          type: array
          items:
            $ref: '#/components/schemas/ApiErrorIssue'
        requestId:
          type: string
          description: Request id echoed via the x-request-id header
        hint:
          description: Suggested fix for known error patterns
          type: string
        docsUrl:
          description: Link to relevant docs
          type: string
      required:
        - issues
        - requestId
      additionalProperties: false
    ApiErrorIssue:
      type: object
      properties:
        field:
          type: string
          description: JSON path of the offending field, or "<root>"
        message:
          type: string
          description: Human-readable error message
        code:
          type: string
          description: >-
            Machine-readable error code (e.g. invalid_value, not_found,
            api_trigger_disabled, manual_trigger_disabled)
        severity:
          type: string
          enum:
            - error
            - warning
          description: Issue severity
      required:
        - field
        - message
        - code
        - severity
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key issued from Settings → API Keys. Pass as `Authorization: Bearer
        <key>`.

````