Articles
Articles are long-form content (blog posts, announcements). Each
article has a stable slug you can use to deep-link.
Workflow: create as DRAFT via POST /articles, then publish via
PATCH /articles/:id with status: "PUBLISHED" (requires
bannerUrl set). Once published, the article is visible via
GET /articles + the article.published webhook fires.
Read endpoints (READ_PUBLIC) — list published, get by slug.
Write endpoints (ADMIN) — create, update, publish/unpublish via
the status field. Author is the community's founder user.
Base URL: https://api.cobuntu.com/api/v1
Every endpoint requires an X-API-Key header. See Authentication for scope details.
GET /communities/{communityTag}/articles — List published articles
Scope: READ_PUBLIC
Path parameters:
| Param | Type | Description |
|---|---|---|
communityTag | string | Your community's tag (e.g. bela-escala, orbis). |
Query parameters:
| Param | Type | Default | Description |
|---|---|---|---|
limit | integer | 20 | Page size. Default 20, max 100. |
offset | integer | 0 | Zero-based offset for pagination. Use either offset or cursor — not both. |
Response (200):
[
{
"id": "…",
"slug": "…",
"title": "…",
"excerpt": "…",
"publishedAt": "…",
"bannerUrl": "…" // nullable,
"author": { … },
"readTimeMinutes": 0,
"content": "…",
}
]| Field | Type | Description |
|---|---|---|
id | string | Stable article identifier (uuid). |
slug | string | URL-safe identifier; stable across edits. |
title | string | Article title. |
excerpt | string | Short summary shown on list pages. |
publishedAt | string (date-time) | ISO 8601 publish timestamp. Articles only appear in this API once published. |
bannerUrl | string (nullable) | Hero image URL (or null). |
author | object | Author object ({ name, usertag, profileImage }). |
readTimeMinutes | integer | Estimated reading time in minutes. |
content | string | HTML body. |
Example:
curl https://api.cobuntu.com/api/v1/communities/my-community/articles \
-H "X-API-Key: pk_live_..."POST /communities/{communityTag}/articles — Create an article (DRAFT)
Scope: ADMIN
Path parameters:
| Param | Type | Description |
|---|---|---|
communityTag | string | Your community's tag (e.g. bela-escala, orbis). |
Request body:
{
"title": "…",
"content": "…",
"excerpt": "…",
"category": "…",
"bannerUrl": "…",
}| Field | Type | Description |
|---|---|---|
title | string | Article title. Required, non-empty. Used to generate the URL slug. |
content | string | Body as sanitized HTML. Defaults to empty string if omitted. |
excerpt | string | Short summary for listings (max 500 chars). Optional. |
category | string | Free-form category label (max 100 chars). Optional. |
bannerUrl | string | Hero image URL. Required to subsequently PATCH the article to status: PUBLISHED. |
Response (201):
{
"id": "…",
"slug": "…",
"title": "…",
"excerpt": "…",
"publishedAt": "…",
"bannerUrl": "…" // nullable,
"author": { … },
"readTimeMinutes": 0,
"content": "…",
}| Field | Type | Description |
|---|---|---|
id | string | Stable article identifier (uuid). |
slug | string | URL-safe identifier; stable across edits. |
title | string | Article title. |
excerpt | string | Short summary shown on list pages. |
publishedAt | string (date-time) | ISO 8601 publish timestamp. Articles only appear in this API once published. |
bannerUrl | string (nullable) | Hero image URL (or null). |
author | object | Author object ({ name, usertag, profileImage }). |
readTimeMinutes | integer | Estimated reading time in minutes. |
content | string | HTML body. |
Example:
curl -X POST \
https://api.cobuntu.com/api/v1/communities/my-community/articles \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'GET /communities/{communityTag}/articles/slug/{slug} — Get article by slug
Scope: READ_PUBLIC
Path parameters:
| Param | Type | Description |
|---|---|---|
communityTag | string | Your community's tag (e.g. bela-escala, orbis). |
slug | string | URL slug from the event / article. Stable across edits. |
Response (200):
{
"id": "…",
"slug": "…",
"title": "…",
"excerpt": "…",
"publishedAt": "…",
"bannerUrl": "…" // nullable,
"author": { … },
"readTimeMinutes": 0,
"content": "…",
}| Field | Type | Description |
|---|---|---|
id | string | Stable article identifier (uuid). |
slug | string | URL-safe identifier; stable across edits. |
title | string | Article title. |
excerpt | string | Short summary shown on list pages. |
publishedAt | string (date-time) | ISO 8601 publish timestamp. Articles only appear in this API once published. |
bannerUrl | string (nullable) | Hero image URL (or null). |
author | object | Author object ({ name, usertag, profileImage }). |
readTimeMinutes | integer | Estimated reading time in minutes. |
content | string | HTML body. |
Example:
curl https://api.cobuntu.com/api/v1/communities/my-community/articles/slug/EXAMPLE_ID \
-H "X-API-Key: pk_live_..."PATCH /communities/{communityTag}/articles/{articleId} — Update an article (incl. publish/unpublish)
Scope: ADMIN
Path parameters:
| Param | Type | Description |
|---|---|---|
communityTag | string | Your community's tag (e.g. bela-escala, orbis). |
articleId | string | Article identifier (uuid) from POST /articles response. |
Request body:
{
"title": "…",
"content": "…",
"excerpt": "…" // nullable,
"category": "…" // nullable,
"bannerUrl": "…" // nullable,
"status": "…",
}| Field | Type | Description |
|---|---|---|
title | string | New title. Note: changing the title does NOT regenerate the slug — slugs are stable across edits. |
content | string | New HTML body. |
excerpt | string (nullable) | New short summary; null to clear. |
category | string (nullable) | New category; null to clear. |
bannerUrl | string (nullable) | New banner image; null to clear. Cannot be null if status becomes PUBLISHED in the same request — banners are required for published articles. |
status | string (enum) | Workflow status. PUBLISHED makes the article visible via GET /articles + fires the article.published webhook. Setting back to DRAFT hides it again + fires article.deleted (legacy event name — fires on unpublish too). |
Response (200):
{
"id": "…",
"slug": "…",
"title": "…",
"excerpt": "…",
"publishedAt": "…",
"bannerUrl": "…" // nullable,
"author": { … },
"readTimeMinutes": 0,
"content": "…",
}| Field | Type | Description |
|---|---|---|
id | string | Stable article identifier (uuid). |
slug | string | URL-safe identifier; stable across edits. |
title | string | Article title. |
excerpt | string | Short summary shown on list pages. |
publishedAt | string (date-time) | ISO 8601 publish timestamp. Articles only appear in this API once published. |
bannerUrl | string (nullable) | Hero image URL (or null). |
author | object | Author object ({ name, usertag, profileImage }). |
readTimeMinutes | integer | Estimated reading time in minutes. |
content | string | HTML body. |
Example:
curl -X PATCH \
https://api.cobuntu.com/api/v1/communities/my-community/articles/EXAMPLE_ID \
-H "X-API-Key: sk_live_..." \
-H "Content-Type: application/json" \
-d '{ /* request body */ }'