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

# Sync Connector

> Trigger an on-demand sync for a connector.

Starts an immediate sync for all configured resources. Syncs also run on a schedule (default: hourly), so this endpoint is only needed when you want to force a sync outside the normal cadence.

<RequestExample>
  ```bash cURL theme={"dark"}
  curl -X POST 'https://api.hydradb.com/connectors/{connector_id}/sync' \
    -H "Authorization: Bearer $HYDRA_DB_API_KEY" \
    -H "API-Version: 2"
  ```
</RequestExample>

## Path parameters

| Name | Description                                    |
| ---- | ---------------------------------------------- |
| `id` | Connector UUID returned by `POST /connectors`. |

<ResponseExample>
  ```json 202 theme={"dark"}
  {
    "run_id": "{run_id}",
    "workflow_id": "connector-sync-{connector_id}"
  }
  ```
</ResponseExample>

`202` means the sync was queued, not that it completed. Poll [Connector Resources](/api-reference/v2/endpoint/connector-resources) and check that `provider_cursor` advances to confirm the sync ran.

<div className="api-before-related-resources" />

## Related Resources

* [Connector Resources](/api-reference/v2/endpoint/connector-resources)  -  poll `provider_cursor` to confirm sync completion
* [Configure Connector](/api-reference/v2/endpoint/configure-connector)  -  activate resources before syncing


## OpenAPI

````yaml api-reference/v2/openapi.json POST /connectors/{id}/sync
openapi: 3.1.0
info:
  contact:
    email: support@hydradb.com
    name: HydraDB Support
  description: >-
    HydraDB Application API — knowledge ingestion, search, and memory
    management.
  license:
    name: Proprietary
  title: HydraDB Application API
  version: 0.1.0
servers:
  - description: Production server
    url: https://api.hydradb.com
security: []
externalDocs:
  description: ''
  url: ''
paths:
  /connectors/{id}/sync:
    post:
      tags:
        - connectors
      summary: Trigger a connector sync
      description: Start a manual sync workflow for a connector.
      parameters:
        - description: Connector ID
          in: path
          name: id
          required: true
          schema:
            example: HydraDoc1234
            type: string
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties: {}
                type: object
          description: Accepted
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Conflict
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Service Unavailable
      security:
        - BearerAuth: []
components:
  schemas:
    handler.ErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/handler.ErrorDetail'
          description: Structured error detail with code, message, and deprecation hints.
          example:
            deprecated: true
            deprecated_field: tenant_id
            error_code: VALIDATION_ERROR
            message: Request validation failed
            preferred_field: database
            success: true
      type: object
    handler.ErrorDetail:
      properties:
        deprecated:
          description: Whether this response concerns a deprecated field or route.
          example: true
          type: boolean
        deprecated_field:
          description: The deprecated field name.
          example: tenant_id
          type: string
        error_code:
          description: Machine-readable error classification code.
          example: VALIDATION_ERROR
          type: string
        message:
          description: Human-readable description of the error.
          example: Request validation failed
          type: string
        preferred_field:
          description: The canonical replacement for the deprecated field.
          example: database
          type: string
        success:
          description: Always false for error responses.
          example: true
          type: boolean
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API key
      description: 'API key sent as a Bearer token: "Bearer prefix.secret"'
      scheme: bearer
      type: http

````