Create a LinkedIn Ads integration for a account with ad account details
http
POST https://services.leadconnectorhq.com/ad-publishing/linkedin/integrationAuthorization
| 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_123 | Account identifier |
adAccountId | string | Yes | 12345678 | Ad account identifier |
adAccountName | string | Yes | My Ad Account | Ad account name |
currencyCode | string | Yes | USD | Currency code |
organizationId | string | Yes | 12345678 | Organization identifier |
Responses
201 - Response
400 - Bad Request
json
{}422 - Unprocessable Entity
json
{}Example
curl -X POST 'https://services.leadconnectorhq.com/ad-publishing/linkedin/integration' \
-H 'Authorization: Bearer YOUR_TOKEN' \
-H 'Version: 2021-07-28' \
-H 'Content-Type: application/json' \
-d '{
"locationId": "loc_123",
"adAccountId": "12345678",
"adAccountName": "My Ad Account",
"currencyCode": "USD",
"organizationId": "12345678"
}'const response = await fetch('https://services.leadconnectorhq.com/ad-publishing/linkedin/integration', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.LEADWAY_TOKEN}`,
Version: '2021-07-28',
'Content-Type': 'application/json',
},
body: JSON.stringify({"locationId": "loc_123", "adAccountId": "12345678", "adAccountName": "My Ad Account", "currencyCode": "USD", "organizationId": "12345678"}),
});
const data = await response.json();import os, requests
response = requests.request(
'POST',
'https://services.leadconnectorhq.com/ad-publishing/linkedin/integration',
headers={
'Authorization': f"Bearer {os.environ['LEADWAY_TOKEN']}",
'Version': '2021-07-28',
'Content-Type': 'application/json',
},
json={"locationId": "loc_123", "adAccountId": "12345678", "adAccountName": "My Ad Account", "currencyCode": "USD", "organizationId": "12345678"},
)
data = response.json()<?php
$ch = curl_init('https://services.leadconnectorhq.com/ad-publishing/linkedin/integration');
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_123', 'adAccountId': '12345678', 'adAccountName': 'My Ad Account', 'currencyCode': 'USD', 'organizationId': '12345678'}),
]);
$data = json_decode(curl_exec($ch), true);