Skip to main content
GET
/
admin
/
posts
List all posts
curl --request GET \
  --url https://psn-api.paystub.dev/admin/posts \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "posts": [
      {
        "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"
      }
    ],
    "pagination": {
      "total": 123,
      "per_page": 123,
      "current_page": 123,
      "last_page": 123
    }
  },
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Use your API token

Query Parameters

filter[title]
string

Filter by title

filter[slug]
string

Filter by slug

filter[type]
enum<string>

Filter by post type

Available options:
article,
guide,
review,
news,
faq
filter[country]
enum<string>

Filter by country

Available options:
us,
ca,
uk,
au,
nz,
global
filter[site_id]
integer

Filter by site ID

filter[post_category_id]
integer

Filter by category ID

filter[user_id]
integer

Filter by user ID

filter[is_draft]
boolean

Filter by draft status

include
enum<string>

Include related resources

Available options:
site,
postCategory,
user
sort
enum<string>

Sort by field (prefix with - for descending)

Available options:
title,
-title,
created_at,
-created_at,
updated_at,
-updated_at,
published_at,
-published_at,
view_count,
-view_count
per_page
integer
default:15

Number of items per page

Response

List of posts

success
boolean
Example:

true

data
object
message
string | null