Skip to main content
Update an existing campaign’s configuration. Only campaigns in draft or paused status can be updated.
Running or completed campaigns cannot be updated. Pause the campaign first if you need to make changes.

Path Parameters

  • campaign_id (integer, required): The unique identifier of the campaign

Request Body

All fields are optional. Only include fields you want to update.
FieldTypeDescription
namestringCampaign name (1-200 characters)
descriptionstringCampaign description
welcome_message_templatestringTemplate for welcome message
agenda_templatestringTemplate for call agenda
end_call_message_templatestringTemplate for end call message
sms_message_templatestringTemplate for SMS content
fallback_valuesobjectFallback values for missing variables
max_attemptsintegerMax retry attempts
retry_delay_minutesintegerDelay between retries

Example Request

Request Body
{
  "name": "Updated Campaign Name",
  "agenda_template": "I'm calling about your upcoming appointment on {{appointment_date}} at {{appointment_time}}.",
  "max_attempts": 5
}

Response

Returns a success message when the update is complete.
Response
{
  "message": "Campaign updated successfully"
}

Example Code

cURL
curl -X PUT "https://api.burki.dev/api/v1/campaigns/42" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Campaign Name",
    "max_attempts": 5
  }'
Python
import requests

response = requests.put(
    "https://api.burki.dev/api/v1/campaigns/42",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "Updated Campaign Name",
        "max_attempts": 5
    }
)

result = response.json()
print(result["message"])
JavaScript
const response = await fetch("https://api.burki.dev/api/v1/campaigns/42", {
  method: "PUT",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    name: "Updated Campaign Name",
    max_attempts: 5
  })
});

const result = await response.json();
console.log(result.message);

Error Responses

Status CodeDescription
400Cannot update running or completed campaigns
404Campaign not found
401Unauthorized - invalid or missing API key