Update a campaign. Allowed on DRAFT and PAUSED campaigns.
curl --request PATCH \
--url https://api.pineyard.ai/v1/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>'})
};
fetch('https://api.pineyard.ai/v1/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/campaigns/{id}"
payload = {
"name": "<string>",
"description": "<string>"
}
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
}Campaigns
Update a campaign. Allowed on DRAFT and PAUSED campaigns.
PATCH
/
v1
/
campaigns
/
{id}
Update a campaign. Allowed on DRAFT and PAUSED campaigns.
curl --request PATCH \
--url https://api.pineyard.ai/v1/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', description: '<string>'})
};
fetch('https://api.pineyard.ai/v1/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/v1/campaigns/{id}"
payload = {
"name": "<string>",
"description": "<string>"
}
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.edit
Scopes apply to scoped API keys. Keys issued without scopes can call every
/v1 endpoint.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Path Parameters
Body
application/json
Required string length:
1 - 100Maximum string length:
280Minimum string length:
1Available options:
VOICE, WHATSAPP, VOICE_THEN_WHATSAPP, WHATSAPP_THEN_VOICE, CUSTOM, EMAIL - Option 1
- Option 2
Show child attributes
Show child attributes
Required range:
1 <= x <= 100000Maximum array length:
20Show child attributes
Show child attributes
Required range:
1 <= x <= 10Show child attributes
Show child attributes
Pattern:
^\+\d{1,3}$Maximum array length:
5Minimum string length:
1Pattern:
^\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:
0 <= x <= 100Maximum array length:
40Show child attributes
Show child attributes
Available options:
CSV, CRM_MANUAL, CRM_WEBHOOK, API Available options:
APPEND, REPLACE Required range:
1 <= x <= 10Required 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 <= 100Show child attributes
Show child attributes
Show child attributes
Show child attributes
Required range:
1 <= x <= 100000Required array length:
1 - 7 elementsRequired range:
0 <= x <= 6Maximum array length:
12Show child attributes
Show child attributes
Response
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

