---
title: "Create an editorial"
method: POST
path: "/v1/admin/editorials"
tags: ["Admin Editorials"]
---

# Create an editorial

`POST /v1/admin/editorials`

## Request

- Base URL: `https://api.hify.club`
- URL: `https://api.hify.club/v1/admin/editorials`
- Auth: API key in header `X-User-Token`

Creates an editorial and, if a media array is supplied, its ordered set of assets.

## Request body

- EditorialInput
  - `title` string
  - `caption` string
  - `boosted` boolean
  - `position` integer
  - `expires_at` string, date-time
  - `editor` string: Attributed author recorded in the PaperTrail version.
  - `media` object[]: The full ordered set of assets. Supplying this replaces the editorial's existing media rather than diffing it.
    - `position` integer
    - `media_type` string
    - `s3_bucket` string
    - `s3_path` string
    - `thumbnail_s3_path` string

## Response `201`

Editorial created

- Editorial
  - `id` integer
  - `title` string
  - `caption` string, nullable
  - `boosted` boolean: Pins the post to page 1 of the explore feed.
  - `position` integer, nullable: Ordering among boosted posts; unset positions sort last.
  - `expires_at` string, date-time, nullable: Set to retire a post; unset or future means active.
  - `created_at` string, date-time
  - `updated_at` string, date-time
  - `media` EditorialMedia[]
    - `id` integer
    - `editorial_id` integer
    - `position` integer: Order of the asset within the editorial.
    - `media_type` string: Kind of asset.
    - `s3_bucket` string
    - `s3_path` string: Bare object key; the CDN host carries the folder segment.
    - `thumbnail_s3_path` string, nullable
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `401`: Unauthenticated
- `403`: Forbidden - caller is not an admin
- `422`: Unprocessable entity - validation failed

---

[API](https://skmtc.dev/hify/apis/hify-apis.md) - [All operations](https://skmtc.dev/hify/apis/hify-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/hify/apis/hify-apis/revisions/b5920403538d?raw)
