Skip to main content
GET
/
admin
/
post-categories
List all post categories
curl --request GET \
  --url https://psn-api.paystub.dev/admin/post-categories \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "categories": [
      {
        "id": 123,
        "site_id": 123,
        "type": "<string>",
        "country": "<string>",
        "name": "<string>",
        "slug": "<string>",
        "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[name]
string

Filter by name

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

sort
enum<string>

Sort by field (prefix with - for descending)

Available options:
name,
-name,
created_at,
-created_at,
updated_at,
-updated_at
per_page
integer
default:15

Number of items per page

Response

List of post categories

success
boolean
Example:

true

data
object
message
string | null