Skip to main content

Articles API

The Articles API provides endpoints for managing articles (content) in Joomla.

Base URL

/api/index.php/v1/content/articles

Endpoints Overview

MethodEndpointDescription
GET/content/articlesRetrieve all articles
GET/content/articles/{id}Retrieve specific article
POST/content/articlesCreate new article
PATCH/content/articles/{id}Update article
DELETE/content/articles/{id}Delete article

Retrieve all articles

GET /api/index.php/v1/content/articles

Response

{
"data": [
{
"type": "articles",
"id": "1",
"attributes": {
"title": "Welcome to Joomla",
"alias": "welcome-to-joomla",
"introtext": "This is the introduction...",
"fulltext": "This is the full text...",
"state": 1,
"catid": 2,
"created": "2024-01-01 12:00:00",
"created_by": 42,
"modified": "2024-10-26 10:30:00"
}
}
],
"meta": {
"total-pages": 5
}
}

Retrieve specific article

GET /api/index.php/v1/content/articles/{id}

Parameters

ParameterTypeDescription
idintegerArticle ID

Example

curl -X GET "https://yoursite.com/api/index.php/v1/content/articles/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN"

Create article

POST /api/index.php/v1/content/articles

Request Body

{
"title": "New article",
"alias": "new-article",
"introtext": "This is the introduction of the new article",
"fulltext": "This is the full text of the new article",
"catid": 2,
"state": 1,
"access": 1,
"language": "*"
}

Required fields

FieldTypeDescription
titlestringArticle title
catidintCategory ID

Optional fields

FieldTypeDefaultDescription
aliasstringautoURL-friendly name
introtextstring""Introduction text
fulltextstring""Full text
stateint1Publication status
accessint1Access level
languagestring"*"Language code or * for all
featuredint0Featured article
metadescstring""Meta description
metakeystring""Meta keywords

Example

curl -X POST "https://yoursite.com/api/index.php/v1/content/articles" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "New article",
"alias": "new-article",
"introtext": "Introduction text",
"fulltext": "Full text",
"catid": 2,
"state": 1
}'

Update article

PATCH /api/index.php/v1/content/articles/{id}

Request Body

Only the fields you want to change:

{
"title": "Updated title",
"state": 0
}

Example

curl -X PATCH "https://yoursite.com/api/index.php/v1/content/articles/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Updated title"
}'

Delete article

DELETE /api/index.php/v1/content/articles/{id}

Example

curl -X DELETE "https://yoursite.com/api/index.php/v1/content/articles/1" \
-H "X-Joomla-Token: YOUR_API_TOKEN"
Note

Deleting an article moves it to the trash (state = -2).

Article States

ValueStatus
-2Trash
0Unpublished
1Published
2Archived

Filtering

By category

GET /api/index.php/v1/content/articles?filter[category]=2

By status

GET /api/index.php/v1/content/articles?filter[state]=1

By author

GET /api/index.php/v1/content/articles?filter[author]=42
GET /api/index.php/v1/content/articles?filter[search]=joomla