Skip to main content
POST
/
posts
Create a post
curl --request POST \
  --url https://api.partoo.co/v2/posts \
  --header 'Content-Type: application/json' \
  --header 'x-APIKey: <api-key>' \
  --data '{
  "business_search": {
    "business__in": [
      [
        "5409c35a97bbc544d8e26737",
        "595badaef348ab6b3530033f",
        "59d53302b12ff6429f262639"
      ]
    ]
  },
  "publishers": [
    "google_my_business",
    "facebook",
    "instagram"
  ],
  "data": {
    "post_type": "news",
    "summary": "Wonderful post summary !",
    "image_url": [
      "https://example.com/1.png",
      "https://example.com/2.png"
    ],
    "title": "Great post title !",
    "cta_type": "book",
    "link": {
      "use_business_url": true,
      "custom_url": "<string>"
    },
    "schedule_time": "2050-01-01T09:00:00",
    "expiration_time": "2050-01-01T09:00:00",
    "coupon_code": "PROMO25",
    "offer_terms": "These are the conditions",
    "start_at": "2050-01-01T09:00:00",
    "end_at": "2050-01-01T09:00:00"
  },
  "is_draft": false,
  "send_notifications": false
}'
{
  "status": "success",
  "code": 200,
  "message": "2 posts have been created.",
  "ids": "45,46",
  "data": [
    {
      "post_id": 101,
      "business_id": "1234567890"
    },
    {
      "post_id": 102,
      "business_id": "1234567891"
    }
  ]
}

Authorizations

x-APIKey
string
header
required

The authentication system on Partoo API is using API Key that should be put in the header of the request (the name of the header is x-APIKey). An api_key is linked to a user. This user's role will give you different access level to the API features.

Body

application/json

Request body to create a Post

Business to create post

publishers
enum<string>[]
required

List of publisher to diffuse the post

Example:
[
"google_my_business",
"facebook",
"instagram"
]
data
object
required

Information on post to create

is_draft
boolean
default:false

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
default:false

If true, a notification email will be sent to all BM/GM users that have access to this draft post

Response

OK

status
enum<string>

Request status

Available options:
success
code
number

Request code

Example:

200

message
string

Number of post(s) created

Example:

"2 posts have been created."

ids
string
deprecated

Id(s) of post(s) created

Example:

"45,46"

data
object[]

Post ID and relative business ID pair list

Example:
[
{
"post_id": 101,
"business_id": "1234567890"
},
{
"post_id": 102,
"business_id": "1234567891"
}
]