API Configuration
You can manage your Google Ads connector programmatically using the Weld REST API. This page covers the key operations specific to Google Ads.
Authentication
All API requests require an API key passed via the x-api-key header. You can create API keys in Settings → API Keys inside the Weld app.
curl https://connect.weld.app/connections \
--header 'x-api-key: YOUR_API_KEY'
Integration ID
When creating connections or syncs for Google Ads, use the following integration ID:
| Parameter | Value |
|---|---|
integration_id | google-ads |
Create a Connection
To connect Google Ads via the API, create a connection bridge session:
curl https://connect.weld.app/connection_bridges \
--request POST \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
"integration_id": "google-ads",
"label": "google-ads-production",
"redirect_uri": "https://yourapp.com/callback"
}'
The user will be redirected to Google's OAuth flow to authorize access. Once complete, the connection is available for creating syncs.
Create an ELT Sync
Once a connection exists, create a sync to start loading Google Ads data:
curl https://connect.weld.app/elt_syncs \
--request POST \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
"connection_id": "YOUR_CONNECTION_ID",
"destination_schema_name": "google_ads",
"sync_interval": "0 */6 * * *",
"start_date": "2024-01-01"
}'
Google Ads supports start_date — you can specify how far back to sync historical data.
Available Streams
After creating the sync, list the available streams to choose which Google Ads reports to sync:
curl https://connect.weld.app/elt_syncs/YOUR_SYNC_ID/available_source_streams \
--header 'x-api-key: YOUR_API_KEY'
Then add the streams you want:
curl https://connect.weld.app/elt_syncs/YOUR_SYNC_ID/source_streams \
--request POST \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
"source_streams": [
{ "name": "campaigns" },
{ "name": "ad_groups" },
{ "name": "ads" },
{ "name": "campaign_performance" }
]
}'
Manage Syncs
| Operation | Method | Endpoint |
|---|---|---|
| List syncs | GET | /elt_syncs |
| Get sync details | GET | /elt_syncs/{id} |
| Update sync | POST | /elt_syncs/{id} |
| Enable sync | POST | /elt_syncs/{id}/enable |
| Disable sync | POST | /elt_syncs/{id}/disable |
| Get sync status | GET | /elt_syncs/{id}/status |
| Delete sync | DELETE | /elt_syncs/{id} |
Manage Streams
| Operation | Method | Endpoint |
|---|---|---|
| List available streams | GET | /elt_syncs/{id}/available_source_streams |
| Add streams | POST | /elt_syncs/{id}/source_streams |
| Trigger stream run | POST | /elt_streams/{id}/request_run |
| Request full refresh | POST | /elt_streams/{id}/request_full_refresh |
For the full endpoint reference including request/response schemas, see the API Reference →.