# create_post: Publish a post

Publish one post, or repost one. This action can change or spend something, and it happens right away. Plan: Free and Connect.

```
POST https://api.heyreagent.com/v1/actions/create_post
Authorization: Bearer YOUR_KEY
content-type: application/json

{
  "text": "Hello LinkedIn!"
}
```

## What you give it

- `text` (optional): text, up to 3000 characters. The post text, exactly as it should appear. May be empty only for a plain repost.
- `attachmentUrls` (optional): a list (a link), up to 9. Images, one video or one document to attach. Public https links; each file up to 10 MB, 20 MB in total.
- `videoThumbnailUrl` (optional): a link. Cover image for an attached video (a public https link).
- `repostOf` (optional): a post link or a post social id. URL of an existing LinkedIn post to repost. With empty text it is a plain repost; with text, a repost with your thoughts. Where to get it: On LinkedIn, click the More icon (the three dots) at the top right of the post, then "Copy link to post". Or: Run `search_posts` and use `posts[].url`.
- `mentions` (optional): a list (a group of fields), up to 20. People or companies to mention. Put {{0}}, {{1}}, … in the text where each one goes (its position in this list).
  - `name` (needed): text. The name as it should appear in the text.
  - `profileId` (needed): a member id or a company id. The LinkedIn member id of the person (starts with ACo or ADo), or the numeric id of a company. Where to get it: Run `get_profile_details` and use `providerId`.
  - `isCompany` (optional): true or false. True when the mention is a company.
- `link` (optional): a link. A link to show as a preview card. It should also appear in the text; otherwise LinkedIn adds it at the end.
- `jobPostingId` (optional): a job id. Id of one of your job postings to show as a card (from list_job_postings). Where to get it: Run `list_job_postings` and use `jobPostings[].id`.
- `asOrganization` (optional): a organization id. Act as a company page you administer instead of yourself: that page's numeric id. No action here lists the pages you administer.
- `audience` (optional): a search filter id. 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 }. Where to get it: `language`: run `lookup_search_ids` with type `LANGUAGE` and use `matches[].id`. `jobFunction`: run `lookup_search_ids` with type `POST_JOB_FUNCTION` and use `matches[].id`. `school`: run `lookup_search_ids` with type `SCHOOL` and use `matches[].id`. `seniority`: run `lookup_search_ids` with type `SENIORITY` and use `matches[].id`. `industry`: run `lookup_search_ids` with type `INDUSTRY` and use `matches[].id`. `region`: run `lookup_search_ids` with type `REGION` and use `matches[].id`. `location`: run `lookup_search_ids` with type `LOCATION` and use `matches[].id`.
  - `language` (optional): a list (text). 
  - `jobFunction` (optional): a list (text). 
  - `school` (optional): a list (text). 
  - `seniority` (optional): a list (text). 
  - `industry` (optional): a list (text). 
  - `region` (optional): a list (text). 
  - `location` (optional): a list (text). 
  - `headcount` (optional): a list (a group of fields). 
- `connectionId` (optional): a connection id. Which of your LinkedIn accounts to act from (its id from list_linkedin_accounts). Omit to use your first live one. Where to get it: Run `list_linkedin_accounts` and use `accounts[].id`.

## What you get back

- `published`
- `postId`: a post id
- `from`: the account it ran on
- `usedToday`: number
- `dailyLimit`: number

## Good to know

- 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.

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