# Blotato

> Blotato publishing, account data, comments, schedules and video templates.

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

## Actions

### Create video

Start a video creation using a template. Use Get video creation to retrieve its status and result.

**Inputs**

- Template (`templateId`, text, required): Template Id.
- Inputs (`inputs`, object, required): Inputs.
- Prompt (`prompt`, text): Prompt.
- Is Draft (`isDraft`, true/false): Is Draft.
- Render (`render`, true/false, required): Render.
- Title (`title`, text): Title.
- Use Brand Kit (`useBrandKit`, true/false): Use Brand Kit.
- Brand Id (`brandId`, text): Brand Id.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "item": {
      "id": "example",
      "status": "queueing"
    }
  }
}
```

### Delete schedule

Delete schedule.

**Inputs**

- Id (`id`, text, required): The ID of the schedule to delete.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Get comment

Get comment.

**Inputs**

- Comment Id (`commentId`, text, required): Blotato id of the comment to fetch.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "accountId": "example",
    "author": {
      "name": "example",
      "username": "example"
    },
    "authorId": "example",
    "createdAt": "example",
    "errorCode": 1,
    "errorMessage": "example",
    "id": "example",
    "isAuthor": false,
    "parentCommentId": "example",
    "platform": "facebook",
    "platformCommentId": "example",
    "platformPostId": "example",
    "postId": "example",
    "status": "deleted",
    "text": "example"
  }
}
```

### Get current user

Get current user.

**Inputs**: None.

**Outputs**

- `data` (object): Current user information

**Example output**

```json
{
  "data": {
    "id": "example",
    "subscriptionPlan": "starter",
    "subscriptionStatus": "example"
  }
}
```

### Get post analytics

Get post analytics.

**Inputs**

- Id (`id`, text, required): The id of the published post.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "history": [],
    "lastError": "example",
    "lastFetchedAt": "example",
    "metrics": {
      "blueskyQuotesCount": "example",
      "blueskyRepostsCount": "example",
      "clicksCount": "example",
      "commentsCount": "example",
      "facebookBlueReelsPlaysCount": "example",
      "facebookFbReelsReplaysCount": "example",
      "facebookFbReelsTotalPlaysCount": "example",
      "facebookPostMediaViewsCount": "example",
      "facebookPostMediaViewsUniqueCount": "example",
      "facebookPostReactionsByType": {},
      "facebookPostVideoFollowersCount": "example",
      "facebookPostVideoLikesByReactionType": {},
      "facebookPostVideoSocialActionsByType": {},
      "facebookPostVideoViewTimeMsSum": "example",
      "facebookPostVideoWatchTimeMsAvg": "example",
      "facebookTotalVideoCompleteViewsAutoplayedCount": "example",
      "facebookTotalVideoCompleteViewsClickedToPlayCount": "example",
      "facebookTotalVideoCompleteViewsCount": "example",
      "facebookTotalVideoCompleteViewsOrganicCount": "example",
      "facebookTotalVideoCompleteViewsOrganicUniqueCount": "example",
      "facebookTotalVideoCompleteViewsPaidCount": "example",
      "facebookTotalVideoCompleteViewsPaidUniqueCount": "example",
      "facebookTotalVideoCompleteViewsUniqueCount": "example",
      "facebookTotalVideoReactionsByType": {},
      "facebookTotalVideoStoriesByActionType": {},
      "facebookTotalVideoViewTimeMsByAgeBucketAndGender": {},
      "facebookTotalVideoViewTimeMsByRegionId": {},
      "facebookTotalVideoViewTimeMsSum": "example",
      "facebookTotalVideoViewTimeOrganicMsSum": "example",
      "facebookTotalVideoViewTimePaidMsSum": "example",
      "facebookTotalVideoViews10sAutoplayedCount": "example",
      "facebookTotalVideoViews10sClickedToPlayCount": "example",
      "facebookTotalVideoViews10sCount": "example",
      "facebookTotalVideoViews10sOrganicCount": "example",
      "facebookTotalVideoViews10sPaidCount": "example",
      "facebookTotalVideoViews10sSoundOnCount": "example",
      "facebookTotalVideoViews10sUniqueCount": "example",
      "facebookTotalVideoViews15sCount": "example",
      "facebookTotalVideoViews60sExcludesShorterCount": "example",
      "facebookTotalVideoViewsAutoplayedCount": "example",
      "facebookTotalVideoViewsByDistributionType": {},
      "facebookTotalVideoViewsClickedToPlayCount": "example",
      "facebookTotalVideoViewsCount": "example",
      "facebookTotalVideoViewsSoundOnCount": "example",
      "facebookTotalVideoViewsUniqueCount": "example",
      "facebookTotalVideoWatchTimeMsAvg": "example",
      "followsCount": "example",
      "impressionsCount": "example",
      "interactionsSum": "example",
      "likesCount": "example",
      "linkedinFirstLevelCommentsCount": "example",
      "linkedinReactionsByType": {},
      "navigationsCount": "example",
      "pinterestPinClicksCount": "example",
      "pinterestReactionsCount": "example",
      "pinterestSaveRate": 1.0,
      "pinterestVideo10sViewsCount": "example",
      "pinterestVideoMrcViewsCount": "example",
      "pinterestVideoP95ViewsCount": "example",
      "pinterestVideoV50WatchTimeMsSum": "example",
      "playsCount": "example",
      "profileActivityCount": "example",
      "profileVisitsCount": "example",
      "reachCount": "example",
      "repliesCount": "example",
      "savesCount": "example",
      "sharesCount": "example",
      "threadsQuotesCount": "example",
      "threadsRepostsCount": "example",
      "twitterPerMediaVideoPlayback25Count": [],
      "twitterPerMediaVideoPlayback50Count": [],
      "twitterPerMediaVideoPlayback75Count": [],
      "twitterPerMediaVideoPlaybackCompleteCount": [],
      "twitterPerMediaVideoPlaybackStartCount": [],
      "twitterPerMediaVideoViewsCount": [],
      "twitterQuotesCount": "example",
      "twitterRetweetsCount": "example",
      "viewTimeMsSum": "example",
      "viewsCount": "example",
      "watchTimeMsAvg": "example",
      "youtubeAnnotationClickThroughRate": 1.0,
      "youtubeAnnotationClickableImpressionsCount": "example",
      "youtubeAnnotationClicksCount": "example",
      "youtubeAnnotationClosableImpressionsCount": "example",
      "youtubeAnnotationCloseRate": 1.0,
      "youtubeAnnotationClosesCount": "example",
      "youtubeAnnotationImpressionsCount": "example",
      "youtubeAverageViewPercentage": 1.0,
      "youtubeCardClickRate": 1.0,
      "youtubeCardClicksCount": "example",
      "youtubeCardImpressionsCount": "example",
      "youtubeCardTeaserClickRate": 1.0,
      "youtubeCardTeaserClicksCount": "example",
      "youtubeCardTeaserImpressionsCount": "example",
      "youtubeDislikesCount": "example",
      "youtubeEngagedViewsCount": "example",
      "youtubeRedViewTimeMsSum": "example",
      "youtubeRedViewsCount": "example",
      "youtubeSubscribersLostCount": "example",
      "youtubeVideosAddedToPlaylistsCount": "example",
      "youtubeVideosRemovedFromPlaylistsCount": "example"
    },
    "platform": "twitter",
    "publishedPostId": "example"
  }
}
```

### Get post submission

Get post submission.

**Inputs**

- Post Submission Id (`postSubmissionId`, text, required): The ID of the post submission to check.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "errorMessage": "example",
    "postSubmissionId": "example",
    "publicUrl": "example",
    "scheduledTime": "example",
    "status": "in-progress"
  }
}
```

