---
title: "Publish a post"
method: POST
path: "/v1/actions/create_post"
tags: ["Posts"]
---

# Publish a post

`POST /v1/actions/create_post`

## Request

- Base URL: `https://api.heyreagent.com`
- URL: `https://api.heyreagent.com/v1/actions/create_post`
- Auth: HTTP bearer

Publish one post, or repost one.

No published text says which form of id postId is. Pass it to get_post and use the socialId that comes back.

A mention is written {{0}}, {{1}}, … in the text, by its position in mentions.

repost true and attachments (a count) are added to the answer when they apply.

Docs: https://heyreagent.com/docs/actions/create_post

## Request body

- object
  - `text` string: The post text, exactly as it should appear. May be empty only for a plain repost.
  - `attachmentUrls` string[]: Images, one video or one document to attach. Public https links; each file up to 10 MB, 20 MB in total.
  - `videoThumbnailUrl` string, uri: Cover image for an attached video (a public https link).
  - `repostOf` string: URL of an existing LinkedIn post to repost. With empty text it is a plain repost; with text, a repost with your thoughts.
  - `mentions` object[]: People or companies to mention. Put {{0}}, {{1}}, … in the text where each one goes (its position in this list).
    - `name` string, required: The name as it should appear in the text.
    - `profileId` string, required: The LinkedIn member id of the person (starts with ACo or ADo), or the numeric id of a company.
    - `isCompany` boolean: True when the mention is a company.
  - `link` string, uri: A link to show as a preview card. It should also appear in the text; otherwise LinkedIn adds it at the end.
  - `jobPostingId` string: Id of one of your job postings to show as a card (from list_job_postings).
  - `asOrganization` string: Act as a company page you administer instead of yourself: that page's numeric id. No action here lists the pages you administer.
  - `audience` object: Limit who sees the post (company-page posts). Each list holds LinkedIn ids from lookup_search_ids (types LANGUAGE, POST_JOB_FUNCTION, SCHOOL, SENIORITY, INDUSTRY, REGION, LOCATION); headcount is company-size ranges such as { min: 51, max: 200 }.
    - `language` string[]
    - `jobFunction` string[]
    - `school` string[]
    - `seniority` string[]
    - `industry` string[]
    - `region` string[]
    - `location` string[]
    - `headcount` object[]
  - `connectionId` string: Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one.

## Response `200`

It worked. Inside result: published, postId, from, usedToday, dailyLimit.

- Worked
  - `ok` true, required
  - `result` object, required: What was asked for. A field that does not apply is left out, or is null.

## Other responses

- `default`: It did not work. The message says why, in plain English.

---

[API](https://skmtc.dev/heyreagent/apis/heyreagent-api.md) · [All operations](https://skmtc.dev/heyreagent/apis/heyreagent-api/llms.txt) · [OpenAPI document](https://skmtc.dev/heyreagent/apis/heyreagent-api/revisions/917360c5f841?raw)
