GET
/api/public/v1/blog-posts

List 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

NameTypeRequiredDescription
locationIdstringRequiredWhose blog to read.
limitnumberOptionalMaximum number of items to return (1-100).Default: 20
offsetnumberOptionalNumber of items to skip before starting to collect the result set.Default: 0
sortBystringOptionalField to sort by. Allowed values vary by endpoint.Default: createdAt
sortOrderstring
asc
desc
OptionalSort direction.Default: desc
searchstringOptionalFree-text search across the resource’s primary fields.
createdAfterstringOptionalISO 8601 timestamp — only return items created after this time.
createdBeforestringOptionalISO 8601 timestamp — only return items created before this time.
updatedAfterstringOptionalISO 8601 timestamp — only return items updated after this time.
publishedbooleanOptionalOmit 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