Skip to main content

PATCH /api/v1/public/campaigns//

Updates campaign settings including name, timezone, language, limits, and sending window. Auth: X-API-Key

Path Parameters

  • id (integer, required): Campaign ID

Request Body

{
  "name": "Updated Campaign Name",
  "timezone": "America/New_York",
  "language": "en",
  "email_max_messages": 50,
  "linkedin_max_messages": 120,
  "linkedin_max_connections": 60,
  "sending_window": {
    "monday": {"enabled": true, "start": "08:00", "end": "18:00"},
    "tuesday": {"enabled": true, "start": "08:00", "end": "18:00"},
    "wednesday": {"enabled": true, "start": "08:00", "end": "18:00"},
    "thursday": {"enabled": true, "start": "08:00", "end": "18:00"},
    "friday": {"enabled": true, "start": "08:00", "end": "18:00"},
    "saturday": {"enabled": false, "start": "09:00", "end": "17:00"},
    "sunday": {"enabled": false, "start": "09:00", "end": "17:00"}
  }
}

Response

{
  "success": true,
  "campaign": {
    "id": 123,
    "name": "Updated Campaign Name",
    "status": "DRAFT",
    "timezone": "America/New_York",
    "language": "en",
    "email_max_messages": 50,
    "linkedin_max_messages": 120,
    "linkedin_max_connections": 60,
    "sending_window": {...},
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T11:45:00Z"
  }
}

Example

curl -X PATCH -H "X-API-Key: <key>" \
  -H "Content-Type: application/json" \
  -d '{"name": "Updated Campaign Name", "timezone": "America/New_York"}' \
  "https://api.seleqt.ai/api/v1/public/campaigns/123/"