> ## Documentation Index
> Fetch the complete documentation index at: https://reach-owl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH/PUT /api/v1/campaigns/{id}, Update a Campaign

> Partially or fully update a campaign. Use status 0 to pause and status 1 to resume. Schedule, messages, limit, name, and executor IDs are all updatable.

Change a campaign's configuration with a partial or full update. You control running state through the status field: set it to 0 to pause the campaign or 1 to resume it. There are no separate /pause or /start routes.

## Path parameters

<ParamField path="campaign_id" type="integer" required>
  The unique ID of the campaign to update.
</ParamField>

## Body parameters

<ParamField body="status" type="integer">
  Campaign status: 0 to pause, 1 to resume.
</ParamField>

<ParamField body="name" type="string">
  New campaign name.
</ParamField>

<ParamField body="limit" type="integer">
  Maximum number of actions the campaign should perform.
</ParamField>

<ParamField body="schedule" type="array">
  Active time windows. Each item contains day, start\_time, and end\_time.
</ParamField>

<ParamField body="messages" type="array">
  Message sequence. Each item contains a text array and a delay value.
</ParamField>

<ParamField body="executor_ids" type="array">
  Array of executor IDs assigned to the campaign.
</ParamField>

<ParamField body="post_url" type="string">
  URL of the synced group or post.
</ParamField>

<ParamField body="audience_keywords" type="array">
  Keywords to include when filtering the audience.
</ParamField>

<ParamField body="exclude_keywords" type="array">
  Keywords to exclude when filtering the audience.
</ParamField>

<ParamField body="countries" type="array">
  Target country codes.
</ParamField>

<ParamField body="comment_keywords" type="array">
  Keywords for comment-based filtering.
</ParamField>

## Example requests

### Pause a campaign

```bash theme={null}
curl -X PATCH "https://reachowl.com/api/v1campaigns/101" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"status": 0}'
```

### Resume a campaign

```bash theme={null}
curl -X PATCH "https://reachowl.com/api/v1campaigns/101" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"status": 1}'
```

### Full update with schedule change

```bash theme={null}
curl -X PUT "https://reachowl.com/api/v1campaigns/101" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q3 Outreach Updated",
    "limit": 50,
    "status": 1,
    "schedule": [
      {
        "day": "tuesday",
        "start_time": "10:00",
        "end_time": "18:00"
      }
    ],
    "messages": [
      {
        "text": ["Hi there!"],
        "delay": 3
      }
    ],
    "executor_ids": [3, 7, 9]
  }'
```

## Example response

```json theme={null}
{
  "id": 101,
  "name": "Q3 Outreach Updated",
  "platform": "facebook",
  "action_type": "friend_request",
  "audience_type": "group",
  "post_url": "https://facebook.com/groups/example",
  "status": 1,
  "limit": 50,
  "executor_ids": [3, 7, 9],
  "messages": [
    {
      "text": ["Hi there!"],
      "delay": 3
    }
  ],
  "schedule": [
    {
      "day": "tuesday",
      "start_time": "10:00",
      "end_time": "18:00"
    }
  ],
  "audience_keywords": [],
  "exclude_keywords": [],
  "countries": [],
  "comment_keywords": [],
  "created_at": "2024-01-10T08:00:00Z",
  "updated_at": "2024-01-15T14:00:00Z"
}
```

<Note>
  ReachOwl does not provide separate /pause or /resume endpoints. Update the status field directly to control campaign flow.
</Note>
