Skip to main content
GET
/
categories
Categories
curl --request GET \
  --url https://api.example.com/categories

List Categories

GET /categories

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
perPageinteger50Items per page
sortstringnameSort field

Example Request

curl -X GET "https://api.skayle.ai/v1/categories" \
  -H "Authorization: Bearer YOUR_API_KEY"

Example Response

{
  "data": [
    {
      "id": "cat_abc123",
      "type": "category",
      "attributes": {
        "name": "Technology",
        "slug": "technology",
        "description": "Tech news and tutorials",
        "postCount": 15
      }
    },
    {
      "id": "cat_def456",
      "type": "category",
      "attributes": {
        "name": "Business",
        "slug": "business",
        "description": "Business insights",
        "postCount": 8
      }
    }
  ],
  "meta": {
    "total": 12
  }
}

Get Category

GET /categories/{id}

Get Posts by Category

GET /categories/{id}/posts
GET /categories/slug/{slug}/posts
Returns paginated posts belonging to the category.

Example Request

curl -X GET "https://api.skayle.ai/v1/categories/slug/technology/posts?perPage=5" \
  -H "Authorization: Bearer YOUR_API_KEY"