> 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.

# Facebook Ads

Supports:
* ✅ Model sync destination
* ✅ Bulk sync source
* ✅ Connection Proxy


## Connection

### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>auth_method</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Authentication method<br/><br/>Accepted values: `oauth`, `token` <a href="#auth-method-token">↓</a></td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>auto_add_accounts</code></td>
<td><code>boolean</code></td>
<td style="vertical-align: top;">Automatically add new accounts</td>
<td><code>optional</code></td>
</tr>
</tbody>
</table>

<table>
<thead>
<tr>
<th>Read-only property</th><th>Type</th><th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>user_name</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Connected as</td>
</tr>
</tbody>
</table>

<a id="auth-method-token"></a>

#### `auth_method` = `token`

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>byo_app_token</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Token <a href="#byo-app-token-set-user-name-set">↓</a></td>
<td><code>required</code></td>
</tr>
<tr>
<td><code>graph_api_version</code></td>
<td><code>string</code></td>
<td style="vertical-align: top;">Graph API version (optional)</td>
<td><code>required</code></td>
</tr>
</tbody>
</table>

```json
{
  "name": "Facebook Ads connection",
  "type": "fbaudience",
  "configuration": {
    "accounts": [
      {
        "label": "",
        "value": ""
      }
    ],
    "auth_method": "token",
    "auto_add_accounts": false,
    "byo_app_token": "secret",
    "graph_api_version": "v24.0"
  }
}
```

<a id="byo-app-token-set-user-name-set"></a>

##### `byo_app_token`

When `byo_app_token` is set or `user_name` is set:

<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>accounts</code></td>
<td><code>array</code></td>
<td style="vertical-align: top;">Accounts</td>
<td><code>required</code></td>
</tr>
</tbody>
</table>



## Model Sync
### Target
Facebook Ads connections may be used as the destination in a model sync.




### Target creation

Facebook Ads connections may be used to create a new target for a model sync. The
following parameters are required to create a new target:

<table>
<thead>
<tr>
  <th>NAME</th>
  <th>DESCRIPTION</th>
  <th>ENUM</th>
</tr></thead>
<tbody>
<tr>
  <td>account</td>
  <td>Ads account ID</td>
  <td>true</td>
</tr>

<tr>
  <td>name</td>
  <td>Audience name</td>
  <td>false</td>
</tr>

</tbody>
</table>




## Bulk Sync
### Source
#### Configuration
<table>
<thead>
<tr>
<th>Name</th><th>Type</th><th>Description</th><th>Required</th>
</tr>
</thead>
<tbody>
<tr>
<td><code>reporting_lookback</code></td>
<td><code>integer</code></td>
<td style="vertical-align: top;">Lookback period for reports</td>
<td><code>optional</code></td>
</tr>
</tbody>
</table>


#### Example
```json
{
  ...
  "source_configuration": {
    "reporting_lookback": 7
  }
}
```