# BulkPublish

> Create and schedule social posts, manage labels, and read publishing activity and analytics.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/bulkpublish

## Actions

### Create label

Create label.

**Inputs**

- Name (`name`, text, required): 1 to 100 characters, trimmed. Must be unique within the org for the same `type` (409 DUPLICATE_NAME otherwise).
- Color (`color`, text): Hex colour, `#RGB` or `#RRGGBB`, e.g. `#3B82F6`. Default `#6366f1`. Any other format is rejected with 400. Default: `#6366f1`.
- Type (`type`, text): Which surface the label organizes: `post`, `media`, or `inbox` for Inbox conversations. Default `post`. Any value outside this list is rejected with 400. One of: `post`, `media`, `inbox`. Default: `post`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "id": 1,
    "name": "example"
  }
}
```

### Create post

Create a draft or schedule a post across selected channels.

**Inputs**

- Content (`content`, text): Post text content (optional if media attached). LinkedIn mentions: write @[Display Name](urn:li:organization:ID) to mention a Page or @[Display Name](urn:li:person:ID) to mention a person; the token publishes as a real mention on LinkedIn and as plain @Display Name on every other channel of the same post, and counts as @Display Name toward every character limit. GET /api/channels/{id}/mentions?q=<vanity-name> on a LinkedIn channel returns ready-made tokens
- Channels (`channels`, list, required): Required. Target channels to publish to
- Status (`status`, text): Optional. Default: draft. One of: `draft`, `scheduled`. Default: `draft`.
- Media files (`media_files`, list): Optional. Media file IDs from POST /api/media
- Scheduled date and time (`scheduled_at`, date and time): Optional. Required when status is 'scheduled'
- Timezone (`timezone`, text): Optional. IANA timezone (default: UTC). Default: `UTC`.
- Labels (`labels`, list): Optional. Label IDs to attach
- Post format (`post_format`, text): Optional. Default: post. One of: `post`, `video`, `reel`, `story`, `carousel`, `thread`. Default: `post`.
- Request approval (`request_approval`, true/false): Optional. Set true to hold a scheduled post for team approval (approvalStatus becomes 'pending'). Forced on server-side for roles without post:publish (contributors), regardless of this flag. Default: `false`.
- Publish when approved (`publish_when_approved`, true/false): Optional. Set true on a post that waits for approval when it should go out as soon as it is approved, even if that is after its scheduled time (the "publish now" of someone who needs approval: schedule it for now, with requestApproval or a contributor role, and send this). It decides what an approval that arrives more than 15 minutes after the scheduled time does: true publishes it immediately; false (the default) approves it but returns it to draft for a. Default: `false`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "id": 1,
    "status": "example"
  }
}
```

### Delete label

Delete label.

**Inputs**

- Label ID (`label_id`, number, required): Label ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### Delete post

Delete post.

**Inputs**

- Post ID (`post_id`, number, required): Post ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### Edit a post

Edit the text, draft status or schedule of an existing post. Keep its channels, labels and platform settings.

**Inputs**

