> ## 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.

# Update Connector

> Change a connector's instructions, sync interval or credentials in place.

Updates a connector in place. Every field is optional and only the fields you send change, so it is safe to call without re-sending anything else. Every field is checked before anything is saved, so if one is invalid, nothing changes. Credentials are saved before the other settings, so in the rare case of a server error after that, only the credentials may have changed; retrying the same request is safe.

* **`custom_instructions`** sets the connector-level ingestion instructions, used by every resource that has no instructions of its own. Send `""` to clear them. Up to 4,000 characters. They apply from the next sync; documents already synced are not processed again. See [Custom Ingestion Instructions](/essentials/v2/connector-instructions).
* **`sync_interval_seconds`** sets how often scheduled syncs run. The allowed range depends on the provider and comes back in the response as `min_sync_interval_seconds` and `max_sync_interval_seconds`. Values outside it are rejected, and `0` resets to the provider default. The next sync is rescheduled right away, so a shorter interval takes effect immediately.
* **`credentials`** reconnects the connector, for example after a token expired or was revoked. Send the provider's full credential set, the same as on create. The connector keeps its id, resources and sync positions, and a reconnect-required state is cleared.

<RequestExample>
  ```bash cURL theme={"dark"}
  curl -X PATCH 'https://api.hydradb.com/connectors/{id}' \
    -H "Authorization: Bearer $HYDRA_DB_API_KEY" \
    -H "API-Version: 2" \
    -H "Content-Type: application/json" \
    -d '{
      "custom_instructions": "Aurora was renamed to Nimbus in January 2025; they are the same product. Index all Aurora content under Nimbus.",
      "sync_interval_seconds": 3600
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={"dark"}
  {
    "connector_id": "{connector_id}",
    "sync_interval_seconds": 3600,
    "next_sync_at": "2026-06-01T13:00:00Z",
    "min_sync_interval_seconds": 300,
    "max_sync_interval_seconds": 604800,
    "custom_instructions_updated": true
  }
  ```
</ResponseExample>

`custom_instructions_updated` and `credentials_updated` are present when the request changed those fields. Sending `{}` changes nothing and returns the current interval and the allowed range.

## Errors

* `400`: `custom_instructions` is over 4,000 characters, or `sync_interval_seconds` is outside the provider's range. Nothing is changed.
* `404`: no connector with this id in your workspace.
* `422`: `credentials` does not match the provider's `credential_schema`.

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

## Related Resources

* [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource): instructions for one resource
* [Custom Ingestion Instructions](/essentials/v2/connector-instructions): what instructions do and how they combine
* [Get Connector](/api-reference/v2/endpoint/get-connector): read the stored settings back


## OpenAPI

````yaml api-reference/v2/openapi.json PATCH /connectors/{id}
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}:
    patch:
      tags:
        - connectors
      summary: Update a connector
      description: >-
        Update a connector's settings in place. Only the fields you send change.
        `sync_interval_seconds` sets the sync cadence within the range returned
        in the response (`0` resets to the provider default). `credentials`
        reconnects the connector with a full credential set, keeping its id,
        resources and sync cursors. `custom_instructions` replaces the
        connector-level ingestion instructions (`""` clears them) from the next
        sync. Every field is validated before anything is written, so an invalid
        value changes nothing. Credentials are saved before the other settings,
        so a server error after that point can leave only the credentials
        updated.
      parameters:
        - description: Connector ID
          in: path
          name: id
          required: true
          schema:
            example: HydraDoc1234
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.connectorUpdateReq'
        description: Connector update request
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.connectorUpdateResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/handler.ErrorResponse'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    handler.connectorUpdateReq:
      properties:
        credentials:
          additionalProperties: {}
          description: >-
            Provider-specific credentials. Their shape is the provider's
            `credential_schema` from `GET /connectors/providers?id=<provider>`,
            for example `{"access_token": "..."}`.
          example:
            api_token: xoxb-...
          type: object
        custom_instructions:
          description: >-
            Ingestion and indexing instructions for every resource on this
            connector that has no instructions of its own. Omit to leave
            unchanged; `""` clears. Up to 4000 characters, applied from the next
            sync.
          type: string
        sync_interval_seconds:
          description: >-
            How frequently the scheduler triggers incremental syncs, in seconds.
            Bounded per provider; send 0 or omit to use the provider default.
            Change it later with PATCH /connectors/{id}.
          example: 3600
          type: integer
      type: object
    handler.connectorUpdateResponse:
      properties:
        connector_id:
          description: Connector this resource belongs to.
          example: conn_abc123
          type: string
        credentials_updated:
          description: >-
            `true` when this request replaced the stored credentials and cleared
            any reconnect-required state.
          example: true
          type: boolean
        custom_instructions_updated:
          description: >-
            `true` when this request set or cleared the connector-level
            `custom_instructions`. The change applies from the next sync.
          example: true
          type: boolean
        max_sync_interval_seconds:
          description: Largest sync_interval_seconds this connector's provider allows.
          example: 604800
          type: integer
        min_sync_interval_seconds:
          description: >-
            Smallest sync_interval_seconds this connector's provider allows.
            Values below it are rejected, never clamped.
          example: 300
          type: integer
        next_sync_at:
          description: RFC3339 timestamp when the next scheduled sync will run.
          example: '2026-07-02T18:00:00Z'
          type: string
        sync_interval_seconds:
          description: >-
            How frequently the scheduler triggers incremental syncs, in seconds.
            Bounded per provider; send 0 or omit to use the provider default.
            Change it later with PATCH /connectors/{id}.
          example: 3600
          type: integer
      type: object
    handler.ErrorResponse:
      properties:
        data:
          description: Always `null` on this error response.
        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
        error:
          $ref: '#/components/schemas/handler.apiError'
          description: Error message, empty string on success.
          example:
            code: DATABASE_NOT_FOUND
            message: Database not found
        meta:
          $ref: '#/components/schemas/handler.ErrorMeta'
          example:
            latency_ms: 12.3
            request_id: 9d13aef4-02f4-4e73-8c62-4c2601d04f9d
        success:
          description: Whether the request succeeded.
          example: false
          type: boolean
      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:
          deprecated: true
          description: >-
            Deprecated: always `false`. Read the HTTP status, then `error.code`
            and `error.message`.
          example: false
          type: boolean
          x-deprecated: 'true'
      type: object
    handler.apiError:
      properties:
        code:
          description: Machine-readable error code (e.g. `DATABASE_NOT_FOUND`).
          example: DATABASE_NOT_FOUND
          type: string
        message:
          description: Human-readable description of the error.
          example: Database not found
          type: string
      type: object
    handler.ErrorMeta:
      properties:
        api_version:
          description: Version of the API that served the request, for example `2.0.1`.
          type: string
        latency_ms:
          description: Server-side processing time in milliseconds.
          example: 12.3
          type: number
        request_id:
          description: Unique identifier for this request, useful for support and tracing.
          example: 9d13aef4-02f4-4e73-8c62-4c2601d04f9d
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: API key
      description: 'API key sent as a Bearer token: "Bearer prefix.secret"'
      scheme: bearer
      type: http

````