# Auto-Scheduling

Automatically pick the optimal posting time for your content within a specified date window. Publer analyzes your posting schedule and audience engagement to fill gaps and maximize reach.

### Endpoint

```bash
POST /api/v1/posts/schedule
```

### Request Headers

<table><thead><tr><th width="195.8599853515625">Header</th><th width="137.239501953125">Required</th><th>Description</th></tr></thead><tbody><tr><td>Authorization</td><td>Yes</td><td><code>Bearer-API YOUR_API_KEY</code></td></tr><tr><td>Publer-Workspace-Id</td><td>Yes</td><td>Workspace ID</td></tr><tr><td>Content-Type</td><td>Yes</td><td><code>application/json</code></td></tr><tr><td>Accept</td><td>No</td><td><code>application/json</code> (default)</td></tr></tbody></table>

### Request Body

Set `auto: true` and define `range` to enable auto-scheduling:

```json
{
  "bulk": {
    "state": "scheduled",
    "posts": [
      {
        "networks": {
          "facebook": {
            "type": "status",
            "text": "Let Publer pick the best time for this post!"
          }
        },
        "accounts": [
          { "id": "ACCOUNT_ID" }
        ],
        "range": {
          "start_date": "2025-05-23T07:45:00Z",
          "end_date":   "2025-05-31T23:59:00Z"
        },
        "auto": true
      }
    ]
  }
}
```

#### Key Parameters

<table><thead><tr><th width="176.4857177734375">Field</th><th width="86.9464111328125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>auto</code></td><td>boolean</td><td>Set to <code>true</code> to enable auto-scheduling</td></tr><tr><td><code>range.start_date</code></td><td>string</td><td>Earliest ISO 8601 timestamp for posting (inclusive)</td></tr><tr><td><code>range.end_date</code></td><td>string</td><td>Latest ISO 8601 timestamp for posting (inclusive, optional)</td></tr><tr><td><code>share_next</code></td><td>boolean</td><td>(Optional) When <code>true</code>, schedule in the very next available slot</td></tr></tbody></table>

### Examples

#### Basic Auto-Scheduling

```json
{
  "bulk": {
    "state": "scheduled",
    "posts": [{
      "networks": {
        "facebook": {
          "type": "status",
          "text": "Let Publer choose the best time!"
        }
      },
      "accounts": [{ "id": "66f509f7db2797026a37ba76" }],
      "range": {
        "start_date": "2025-05-23T07:45:00Z",
        "end_date":   "2025-05-31T23:59:00Z"
      },
      "auto": true
    }]
  }
}
```

#### Next Available Slot

Omit `end_date` and set `share_next` to schedule at the next open slot:

```json
{
  "bulk": {
    "state": "scheduled",
    "posts": [{
      "networks": {
        "facebook": {
          "type": "status",
          "text": "Post in next available slot"
        }
      },
      "accounts": [{ "id": "66f509f7db2797026a37ba76" }],
      "range": { "start_date": "2025-05-23T07:45:00Z" },
      "share_next": true,
      "auto": true
    }]
  }
}
```

### How It Works

1. **Analyze Schedule**: Publer looks at your existing posting queue and calendar.
2. **Identify Slots**: Finds open time slots based on your account’s posting schedule.
3. **Optimize**: Uses audience engagement data to pick a high-impact time within your range.
4. **Schedule**: Creates the post at the selected time.

### Use Cases

* **Fill Gaps**: Keep your queue full without manual scheduling.
* **Engagement Boost**: Leverage data-driven timing for better reach.
* **Bulk Campaigns**: Auto-schedule large batches within a window.
* **Hands-Off Workflow**: Let Publer handle timing so you focus on content.

### Best Practices

* **Define Posting Schedule**: Ensure your account has active time slots configured.
* **Reasonable Ranges**: Provide a wide enough window for better slot selection.
* **Mix Methods**: Combine auto-scheduling with manual posts for flexibility.
* **Monitor Jobs**: Poll `/api/v1/job_status/{job_id}` to confirm success.

### Common Issues

<table><thead><tr><th width="177.87603759765625">Issue</th><th>Solution</th></tr></thead><tbody><tr><td>No available slots</td><td>Add or open time slots in your posting schedule within the date range.</td></tr><tr><td>Suboptimal timing</td><td>Expand the date range or refine your posting schedule.</td></tr><tr><td>Data insufficient</td><td>Post more content manually to build up engagement metrics.</td></tr></tbody></table>

### Related Topics

* [Publishing Methods](/docs/posting/create-posts/publishing-methods.md)
* [Scheduled Publishing](/docs/posting/create-posts/publishing-methods/manual-scheduling.md)
* [Recurring Posts](/docs/posting/create-posts/publishing-methods/recurring-posts.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://publer.com/docs/posting/create-posts/publishing-methods/auto-scheduling.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
