Articles

Articles are news/announcement posts that go through an approval workflow before publishing.

The article model

  • Name
    id
    Type
    string
    Description

    Unique identifier for the article.

  • Name
    title
    Type
    string
    Description

    The article's title. 2–255 characters.

  • Name
    body
    Type
    string
    Description

    The article's HTML/rich-text body.

  • Name
    status
    Type
    string
    Description

    One of Approved, Draft, Rejected, Pending, Unpublished, Deleted. Every status transition is recorded as an ArticleLog entry.

  • Name
    published_at
    Type
    timestamp | null
    Description

    Timestamp when the article was published.

  • Name
    remarks
    Type
    string | null
    Description

    Reviewer remarks, typically set alongside a Rejected status.

  • Name
    categories
    Type
    array<string>
    Description

    Article category ids this article belongs to.

  • Name
    created_by
    Type
    string
    Description

    The user who authored the article.

  • Name
    approved_by
    Type
    string | null
    Description

    The user who approved the article, if applicable.

  • Name
    cover_image_url
    Type
    string | null
    Description

    URL to the article's cover image, with an optional caption.


GET/api/articles

List articles

Retrieve a paginated list of articles.

Optional attributes

  • Name
    filter[status]
    Type
    string
    Description

    Filter by article status.

  • Name
    filter[search]
    Type
    string
    Description

    Search by title.

Request

GET
/api/articles
curl -G https://your-domain.com/api/articles \
  -H "Accept: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  --data-urlencode "filter[status]=Approved"

Response

{
  "data": [
    {
      "id": "7b8c9d0e-1f2a-3b4c-7b8c-9d0e1f2a3b4c",
      "title": "New E-Filing Guidelines Effective March 2026",
      "status": "Approved",
      "published_at": "2026-02-15T09:00:00+00:00",
      "created_by": "1a2b3c4d-5e6f-7890-1a2b-3c4d5e6f7890"
    }
  ],
  "meta": {"current_page": 1, "last_page": 2, "total": 24}
}

POST/api/articles

Create an article

Required attributes

  • Name
    title
    Type
    string
    Description

    2–255 characters.

  • Name
    body
    Type
    string
    Description

    Minimum 2 characters.

  • Name
    status
    Type
    string
    Description

    One of Approved, Draft, Rejected, Pending, Unpublished, Deleted.

  • Name
    categories
    Type
    string
    Description

    JSON-encoded array of { "value": "<article_category_id>" } objects.

Optional attributes

  • Name
    cover_image
    Type
    file
    Description

    A cover image, with an optional caption custom property.

Request

POST
/api/articles
curl -X POST https://your-domain.com/api/articles \
  -H "Accept: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  -F "title=New E-Filing Guidelines Effective March 2026" \
  -F "body=<p>Starting March 2026...</p>" \
  -F "status=Pending" \
  -F 'categories=[{"value":"announcements-category-id"}]' \
  -F "cover_image=@/path/to/cover.jpg"

Response

{
  "data": {
    "id": "7b8c9d0e-1f2a-3b4c-7b8c-9d0e1f2a3b4c",
    "title": "New E-Filing Guidelines Effective March 2026",
    "status": "Pending",
    "created_at": "2026-02-20T10:30:00+00:00"
  }
}

POST/api/articles/{article}

Update an article

Update an article's content or status. Sent as POST (not PUT) so multipart cover-image uploads work.

Path parameters

  • Name
    article
    Type
    string
    Description

    The UUID of the article to update.

Request

POST
/api/articles/{article}
curl -X POST https://your-domain.com/api/articles/7b8c9d0e-1f2a-3b4c-7b8c-9d0e1f2a3b4c \
  -H "Accept: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  -F "_method=PUT" \
  -F "status=Approved"

Response

{
  "data": {
    "id": "7b8c9d0e-1f2a-3b4c-7b8c-9d0e1f2a3b4c",
    "status": "Approved",
    "approved_by": "1a2b3c4d-5e6f-7890-1a2b-3c4d5e6f7890",
    "updated_at": "2026-02-20T11:00:00+00:00"
  }
}

POST/api/articles-restore

Restore a deleted article

Restore a soft-deleted article back to its prior status.

Required attributes

  • Name
    article_id
    Type
    string
    Description

    The UUID of the article to restore.

Request

POST
/api/articles-restore
curl -X POST https://your-domain.com/api/articles-restore \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  -d '{"article_id": "7b8c9d0e-1f2a-3b4c-7b8c-9d0e1f2a3b4c"}'

Response

{
  "message": "Article restored successfully."
}

GET/api/related-articles

Retrieve articles related by shared category.

Optional attributes

  • Name
    article_id
    Type
    string
    Description

    The UUID of the article to find related articles for.

Request

GET
/api/related-articles
curl -G https://your-domain.com/api/related-articles \
  -H "Accept: application/json" \
  -H "X-XSRF-TOKEN: {token}" \
  --cookie "cms_admin_session={session}" \
  --data-urlencode "article_id=7b8c9d0e-1f2a-3b4c-7b8c-9d0e1f2a3b4c"

Response

{
  "data": [
    {"id": "8c9d0e1f-2a3b-4c5d-8c9d-0e1f2a3b4c5d", "title": "Understanding the Raffling Process"}
  ]
}

Was this page helpful?