Generate or attach a live Google Sheet
curl --request POST \
--url https://api.pineyard.ai/campaigns/{id}/sheet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.pineyard.ai/campaigns/{id}/sheet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/sheet"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"connected": true,
"googleEmail": "<string>",
"linked": true,
"spreadsheetUrl": "<string>",
"source": "GENERATED",
"status": "ACTIVE",
"autoSync": true,
"matchColumn": "<string>",
"lastSyncedAt": "<string>",
"lastError": "<string>",
"legacyLayout": true,
"managedColumnCount": 123,
"layoutLocked": true,
"sheetTitle": "<string>",
"sheetGid": 123,
"previousSpreadsheetUrl": "<string>",
"rotatedAt": "<string>"
}Live sheet
Generate or attach a live Google Sheet
API keys: only mode: "generate" is allowed. Attaching an existing spreadsheet (mode: "attach") returns 403 api_key_not_allowed.
POST
/
campaigns
/
{id}
/
sheet
Generate or attach a live Google Sheet
curl --request POST \
--url https://api.pineyard.ai/campaigns/{id}/sheet \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.pineyard.ai/campaigns/{id}/sheet', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/sheet"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"connected": true,
"googleEmail": "<string>",
"linked": true,
"spreadsheetUrl": "<string>",
"source": "GENERATED",
"status": "ACTIVE",
"autoSync": true,
"matchColumn": "<string>",
"lastSyncedAt": "<string>",
"lastError": "<string>",
"legacyLayout": true,
"managedColumnCount": 123,
"layoutLocked": true,
"sheetTitle": "<string>",
"sheetGid": 123,
"previousSpreadsheetUrl": "<string>",
"rotatedAt": "<string>"
}Required scope:
intel.view, and API keys additionally need campaigns.edit.
Requires a plan that includes business intelligence (basic tier). Otherwise the request is refused; see Errors.
Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Body
application/json
Response
Created
Available options:
GENERATED, ATTACHED Available options:
ACTIVE, PAUSED, ERROR 
