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

# Sync Data Connector File

> Materialize a connector URI (e.g. `grain://recording/<id>`) into a Cloudglue file without starting a downstream job. Idempotent: syncing the same URI returns the existing file. For Grain, Zoom, Recall, Google Drive, Dropbox, and Gong the file's `source_metadata` is populated from the provider (see the SourceMetadata schema). Plain http(s), TikTok, and Loom URLs are not connector-syncable; ingest those via POST /files/sync instead. YouTube URLs can only be added to a collection via the add-media endpoint.



## OpenAPI

````yaml POST /data-connectors/{id}/sync
openapi: 3.0.0
info:
  title: Cloudglue API
  description: API for Cloudglue
  license:
    name: Apache License 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: 0.7.10
servers:
  - url: https://api.cloudglue.dev/v1
security:
  - bearerAuth: []
paths:
  /data-connectors/{id}/sync:
    post:
      tags:
        - Data Connectors
      summary: Sync a data connector URI into a file
      description: >-
        Materialize a connector URI (e.g. `grain://recording/<id>`) into a
        Cloudglue file without starting a downstream job. Idempotent: syncing
        the same URI returns the existing file. For Grain, Zoom, Recall, Google
        Drive, Dropbox, and Gong the file's `source_metadata` is populated from
        the provider (see the SourceMetadata schema). Plain http(s), TikTok, and
        Loom URLs are not connector-syncable; ingest those via POST /files/sync
        instead. YouTube URLs can only be added to a collection via the
        add-media endpoint.
      operationId: syncDataConnectorFile
      parameters:
        - name: id
          in: path
          description: The ID of the data connector
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: >-
                    Connector URI to sync. Must match the connector's type.
                    Accepted forms per connector — s3: `s3://<bucket>/<key>` ·
                    gcs: `gs://<bucket>/<key>` · google-drive:
                    `gdrive://file/<fileId>` or a
                    `https://drive.google.com/file/d/<fileId>/...` link ·
                    dropbox: `dropbox://<path>` (as returned by GET
                    /data-connectors/{id}/files) or a
                    `https://www.dropbox.com/scl/fi/...` share link · zoom:
                    `zoom://uuid/<meetingUuid>`, `zoom://id/<meetingId>`, or a
                    `https://*.zoom.us` join, recording-detail, or rec/share
                    link · grain: `grain://recording/<id>` · gong:
                    `gong://call/<id>` · recall: `recall://recording/<id>`.
                  example: grain://recording/abc123
              required:
                - url
      responses:
        '200':
          description: The synced file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/File'
        '400':
          description: >-
            Bad request (e.g. URL source does not match the connector type, or
            the link points to a folder)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            The source file is not accessible (e.g. a login-gated, expired, or
            restricted Dropbox share link)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: >-
            Data connector not found, or the referenced file/recording was not
            found at the source
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            The external service rate-limited the request (e.g. Dropbox or
            Zoom); retry shortly
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: An unexpected error occurred on the server
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: Error communicating with the external service
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    File:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the file
        status:
          type: string
          enum:
            - pending
            - processing
            - completed
            - failed
            - not_applicable
          description: Processing status of the file
        bytes:
          type: integer
          nullable: true
          description: Size of the file in bytes, null if not available
        created_at:
          type: integer
          description: Unix timestamp in milliseconds when the file was created
        filename:
          type: string
          description: Original filename
        uri:
          type: string
          description: Cloudglue URI for the file, to be used in other API calls
        metadata:
          type: object
          nullable: true
          description: User-provided metadata about the file, null if none provided
        media_type:
          type: string
          enum:
            - video
            - audio
            - image
          description: >-
            Type of media file (video, audio, or image). Images are processed at
            the file level only (no segmentation).
        media_info:
          type: object
          properties:
            duration_seconds:
              type: number
              nullable: true
              description: Duration in seconds
            width:
              type: integer
              nullable: true
              description: Width in pixels (null for audio files)
            height:
              type: integer
              nullable: true
              description: Height in pixels (null for audio files)
            sample_rate:
              type: integer
              nullable: true
              description: Audio sample rate in Hz
            channels:
              type: integer
              nullable: true
              description: Number of audio channels
            bitrate:
              type: integer
              nullable: true
              description: Audio bitrate in bps
            format:
              type: string
              nullable: true
              description: File format
            has_audio:
              type: boolean
              nullable: true
              description: Whether the file has audio
          description: Unified media information for video, audio, and image files
        video_info:
          type: object
          properties:
            duration_seconds:
              type: number
              nullable: true
              description: Duration of the video in seconds, null if not available
            height:
              type: integer
              nullable: true
              description: Height of the video in pixels, null if not available
            width:
              type: integer
              nullable: true
              description: Width of the video in pixels, null if not available
            format:
              type: string
              nullable: true
              description: Format of the video file, null if not available
            has_audio:
              type: boolean
              nullable: true
              description: Whether the video has audio, null if not available
          description: Information about the video content
        thumbnail_url:
          type: string
          description: URL of the thumbnail for the file
        source:
          type: string
          enum:
            - video
            - youtube
            - s3
            - dropbox
            - http
            - upload
            - google-drive
            - zoom
            - gong
            - recall
            - gcs
            - grain
            - loom
          description: Source of the file
        source_metadata:
          allOf:
            - $ref: '#/components/schemas/SourceMetadata'
          nullable: true
          description: >-
            Source provenance captured from the upstream connector at ingest
            time. Null when nothing was captured (older files, or a connector
            that does not yet populate it).
      required:
        - id
        - uri
        - status
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
    SourceMetadata:
      oneOf:
        - $ref: '#/components/schemas/GrainSourceMetadata'
        - $ref: '#/components/schemas/ZoomSourceMetadata'
        - $ref: '#/components/schemas/RecallSourceMetadata'
        - $ref: '#/components/schemas/GoogleDriveSourceMetadata'
        - $ref: '#/components/schemas/DropboxSourceMetadata'
        - $ref: '#/components/schemas/GongSourceMetadata'
      discriminator:
        propertyName: source_type
        mapping:
          grain:
            $ref: '#/components/schemas/GrainSourceMetadata'
          zoom:
            $ref: '#/components/schemas/ZoomSourceMetadata'
          recall:
            $ref: '#/components/schemas/RecallSourceMetadata'
          google-drive:
            $ref: '#/components/schemas/GoogleDriveSourceMetadata'
          dropbox:
            $ref: '#/components/schemas/DropboxSourceMetadata'
          gong:
            $ref: '#/components/schemas/GongSourceMetadata'
      description: >-
        Per-source provenance captured from the upstream connector,
        discriminated by source_type. Populated for Grain, Zoom, Recall, Google
        Drive, Dropbox, and Gong; files synced before a connector was upgraded
        carry null. S3/GCS files carry null (plain object stores have no richer
        metadata).
    GrainSourceMetadata:
      type: object
      description: >-
        Source provenance captured from Grain at ingest time. The richer
        AI/contextual fields are only present when Grain returns them.
      properties:
        source_type:
          type: string
          enum:
            - grain
          description: Discriminator identifying the upstream connector.
        grain_recording_id:
          type: string
          description: Grain's recording id.
        title:
          type: string
          description: Recording title.
          nullable: true
        start_datetime:
          type: string
          format: date-time
          description: UTC time Grain started the recording.
          nullable: true
        end_datetime:
          type: string
          format: date-time
          description: UTC time the recording ended.
          nullable: true
        duration_ms:
          type: integer
          description: Recording duration in milliseconds.
          nullable: true
        media_type:
          type: string
          enum:
            - audio
            - transcript
            - video
          description: Grain media type of the recording.
          nullable: true
        upstream_source:
          type: string
          enum:
            - aircall
            - local_capture
            - meet
            - teams
            - upload
            - webex
            - zoom
            - other
          description: Platform Grain captured the recording from.
          nullable: true
        grain_url:
          type: string
          description: URL to the recording in Grain.
          nullable: true
        thumbnail_url:
          type: string
          nullable: true
          description: Thumbnail URL, null if none.
        tags:
          type: array
          items:
            type: string
          description: Tags applied to the recording.
          nullable: true
        teams:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
          description: Teams the recording belongs to.
          nullable: true
        meeting_type:
          type: object
          nullable: true
          properties:
            id:
              type: string
            name:
              type: string
            scope:
              type: string
          description: Recording's meeting type, null if none.
        participants:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              email:
                type: string
                nullable: true
              scope:
                type: string
                enum:
                  - internal
                  - external
                  - unknown
              confirmed_attendee:
                type: boolean
              hs_contact_id:
                type: string
                nullable: true
                description: HubSpot contact id, if linked.
          nullable: true
          description: >-
            Meeting participants (include-gated by Grain). Null when requested
            but empty.
        highlights:
          type: array
          items:
            type: object
          nullable: true
          description: Clips / highlights (include-gated). Null when requested but empty.
        ai_summary:
          type: object
          properties:
            text:
              type: string
              description: Markdown AI summary.
          nullable: true
          description: AI summary (include-gated). Null when requested but empty.
        ai_action_items:
          type: array
          items:
            type: object
            properties:
              status:
                type: string
                enum:
                  - pending
                  - completed
              timestamp_ms:
                type: integer
                description: Time in the recording the item was mentioned.
              text:
                type: string
              assignee:
                type: object
                nullable: true
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  user_id:
                    type: string
                    nullable: true
          nullable: true
          description: AI action items (include-gated). Null when requested but empty.
        ai_template_sections:
          type: array
          items:
            type: object
          nullable: true
          description: >-
            AI template sections, shape varies by template (include-gated). Null
            when requested but empty.
        calendar_event:
          type: object
          nullable: true
          properties:
            ical_uid:
              type: string
          description: Related calendar event (include-gated).
        hubspot:
          type: object
          properties:
            hubspot_company_ids:
              type: array
              items:
                type: string
            hubspot_deal_ids:
              type: array
              items:
                type: string
          nullable: true
          description: >-
            Related HubSpot company/deal ids (include-gated). Null when
            requested but empty.
      required:
        - source_type
        - grain_recording_id
    ZoomSourceMetadata:
      type: object
      description: >-
        Source provenance captured from Zoom at ingest time. Signed
        download/play URLs, share URLs, and passcodes are never included.
      properties:
        source_type:
          type: string
          enum:
            - zoom
          description: Discriminator identifying the upstream connector.
        zoom_meeting_uuid:
          type: string
          description: Zoom meeting instance UUID.
        zoom_meeting_id:
          type: integer
          description: Zoom numeric meeting id.
          nullable: true
        topic:
          type: string
          description: Meeting topic (empty string when Zoom omits it).
          nullable: true
        start_time:
          type: string
          format: date-time
          description: UTC time the meeting started.
          nullable: true
        host_id:
          type: string
          nullable: true
          description: Zoom host user id.
        host_email:
          type: string
          nullable: true
          description: >-
            Host email. Nullable whenever Zoom omits it — both list and
            per-meeting endpoints may return null depending on account scopes.
        account_id:
          type: string
          nullable: true
          description: Zoom account id.
        timezone:
          type: string
          nullable: true
          description: Meeting timezone.
        duration_minutes:
          type: number
          nullable: true
          description: Meeting duration in minutes (as reported by Zoom).
        total_size:
          type: number
          nullable: true
          description: Total size of all recording files in bytes.
        recording_count:
          type: number
          nullable: true
          description: Number of recording files for the meeting.
        meeting_type:
          type: number
          nullable: true
          description: Zoom's numeric meeting type.
        recording_files:
          type: array
          nullable: true
          items:
            type: object
            properties:
              id:
                type: string
                nullable: true
              recording_type:
                type: string
                nullable: true
                description: e.g. shared_screen_with_speaker_view, audio_only.
              file_type:
                type: string
                nullable: true
              file_extension:
                type: string
                nullable: true
              file_size:
                type: number
                nullable: true
                description: File size in bytes.
              recording_start:
                type: string
                nullable: true
              recording_end:
                type: string
                nullable: true
              status:
                type: string
                nullable: true
          description: >-
            Structural facts about each recording file. Download/play URLs are
            excluded.
      required:
        - source_type
        - zoom_meeting_uuid
    RecallSourceMetadata:
      type: object
      description: >-
        Source provenance captured from Recall at ingest time. Artifact
        availability is exposed as booleans — signed artifact download URLs are
        never included.
      properties:
        source_type:
          type: string
          enum:
            - recall
          description: Discriminator identifying the upstream connector.
        recall_recording_id:
          type: string
          description: Recall recording id.
        created_at:
          type: string
          nullable: true
          description: UTC time the recording object was created.
        started_at:
          type: string
          nullable: true
          description: UTC time recording started.
        completed_at:
          type: string
          nullable: true
          description: UTC time recording completed.
        expires_at:
          type: string
          nullable: true
          description: UTC time the recording expires upstream at Recall.
        status_code:
          type: string
          nullable: true
          description: >-
            Recall status: done, processing, failed, or paused. Only done
            recordings can be synced.
        meeting_title:
          type: string
          nullable: true
          description: Meeting title, when Recall's meeting metadata carries one.
        meeting_platform:
          type: string
          nullable: true
          description: Meeting platform (e.g. zoom, google_meet), when available.
        has_transcript:
          type: boolean
          description: Whether a transcript artifact exists.
          nullable: true
        has_audio:
          type: boolean
          description: Whether a separate audio artifact exists.
          nullable: true
        has_participant_events:
          type: boolean
          nullable: true
          description: Whether a participant-events artifact exists.
        bot_id:
          type: string
          nullable: true
          description: Id of the bot that captured the recording.
        recall_metadata:
          type: object
          nullable: true
          additionalProperties: true
          description: >-
            Arbitrary caller-supplied metadata attached to the bot/recording in
            Recall.
      required:
        - source_type
        - recall_recording_id
    GoogleDriveSourceMetadata:
      type: object
      description: >-
        Source provenance captured from Google Drive at ingest time. Short-lived
        signed URLs (e.g. thumbnailLink) are never included.
      properties:
        source_type:
          type: string
          enum:
            - google-drive
          description: Discriminator identifying the upstream connector.
        gdrive_file_id:
          type: string
          description: Drive file id.
        name:
          type: string
          description: File name.
          nullable: true
        mime_type:
          type: string
          nullable: true
        size_bytes:
          type: number
          nullable: true
        created_time:
          type: string
          nullable: true
          description: UTC time the file was created in Drive.
        modified_time:
          type: string
          nullable: true
          description: UTC time the file was last modified.
        web_view_link:
          type: string
          nullable: true
          description: Link to view the file in Drive (requires Drive access).
        owners:
          type: array
          nullable: true
          items:
            type: object
            properties:
              display_name:
                type: string
                nullable: true
              email_address:
                type: string
                nullable: true
          description: File owners.
        last_modifying_user:
          type: object
          nullable: true
          properties:
            display_name:
              type: string
              nullable: true
            email_address:
              type: string
              nullable: true
          description: User who last modified the file.
        parents:
          type: array
          nullable: true
          items:
            type: string
          description: Parent folder ids.
        shared:
          type: boolean
          nullable: true
          description: Whether the file is shared.
        file_extension:
          type: string
          nullable: true
        md5_checksum:
          type: string
          nullable: true
        video_media_metadata:
          type: object
          nullable: true
          properties:
            duration_millis:
              type: number
              nullable: true
              description: Video duration in milliseconds.
            width:
              type: number
              nullable: true
            height:
              type: number
              nullable: true
          description: Drive's video metadata, when Drive has processed the file.
      required:
        - source_type
        - gdrive_file_id
    DropboxSourceMetadata:
      type: object
      description: Source provenance captured from Dropbox at ingest time.
      properties:
        source_type:
          type: string
          enum:
            - dropbox
          description: Discriminator identifying the upstream connector.
        dropbox_id:
          type: string
          description: Dropbox file id (id:… form).
        name:
          type: string
          description: File name.
          nullable: true
        path_lower:
          type: string
          description: Lowercased path of the file.
          nullable: true
        path_display:
          type: string
          nullable: true
          description: Display-cased path.
        size_bytes:
          type: number
          nullable: true
        client_modified:
          type: string
          nullable: true
          description: Modification time reported by the client that uploaded the file.
        server_modified:
          type: string
          nullable: true
          description: Time the file was last modified on Dropbox.
        rev:
          type: string
          nullable: true
          description: Dropbox revision id.
        content_hash:
          type: string
          nullable: true
          description: Dropbox content hash.
        is_downloadable:
          type: boolean
          nullable: true
        media_info:
          type: object
          nullable: true
          properties:
            duration_ms:
              type: number
              nullable: true
              description: Media duration in milliseconds.
            width:
              type: number
              nullable: true
            height:
              type: number
              nullable: true
          description: >-
            Media dimensions/duration. Only populated at sync/lookup time —
            Dropbox's list endpoint stopped returning media info in 2019, so
            items in the list endpoint carry null here.
      required:
        - source_type
        - dropbox_id
    GongSourceMetadata:
      type: object
      description: >-
        Source provenance captured from Gong at ingest time. Signed media URLs
        are never included. AI content fields (topics, trackers, brief,
        key_points) require Gong Call Spotlight entitlement and are only
        captured at sync/lookup time.
      properties:
        source_type:
          type: string
          enum:
            - gong
          description: Discriminator identifying the upstream connector.
        gong_call_id:
          type: string
          description: Gong call id.
        title:
          type: string
          description: Call title (empty string when Gong omits it).
          nullable: true
        started:
          type: string
          nullable: true
          description: UTC time the call started.
        scheduled:
          type: string
          nullable: true
          description: UTC time the call was scheduled for.
        duration:
          type: number
          nullable: true
          description: Call duration in seconds.
        gong_url:
          type: string
          nullable: true
          description: URL to the call in Gong.
        meeting_url:
          type: string
          nullable: true
          description: URL of the underlying meeting.
        is_private:
          type: boolean
          nullable: true
          description: >-
            Whether the call is private in Gong. Private calls cannot be listed
            or synced.
        purpose:
          type: string
          nullable: true
        primary_user_id:
          type: string
          nullable: true
          description: Gong user id of the call owner.
        direction:
          type: string
          nullable: true
          description: Inbound, Outbound, Conference, or Unknown.
        system:
          type: string
          nullable: true
          description: Telephony/meeting system the call was held on.
        scope:
          type: string
          nullable: true
          description: Internal, External, or Unknown.
        language:
          type: string
          nullable: true
          description: ISO-639-2B language code Gong detected.
        workspace_id:
          type: string
          nullable: true
          description: Gong workspace id.
        call_media_type:
          type: string
          nullable: true
          description: 'Gong''s media indicator: Video or Audio.'
        parties:
          type: array
          nullable: true
          items:
            type: object
            properties:
              id:
                type: string
                nullable: true
              name:
                type: string
                nullable: true
              email:
                type: string
                nullable: true
              affiliation:
                type: string
                nullable: true
                description: Internal, External, or Unknown.
              speaker_id:
                type: string
                nullable: true
              user_id:
                type: string
                nullable: true
          description: Call participants.
        topics:
          type: array
          nullable: true
          items:
            type: object
            properties:
              name:
                type: string
                nullable: true
              duration:
                type: number
                nullable: true
                description: Seconds spent on the topic.
          description: AI topics (Call Spotlight).
        trackers:
          type: array
          nullable: true
          items:
            type: object
            properties:
              name:
                type: string
                nullable: true
              count:
                type: number
                nullable: true
          description: Tracker keyword hit counts (Call Spotlight).
        brief:
          type: string
          nullable: true
          description: AI call brief (Call Spotlight).
        key_points:
          type: array
          nullable: true
          items:
            type: string
          description: AI key points (Call Spotlight).
      required:
        - source_type
        - gong_call_id
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````