Playgun API
Articles

List Articles

Retrieve all published articles

List Articles

Retrieves a list of all your published articles.

GET /api/v1/parable/articles

Authentication

Requires a valid API key with read:articles permission.

Authorization: Bearer pk_live_your_api_key

Response

{
  "data": [
    {
      "id": "abc123xyz",
      "title": "My First Article",
      "subtitle": "An introduction to writing",
      "coverImage": "https://pub-playgun.r2.dev/images/cover.jpg",
      "createdAt": "2024-01-15T10:00:00.000Z",
      "updatedAt": "2024-01-15T14:30:00.000Z"
    },
    {
      "id": "def456abc",
      "title": "Second Post",
      "createdAt": "2024-01-16T09:00:00.000Z",
      "updatedAt": "2024-01-16T09:00:00.000Z"
    }
  ],
  "meta": {
    "total": 2
  }
}

Response Fields

FieldTypeDescription
idstringUnique article identifier
titlestringArticle title
subtitlestring?Optional subtitle
coverImagestring?URL to cover image (if set)
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 last update timestamp

Example Request

cURL

curl -X GET \
  -H "Authorization: Bearer pk_live_your_api_key" \
  https://aware-squirrel-935.convex.site/api/v1/parable/articles

JavaScript

const response = await fetch(
  "https://aware-squirrel-935.convex.site/api/v1/parable/articles",
  {
    headers: {
      Authorization: `Bearer ${process.env.PARABLE_API_KEY}`,
    },
  }
);

const { data, meta } = await response.json();
console.log(`Found ${meta.total} articles`);

Notes

  • Only published articles are returned
  • Articles are sorted by updatedAt in descending order (most recent first)
  • Draft and idea articles are not included