← Documentation home
PATCH
/hyax-api/v1/posts/:idUpdate post
Send only changed fields. Slug must be unique within the team (409 if taken).
Base URL: https://platform.hyax.com · Replace YOUR_API_KEY with your team API key.
Request body
| Field | Required | Description |
|---|---|---|
| title | No | |
| content | No | |
| description | No | |
| status | No | `DRAFT` | `SCHEDULED` | `PUBLISHED` | `ARCHIVED` |
| tags | No | String array |
| imageUrl | No | Mapped to `image` |
| publishDate | No | ISO date |
| categoryIds | No | String array |
| slug | No | Must be unique in team |
| authorId | No | Must be team member |
Request examples
Same request in cURL, Node.js (fetch), and PHP (ext-curl).
curl -X PATCH 'https://platform.hyax.com/hyax-api/v1/posts/clx_example_id' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"title": "Updated Post Title",
"content": "<p>Updated body HTML</p>",
"description": "Updated meta description",
"status": "PUBLISHED",
"tags": [
"updated",
"featured"
],
"imageUrl": "https://cdn.example.com/new-cover.jpg",
"publishDate": "2025-02-01T10:00:00.000Z",
"categoryIds": [
"clx_cat_tech"
],
"slug": "updated-post-title",
"authorId": "usr_456"
}'Example response
Shape varies by data; values are illustrative.
{
"success": true,
"data": {
"id": "clx…",
"title": "Hello world",
"slug": "hello-world",
"status": "PUBLISHED",
"publishedAt": "2025-01-15T12:00:00.000Z",
"authorId": "usr…",
"updatedAt": "2025-01-15T12:10:00.000Z"
}
}