Live-edit a campaign’s pacing/schedule (allowed while RUNNING)
curl --request PATCH \
--url https://api.pineyard.ai/campaigns/{id}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dailyDialCap": 50000,
"dialDays": [
3
],
"timezone": "<string>",
"scheduledStartAt": "2023-11-07T05:31:56Z",
"scheduledEndAt": "2023-11-07T05:31:56Z",
"dailyWindowStart": "<string>",
"dailyWindowEnd": "<string>",
"retryCount": 5,
"cooldownMinutes": 21602,
"retryDelaysMinutes": [
21600
],
"churnEnabled": true,
"churnMaxAttempts": 5,
"churnIntervalHours": 1080,
"churnDelaysHours": [
1080
],
"goal": "<string>",
"briefText": "<string>",
"briefFileName": "<string>",
"incompleteRetryEnabled": true,
"incompleteRetryMaxAttempts": 3,
"incompleteRetryIntervalMinutes": 720,
"incompleteRetryDelaysMinutes": [
720
],
"incompleteCallSeconds": 152,
"referralMaxDepth": 1,
"skipRetryOnFirstVoicemail": true,
"messageRetryEnabled": true,
"messageRetryMaxAttempts": 5,
"messageRetryIntervalSeconds": 302400,
"messageRetryDelaysSeconds": [
302400
],
"messageRetryWindowSeconds": 1296000,
"messageRetryTieredEnabled": true,
"messageRetryTransientMaxAttempts": 50,
"autoReseedEnabled": true,
"retryConcurrencyPercent": 50
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dailyDialCap: 50000,
dialDays: [3],
timezone: '<string>',
scheduledStartAt: '2023-11-07T05:31:56Z',
scheduledEndAt: '2023-11-07T05:31:56Z',
dailyWindowStart: '<string>',
dailyWindowEnd: '<string>',
retryCount: 5,
cooldownMinutes: 21602,
retryDelaysMinutes: [21600],
churnEnabled: true,
churnMaxAttempts: 5,
churnIntervalHours: 1080,
churnDelaysHours: [1080],
goal: '<string>',
briefText: '<string>',
briefFileName: '<string>',
incompleteRetryEnabled: true,
incompleteRetryMaxAttempts: 3,
incompleteRetryIntervalMinutes: 720,
incompleteRetryDelaysMinutes: [720],
incompleteCallSeconds: 152,
referralMaxDepth: 1,
skipRetryOnFirstVoicemail: true,
messageRetryEnabled: true,
messageRetryMaxAttempts: 5,
messageRetryIntervalSeconds: 302400,
messageRetryDelaysSeconds: [302400],
messageRetryWindowSeconds: 1296000,
messageRetryTieredEnabled: true,
messageRetryTransientMaxAttempts: 50,
autoReseedEnabled: true,
retryConcurrencyPercent: 50
})
};
fetch('https://api.pineyard.ai/campaigns/{id}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/schedule"
payload = {
"dailyDialCap": 50000,
"dialDays": [3],
"timezone": "<string>",
"scheduledStartAt": "2023-11-07T05:31:56Z",
"scheduledEndAt": "2023-11-07T05:31:56Z",
"dailyWindowStart": "<string>",
"dailyWindowEnd": "<string>",
"retryCount": 5,
"cooldownMinutes": 21602,
"retryDelaysMinutes": [21600],
"churnEnabled": True,
"churnMaxAttempts": 5,
"churnIntervalHours": 1080,
"churnDelaysHours": [1080],
"goal": "<string>",
"briefText": "<string>",
"briefFileName": "<string>",
"incompleteRetryEnabled": True,
"incompleteRetryMaxAttempts": 3,
"incompleteRetryIntervalMinutes": 720,
"incompleteRetryDelaysMinutes": [720],
"incompleteCallSeconds": 152,
"referralMaxDepth": 1,
"skipRetryOnFirstVoicemail": True,
"messageRetryEnabled": True,
"messageRetryMaxAttempts": 5,
"messageRetryIntervalSeconds": 302400,
"messageRetryDelaysSeconds": [302400],
"messageRetryWindowSeconds": 1296000,
"messageRetryTieredEnabled": True,
"messageRetryTransientMaxAttempts": 50,
"autoReseedEnabled": True,
"retryConcurrencyPercent": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"channel": "VOICE",
"status": "<string>",
"reservedConcurrency": 123,
"variableMap": {},
"startedAt": "<string>",
"endedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"campaignTypeId": "<string>",
"campaignTypeName": "<string>",
"customExtractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"effectiveExtractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"notificationUserIds": [
"<string>"
],
"source": "CSV",
"defaultCrmConnectionId": "<string>",
"defaultCrmSegmentId": "<string>",
"description": "<string>",
"whatsappOutreachTemplateId": "<string>",
"whatsappTemplateByMetric": null,
"messageDeclinedLeads": true,
"dailyMessageCap": 123,
"outreachRules": [
{
"trigger": "MESSAGE_REPLY",
"afterDays": 45,
"condition": {
"kind": "ai_interested",
"describe": "<string>"
},
"conditions": [
{
"kind": "ai_interested",
"describe": "<string>"
}
],
"match": "ALL",
"action": "HAND_OFF"
}
],
"whatsappEnabled": true,
"whatsappAgentTemplateIds": [
"<string>"
],
"whatsappPaymentLinkEnabled": true,
"recoveryLinkEnabled": true,
"whatsappAutomations": [
{
"key": "<string>",
"label": "<string>",
"detail": "<string>"
}
],
"workflowId": "<string>",
"countryCode": "<string>",
"phoneColumn": "<string>",
"altPhoneColumns": [
"<string>"
],
"removeInvalidRows": true,
"transliterateCalleeNames": true,
"uploadId": "<string>",
"timezone": "<string>",
"scheduledStartAt": "<string>",
"scheduledEndAt": "<string>",
"dailyWindowStart": "<string>",
"dailyWindowEnd": "<string>",
"retryCount": 123,
"cooldownMinutes": 123,
"retryDelaysMinutes": [
123
],
"retryConcurrencyPercent": 123,
"followupEnabled": true,
"followupMaxAttempts": 123,
"churnEnabled": true,
"churnMaxAttempts": 123,
"churnIntervalHours": 123,
"churnDelaysHours": [
123
],
"goal": "<string>",
"incompleteRetryEnabled": true,
"incompleteRetryMaxAttempts": 123,
"incompleteRetryIntervalMinutes": 123,
"incompleteRetryDelaysMinutes": [
123
],
"incompleteCallSeconds": 123,
"referralMaxDepth": 123,
"skipRetryOnFirstVoicemail": true,
"messageRetryEnabled": true,
"messageRetryMaxAttempts": 123,
"messageRetryIntervalSeconds": 123,
"messageRetryDelaysSeconds": [
123
],
"messageRetryWindowSeconds": 123,
"messageRetryTieredEnabled": true,
"messageRetryTransientMaxAttempts": 123,
"autoReseedEnabled": true,
"briefFileName": "<string>",
"briefUploadedAt": "<string>",
"briefText": "<string>",
"dailyDialCap": 123,
"dialDays": [
123
],
"evaluationMetrics": [
{
"key": "<string>",
"label": "<string>",
"allowedValues": [
"<string>"
],
"prompt": "<string>",
"builtin": true
}
],
"contactCount": 123,
"receivedCalls": 123
}Lifecycle
Live-edit a campaign’s pacing/schedule (allowed while RUNNING)
PATCH
/
campaigns
/
{id}
/
schedule
Live-edit a campaign’s pacing/schedule (allowed while RUNNING)
curl --request PATCH \
--url https://api.pineyard.ai/campaigns/{id}/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dailyDialCap": 50000,
"dialDays": [
3
],
"timezone": "<string>",
"scheduledStartAt": "2023-11-07T05:31:56Z",
"scheduledEndAt": "2023-11-07T05:31:56Z",
"dailyWindowStart": "<string>",
"dailyWindowEnd": "<string>",
"retryCount": 5,
"cooldownMinutes": 21602,
"retryDelaysMinutes": [
21600
],
"churnEnabled": true,
"churnMaxAttempts": 5,
"churnIntervalHours": 1080,
"churnDelaysHours": [
1080
],
"goal": "<string>",
"briefText": "<string>",
"briefFileName": "<string>",
"incompleteRetryEnabled": true,
"incompleteRetryMaxAttempts": 3,
"incompleteRetryIntervalMinutes": 720,
"incompleteRetryDelaysMinutes": [
720
],
"incompleteCallSeconds": 152,
"referralMaxDepth": 1,
"skipRetryOnFirstVoicemail": true,
"messageRetryEnabled": true,
"messageRetryMaxAttempts": 5,
"messageRetryIntervalSeconds": 302400,
"messageRetryDelaysSeconds": [
302400
],
"messageRetryWindowSeconds": 1296000,
"messageRetryTieredEnabled": true,
"messageRetryTransientMaxAttempts": 50,
"autoReseedEnabled": true,
"retryConcurrencyPercent": 50
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
dailyDialCap: 50000,
dialDays: [3],
timezone: '<string>',
scheduledStartAt: '2023-11-07T05:31:56Z',
scheduledEndAt: '2023-11-07T05:31:56Z',
dailyWindowStart: '<string>',
dailyWindowEnd: '<string>',
retryCount: 5,
cooldownMinutes: 21602,
retryDelaysMinutes: [21600],
churnEnabled: true,
churnMaxAttempts: 5,
churnIntervalHours: 1080,
churnDelaysHours: [1080],
goal: '<string>',
briefText: '<string>',
briefFileName: '<string>',
incompleteRetryEnabled: true,
incompleteRetryMaxAttempts: 3,
incompleteRetryIntervalMinutes: 720,
incompleteRetryDelaysMinutes: [720],
incompleteCallSeconds: 152,
referralMaxDepth: 1,
skipRetryOnFirstVoicemail: true,
messageRetryEnabled: true,
messageRetryMaxAttempts: 5,
messageRetryIntervalSeconds: 302400,
messageRetryDelaysSeconds: [302400],
messageRetryWindowSeconds: 1296000,
messageRetryTieredEnabled: true,
messageRetryTransientMaxAttempts: 50,
autoReseedEnabled: true,
retryConcurrencyPercent: 50
})
};
fetch('https://api.pineyard.ai/campaigns/{id}/schedule', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/campaigns/{id}/schedule"
payload = {
"dailyDialCap": 50000,
"dialDays": [3],
"timezone": "<string>",
"scheduledStartAt": "2023-11-07T05:31:56Z",
"scheduledEndAt": "2023-11-07T05:31:56Z",
"dailyWindowStart": "<string>",
"dailyWindowEnd": "<string>",
"retryCount": 5,
"cooldownMinutes": 21602,
"retryDelaysMinutes": [21600],
"churnEnabled": True,
"churnMaxAttempts": 5,
"churnIntervalHours": 1080,
"churnDelaysHours": [1080],
"goal": "<string>",
"briefText": "<string>",
"briefFileName": "<string>",
"incompleteRetryEnabled": True,
"incompleteRetryMaxAttempts": 3,
"incompleteRetryIntervalMinutes": 720,
"incompleteRetryDelaysMinutes": [720],
"incompleteCallSeconds": 152,
"referralMaxDepth": 1,
"skipRetryOnFirstVoicemail": True,
"messageRetryEnabled": True,
"messageRetryMaxAttempts": 5,
"messageRetryIntervalSeconds": 302400,
"messageRetryDelaysSeconds": [302400],
"messageRetryWindowSeconds": 1296000,
"messageRetryTieredEnabled": True,
"messageRetryTransientMaxAttempts": 50,
"autoReseedEnabled": True,
"retryConcurrencyPercent": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"agentId": "<string>",
"agentName": "<string>",
"channel": "VOICE",
"status": "<string>",
"reservedConcurrency": 123,
"variableMap": {},
"startedAt": "<string>",
"endedAt": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"campaignTypeId": "<string>",
"campaignTypeName": "<string>",
"customExtractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"effectiveExtractionKeys": [
{
"name": "<string>",
"type": "string",
"description": "<string>"
}
],
"notificationUserIds": [
"<string>"
],
"source": "CSV",
"defaultCrmConnectionId": "<string>",
"defaultCrmSegmentId": "<string>",
"description": "<string>",
"whatsappOutreachTemplateId": "<string>",
"whatsappTemplateByMetric": null,
"messageDeclinedLeads": true,
"dailyMessageCap": 123,
"outreachRules": [
{
"trigger": "MESSAGE_REPLY",
"afterDays": 45,
"condition": {
"kind": "ai_interested",
"describe": "<string>"
},
"conditions": [
{
"kind": "ai_interested",
"describe": "<string>"
}
],
"match": "ALL",
"action": "HAND_OFF"
}
],
"whatsappEnabled": true,
"whatsappAgentTemplateIds": [
"<string>"
],
"whatsappPaymentLinkEnabled": true,
"recoveryLinkEnabled": true,
"whatsappAutomations": [
{
"key": "<string>",
"label": "<string>",
"detail": "<string>"
}
],
"workflowId": "<string>",
"countryCode": "<string>",
"phoneColumn": "<string>",
"altPhoneColumns": [
"<string>"
],
"removeInvalidRows": true,
"transliterateCalleeNames": true,
"uploadId": "<string>",
"timezone": "<string>",
"scheduledStartAt": "<string>",
"scheduledEndAt": "<string>",
"dailyWindowStart": "<string>",
"dailyWindowEnd": "<string>",
"retryCount": 123,
"cooldownMinutes": 123,
"retryDelaysMinutes": [
123
],
"retryConcurrencyPercent": 123,
"followupEnabled": true,
"followupMaxAttempts": 123,
"churnEnabled": true,
"churnMaxAttempts": 123,
"churnIntervalHours": 123,
"churnDelaysHours": [
123
],
"goal": "<string>",
"incompleteRetryEnabled": true,
"incompleteRetryMaxAttempts": 123,
"incompleteRetryIntervalMinutes": 123,
"incompleteRetryDelaysMinutes": [
123
],
"incompleteCallSeconds": 123,
"referralMaxDepth": 123,
"skipRetryOnFirstVoicemail": true,
"messageRetryEnabled": true,
"messageRetryMaxAttempts": 123,
"messageRetryIntervalSeconds": 123,
"messageRetryDelaysSeconds": [
123
],
"messageRetryWindowSeconds": 123,
"messageRetryTieredEnabled": true,
"messageRetryTransientMaxAttempts": 123,
"autoReseedEnabled": true,
"briefFileName": "<string>",
"briefUploadedAt": "<string>",
"briefText": "<string>",
"dailyDialCap": 123,
"dialDays": [
123
],
"evaluationMetrics": [
{
"key": "<string>",
"label": "<string>",
"allowedValues": [
"<string>"
],
"prompt": "<string>",
"builtin": true
}
],
"contactCount": 123,
"receivedCalls": 123
}Required scope:
campaigns.editAuthorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Body
application/json
Required range:
1 <= x <= 100000Required array length:
1 - 7 elementsRequired range:
0 <= x <= 6Pattern:
^\d{2}:\d{2}$Pattern:
^\d{2}:\d{2}$Required range:
0 <= x <= 10Required range:
5 <= x <= 43200Maximum array length:
10Required range:
1 <= x <= 43200Required range:
1 <= x <= 10Required range:
1 <= x <= 2160Maximum array length:
10Required range:
1 <= x <= 2160Maximum string length:
500Maximum string length:
200000Maximum string length:
255Required range:
1 <= x <= 5Required range:
1 <= x <= 1440Maximum array length:
5Required range:
1 <= x <= 1440Required range:
5 <= x <= 300Required range:
0 <= x <= 3Required range:
1 <= x <= 10Required range:
1 <= x <= 604800Maximum array length:
10Required range:
1 <= x <= 604800Required range:
1 <= x <= 2592000Required range:
1 <= x <= 100Required range:
0 <= x <= 100Response
OK
Available options:
VOICE, WHATSAPP, VOICE_THEN_WHATSAPP, WHATSAPP_THEN_VOICE, CUSTOM, EMAIL Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
CSV, CRM_MANUAL, CRM_WEBHOOK, API, INBOUND Maximum array length:
20Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum array length:
12Show child attributes
Show child attributes

