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

# Sync Registry Repository

> Sync an org-scoped registry repository.

For platform registries (base registry), use the admin API at /admin/registry/sync.

Args:
    repository_id: The ID of the repository to sync
    sync_params: Optional sync parameters, including target commit SHA and force flag

Raises:
    422: If there is an error syncing the repository (validation error)
    404: If the repository is not found
    400: If there is an error syncing the repository



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json post /registry/repos/{repository_id}/sync
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /registry/repos/{repository_id}/sync:
    post:
      tags:
        - registry-repositories
      summary: Sync Registry Repository
      description: >-
        Sync an org-scoped registry repository.


        For platform registries (base registry), use the admin API at
        /admin/registry/sync.


        Args:
            repository_id: The ID of the repository to sync
            sync_params: Optional sync parameters, including target commit SHA and force flag

        Raises:
            422: If there is an error syncing the repository (validation error)
            404: If the repository is not found
            400: If there is an error syncing the repository
      operationId: registry-repositories-sync_registry_repository
      parameters:
        - name: repository_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Repository Id
      requestBody:
        content:
          application/json:
            schema:
              anyOf:
                - $ref: '#/components/schemas/RegistryRepositorySync'
                - type: 'null'
              title: Sync Params
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/tracecat__registry__repositories__schemas__RegistrySyncResponse
        '400':
          description: Cannot sync repository
        '404':
          description: Registry repository not found
        '422':
          description: Registry sync validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegistryRepositoryErrorDetail'
      security:
        - APIKeyCookie: []
components:
  schemas:
    RegistryRepositorySync:
      properties:
        target_commit_sha:
          anyOf:
            - type: string
              maxLength: 40
              minLength: 40
            - type: 'null'
          title: Target Commit Sha
          description: The specific commit SHA to sync to. If None, syncs to HEAD.
        force:
          type: boolean
          title: Force
          description: Force sync by deleting the existing version first, allowing re-sync.
          default: false
      type: object
      title: RegistryRepositorySync
      description: Parameters for syncing a repository to a specific commit.
    tracecat__registry__repositories__schemas__RegistrySyncResponse:
      properties:
        success:
          type: boolean
          title: Success
        repository_id:
          type: string
          format: uuid
          title: Repository Id
        origin:
          type: string
          title: Origin
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        commit_sha:
          anyOf:
            - type: string
            - type: 'null'
          title: Commit Sha
        actions_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Actions Count
        forced:
          type: boolean
          title: Forced
          default: false
      type: object
      required:
        - success
        - repository_id
        - origin
      title: RegistrySyncResponse
      description: Response model for registry sync operation.
    RegistryRepositoryErrorDetail:
      properties:
        id:
          type: string
          title: Id
        origin:
          type: string
          title: Origin
        message:
          type: string
          title: Message
        errors:
          additionalProperties:
            items:
              $ref: '#/components/schemas/RegistryActionValidationErrorInfo'
            type: array
          type: object
          title: Errors
      type: object
      required:
        - id
        - origin
        - message
        - errors
      title: RegistryRepositoryErrorDetail
      description: Error response model for registry sync failures.
    RegistryActionValidationErrorInfo:
      properties:
        type:
          $ref: '#/components/schemas/TemplateActionValidationErrorType'
        details:
          items:
            type: string
          type: array
          title: Details
        is_template:
          type: boolean
          title: Is Template
        loc_primary:
          type: string
          title: Loc Primary
        loc_secondary:
          anyOf:
            - type: string
            - type: 'null'
          title: Loc Secondary
      type: object
      required:
        - type
        - details
        - is_template
        - loc_primary
      title: RegistryActionValidationErrorInfo
    TemplateActionValidationErrorType:
      type: string
      enum:
        - ACTION_NOT_FOUND
        - ACTION_NAME_CONFLICT
        - STEP_VALIDATION_ERROR
        - EXPRESSION_VALIDATION_ERROR
        - SERIALIZATION_ERROR
      title: TemplateActionValidationErrorType
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth

````