Skip to main content

Update a Post

PUT 

https://api.staging.powerapi.com/api/v2/posts/:post_id

This endpoint lets you update a Post. The update will not happen in real time and might take a few minutes

Request

Path Parameters

    post_id integerrequired

Body

required

    title string

    The title of the post

    summary stringrequired

    Main text content of the post.

    image_url string

    URL of the image displayed with the post.

    cta_type string

    Possible values: [book, order, shop, learn_more, sign_up, call, no_cta]

    The type of the post to be created. Some type mig.

    link

    object

    use_business_url boolean
    custom_url string
    schedule_time string

    Date when the Post will be published. No scheduled start time means that the Post will be published immediately.

    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.

    coupon_code string

    Offer code that is usable in store or online

    offer_term string

    Terms and conditions of the offer

Responses

Schema

    id integerrequired
    post_type stringrequired

    Possible values: [standard, event, offer, alert]

    summary stringrequired

    Main text content of the post.

    business_id string
    title string

    The title of the post

    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.

    schedule_time string

    Date when the Post will be published. No scheduled start time means that the Post will be published immediately.

    post_medias

    object[]

    The photo that will be on the Post

  • Array [

  • media_url string

    URL of the image displayed with the post.

  • ]

  • created_at date-time
    updated_at date-time
    business_info string

    name and address of the business that the post is related to.

    post_insight

    object[]

    Statistics related to the posts on the different platforms.

    ⚠️ Due to a Google deprecation, on 20/02/2023, Google views and counts won't be available anymore. Old insights will still be sent. Facebook ones will still be available.

  • Array [

  • name string

    Possible values: [google_my_business__posts, facebook__posts]

    Publisher related to the post

    click_count integer

    number of times a user has clicked on the post.

    view_count integer

    number of times the post has been viewed.

  • ]

  • post_status

    object[]

    Status related to the posts on the different platforms.

  • Array [

  • name string

    Possible values: [google_my_business__posts, facebook__posts]

    Publisher related to the post

    state string

    Possible values: [live, to_configure, pending, scheduled, error, expired]

    The state of the post, indicating at which lifecycle stage it is currently.

    link string

    Link displayed in the post to redirect the client clicking on it.

  • ]

  • offer_terms string

    Terms and conditions of the offer

    offer_code string

    Offer code that is usable in store or online

    cta_link string

    Link displayed in the post to redirect the client clicking on it.

    cta_type string

    Possible values: [book, order, shop, learn_more, sign_up, call, no_cta]

    The type of the post to be created. Some type mig.

curl -L -X PUT 'https://api.staging.powerapi.com/api/v2/posts/:post_id' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"title": "string",
"summary": "Wonderful post summary!",
"image_url": "string",
"cta_type": "book",
"link": {
"use_business_url": true,
"custom_url": "string"
},
"schedule_time": "2020-01-01T10:00:00.000Z",
"start_at": "2050-01-01T09:00:00.000Z",
"end_at": "2050-01-01T09:00:00.000Z",
"coupon_code": "PROMO25",
"offer_term": "These are the conditions"
}'
Request Collapse all
Base URL
https://api.staging.powerapi.com
Auth
Parameters
— pathrequired
Body required
{
  "title": "string",
  "summary": "Wonderful post summary!",
  "image_url": "string",
  "cta_type": "book",
  "link": {
    "use_business_url": true,
    "custom_url": "string"
  },
  "schedule_time": "2020-01-01T10:00:00.000Z",
  "start_at": "2050-01-01T09:00:00.000Z",
  "end_at": "2050-01-01T09:00:00.000Z",
  "coupon_code": "PROMO25",
  "offer_term": "These are the conditions"
}
ResponseClear

Click the Send API Request button above and see the response here!