# Ayrshare

> Publish across linked social accounts, track posts and short links, and monitor webhook events.

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

## Actions

### Add comment

Post a comment on selected social networks for an Ayrshare post.

**Inputs**

- Post ID (`post_id`, text, required): Enter the Ayrshare post ID.
- Comment (`comment`, text, required): Enter the comment text.
- Platforms (`platforms`, list, required): Choose the linked accounts to comment on. One or more of: `bluesky`, `facebook`, `instagram`, `linkedin`, `reddit`, `tiktok`, `twitter`, `youtube`.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### Check media URL

Check whether Ayrshare can reach a public media URL.

**Inputs**

- Media URL (`media_url`, text, required): Enter the public media URL.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "contentType": "example",
    "status": "example",
    "statusCode": 1
  }
}
```

### Create short link

Create a tracked short link to an HTTPS URL.

**Inputs**

- URL (`url`, text, required): Enter the HTTPS destination URL.
- UTM source (`utm_source`, text): Enter the campaign's traffic source.
- UTM campaign (`utm_campaign`, text): Enter the campaign name.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "id": "example",
    "originalUrl": "example",
    "shortUrl": "example"
  }
}
```

### Delete post

Cancel a scheduled post or remove a published post from its networks.

**Inputs**

- Post ID (`post_id`, text, required): Enter the Ayrshare post ID.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### Get account analytics

Read account metrics for selected linked social networks.

**Inputs**

- Platforms (`platforms`, list, required): Choose which social networks to include. One or more of: `bluesky`, `facebook`, `gmb`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `threads`, and 3 more.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### Get media metadata

Read dimensions, encoding, and duration for a public media URL.

**Inputs**

- URL (`url`, text, required): Enter the public media URL.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### Get post

Read a post and its current publishing status.

**Inputs**

- Post ID (`post_id`, text, required): Enter the Ayrshare post ID.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "id": "example",
    "platforms": [
      "example"
    ],
    "post": "example",
    "postIds": [
      {}
    ],
    "status": "example"
  }
}
```

### Get post analytics

Read engagement and performance metrics for an Ayrshare post.

**Inputs**

- Post ID (`post_id`, text, required): Enter the Ayrshare post ID.
- Platforms (`platforms`, list): Choose which social networks to include. One or more of: `bluesky`, `facebook`, `gmb`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `threads`, and 3 more.
- Daily (`daily`, true/false): Include a daily breakdown when available.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### Get post history

Read the publishing history of one Ayrshare post.

**Inputs**

- Post ID (`post_id`, text, required): Enter the Ayrshare post ID.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "id": "example",
    "platforms": [
      "example"
    ],
    "post": "example",
    "postIds": [
      {}
    ],
    "status": "example"
  }
}
```

### Get profile and connected accounts

Read linked social accounts and usage for the connected Ayrshare profile.

**Inputs**

- Instagram details (`instagram_details`, true/false): Include additional Instagram account details.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "activeSocialAccounts": [
      "example"
    ],
    "displayNames": [
      {}
    ]
  }
}
```

### Get short link analytics

Read tracking metrics for a short link.

**Inputs**

- Link ID (`link_id`, text, required): Enter the ID from Create short link.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### List media gallery

List images and videos uploaded to the media gallery.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### List post comments

Get comments for an Ayrshare post.

**Inputs**

- Post ID (`post_id`, text, required): Enter the Ayrshare post ID.
- Platform (`platform`, text): Only get comments from this social network. One of: `bluesky`, `facebook`, `gmb`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `threads`, and 3 more.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### List post history

Read posts sent or scheduled through Ayrshare, newest first.

**Inputs**

- Limit (`limit`, number): Maximum number of posts to return. From 1 to 1000.
- Status (`status`, text): Choose which post status to list. One of: `success`, `error`, `processing`, `pending`, `paused`, `deleted`, `awaiting approval`.
- Start time (`start_time`, date and time): Include posts from this date and time.
- End time (`end_time`, date and time): Include posts through this date and time.
- Last days (`last_days`, number): Limit to this many days. Use zero for the full history. At least 0.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "history": [
      {
        "id": "example",
        "platforms": [
          "example"
        ],
        "post": "example",
        "postIds": [
          {}
        ],
        "status": "example"
      }
    ],
    "lastUpdated": "example"
  }
}
```

### List registered webhooks

List webhook destinations for the connected profile.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

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

### List webhook deliveries

Read recent webhook events, grouped by event type.

**Inputs**

- Action type (`action_type`, text): Choose one event type, or leave empty for all types. One of: `social`, `scheduled`, `messages`, `feed`, `batch`, `mentions`, `comments`, `automations`, `demo`, `suspended`, `ads`.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "ads": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "automations": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "batch": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "comments": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "demo": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "feed": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "mentions": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "messages": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "scheduled": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "social": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ],
    "suspended": [
      {
        "action": "example",
        "created": "example",
        "hookId": "example"
      }
    ]
  }
}
```

### Publish or schedule post

Send a post to selected linked networks now or at a future time.

**Inputs**

- Post (`post`, text): Enter the post text.
- Platforms (`platforms`, list, required): Choose the linked accounts to publish to. One or more of: `bluesky`, `facebook`, `gmb`, `instagram`, `linkedin`, `pinterest`, `reddit`, `snapchat`, `telegram`, `threads`, and 3 more.
- Media URLS (`media_urls`, list): Enter the public image or video URLs.
- Schedule date (`schedule_date`, date and time): Choose a future date and time, or leave empty to publish now.
- Youtube title (`youtube_title`, text): Enter the video title when publishing to YouTube.
- Pinterest board ID (`pinterest_board_id`, text): Enter the board ID when publishing to Pinterest.
- Is video (`is_video`, true/false): Treat the supplied media as video.
- Shorten links (`shorten_links`, true/false): Shorten the links in the post.
- Requires approval (`requires_approval`, true/false): Hold the post for approval.
- Idempotency key (`idempotency_key`, text): Set a distinct key per post to prevent duplicates on repeat calls.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "id": "example",
    "postIds": [
      {}
    ],
    "status": "example"
  }
}
```

### Register webhook destination

Send one type of Ayrshare event to an existing public HTTPS receiver.

**Inputs**

- Action type (`action_type`, text, required): Choose the event type to send. One of: `social`, `scheduled`, `messages`, `feed`, `batch`, `mentions`, `comments`, `automations`, `demo`, `suspended`, `ads`.
- URL (`url`, text, required): Enter the HTTPS URL that receives the events.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "action": "example",
    "refId": "example",
    "status": "example"
  }
}
```

### Unregister webhook destination

Stop webhook deliveries for one event type on this profile.

**Inputs**

- Action type (`action_type`, text, required): Choose the event type to remove. One of: `social`, `scheduled`, `messages`, `feed`, `batch`, `mentions`, `comments`, `automations`, `demo`, `suspended`, `ads`.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "action": "example",
    "refId": "example",
    "status": "example"
  }
}
```

### Update post settings

Update notes or reschedule a pending post.

**Inputs**

- Post ID (`post_id`, text, required): Enter the Ayrshare post ID.
- Notes (`notes`, text): Enter internal notes for the post.
- Schedule date (`schedule_date`, date and time): Choose a new future publication time.

**Outputs**

- `data` (object): The response from Ayrshare.

**Example output**

```json
{
  "data": {
    "id": "example",
    "postIds": [
      {}
    ],
    "status": "example"
  }
}
```
