Update a Post
PUThttps://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
- application/json
Body
required
The title of the post
Main text content of the post.
URL of the image displayed with the post.
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
Date when the Post will be published. No scheduled start time means that the Post will be published immediately.
For either event or offer post type. Defined when it start. Timezone is defined by the business timezone.
For either event or offer post type. Defined when it end. Timezone is defined by the business timezone.
Offer code that is usable in store or online
Terms and conditions of the offer
Responses
- 200
- 400
- 401
- 403
- 404
- 422
- 500
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [standard
, event
, offer
, alert
]
Main text content of the post.
The title of the post
For either event or offer post type. Defined when it start. Timezone is defined by the business timezone.
For either event or offer post type. Defined when it end. Timezone is defined by the business timezone.
Date when the Post will be published. No scheduled start time means that the Post will be published immediately.
post_medias
object[]
name and address of the business that the post is related to.
post_insight
object[]
post_status
object[]
Terms and conditions of the offer
Offer code that is usable in store or online
Link displayed in the post to redirect the client clicking on it.
Possible values: [book
, order
, shop
, learn_more
, sign_up
, call
, no_cta
]
The type of the post to be created. Some type mig.
{
"id": 0,
"post_type": "standard",
"summary": "Wonderful post summary!",
"business_id": "string",
"title": "string",
"start_at": "2050-01-01T09:00:00.000Z",
"end_at": "2050-01-01T09:00:00.000Z",
"schedule_time": "2020-01-01T10:00:00.000Z",
"post_medias": [
{
"media_url": "string"
}
],
"created_at": "2024-07-29T15:51:28.071Z",
"updated_at": "2024-07-29T15:51:28.071Z",
"business_info": "Rick - HQ - 157 boulevard Macdonald, Paris",
"post_insight": [
{
"name": "facebook__posts",
"click_count": 1512,
"view_count": 2012
}
],
"post_status": [
{
"name": "facebook__posts",
"state": "live",
"link": "google.com"
}
],
"offer_terms": "These are the conditions",
"offer_code": "PROMO25",
"cta_link": "google.com",
"cta_type": "book"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Possible values: [query
, body
, response
, param
]
Where in the request the error occurred
errors
object[]
required
{
"statusCode": 404,
"message": "Cannot find item",
"location": "query",
"errors": [
{
"path": "business.id",
"constraints": {
"object_required_property": "Required property"
}
}
]
}
- application/json
- Schema
- Example (from schema)
Schema
HTTP status code
Error message
Error name
{
"statusCode": 404,
"message": "Cannot find item",
"error": "Not Found"
}
- curl
- python
- go
- nodejs
- ruby
- java
- powershell
- CURL
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"
}'