Update a campaign's WhatsApp agent settings
curl --request PUT \
--url https://api.pineyard.ai/whatsapp/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"whatsappEnabled": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({whatsappEnabled: true})
};
fetch('https://api.pineyard.ai/whatsapp/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/campaigns/{id}"
payload = { "whatsappEnabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "<string>",
"agentName": "<string>",
"whatsappEnabled": true,
"whatsappSenderId": "<string>",
"whatsappAgentCollectionIds": [
"<string>"
],
"whatsappAgentTemplateIds": [
"<string>"
],
"recoveryLinkEnabled": true,
"whatsappPaymentLinkEnabled": true,
"whatsappPaymentTemplateId": "<string>",
"paymentLinkBaseUrl": "<string>"
}Campaign settings
Update a campaign's WhatsApp agent settings
PUT
/
whatsapp
/
campaigns
/
{id}
Update a campaign's WhatsApp agent settings
curl --request PUT \
--url https://api.pineyard.ai/whatsapp/campaigns/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"whatsappEnabled": true
}
'const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({whatsappEnabled: true})
};
fetch('https://api.pineyard.ai/whatsapp/campaigns/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.pineyard.ai/whatsapp/campaigns/{id}"
payload = { "whatsappEnabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text){
"id": "<string>",
"name": "<string>",
"status": "<string>",
"agentName": "<string>",
"whatsappEnabled": true,
"whatsappSenderId": "<string>",
"whatsappAgentCollectionIds": [
"<string>"
],
"whatsappAgentTemplateIds": [
"<string>"
],
"recoveryLinkEnabled": true,
"whatsappPaymentLinkEnabled": true,
"whatsappPaymentTemplateId": "<string>",
"paymentLinkBaseUrl": "<string>"
}Required scope:
whatsapp.edit, and API keys additionally need campaigns.edit.Authorizations
Your API key, e.g. pk_live_xxxxxxxxxxxxxxxxxxxxxxxx.
Body
application/json
Response
OK