- Post ID (`post_id`, number, required): Post ID.
- Post text (`content`, text): New post text.
- Status (`status`, text): Choose draft to unschedule the post, or scheduled to send it later. One of: `draft`, `scheduled`.
- Scheduled date and time (`scheduled_at`, date and time): When to publish the scheduled post.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "approvalStatus": "none",
    "approvedAt": "example",
    "approvedBy": "example",
    "approver": {
      "id": "example",
      "image": "example",
      "name": "example"
    },
    "assignedAt": "example",
    "assignedUserId": "example",
    "assignee": {
      "id": "example",
      "image": "example",
      "name": "example"
    },
    "author": {
      "id": "example",
      "image": "example",
      "name": "example"
    },
    "autoPlugEnabled": false,
    "autoPlugFired": false,
    "autoPlugText": "example",
    "autoPlugThreshold": 1,
    "autoRepostEnabled": false,
    "autoRepostFired": false,
    "autoRepostThreshold": 1,
    "content": "example",
    "createdAt": "example",
    "deleteMediaAfterPublish": false,
    "hasShareLink": false,
    "id": 1,
    "labels": [],
    "mediaFiles": [],
    "platformContent": {},
    "platformMediaFileIds": {},
    "platformSpecific": {},
    "postFormat": "post",
    "postPlatforms": [],
    "postTypeOverrides": {},
    "publishWhenApproved": false,
    "publishedAt": "example",
    "recurringSchedule": {},
    "recurringScheduleId": 1,
    "rejectedBy": "example",
    "rejectionReason": "example",
    "scheduledAt": "example",
    "status": "draft",
    "threadMediaFiles": [],
    "threadParts": [],
    "timezone": "example",
    "updatedAt": "example",
    "userId": "example"
  }
}
```

### Get analytics post history

Get analytics post history.

**Inputs**

- Post ID (`post_id`, number, required): The post id.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### Get analytics summary

Get analytics summary.

**Inputs**

- Start date (`start_date`, date, required): Start date (YYYY-MM-DD)
- End date (`end_date`, date, required): End date (YYYY-MM-DD)
- Tz (`tz`, text): IANA timezone (e.g. `Asia/Karachi`) used for day boundaries and per-day bucketing. Defaults to `UTC`. Invalid names fall back to UTC. Default: `UTC`.
- Channel IDs (`channel_ids`, text): Comma-separated channel ids. Only post_platform rows on these channels are counted. Combines with `platforms`, `labelIds`, `postFormat` and `mediaType` (all must match).
- Label IDs (`label_ids`, text): Comma-separated label ids. A post matches when it carries ANY of them.
- Post format (`post_format`, text): `post` (single) or `thread`. Reads `posts.post_format`. One of: `post`, `thread`.
- Media type (`media_type`, text): `text` (no media), `image` or `video`, decided by the post's FIRST media file (`media_files.mime_type`). One of: `text`, `image`, `video`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### Get channel

Get channel.

**Inputs**

- Channel (`channel_id`, number, required): Channel ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "id": 1
  }
}
```

### Get channel health

Get channel health.

**Inputs**

- Channel (`channel_id`, number, required): Channel ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### Get post

Get post.

**Inputs**

- Post ID (`post_id`, number, required): Post ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "approvalStatus": "none",
    "approvedAt": "example",
    "approvedBy": "example",
    "approver": {
      "id": "example",
      "image": "example",
      "name": "example"
    },
    "assignedAt": "example",
    "assignedUserId": "example",
    "assignee": {
      "id": "example",
      "image": "example",
      "name": "example"
    },
    "author": {
      "id": "example",
      "image": "example",
      "name": "example"
    },
    "autoPlugEnabled": false,
    "autoPlugFired": false,
    "autoPlugText": "example",
    "autoPlugThreshold": 1,
    "autoRepostEnabled": false,
    "autoRepostFired": false,
    "autoRepostThreshold": 1,
    "content": "example",
    "createdAt": "example",
    "deleteMediaAfterPublish": false,
    "hasShareLink": false,
    "id": 1,
    "labels": [],
    "mediaFiles": [],
    "platformContent": {},
    "platformMediaFileIds": {},
    "platformSpecific": {},
    "postFormat": "post",
    "postPlatforms": [],
    "postTypeOverrides": {},
    "publishWhenApproved": false,
    "publishedAt": "example",
    "recurringSchedule": {},
    "recurringScheduleId": 1,
    "rejectedBy": "example",
    "rejectionReason": "example",
    "scheduledAt": "example",
    "status": "draft",
    "threadMediaFiles": [],
    "threadParts": [],
    "timezone": "example",
    "updatedAt": "example",
    "userId": "example"
  }
}
```

### Get schedule

Get schedule.

**Inputs**

- Schedule ID (`schedule_id`, number, required): Schedule ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "channelIds": [],
    "contentTemplate": "example",
    "dayOfMonth": 1,
    "dayOfWeek": 1,
    "frequency": "daily",
    "id": 1,
    "isActive": false,
    "name": "example",
    "nextRunAt": "example",
    "platformMediaFileIds": {},
    "requireApproval": false,
    "timeOfDay": "example",
    "timezone": "example"
  }
}
```

