# Postiz

> Manage social posts and read channel and post analytics.

App · 12 actions. Web page: https://docs.lodol.com/docs/integrations/postiz

## Actions

### Change a post’s scheduling status

Change a post’s scheduling status.

**Inputs**

- Post ID (`post_id`, text, required): Post ID
- Status (`status`, text, required): New status for the post. One of: `draft`, `schedule`.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "id": "example",
    "state": "DRAFT"
  }
}
```

### Create or schedule a post

Create or schedule a post.

**Inputs**

- Type (`type`, text, required): Post type. One of: `draft`, `schedule`, `now`.
- Date (`date`, date and time, required): Publish date in UTC ISO format
- Short link (`short_link`, true/false, required): Whether to use short links
- Order (`order`, text): Order of posts
- Inter (`inter`, number): Interval between posts
- Tags (`tags`, list, required): Tags.
- Posts (`posts`, list): Required if type is not 'draft'

**Outputs**

- `data` (list): The response from Postiz.

**Example output**

```json
{
  "data": [
    {
      "integration": "example",
      "postId": "example"
    }
  ]
}
```

### Delete a post group

Delete a post group.

**Inputs**

- Post ID (`post_id`, text, required): Post ID to delete

**Outputs**

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

**Example output**

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

### Find the next publishing slot

Find the next publishing slot.

**Inputs**

- Channel (`channel_id`, text, required): Integration ID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "date": "example"
  }
}
```

### Get post analytics

Get post analytics.

**Inputs**

- Post ID (`post_id`, text, required): Post ID
- Date (`date`, text, required): Number of days to look back for analytics data (e.g. 7, 30, 90)

**Outputs**

- `data` (list): The response from Postiz.

**Example output**

```json
{
  "data": [
    {
      "aggregation": "sum",
      "average": true,
      "breakdowns": [
        {}
      ],
      "data": [
        {}
      ],
      "label": "example",
      "notDaily": true,
      "percentageChange": 1,
      "previous": {
        "from": "example",
        "to": "example",
        "total": "example"
      },
      "ratio": true,
      "total": "example"
    }
  ]
}
```

### Get social channel analytics

Get social channel analytics.

**Inputs**

- Channel (`channel_id`, text, required): Integration ID
- Date (`date`, text, required): Number of days to look back for analytics data (e.g. 7, 30, 90)

**Outputs**

- `data` (list): The response from Postiz.

**Example output**

```json
{
  "data": [
    {
      "aggregation": "sum",
      "average": true,
      "breakdowns": [
        {}
      ],
      "data": [
        {}
      ],
      "label": "example",
      "notDaily": true,
      "percentageChange": 1,
      "previous": {
        "from": "example",
        "to": "example",
        "total": "example"
      },
      "ratio": true,
      "total": "example"
    }
  ]
}
```

### Get social channel settings

Get social channel settings.

**Inputs**

- Channel (`channel_id`, text, required): The integration ID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "output": {
      "maxLength": 1,
      "rules": "example",
      "settings": {},
      "tools": [
        {}
      ]
    }
  }
}
```

### Get the connected workspace

Get the connected workspace.

**Inputs**: None.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "organization": {
      "id": "example",
      "name": "example"
    },
    "user": {
      "id": "example",
      "name": "example",
      "picture": "example"
    }
  }
}
```

### List channel groups

List channel groups.

**Inputs**: None.

**Outputs**

- `data` (list): The response from Postiz.

**Example output**

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

### List posts in a date range

List posts in a date range.

**Inputs**

- Start date (`start_date`, date and time, required): Start date in UTC ISO format
- End date (`end_date`, date and time, required): End date in UTC ISO format
- Customer (`customer`, text): Filter by customer ID

**Outputs**

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

**Example output**

```json
{
  "data": {
    "posts": [
      {
        "content": "example",
        "error": "example",
        "id": "example",
        "integration": {},
        "publishDate": "example",
        "releaseURL": "example",
        "settings": {},
        "state": "QUEUE"
      }
    ]
  }
}
```

### List social channels

List social channels.

**Inputs**

- Group (`group`, text): Filter integrations by customer (group) ID. Returns only channels assigned to the given group.

**Outputs**

- `data` (list): The response from Postiz.

**Example output**

```json
{
  "data": [
    {
      "customer": {
        "id": "example",
        "name": "example"
      },
      "disabled": true,
      "id": "example",
      "identifier": "x",
      "name": "example",
      "picture": "example",
      "profile": "example"
    }
  ]
}
```

### Upload media from a URL

Upload media from a URL.

**Inputs**

- URL (`url`, text, required): URL of the file to upload
- Adjust (`adjust`, true/false): Adjust.

**Outputs**

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

**Example output**

```json
{
  "data": {
    "createdAt": "example",
    "id": "example",
    "name": "example",
    "organizationId": "example",
    "path": "example",
    "status": "ready",
    "updatedAt": "example"
  }
}
```
