---
title: "Sync and export"
description: "Context4 syncs: sources, supported entities, runs and data exports through the public API."
group: "Technical documentation"
order: 35
---

## Deployment addresses

- Documentation: https://ctx4.me/docs.md
- Agent index: https://ctx4.me/docs/agent-index.json
- Console and connections: https://console.ctx4.me/integrations
- MCP: https://ctx4.me/mcp
- HTTP API: https://ctx4.me/v1
- Composio base URL: https://ctx4.me/compat/context4/v1
- OpenAPI: https://ctx4.me/docs/openapi.json
- HTTP/MCP inventory: https://ctx4.me/docs/api-index.json
- Composio routes: https://ctx4.me/docs/compat-routes.json
- Connectors: https://ctx4.me/docs/connectors.json


# Sync and export

Generated from the public Context4 OpenAPI. Authenticate with `Authorization: Bearer` and an API key. General rules: [API](https://ctx4.me/docs/api.md). Full contract: [OpenAPI JSON](https://ctx4.me/docs/openapi.json). In the JSON below, `$ref` points to a named schema in the Schemas section.

## getSyncDeliveryAuthority

`GET /v1/syncs/{syncId}/delivery-authority`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/delivery-authority`. Replace parameters in braces with actual IDs from the API.

Read the tenant-scoped delivery grant fence for a sync resource

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |
| `entity` | query | yes | &#123;"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9_.-]&#123;0,79&#125;$"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | Persisted delivery grants and source lineage without credentials | `application/json` [SyncDeliveryAuthority](https://ctx4.me/docs/api-schemas-3.md#syncdeliveryauthority) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## createSync

`POST /v1/syncs`

Deployment URL: `https://ctx4.me/v1/syncs`. Replace parameters in braces with actual IDs from the API.

Create a sync binding a connection to a syncable entity

Capability: `syncs:write`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | no | &#123;"type":"string"&#125; Required when source_kind is database_poll; retries with the same key and payload return the original sync. Optional for other source kinds. |

### Request body

Required. 

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "example": "9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"
          },
          "source_kind": {
            "type": "string",
            "enum": [
              "api_poll",
              "database_cdc",
              "database_poll",
              "topic"
            ]
          },
          "database_poll": {
            "type": "object",
            "properties": {
              "schema": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "table": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "columns": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "minItems": 1,
                "maxItems": 256
              },
              "primary_key": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 128
                },
                "minItems": 1,
                "maxItems": 16
              },
              "mode": {
                "type": "string",
                "enum": [
                  "full_scan",
                  "rowversion",
                  "timestamp"
                ]
              },
              "watermark_column": {
                "type": [
                  "string",
                  "null"
                ],
                "minLength": 1,
                "maxLength": 128
              },
              "full_reconciliation_minutes": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10080
              },
              "timestamp_overlap_seconds": {
                "type": "integer",
                "minimum": 0,
                "maximum": 86400
              },
              "deletion_policy": {
                "type": "string",
                "enum": [
                  "preserve",
                  "confirm_missing"
                ]
              }
            },
            "required": [
              "schema",
              "table",
              "columns",
              "primary_key"
            ],
            "additionalProperties": false
          },
          "entity": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,79}$"
          },
          "schedule_minutes": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10080
          }
        },
        "required": [
          "connection_id",
          "entity"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 201 | The created sync; acquisition and initial loading follow the provider capabilities | `application/json` [Sync](https://ctx4.me/docs/api-schemas-3.md#sync) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing, forbidden) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited, quota_exceeded) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## listSyncs

`GET /v1/syncs`

Deployment URL: `https://ctx4.me/v1/syncs`. Replace parameters in braces with actual IDs from the API.

List syncs in the workspace

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `cursor` | query | no | &#123;"type":"string","minLength":1,"maxLength":400,"pattern":"^[A-Za-z0-9_-]+$","description":"Opaque pagination cursor from a previous response"&#125; Opaque pagination cursor from a previous response |
| `limit` | query | no | &#123;"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 25)"&#125; Page size (1-100, default 25) |
| `connection_id` | query | no | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | One page of syncs with the continuation cursor | `application/json` [SyncList](https://ctx4.me/docs/api-schemas-3.md#synclist) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## getSync

`GET /v1/syncs/{syncId}`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}`. Replace parameters in braces with actual IDs from the API.

Get one sync

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | The sync view | `application/json` [Sync](https://ctx4.me/docs/api-schemas-3.md#sync) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## patchSync

`PATCH /v1/syncs/{syncId}`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}`. Replace parameters in braces with actual IDs from the API.

Pause, resume, or update the schedule of a sync

Capability: `syncs:write`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Request body

Required. 

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "oneOf": [
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "pause",
                  "resume"
                ]
              }
            },
            "required": [
              "action"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "enum": [
                  "update_schedule"
                ]
              },
              "schedule_minutes": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10080
              },
              "full_reconciliation_minutes": {
                "type": "integer",
                "minimum": 1,
                "maximum": 10080
              },
              "deletion_policy": {
                "type": "string",
                "enum": [
                  "preserve"
                ]
              },
              "expected_config_revision": {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "action",
              "schedule_minutes",
              "expected_config_revision"
            ],
            "additionalProperties": false
          }
        ]
      }
    }
  }
}
```

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | The updated sync view | `application/json` [Sync](https://ctx4.me/docs/api-schemas-3.md#sync) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## deleteSync

`DELETE /v1/syncs/{syncId}`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}`. Replace parameters in braces with actual IDs from the API.

