Skip to main content
PATCH
/
v1
/
buckets
/
{bucket_id}
/
syncs
/
{sync_config_id}
Update Sync Configuration
curl --request PATCH \
  --url https://api.mixpeek.com/v1/buckets/{bucket_id}/syncs/{sync_config_id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Namespace: <x-namespace>' \
  --data '
{
  "description": "Daily video ingestion from production bucket",
  "metadata": {
    "environment": "production",
    "project": "video-pipeline"
  },
  "status": "pending",
  "is_active": true,
  "polling_interval_seconds": 60,
  "batch_size": 10
}
'
{
  "bucket_id": "<string>",
  "connection_id": "<string>",
  "internal_id": "<string>",
  "namespace_id": "<string>",
  "source_path": "<string>",
  "created_by_user_id": "<string>",
  "sync_config_id": "<string>",
  "file_filters": {
    "include_patterns": [
      "<string>"
    ],
    "exclude_patterns": [
      "<string>"
    ],
    "min_size_bytes": 1,
    "max_size_bytes": 1,
    "modified_after": "2023-11-07T05:31:56Z",
    "modified_before": "2023-11-07T05:31:56Z",
    "mime_types": [
      "<string>"
    ]
  },
  "sync_mode": "continuous",
  "polling_interval_seconds": 300,
  "batch_size": 50,
  "create_object_on_confirm": true,
  "skip_duplicates": true,
  "status": "PENDING",
  "is_active": true,
  "total_files_discovered": 0,
  "total_files_synced": 0,
  "total_files_failed": 0,
  "total_bytes_synced": 0,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "last_sync_at": "2023-11-07T05:31:56Z",
  "next_sync_at": "2023-11-07T05:31:56Z",
  "last_error": "<string>",
  "consecutive_failures": 0,
  "metadata": {}
}

Headers

Authorization
string
required

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

X-Namespace
string
required

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Path Parameters

bucket_id
string
required
sync_config_id
string
required

Body

application/json

Request to update an existing sync configuration.

Allows partial updates to sync settings without recreating the configuration. All fields are optional - only provided fields will be updated.

Use Cases: - Pause/resume syncs by toggling is_active - Adjust polling intervals based on activity patterns - Update batch sizes for performance tuning - Add metadata tags for organization

Requirements: - All fields are OPTIONAL - At least one field should be provided for the update - Changes take effect on the next sync cycle

description
string | null

Optional human-readable description of the sync configuration. NOT REQUIRED. Used for documentation and UI display. Maximum 500 characters.

Example:

"Daily video ingestion from production bucket"

metadata
Metadata · object

Optional custom metadata to replace existing metadata. NOT REQUIRED. Completely replaces existing metadata (not merged). Use for tagging, categorization, or custom attributes. Maximum 50 keys, values must be JSON-serializable.

Example:
{
"environment": "production",
"project": "video-pipeline"
}
status
enum<string> | null

Optional status to set for the sync configuration. NOT REQUIRED. Valid values: 'pending', 'processing', 'completed', 'failed', 'paused'. Typically managed automatically but can be manually overridden. Use pause/resume endpoints instead for active control.

Available options:
PENDING,
IN_PROGRESS,
PROCESSING,
COMPLETED,
COMPLETED_WITH_ERRORS,
FAILED,
CANCELED,
UNKNOWN,
SKIPPED,
DRAFT,
ACTIVE,
ARCHIVED,
SUSPENDED
Example:

"pending"

is_active
boolean | null

Optional flag to enable or disable the sync configuration. NOT REQUIRED. When False, sync will not process new files. Prefer using the /pause and /resume endpoints for clarity. Changes take effect immediately.

Example:

true

polling_interval_seconds
integer | null

Optional new polling interval in seconds. NOT REQUIRED. Must be between 30 and 900 seconds if provided. Only applies to 'continuous' and 'scheduled' sync modes. Lower values increase responsiveness but API usage.

Required range: 30 <= x <= 900
Example:

60

batch_size
integer | null

Optional new batch size for file processing. NOT REQUIRED. Must be between 1 and 100 if provided. Larger batches improve throughput but use more memory. Changes apply to subsequent batches only.

Required range: 1 <= x <= 100
Example:

10

Response

Successful Response

Bucket-scoped configuration describing how to sync external files.

bucket_id
string
required

Target bucket identifier (e.g. 'bkt_marketing_assets').

connection_id
string
required

Storage connection identifier (e.g. 'conn_abc123').

internal_id
string
required

Organization internal identifier (multi-tenancy scope).

namespace_id
string
required

Namespace identifier owning the bucket.

source_path
string
required

Source path in the external storage provider.

created_by_user_id
string
required

User identifier that created the sync configuration.

sync_config_id
string

Unique identifier for the sync configuration.

file_filters
FileFilters · object

Optional filter rules limiting which files are synced.

sync_mode
enum<string>
default:continuous

Sync mode controlling lifecycle (initial_only or continuous).

Available options:
initial_only,
continuous
polling_interval_seconds
integer
default:300

Polling interval in seconds (continuous mode).

Required range: 30 <= x <= 900
batch_size
integer
default:50

Number of files processed per sync batch.

Required range: 1 <= x <= 100
create_object_on_confirm
boolean
default:true

Whether objects should be created immediately after confirmation.

skip_duplicates
boolean
default:true

Skip files whose hashes already exist in the bucket.

status
enum<string>
default:PENDING

Current lifecycle status for the sync configuration. PENDING: Not yet started. ACTIVE: Currently running/polling. SUSPENDED: Temporarily paused. COMPLETED: Initial sync completed (for initial_only mode). FAILED: Sync encountered errors.

Available options:
PENDING,
IN_PROGRESS,
PROCESSING,
COMPLETED,
COMPLETED_WITH_ERRORS,
FAILED,
CANCELED,
UNKNOWN,
SKIPPED,
DRAFT,
ACTIVE,
ARCHIVED,
SUSPENDED
is_active
boolean
default:true

Convenience flag used for filtering active syncs.

total_files_discovered
integer
default:0
Required range: x >= 0
total_files_synced
integer
default:0
Required range: x >= 0
total_files_failed
integer
default:0
Required range: x >= 0
total_bytes_synced
integer
default:0
Required range: x >= 0
created_at
string<date-time>
updated_at
string<date-time>
last_sync_at
string<date-time> | null
next_sync_at
string<date-time> | null
last_error
string | null

Most recent error message if sync attempts failed.

Maximum string length: 1000
consecutive_failures
integer
default:0
Required range: x >= 0
metadata
Metadata · object

Arbitrary metadata supplied by the user.