> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.polytomic.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.polytomic.com/_mcp/server.

# Get Bulk Source

GET https://app.polytomic.com/api/connections/{id}/bulksync/source

Lists the schemas (tables or objects) available on a connection for use as a bulk sync source, optionally including per-schema field details.

The response reflects what the
connection currently has cached; if the upstream source has changed, trigger
a refresh first with
[`POST /api/connections/{id}/schemas/refresh`](../../../../../api-reference/schemas/refresh).

These are the schemas available for selection, not the schemas already
configured on any particular sync. To inspect schemas on a running sync, use
[`GET /api/bulk/syncs/{id}/schemas`](../../../../../api-reference/bulk-sync/schemas/list).

Pass `include_fields=true` to receive per-schema field details in a single call.
Omit it when you only need the schema list, as field enumeration can be slow for
large sources.

Reference: https://apidocs.polytomic.com/api-reference/bulk-sync/get-source

## Authentication

- `Authorization` header (bearer token, required) — Bearer user API key
- `Authorization` header (basic auth, required) — Basic organization-scoped API key

## Request

### Path parameters

- `id` (string, required) — Unique identifier of the connection.

### Query parameters

- `include_fields` (boolean, optional, default: true) — When true, include per-schema field lists in the response. Set to false for a smaller payload when field details are not needed.

## Response

### 200

OK

- `data` (BulkSyncSource, optional)

## Errors

### 400 Bad Request Error

Bad Request

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 404 Not Found Error

Not Found

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

### 500 Internal Server Error

Internal Server Error

- `key` (string, optional)
- `message` (string, optional)
- `metadata` (map from string to any, optional)
- `status` (integer, optional)

## Types

### BulkSyncSource

- `capabilities` (BulkSyncSourceCapabilities, optional)
- `configuration` (any, optional)
- `schemas` (list of Schema, optional, nullable)

### BulkSyncSourceCapabilities

- `supports_namespaces` (boolean, optional) — When true, the portion of a schema ID before its last dot is that schema's namespace.
- `supports_tracking_fields` (boolean, optional)

### Schema

- `fields` (list of SchemaField, optional)
- `id` (string, optional)
- `name` (string, optional)

### SchemaField

- `association` (SchemaAssociation, optional)
- `id` (string, optional)
- `is_primary_key` (boolean, optional) — Whether this field is part of the schema's primary key, including any user override.
- `name` (string, optional)
- `path` (string, optional) — JSONPath used to extract the field from each source record; only meaningful for document-style backends.
- `primary_key_override` (boolean, optional, nullable) — The user-set primary key status for this field, which takes precedence over source_primary_key; omitted when no override is set.
- `remote_type` (string, optional) — The type of the field from the remote system.
- `source_primary_key` (boolean, optional) — Whether the source system reports this field as part of the schema's primary key.
- `type` (enum, optional)
  - Allowed values: `unknown`, `string`, `number`, `boolean`, `datetime`, `array`, `object`, `binary`
- `type_spec` (any, optional)
- `user_managed` (boolean, optional) — True when the field's effective definition came from a user override.
- `values` (list of PickValue, optional)

### SchemaAssociation

- `id` (string, optional)
- `name` (string, optional)
- `reference_to` (list of string, optional)
- `referenced_field` (string, optional)

### PickValue

- `label` (string, optional)
- `value` (string, optional)

## Examples

**Response**

```json
{
  "data": {
    "capabilities": {
      "supports_namespaces": true,
      "supports_tracking_fields": true
    },
    "schemas": [
      {
        "fields": [
          {
            "association": {
              "id": "string",
              "name": "string",
              "reference_to": [
                "string"
              ],
              "referenced_field": "string"
            },
            "id": "email",
            "is_primary_key": true,
            "name": "Email",
            "path": "string",
            "primary_key_override": true,
            "remote_type": "varchar(255)",
            "source_primary_key": false,
            "type": "unknown",
            "user_managed": true,
            "values": [
              {
                "label": "string",
                "value": "string"
              }
            ]
          }
        ],
        "id": "contact",
        "name": "Contact"
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://app.polytomic.com/api/connections/248df4b7-aa70-47b8-a036-33ac447e668d/bulksync/source")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```