### List channels

List channels.

**Inputs**

- Active (`active`, true/false): Filter by active status (default: true). `false` returns every active channel plus up to 100 disconnected ones, most recently updated first. Default: `true`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "capabilities": {
      "canApprovePosts": false,
      "canCreatePosts": false,
      "canPublishPosts": false
    },
    "channels": []
  }
}
```

### List labels

List labels.

**Inputs**

- Type (`type`, text): Filter by label type: `post`, `media` or `inbox` (labels for Inbox conversations). Omitted, or an unknown value: every label. Labels are org-wide and one quota counts every type together (see `GET /api/quotas/usage`). One of: `post`, `media`, `inbox`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### List media

List media.

**Inputs**

- Page (`page`, number): Page number (default: 1). At least 1. Default: `1`.
- Limit (`limit`, number): Items per page (default: 20). At least 1. Default: `20`.
- Search (`search`, text): Search by filename
- Label IDs (`label_ids`, text): Comma-separated label IDs
- Type (`type`, text): Filter by media kind: `image`, `video` or `document` (PDF, Word and PowerPoint files). Omit for all files. One of: `image`, `video`, `document`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### List platforms

List platforms.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "platforms": []
  }
}
```

### List post metrics

List post metrics.

**Inputs**

- Post ID (`post_id`, number, required): Post ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "platforms": [],
    "postId": 1,
    "totals": {}
  }
}
```

### List posts

List posts.

**Inputs**

- Page (`page`, number): Page number (default: 1). At least 1. Default: `1`.
- Limit (`limit`, number): Items per page, max 500 (default: 20). From 1 to 500. Default: `20`.
- Status (`status`, text): Filter by post status. A value outside this list answers 400; it is not a post status that happens to match nothing. Note that `published` also covers `partial` (the post went live, just not on every channel), and that team approval is a separate axis , use `approvalStatus`, not a status value, to find posts awaiting review. One of: `draft`, `scheduled`, `publishing`, `published`, `processing`, `failed`, `partial`.
- Channel (`channel_id`, number): Filter by channel ID
- Label IDs (`label_ids`, text): Comma-separated label IDs to filter by
- Label mode (`label_mode`, text): How to combine label filters (default: or). One of: `or`, `and`. Default: `or`.
- Search (`search`, text): Search in post content
- Start date (`start_date`, date): Filter posts created on or after this date
- End date (`end_date`, date): Filter posts created on or before this date
- Scheduled from (`scheduled_from`, date): Filter posts scheduled on or after this date
- Scheduled to (`scheduled_to`, date): Filter posts scheduled on or before this date
- Approval status (`approval_status`, text): Filter by team approval state (e.g. 'pending' for the approval queue). Orthogonal to `status`: a post can be `scheduled` and `pending` at once. A value outside this list answers 400. One of: `none`, `pending`, `approved`, `rejected`.
- Order (`order`, text): Direction of the timeline sort. Posts are ordered by the timestamp that matters for each one , when it published, else when it is due, else when it was created. `desc` (the default) returns the most recent first. `asc` returns the earliest first, which is what you want when reading the next few scheduled posts rather than the furthest-out ones. Any other value answers 400 rather than quietly falling back to `desc`. One of: `asc`, `desc`. Default: `desc`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "limit": 1,
    "page": 1,
    "posts": [],
    "total": 1,
    "totalPages": 1
  }
}
```

### List schedules

List schedules.

**Inputs**: None.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {
    "schedules": []
  }
}
```

### Publish post

Publish post.

**Inputs**

- Post ID (`post_id`, number, required): Post ID.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```

### Retry post

Retry post.

**Inputs**

- Post ID (`post_id`, number, required): Post ID.
- Republish (`republish`, true/false): Explicit opt-in to also retry platforms in status 'unconfirmed'. Their publish may have already gone through; retrying can create a duplicate post. Default: `false`.

**Outputs**

- `data` (object): Response.

**Example output**

```json
{
  "data": {}
}
```
