GET
/api/public/v1/blog-postsList blog posts
Posts on a location’s public blog. An unpublished post is a draft and is not live on the site. The cover image is not settable through this API — it is an upload and these endpoints take JSON — so set one from Website → Blog in the console; everything else about a post can be written here.
Required scope
The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.
blog:read
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
locationId | string | Required | Whose blog to read. |
limit | number | Optional | Maximum number of items to return (1-100).Default: 20 |
offset | number | Optional | Number of items to skip before starting to collect the result set.Default: 0 |
sortBy | string | Optional | Field to sort by. Allowed values vary by endpoint.Default: createdAt |
sortOrder | string asc desc | Optional | Sort direction.Default: desc |
search | string | Optional | Free-text search across the resource’s primary fields. |
createdAfter | string | Optional | ISO 8601 timestamp — only return items created after this time. |
createdBefore | string | Optional | ISO 8601 timestamp — only return items created before this time. |
updatedAfter | string | Optional | ISO 8601 timestamp — only return items updated after this time. |
published | boolean | Optional | Omit for both, `true` for live posts, `false` for drafts. |
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/blog-posts" \
-H "Authorization: Bearer your_access_token"200Example response
json
{
"message": "Blog posts retrieved successfully!",
"content": {
"posts": [
{
"id": "bpt_7001",
"locationId": "loc_abc123",
"title": "Why we changed our opening hours",
"slug": "why-we-changed-our-opening-hours",
"excerpt": "Shorter mornings, longer evenings.",
"content": "From September we open at ten…",
"coverImagePath": null,
"author": "Sam Okafor",
"isPublished": true,
"publishedAt": "2026-08-20T09:00:00.000Z",
"createdAt": "2026-08-19T14:00:00.000Z",
"updatedAt": "2026-08-20T09:00:00.000Z"
}
],
"pagination": {
"total": 42,
"limit": 20,
"offset": 0,
"hasMore": true
}
}
}In the console
The same thing done by hand, for anyone comparing the API against the screen they already use.
Website → Blog
/website/blog