SwiftGoma.SwiftGoma

Search endpoints

Jump to any API endpoint by name, method, or path

Blog

Update post

PUT/api/v1/blog/:id

Updates a post's content, status, or cover image. Staff-only.

Requires Authorization
ADMIN, SUPPORT only
Authenticated action

Path parameters

idstringrequired
Post ID.

Form fields

titlestring
excerptstring
contentstring
statusstring
DRAFT or PUBLISHED.
coverImagefile
Replaces the existing cover image.
removeCoverImageboolean
Removes the cover image without replacing it.
Request
curl --request PUT \
  --url https://api.swiftgoma.com/api/v1/blog/:id \
  --header 'Authorization: Bearer <access_token>' \
  --form 'title=<title>' \
  --form 'excerpt=<excerpt>' \
  --form 'content=<content>' \
  --form 'status=<status>' \
  --form 'coverImage=@/path/to/file.jpg' \
  --form 'removeCoverImage=<removeCoverImage>'
200Example response
{
  "success": true,
  "data": {
    "id": "post_1a2b3c",
    "authorId": "9f8e7d6c",
    "title": "Comment bien démarrer sur SwiftGoma",
    "slug": "comment-bien-demarrer-sur-swiftgoma",
    "excerpt": "Un guide rapide pour les nouveaux vendeurs.",
    "content": "<p>Contenu de l'article…</p>",
    "coverImageUrl": "https://res.cloudinary.com/dx3wclabo/image/upload/v1/blog/demarrer.jpg",
    "status": "PUBLISHED",
    "publishedAt": "2026-02-01T09:00:00.000Z"
  }
}