Skip to main content
GET
/
posts
/
{slug}
Get a post by slug
curl --request GET \
  --url https://psn-api.paystub.dev/posts/{slug}
{
  "success": true,
  "data": {
    "id": 123,
    "site_id": 123,
    "post_category_id": 123,
    "user_id": 123,
    "type": "<string>",
    "country": "<string>",
    "title": "<string>",
    "slug": "<string>",
    "excerpt": "<string>",
    "content": "<string>",
    "meta": {},
    "faq": {},
    "fact_check": {},
    "minutes_to_read": 123,
    "view_count": 123,
    "is_draft": true,
    "media": [
      {
        "id": 123,
        "name": "<string>",
        "file_name": "<string>",
        "mime_type": "<string>",
        "size": 123,
        "url": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      }
    ],
    "published_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "message": "<string>"
}

Path Parameters

slug
string
required

Post slug

Query Parameters

include
enum<string>

Include related resources

Available options:
postCategory,
user,
site

Response

Post details

success
boolean
Example:

true

data
object
message
string | null