### Get published post

Get published post.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "publishedPost": {
      "content": "example",
      "createdAt": "example",
      "id": "example",
      "mediaUrls": [],
      "platform": "twitter",
      "postUrl": "example",
      "rawPost": {
        "accountId": "example",
        "content": {
          "additionalPosts": [],
          "mediaUrls": [],
          "platform": "twitter",
          "text": "example"
        },
        "target": {
          "targetType": "webhook",
          "url": "example"
        }
      }
    }
  }
}
```

### Get schedule

Get schedule.

**Inputs**

- Id (`id`, text, required): Id.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "schedule": {
      "account": {
        "id": "example",
        "name": "example",
        "profileImageUrl": "example",
        "subId": "example",
        "subaccountId": "example",
        "subaccountName": "example",
        "username": "example"
      },
      "draft": {
        "accountId": "example",
        "content": {
          "additionalPosts": [],
          "mediaUrls": [],
          "platform": "twitter",
          "text": "example"
        },
        "target": {
          "targetType": "webhook",
          "url": "example"
        }
      },
      "id": "example",
      "scheduledAt": "example"
    }
  }
}
```

### Get usage

Get usage.

**Inputs**: None.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "accounts": 1,
    "contacts": 1,
    "contactsLimit": "unlimited"
  }
}
```

### Get video creation

Get video creation.

**Inputs**

- Id (`id`, text, required): Video ID

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "item": {
      "createdAt": "example",
      "error": "example",
      "errorMetadata": {
        "creditsRemaining": 1.0,
        "creditsRequired": 1.0,
        "numAiOverlays": 1.0,
        "numDraftOverlays": 1.0
      },
      "id": "example",
      "imageUrls": [],
      "mediaUrl": "example",
      "status": "queueing"
    }
  }
}
```

### List accounts

List accounts.

**Inputs**

