> ## Documentation Index
> Fetch the complete documentation index at: https://cortex-e852fafe-t3code-rewrite-docs-declutter.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Add Connector Resource

> Add one new resource to a connector.

Adds a single resource to a connector without going through [Configure Connector](/api-reference/v2/endpoint/configure-connector). The resource is picked up by the next scheduled sync; unlike configure, this call does not test access to the resource or start a sync.

<Warning>
  **Use this only for resources the connector does not have yet.** On a `resource_id` that already exists, this call replaces the whole resource with what you send. Every field you leave out, including its display name, type, collection, instructions and access rule, is cleared, and the resource syncs again from the beginning.

  To change a resource that is already configured, use [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource) for instructions and access rules, or [Configure Connector](/api-reference/v2/endpoint/configure-connector) for routing and metadata.
</Warning>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://api.hydradb.com/connectors/{id}/resources' \
    -H "Authorization: Bearer $HYDRA_DB_API_KEY" \
    -H "API-Version: 2" \
    -H "Content-Type: application/json" \
    -d '{
      "resource_id": "C0123456789",
      "resource_type": "channel",
      "display_name": "general",
      "collection_override": "all-hands",
      "filters": { "lookback_days": 30 }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "connector_id": "{connector_id}",
    "resource_id": "C0123456789",
    "resource_type": "channel",
    "display_name": "general",
    "status": "active",
    "provider_cursor": "",
    "database_override": "",
    "collection_override": "all-hands",
    "tenant_id_override": "",
    "sub_tenant_id_override": "all-hands",
    "provider_metadata": null,
    "filters": {
      "lookback_days": 30
    }
  }
  ```
</ResponseExample>

Take `resource_id` and `resource_type` from [Discover Resources](/api-reference/v2/endpoint/discover-connector-resources), and always send `display_name`, since it is what the dashboard shows for the resource.

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

## Related Resources

* [Update Connector Resource](/api-reference/v2/endpoint/update-connector-resource): change an existing resource
* [Configure Connector](/api-reference/v2/endpoint/configure-connector): add several resources and start a sync
* [List Connector Resources](/api-reference/v2/endpoint/connector-resources): see what is configured


## OpenAPI

````yaml api-reference/v2/openapi.json POST /connectors/{id}/resources
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}/resources:
    post:
      tags:
        - connectors
      summary: Create a connector resource
      description: >-
        Add one resource to a connector. On a `resource_id` that already exists
        this replaces the whole resource: omitted fields are cleared and its
        sync restarts from the beginning. To change a configured resource, use
        `PATCH /connectors/{id}/resources/{resource_id}`.
      parameters:
        - description: Connector ID
          in: path
          name: id
          required: true
          schema:
            example: HydraDoc1234
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/handler.resourceCreateReq'
        description: Resource configuration
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/connectors.Resource'
          description: Created
        '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.resourceCreateReq:
      properties:
        acl:
          description: >-
            Restricts every object synced from this resource to the listed
            principals (emails or prefixed principals). Omitted means
            unrestricted. See Access Control.
          items:
            type: string
          type: array
          uniqueItems: false
        additional_metadata:
          additionalProperties: {}
          description: >-
            Key-value pairs merged into the custom attributes of every synced
            object. Up to 1 KiB of compact JSON, checked when synced objects are
            ingested.
          example:
            author: ada
            doc_version: 3
          type: object
        collection_override:
          description: >-
            Routes objects synced from this resource into a specific collection.
            Empty means the connector's collection.
          type: string
        custom_instructions:
          description: >-
            Ingestion and indexing instructions for this resource, replacing the
            connector's `custom_instructions`; empty inherits it. Up to 4000
            characters.
          type: string
        database_override:
          description: >-
            Routes objects synced from this resource into a different database.
            Empty means the connector's database.
          type: string
        display_name:
          description: Human-readable name for this resource.
          example: general
          type: string
        filters:
          additionalProperties: {}
          description: >-
            Provider-specific filters applied during sync (e.g.
            `{"lookback_days": 30}`).
          example:
            channel: general
          type: object
        metadata:
          additionalProperties: {}
          description: >-
            Key-value pairs merged into the attributes of every synced object.
            Up to 16 KiB of compact JSON, checked when synced objects are
            ingested.
          example:
            department: finance
            priority: 7
          type: object
        provider_metadata:
          additionalProperties: {}
          description: Additional provider-supplied metadata for this resource.
          example:
            workspace_id: T12345ACME
          type: object
        resource_id:
          description: Resource identifier from the Discover endpoint.
          example: C0123456789
          type: string
        resource_type:
          description: >-
            Type of resource within the provider (e.g. `channel`, `repo`,
            `linear_team`).
          example: channel
          type: string
        sub_tenant_id_override:
          deprecated: true
          description: 'Deprecated: use `collection_override`.'
          type: string
          x-deprecated: 'true'
        tenant_id_override:
          deprecated: true
          description: 'Deprecated: use `database_override`.'
          type: string
          x-deprecated: 'true'
      required:
        - resource_id
      type: object
    connectors.Resource:
      properties:
        acl:
          description: >-
            Principals (emails or prefixed principals) allowed to read objects
            synced from this resource. Absent means unrestricted; provider
            permissions take precedence where supported.
          items:
            type: string
          type: array
          uniqueItems: false
        acl_warning:
          description: >-
            Why this resource's permissions could not be read. Without an access
            rule of yours, its objects are readable by everyone meanwhile; with
            one, your rule applies. Clears on the next successful read.
          type: string
        acl_warning_at:
          description: >-
            When `acl_warning` last changed (RFC 3339). An unchanged warning
            keeps its original time.
          type: string
        additional_metadata:
          additionalProperties: {}
          description: >-
            Key-value pairs merged into the custom attributes
            (`additional_metadata`) of every object synced from this resource.
            Provider-generated fields win on conflict.
          example:
            author: ada
            doc_version: 3
          type: object
        backfill_oldest:
          description: >-
            Oldest point (RFC 3339) the background fetch of older history has
            reached. Empty when that fetch is finished or not needed.
          example: '2026-06-01T00:00:00Z'
          type: string
        collection_override:
          description: >-
            Routes this resource's synced objects into a specific collection,
            overriding the connector's. Formerly `sub_tenant_id_override`.
          type: string
        connector_id:
          description: Connector this resource belongs to.
          example: conn_abc123
          type: string
        custom_instructions:
          description: >-
            Ingestion and indexing instructions for this resource, replacing the
            connector's `custom_instructions`; empty inherits it. Up to 4000
            characters, applied from the next sync.
          type: string
        database_override:
          description: >-
            Database this resource's synced objects are routed to. Empty means
            the connector's own database.
          type: string
        display_name:
          description: Human-readable name for this resource.
          example: general
          type: string
        filters:
          additionalProperties: {}
          description: >-
            Provider-specific filters applied during sync (e.g.
            `{"lookback_days": 30}`).
          example:
            channel: general
          type: object
        metadata:
          additionalProperties: {}
          description: >-
            Key-value pairs merged into the attributes (`metadata`) of every
            object synced from this resource. The system fields `connector_id`
            and `provider` always win on conflict.
          example:
            department: finance
            priority: 7
          type: object
        page_acl_warning:
          description: >-
            Set when page-level restrictions in this resource (for example
            Confluence pages) could not be resolved, so those pages are readable
            by everyone. Clears after a clean full sync.
          type: string
        page_acl_warning_at:
          description: When `page_acl_warning` last changed (RFC 3339).
          type: string
        provider_cursor:
          description: >-
            Bookmark of the last synced position. Non-empty value confirms the
            first sync has run.
          example: '1699999999.000100'
          type: string
        provider_metadata:
          additionalProperties: {}
          description: Additional provider-supplied metadata for this resource.
          example:
            workspace_id: T12345ACME
          type: object
        resource_id:
          description: Resource identifier from the Discover endpoint.
          example: C0123456789
          type: string
        resource_type:
          description: >-
            Type of resource within the provider (e.g. `channel`, `repo`,
            `linear_team`).
          example: channel
          type: string
        status:
          description: Current sync state of this resource (e.g. `active`, `paused`).
          example: active
          type: string
        sub_tenant_id_override:
          deprecated: true
          description: 'Deprecated: use `collection_override`.'
          type: string
          x-deprecated: 'true'
        sync_blocked:
          description: >-
            `true` when syncing stopped because the provider keeps refusing this
            resource, for example a deleted table or an inaccessible channel.
            `sync_blocked_reason` says why.
          example: true
          type: boolean
        sync_blocked_at:
          description: >-
            When syncing of this resource was stopped (RFC 3339). Present only
            while `sync_blocked` is `true`.
          type: string
        sync_blocked_reason:
          description: >-
            The provider's explanation for why this resource is blocked. Present
            only while `sync_blocked` is `true`.
          type: string
        tenant_id_override:
          deprecated: true
          description: 'Deprecated: use `database_override`.'
          type: string
          x-deprecated: 'true'
      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

````

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