---
title: "Create a post"
method: POST
path: "/posts"
tags: ["Posts"]
---

# Create a post

`POST /posts`

This endpoint lets you create a post or a draft post on Google / Facebook / Instagram.

The creation of a post will not happen in real time and might take a few minutes.

A draft post can only be created by Org Admins and is not immediately published. 
An expiration date must be specified when creating a draft post.
In order to be published, a draft needs to be updated by a BM/GM user before the expiration date.

## Request body

- object — Request body to create a Post
  - `business_search` PostBusinessSearch, required — Business to create post
    - `business__in` BusinessIds[], required
      - BusinessId[] — List of business ids
  - `publishers` string[], required — List of publisher to diffuse the post
  - `data` PostData, required — Information on post to create
    - `post_type` 'news' | 'event' | 'offer' | 'covid', required — The type of the post to be created. Event and Offer are not yet available for Facebook.
    - `summary` string, required — Main text content of the post.
    - `image_url` union — URLs of the images displayed with the post. **Note:** - Add up to 10 images for multi-image post on Facebook and IG - Multi-image is not supported by Google, only the first image will be displayed - Image ratio must be between 4:5 and 16:9 for IG - All images must be same ratio for IG or they will be crop at the first image ratio by IG
      - string
      - string[]
    - `title` string — Title of the post.
    - `cta_type` 'book' | 'order' | 'shop' | 'learn_more' | 'sign_up' | 'call' | 'no_cta' — The type of the post to be created. Some type mig.
    - `link` PostLink — Link displayed in the post to redirect the client clicking on it. Use can only have one of the following parameters ('use_business_url' or 'custom_url').
      - `use_business_url` boolean — Use the business google url for link on the post.
      - `custom_url` string — An URL to redirect client when they click on the button
    - `schedule_time` string — Date and time of when the post will be diffused corresponding platforms. It needs to be at least 2 hours after the time of the request. The timezone used is UTC.
    - `expiration_time` string — This parameter is mandatory when creating a draft post. It indicates when the draft will expire, the time after which BM/GM users will no longer be able to validate and publish the post
    - `coupon_code` string — Offer code that is usable in store or online
    - `offer_terms` string — Terms and conditions of the offer
    - `start_at` string — For either event or offer post type. Defined when it start. Timezone is defined by the business timezone.
    - `end_at` string — For either event or offer post type. Defined when it end. Timezone is defined by the business timezone.
  - `is_draft` boolean — If true, the post will be created as a draft. You must then also specify an `expiration_time` in the body's data.
  - `send_notifications` boolean — If true, a notification email will be sent to all BM/GM users that have access to this draft post

## Response `200`

OK

- RequestResponsePost
  - `status` 'success' — Request status
  - `code` number — Request code
  - `message` string — Number of post(s) created
  - `ids` string — Id(s) of post(s) created
  - `data` object[] — Post ID and relative business ID pair list
    - `post_id` integer
    - `business_id` string

## Other responses

- `401` — You are not authenticated
- `403` — You are not allowed to perform this action
- `404` — Resource does not exist

---

[API](https://skmtc.net/partoo/apis/partoo-rest-api.md) · [All operations](https://skmtc.net/partoo/apis/partoo-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/partoo/partoo-rest-api/revisions/3652d8b1a8b3/schema)
