Schedule posts for future publication across one or more social networks using the Publer API.

### Endpoint

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

### Request Headers

| Header                   | Required | Description                                      |
|--------------------------|----------|--------------------------------------------------|
| Authorization            | Yes      | `Bearer-API YOUR_API_KEY`                       |
| Publer-Workspace-Id     | Yes      | Workspace ID for scheduling posts                |
| Content-Type             | Yes      | `application/json`                               |
| Accept                   | No       | `application/json` (default)                    |

### Request Body

Include a valid ISO 8601 `scheduled_at` timestamp under each account:

```
{
  "bulk": {
    "state": "scheduled",
    "posts": [
      {
        "networks": {
          // network provider as key, e.g., facebook, twitter, etc
          "facebook": {
            "type": "status",
            "text": "This post was scheduled through the Publer API! #ScheduledContent"
          }
        },
        "accounts": [
          {
            "id": "66db83154e299efa19a2d8eb",
            "scheduled_at": "2025-06-01T09:00:00Z"
          }
        ]
      }
    ]
  }
}
```

### Sample Request

```
curl -X POST https://app.publer.com/api/v1/posts/schedule \
  -H "Authorization: Bearer-API YOUR_API_KEY" \
  -H "Publer-Workspace-Id: YOUR_WORKSPACE_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "bulk": {
      "state": "scheduled",
      "posts": [{
        "networks": {
          "facebook": {
            "type": "status",
            "text": "This post was scheduled through the Publer API! #ScheduledContent"
          }
        },
        "accounts": [{
          "id": "66db83154e299efa19a2d8eb",
          "scheduled_at": "2025-06-01T09:00:00Z"
        }]
      }]
    }
  }'
```

### Sample Response

**Status**: 200 OK

```
{
  "job_id": "6810dec617eae6d55d7a5e5b"
}
```

### Key Fields

- **state**  
  Must be set to `"scheduled"` for future publishing.

- **accounts[].scheduled_at**  
  ISO 8601 timestamp (with `Z` or offset) specifying when to publish.

- **networks**  
  Per-platform content configuration (e.g., `facebook`, `twitter`, `linkedin`).

### Important Considerations

#### Time Formats

- Use full ISO 8601 format, including timezone (e.g., `2025-06-01T09:00:00+02:00`).

- Timestamps must be at least 1 minute in the future.

### Best Practices

- **Buffer Time**: Space posts 1–2 minutes apart to avoid collisions.

- **Timezone Awareness**: Schedule using your audience’s local time.

- **Batch Scheduling**: Combine related posts in a single request for efficiency.

- **Verify**: Poll `/api/v1/job_status/{job_id}` to confirm scheduling success.
