Admin Editorials

Update an editorial

Updates an editorial's attributes. If a media array is supplied it replaces the editorial's existing assets rather than diffing them.

patch/v1/admin/editorials/{id}

Request

  • Base URL
    https://api.hify.club
  • Auth
    API key in header X-User-Token

Path parameters

idinteger required

Editorial id.

Request body

titlestring
captionstring
boostedboolean
positioninteger
expires_atstring date-time
editorstring

Attributed author recorded in the PaperTrail version.

Example request

{
  "title": "Launch week",
  "caption": "What's new this week",
  "position": 1,
  "editor": "jane.doe",
  "media": [
    {
      "position": 1,
      "media_type": "photo",
      "s3_bucket": "hify-editorials",
      "s3_path": "launch/hero.jpg",
      "thumbnail_s3_path": "launch/hero-thumb.jpg"
    }
  ]
}

Response

Editorial updated

idinteger
titlestring
captionstring nullable
boostedboolean

Pins the post to page 1 of the explore feed.

positioninteger nullable

Ordering among boosted posts; unset positions sort last.

expires_atstring date-time nullable

Set to retire a post; unset or future means active.

created_atstring date-time
updated_atstring date-time

Example response

{
  "id": 7,
  "title": "Launch week",
  "caption": "What's new this week",
  "position": 1,
  "media": [
    {
      "id": 42,
      "editorial_id": 7,
      "position": 1,
      "media_type": "photo",
      "s3_bucket": "hify-editorials",
      "s3_path": "launch/hero.jpg",
      "thumbnail_s3_path": "launch/hero-thumb.jpg"
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.