Content API

Endpoints for creating, reading, updating, and deleting content items. Content items represent documents such as blog posts, user manuals, white papers, and strategy documents.

List Content

GET /v1/content Retrieve a paginated list of content items

Query Parameters

Parameter Type Required Description
type string No Filter by type: blog, manual, whitepaper, strategy
status string No Filter by status: draft, published, archived
limit integer No Items to return. Default: 10, max: 100
offset integer No Number of items to skip for pagination. Default: 0

Example Request

curl -H "Authorization: Bearer YOUR_API_KEY" \
     "https://api.oscarrondon.com/v1/content?type=blog&status=published&limit=5"

Response

{
  "data": [
    {
      "id": "content_abc123",
      "title": "API Documentation Best Practices",
      "type": "blog",
      "status": "published",
      "author": "Oscar Rondon",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z"
    }
  ],
  "pagination": {
    "total": 42,
    "limit": 5,
    "offset": 0,
    "has_more": true
  }
}

Create Content

POST /v1/content Create a new content item

Request Body

Field Type Required Description
title string Yes Content title. Maximum 200 characters.
type string Yes Content type: blog, manual, whitepaper, strategy
content string Yes Content body. Markdown is supported.
status string No Publication status: draft (default) or published

Example Request

curl -X POST "https://api.oscarrondon.com/v1/content" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
       "title": "New Technical Guide",
       "type": "manual",
       "content": "# Technical Guide\n\nThis guide covers...",
       "status": "draft"
     }'

Update Content

PUT /v1/content/{id} Update an existing content item

Use the same request body fields as POST. All fields are optional - only the fields you include will be updated (partial update). The id path parameter must match an existing content item.

Delete Content

DELETE /v1/content/{id} Permanently delete a content item

Returns 204 No Content on success. The operation is irreversible.

Example Request

curl -X DELETE "https://api.oscarrondon.com/v1/content/content_abc123" \
     -H "Authorization: Bearer YOUR_API_KEY"