# Create Post — Beekeeper

> Create a new text or multimedia post in a defined stream. See the documentation

- Key: `beekeeper-create-post`
- Type: Action (Write)
- Version: 0.0.2
- App: Beekeeper (`beekeeper`) — https://pipedream.com/apps/beekeeper.md
- This page (HTML): https://pipedream.com/apps/beekeeper/actions/create-post
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/beekeeper/actions/create-post/create-post.mjs

## Description

Create a new text or multimedia post in a defined stream. [See the documentation](https://beekeeper.stoplight.io/docs/beekeeper-api/18408b41927b9-creates-a-new-post)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `streamId` | `string` | Yes | The ID of the stream to create a post Options are loaded from the connected account. |
| `text` | `string` | Yes | The text content of the post |
| `files` | `string[]` | No | List of file objects to be attached. E.g. [{"name": "fair_play_rules.pdf", "url": "https://mytenant.beekeeper.io/file/665987/original/fair_play_rules.pdf", "userid": "5cb9v45d-8i78-4v65-b5fd-81cgfac3ef17", "height": 619, "width": 700, "key": "f4fdaab0-d198-49b4-b1cc-dd85572d72f1", "media_type": "image/png", "usage_type": "attachment_image" }]. See the documentation for further details. |
| `locked` | `boolean` | No | Disables adding comments on the post |
| `title` | `string` | No | The title of the post |
| `media` | `string[]` | No | List of Photo or Video objects. E.g. [{"name": "fair_play_rules.pdf", "url": "https://mytenant.beekeeper.io/file/665987/original/fair_play_rules.pdf", "userid": "5cb9v45d-8i78-4v65-b5fd-81cgfac3ef17", "height": 619, "width": 700, "key": "f4fdaab0-d198-49b4-b1cc-dd85572d72f1", "media_type": "image/png", "usage_type": "attachment_image" }]. See the documentation for further details. |
| `labels` | `string[]` | No | List of labels attached to the post |
| `sticky` | `boolean` | No | Flag that pins a post to the top of the stream |
| `reactionsDisabled` | `boolean` | No | Flag that disables the ability to add reaction to the post and to see reactions that have been added |
| `options` | `string[]` | No | List of poll options in a post. E.g. ["This Friday", "Monday next week"] |
| `scheduledAt` | `string` | No | Date and time when the post is scheduled to be published (UTC timezone, yyyy-mm-ddTHH:MM:SS format) |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "beekeeper",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "beekeeper-create-post",
  arguments: {
    streamId: "Stream ID",
    text: "Text",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "beekeeper-create-post",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    beekeeper: { authProvisionId: "apn_xxxxxxx" },
    streamId: "Stream ID",
    text: "Text",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "beekeeper-create-post",
    "configured_props": {
      "beekeeper": { "authProvisionId": "apn_xxxxxxx" },
      "streamId": "Stream ID",
      "text": "Text"
    }
  }'
```

---

- App: https://pipedream.com/apps/beekeeper.md · All apps: https://pipedream.com/apps