Delete a sync (record history stays pullable)

Capability: `syncs:write`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | The deleted sync view | `application/json` [Sync](https://ctx4.me/docs/api-schemas-3.md#sync) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## testFireSync

`POST /v1/syncs/test-fire`

Deployment URL: `https://ctx4.me/v1/syncs/test-fire`. Replace parameters in braces with actual IDs from the API.

Synchronously probe a bounded record sample without persisting anything

Capability: `syncs:write`.

The contract defines no additional parameters.

### Request body

Required. 

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "connection_id": {
            "type": "string",
            "format": "uuid",
            "example": "9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"
          },
          "entity": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,79}$"
          },
          "sample_limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50
          }
        },
        "required": [
          "connection_id",
          "entity"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | Normalized sample records plus the estimated total volume | `application/json` [SyncTestFire](https://ctx4.me/docs/api-schemas-3.md#synctestfire) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable, provider_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## triggerSyncRun

`POST /v1/syncs/{syncId}/trigger`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/trigger`. Replace parameters in braces with actual IDs from the API.

Enqueue a manual run

Capability: `syncs:write`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `Idempotency-Key` | header | no | &#123;"type":"string"&#125; Required when the sync source_kind is database_poll; retries with the same key return the original run. Optional for other source kinds. |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 202 | The sync view with the planned run enqueued | `application/json` [Sync](https://ctx4.me/docs/api-schemas-3.md#sync) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict). The source does not support a manual refresh, or a run is already active | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## listSyncRuns

`GET /v1/syncs/{syncId}/runs`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/runs`. Replace parameters in braces with actual IDs from the API.

Run history with per-change-type counters and error causes

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |
| `cursor` | query | no | &#123;"type":"string","minLength":1,"maxLength":400,"pattern":"^[A-Za-z0-9_-]+$","description":"Opaque pagination cursor from a previous response"&#125; Opaque pagination cursor from a previous response |
| `limit` | query | no | &#123;"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 25)"&#125; Page size (1-100, default 25) |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | One page of runs with the continuation cursor | `application/json` [SyncRunList](https://ctx4.me/docs/api-schemas-3.md#syncrunlist) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## pullSyncRecords

`GET /v1/syncs/{syncId}/records`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/records`. Replace parameters in braces with actual IDs from the API.

Cursor-paged record change stream (the pull door onto the broker stream)

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |
| `cursor` | query | no | &#123;"type":"string","minLength":1,"maxLength":400,"pattern":"^[A-Za-z0-9_-]+$","description":"Opaque pagination cursor from a previous response"&#125; Opaque pagination cursor from a previous response |
| `limit` | query | no | &#123;"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 25)"&#125; Page size (1-100, default 25) |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | One page of record changes ordered by modification cursor | `application/json` [SyncRecordList](https://ctx4.me/docs/api-schemas-4.md#syncrecordlist) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## replaySyncRecords

`POST /v1/syncs/{syncId}/replay`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/replay`. Replace parameters in braces with actual IDs from the API.

Replay dead-lettered record deliveries for a sync

Capability: `syncs:write`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | The number of records reset for republication | `application/json` [SyncReplay](https://ctx4.me/docs/api-schemas-4.md#syncreplay) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## listSyncableEntities

`GET /v1/connectors/{connectorId}/syncable-entities`

Deployment URL: `https://ctx4.me/v1/connectors/{connectorId}/syncable-entities`. Replace parameters in braces with actual IDs from the API.

Entities the catalog declares syncable for a connector

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `connectorId` | path | yes | &#123;"type":"string","pattern":"^[a-z0-9][a-z0-9-]&#123;1,78&#125;$","example":"bitrix24"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | Syncable entities with strategy and default schedule | `application/json` [SyncableEntityList](https://ctx4.me/docs/api-schemas-4.md#syncableentitylist) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## getSyncDeliveryCapabilities

`GET /v1/sync-delivery-capabilities`

Deployment URL: `https://ctx4.me/v1/sync-delivery-capabilities`. Replace parameters in braces with actual IDs from the API.

Delivery limits and semantics a consumer must satisfy

Capability: `syncs:read`.

The contract defines no additional parameters.

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | Byte limits, envelope versions and delete semantics this deployment honours | `application/json` [SyncDeliveryCapabilities](https://ctx4.me/docs/api-schemas-4.md#syncdeliverycapabilities) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## createSyncExport

`POST /v1/syncs/{syncId}/exports`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/exports`. Replace parameters in braces with actual IDs from the API.

Open an immutable historical export over a captured frontier

Capability: `syncs:write`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Request body

Required. 

```json
{
  "required": true,
  "content": {
    "application/json": {
      "schema": {
        "type": "object",
        "properties": {
          "destination": {
            "type": "string",
            "enum": [
              "file",
              "bounded-replay-topic"
            ]
          },
          "entity": {
            "type": "string",
            "pattern": "^[A-Za-z0-9][A-Za-z0-9_.-]{0,79}$"
          },
          "idempotency_key": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "range": {
            "type": "object",
            "properties": {
              "after_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^(0|[1-9][0-9]{0,18})$"
              },
              "through_cursor": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^(0|[1-9][0-9]{0,18})$"
              }
            },
            "required": [
              "after_cursor",
              "through_cursor"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "entity",
          "idempotency_key"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 201 | Export session with its captured frontier and publication barrier | `application/json` [SyncExportSession](https://ctx4.me/docs/api-schemas-4.md#syncexportsession) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable, provider_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## cancelSyncExport

`POST /v1/syncs/{syncId}/exports/{exportId}/cancel`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/exports/{exportId}/cancel`. Replace parameters in braces with actual IDs from the API.

Request cancellation of a running export

Capability: `syncs:write`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |
| `exportId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 202 | Cancellation recorded; the session reaches `cancelled` once the runner stops | `application/json` [SyncExportSession](https://ctx4.me/docs/api-schemas-4.md#syncexportsession) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 409 | Problem (conflict) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## getSyncExport

`GET /v1/syncs/{syncId}/exports/{exportId}`

Deployment URL: `https://ctx4.me/v1/syncs/{syncId}/exports/{exportId}`. Replace parameters in braces with actual IDs from the API.

Read an export session's state and progress

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `syncId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |
| `exportId` | path | yes | &#123;"type":"string","format":"uuid","example":"9b2f6f2e-4b0a-4bd2-8b7e-3f8a1c2d4e5f"&#125;  |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | Export session state, progress and terminal outcome | `application/json` [SyncExportSession](https://ctx4.me/docs/api-schemas-4.md#syncexportsession) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 404 | Problem (not_found) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

## listSyncProviders

`GET /v1/sync-providers`

Deployment URL: `https://ctx4.me/v1/sync-providers`. Replace parameters in braces with actual IDs from the API.

List published Sync providers

Capability: `syncs:read`.

### Parameters

| Name | Location | Required | Type and constraints |
| --- | --- | --- | --- |
| `cursor` | query | no | &#123;"type":"string","minLength":1,"maxLength":400,"pattern":"^[A-Za-z0-9_-]+$","description":"Opaque pagination cursor from a previous response"&#125; Opaque pagination cursor from a previous response |
| `limit` | query | no | &#123;"type":"integer","minimum":1,"maximum":100,"description":"Page size (1-100, default 20)"&#125; Page size (1-100, default 20) |

### Responses and errors

| HTTP | Meaning | Format and schema |
| --- | --- | --- |
| 200 | Published providers with Sync entities; empty pages may have a continuation cursor | `application/json` [SyncProviderListResponse](https://ctx4.me/docs/api-schemas-4.md#syncproviderlistresponse) |
| 400 | Problem (validation_failed) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 401 | Problem (authentication_required, invalid_api_key, api_key_expired, api_key_revoked) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 403 | Problem (capability_missing) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 429 | Problem (rate_limited) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 500 | Problem (internal) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |
| 503 | Problem (service_unavailable) | `application/problem+json` [Problem](https://ctx4.me/docs/api-schemas-1.md#problem) |

Successful response headers:
```json
{
  "X-Request-Id": {
    "description": "Correlation id echoed on every response",
    "schema": {
      "type": "string"
    }
  },
  "RateLimit-Limit": {
    "description": "Per-key request limit for the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Remaining": {
    "description": "Requests remaining in the current window",
    "schema": {
      "type": "integer"
    }
  },
  "RateLimit-Reset": {
    "description": "Seconds until the current window resets",
    "schema": {
      "type": "integer"
    }
  }
}
```

