> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Unipile: Create Post

> Publishes a public post (or repost) from the customer’s connected LinkedIn or Instagram account. Image and video uploads are not supported through Deepline.

Publishes a public post (or repost) from the customer’s connected LinkedIn or Instagram account.

> [!NOTE]
>
> Tool ID: `unipile_create_post`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'unipile_create_post',
  {
    "account_id": "123456789",
    "text": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute unipile_create_post --input '{
  "account_id": "123456789",
  "text": "example"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "object": "PostCreated",
    "post_id": "post_123"
  }
}
```

Use `deepline describe unipile_create_post --json` for the latest machine-readable contract.

## Input reference

Publish a post.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.account_id` | `string` | Yes | — | The id of the account to perform the request from. Minimum length: 1. |
| `payload.text` | `string` | Yes | — | `Linkedin`: You can add a mention by inserting the index of the corresponding entry from the mentions array between two double braces. Example: Hey \{\{0}}, check this out ! `Instagram`: To mention a user, use the @ symbol followed by their username. On a story, each mention is drawn on the media as a tappable `@username` sticker and the user is notified. The surrounding text is not displayed. A username that matches no account is left as plain text. Up to 10 mentions per story. |
| `payload.repost` | `string` | No | — | The id of an existing LinkedIn post to publish as repost. For a simple repost without commentary, `text` should be an empty string. |
| `payload.include_job_posting` | `string` | No | — | `Linkedin only` The ID of a job posting that should be displayed within a preview card. |
| `payload.targeted_audience` | `object` | No | — | `Linkedin only` A set of filters to adjust the target audience of your posts. |
| `payload.mentions` | `array` | No | — | `Linkedin only` |
| `payload.external_link` | `string` | No | — | `Linkedin only` An external link that should be displayed within a preview card. The URL must also be included in the post textual content. Otherwise, it will be automatically added at the end. Pattern: `^https?://`. |
| `payload.as_organization` | `string` | No | — | `Linkedin only` Provide the ID of an organization over which you have control to perform the action on its behalf. Minimum length: 1. |
| `payload.location` | `string` | No | — | `Instagram only`: The location to tag in the post. The best match for the query is used, and a query matching no place leaves the post untagged. On a story, the location is also drawn on the media as a tappable sticker. |
| `payload.post_type` | `"feed" \| "story" \| ""` | No | — | `Instagram only`: Publish as a regular feed post or as a story. Defaults to `feed` when omitted or empty. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Publish a post.",
    "properties": {
      "account_id": {
        "type": "string",
        "description": "The id of the account to perform the request from.",
        "minLength": 1
      },
      "text": {
        "type": "string",
        "description": "`Linkedin`: You can add a mention by inserting the index of the corresponding entry from the mentions array between two double braces. Example: Hey {{0}}, check this out ! `Instagram`: To mention a user, use the @ symbol followed by their username. On a story, each mention is drawn on the media as a tappable `@username` sticker and the user is notified; the surrounding text is not displayed. A username that matches no account is left as plain text. Up to 10 mentions per story."
      },
      "repost": {
        "type": "string",
        "description": "The id of an existing LinkedIn post to publish as repost. For a simple repost without commentary, `text` should be an empty string."
      },
      "include_job_posting": {
        "type": "string",
        "description": "`Linkedin only` The ID of a job posting that should be displayed within a preview card."
      },
      "targeted_audience": {
        "type": "object",
        "description": "`Linkedin only` A set of filters to adjust the target audience of your posts.",
        "properties": {
          "language": {
            "type": "array",
            "description": "The ID of the parameter. Use type LANGUAGE on the List search parameters route to find out the right ID. Linkedin native filter : LANGUAGE.",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^[a-z]+_[A-Z]+$"
            }
          },
          "job_function": {
            "type": "array",
            "description": "The ID of the parameter. Use type POST_JOB_FUNCTION on the List search parameters route to find out the right ID. Linkedin native filter : JOB FUNCTION.",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "school": {
            "type": "array",
            "description": "The ID of the parameter. Use type SCHOOL on the List search parameters route to find out the right ID. Linkedin native filter : UNIVERSITY.",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "headcount": {
            "type": "array",
            "description": "Linkedin native filter : COMPANY SIZE.",
            "items": {
              "type": "object",
              "properties": {
                "min": {
                  "type": "number",
                  "enum": [
                    2,
                    11,
                    51,
                    201,
                    501,
                    1001,
                    5001,
                    10001
                  ]
                },
                "max": {
                  "type": "number",
                  "enum": [
                    1,
                    10,
                    50,
                    200,
                    500,
                    1000,
                    5000,
                    10000
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "seniority": {
            "type": "array",
            "description": "The ID of the parameter. Use type SENIORITY on the List search parameters route to find out the right ID. Linkedin native filter : SENIORITY.",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "industry": {
            "type": "array",
            "description": "The ID of the parameter. Use type INDUSTRY on the List search parameters route to find out the right ID. Linkedin native filter : INDUSTRY.",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "region": {
            "type": "array",
            "description": "The ID of the parameter. Use type REGION on the List search parameters route to find out the right ID. Linkedin native filter : REGION.",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          },
          "location": {
            "type": "array",
            "description": "The ID of the parameter. Use type LOCATION on the List search parameters route to find out the right ID. Linkedin native filter : LOCATION.",
            "minItems": 1,
            "items": {
              "type": "string",
              "pattern": "^\\d+$"
            }
          }
        },
        "additionalProperties": false
      },
      "mentions": {
        "type": "array",
        "description": "`Linkedin only`",
        "items": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the user as it will be displayed in your message."
            },
            "profile_id": {
              "type": "string",
              "description": "The provider ID of the user, which begins with ACo/ADo for individuals and is a series of digits for companies."
            },
            "is_company": {
              "type": "boolean"
            }
          },
          "required": [
            "name",
            "profile_id"
          ],
          "additionalProperties": false
        }
      },
      "external_link": {
        "type": "string",
        "description": "`Linkedin only` An external link that should be displayed within a preview card. The URL must also be included in the post textual content. Otherwise, it will be automatically added at the end.",
        "pattern": "^https?://"
      },
      "as_organization": {
        "type": "string",
        "description": "`Linkedin only` Provide the ID of an organization over which you have control to perform the action on its behalf.",
        "minLength": 1
      },
      "location": {
        "type": "string",
        "description": "`Instagram only`: The location to tag in the post. The best match for the query is used, and a query matching no place leaves the post untagged. On a story, the location is also drawn on the media as a tappable sticker."
      },
      "post_type": {
        "description": "`Instagram only`: Publish as a regular feed post or as a story. Defaults to `feed` when omitted or empty.",
        "anyOf": [
          {
            "type": "string",
            "enum": [
              "feed"
            ]
          },
          {
            "type": "string",
            "enum": [
              "story"
            ]
          },
          {
            "type": "string",
            "enum": [
              ""
            ]
          }
        ]
      }
    },
    "required": [
      "account_id",
      "text"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.object` | `"PostCreated"` | Yes | — | Allowed: `PostCreated`. |
| `result.data.post_id` | `string \| null` | Yes | — | — |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "properties": {
          "object": {
            "type": "string",
            "enum": [
              "PostCreated"
            ]
          },
          "post_id": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "object",
          "post_id"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Unipile provider guide](https://deepline.com/docs/providers/unipile/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.