- Platform (`platform`, text): Social media platform. One of: `twitter`, `instagram`, `linkedin`, `facebook`, `tiktok`, `pinterest`, `threads`, `bluesky`, `youtube`, `slack`, `other`.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### List comments

List comments.

**Inputs**

- Limit (`limit`, number): Maximum number of comments to return. Defaults to 50. From 1 to 250.
- Cursor (`cursor`, text): Opaque cursor returned by a previous call. Pass it to fetch the next page.
- Platform (`platform`, list): Filter comments by platform. Pass multiple values to include any of them. One or more of: `facebook`, `instagram`.
- Account (`accountId`, text): Filter to comments belonging to a single connected account.
- Parent Comment Id (`parentCommentId`, text): Filter to direct replies to a single comment.
- Post Id (`postId`, text): Filter to comments on a single Blotato-published post. Accepts either the published post ID or the post submission ID returned when the post was published.
- Since (`since`, date and time): Only include comments created on or after this ISO 8601 timestamp. Omit to apply no lower bound.
- Until (`until`, date and time): Only include comments created on or before this ISO 8601 timestamp. Omit to apply no upper bound.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "items": []
  }
}
```

### List posts

List posts.

**Inputs**

- Since (`since`, date and time): Only include posts whose post time is on or after this ISO 8601 timestamp. Defaults to 7 days ago.
- Until (`until`, date and time): Only include posts whose post time is on or before this ISO 8601 timestamp. Defaults to 7 days from now.
- Limit (`limit`, number): Maximum number of posts to return. Defaults to 50. From 1 to 250.
- Cursor (`cursor`, text): Opaque cursor returned by a previous call. Pass it to fetch the next page.
- Status (`status`, list): Filter posts by status. Pass multiple values to include any of them. Omit to include all statuses. One or more of: `scheduled`, `published`, `failed`.
- Platform (`platform`, list): Filter posts by social media platform. Pass multiple values to include any of them. Omit to include all platforms. One or more of: `twitter`, `instagram`, `linkedin`, `facebook`, `tiktok`, `pinterest`, `threads`, `bluesky`, `youtube`, `slack`, `other`.
- Source (`source`, text): Which published posts to include: 'blotato' (default) returns only posts published through Blotato; 'all' also includes any externally-published posts that were brought into Blotato. One of: `blotato`, `all`.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "cursor": "example",
    "items": []
  }
}
```

### List published posts

List published posts.

**Inputs**

- Query (`query`, text): Query.
- Platform (`platform`, text): Platform.
- Account Id (`accountId`, text): Account Id.
- Sort By (`sortBy`, text): Sort By. One of: `newest`, `oldest`.
- Offset (`offset`, number): Offset. At least 0.
- Limit (`limit`, number): Limit. From 1 to 100.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "count": 1,
    "items": []
  }
}
```

### List schedules

List schedules.

**Inputs**

- Limit (`limit`, number): Limit.
- Cursor (`cursor`, text): Cursor.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "count": "example",
    "cursor": "example",
    "items": []
  }
}
```

### List subaccounts

List subaccounts.

**Inputs**

- Account (`accountId`, text, required): Account Id.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### List video templates

List video templates.

**Inputs**

- Fields (`fields`, text): Comma separated list of fields to include. If provided, only these fields will be included in the response for each template. If omitted, only id, title, and description are included. Id is always included in the response.
- Search (`search`, text): Search regex term to filter templates by title or description. Has no effect if "id" is also provided.
- Id (`id`, text): If provided, only the template with this ID will be returned.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Publish post

Submit a post for publishing or scheduling. Returns a submission ID; use Get post submission to verify its final status.

**Inputs**

- Account (`account_id`, text, required): Account id.
- Platform (`platform`, text, required): Platform. One of: `twitter`, `instagram`, `linkedin`, `facebook`, `tiktok`, `pinterest`, `threads`, `bluesky`, `youtube`, `slack`, `other`.
- Text (`text`, text, required): Text.
- Media urls (`media_urls`, list): Media urls.
- Target options (`target_options`, object): Target options.
- Scheduled time (`scheduled_time`, date and time): Scheduled time.

**Outputs**

- `data` (object): Submitted

**Example output**

```json
{
  "data": {
    "postSubmissionId": "example",
    "scheduledTime": "example"
  }
}
```

### Update schedule

Update schedule.

**Inputs**

- Id (`id`, text, required): The ID of the schedule to update.
- Patch (`patch`, object, required): The fields to update in the schedule.

**Outputs**

- `data` (object): Api result.

**Example output**

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

### Upload media

Upload media.

**Inputs**

- Url (`url`, text, required): The URL of the media to upload.

**Outputs**

- `data` (object): Api result.

**Example output**

```json
{
  "data": {
    "id": "example",
    "url": "example"
  }
}
```
