Create a job to upload users to a Google customer match list
http
POST https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-jobAuthorization
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
Authorization | string | Yes | Bearer token generated from the Leadway portal. See Authentication. | |
Version | string | Yes | 2021-07-28 | API version. |
Body
| Name | Type | Required | Example | Description |
|---|---|---|---|---|
locationId | string | Yes | loc_abc123 | Account identifier |
smartListIds | string[] | No | Smart list IDs | |
csvPath | string | No | /uploads/users.csv | CSV file path |
userListId | string | No | ul_123 | User list identifier |
isDynamic | boolean | No | False | Dynamic list flag |
Responses
201 - Response
400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_abc123",
"smartListIds": [
"sl_123"
],
"csvPath": "/uploads/users.csv",
"userListId": "ul_123",
"isDynamic": false
}'const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_abc123", "smartListIds": ["sl_123"], "csvPath": "/uploads/users.csv", "userListId": "ul_123", "isDynamic": false}),
});
const data = await response.json();import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_abc123", "smartListIds": ["sl_123"], "csvPath": "/uploads/users.csv", "userListId": "ul_123", "isDynamic": false},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/ad-publishing/google/segments/offline-user-list-job');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('LEADWAY_TOKEN'),
'Version: 2021-07-28',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode({'locationId': 'loc_abc123', 'smartListIds': ['sl_123'], 'csvPath': '/uploads/users.csv', 'userListId': 'ul_123', 'isDynamic': false}),
]);
$data = json_decode(curl_exec($ch), true);