> ## 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.

# POST /api/v1/campaigns, Create or Clone a Campaign

> Create a new outreach campaign or clone an existing one. Pass clone_from with a campaign ID to duplicate. Omit to create fresh with full body.

Create a new outreach campaign by providing its full configuration, or clone an existing campaign by specifying its ID. Cloning copies the original campaign's settings, messages, schedule, and executors so you can launch a similar campaign quickly.

## Create a new campaign

### Body parameters

<ParamField body="name" type="string" required>
  Name of the campaign.
</ParamField>

<ParamField body="platform" type="string" required>
  Social platform to target, for example facebook.
</ParamField>

<ParamField body="action_type" type="string" required>
  Outreach action, for example friend\_request.
</ParamField>

<ParamField body="audience_type" type="string" required>
  Audience source, for example group.
</ParamField>

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

<ParamField body="team_id" type="integer">
  Team to own the campaign. Recommended; omit to use the token's default team.
</ParamField>

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

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

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

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

<ParamField body="status" default="1" type="integer">
  Initial status: 0 for paused, 1 for running.
</ParamField>

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

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

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

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

### Example request (create)

```bash theme={null}
curl -X POST "https://reachowl.com/api/v1/campaigns" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q3 Outreach",
    "platform": "facebook",
    "action_type": "friend_request",
    "audience_type": "group",
    "post_url": "https://facebook.com/groups/example",
    "team_id": 1,
    "executor_ids": [3, 7],
    "messages": [
      {
        "text": ["Hello!"],
        "delay": 5
      }
    ],
    "schedule": [
      {
        "day": "monday",
        "start_time": "09:00",
        "end_time": "17:00"
      }
    ],
    "limit": 30,
    "status": 1,
    "audience_keywords": [],
    "exclude_keywords": [],
    "countries": [],
    "comment_keywords": []
  }'
```

## Clone an existing campaign

### Body parameters

<ParamField body="clone_from" type="integer" required>
  ID of the existing campaign to duplicate.
</ParamField>

### Example request (clone)

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

## Example response (201 Created)

```json theme={null}
{
  "id": 102,
  "name": "Q3 Outreach",
  "platform": "facebook",
  "action_type": "friend_request",
  "audience_type": "group",
  "post_url": "https://facebook.com/groups/example",
  "status": 1,
  "limit": 30,
  "executor_ids": [3, 7],
  "messages": [
    {
      "text": ["Hello!"],
      "delay": 5
    }
  ],
  "schedule": [
    {
      "day": "monday",
      "start_time": "09:00",
      "end_time": "17:00"
    }
  ],
  "audience_keywords": [],
  "exclude_keywords": [],
  "countries": [],
  "comment_keywords": [],
  "created_at": "2024-01-15T12:00:00Z",
  "updated_at": "2024-01-15T12:00:00Z"
}
```
