---
title: "Archive post"
method: POST
path: "/api/v1/posts/{id}/archive"
tags: ["Posts"]
---

# Archive post

`POST /api/v1/posts/{id}/archive`

## Request

- Base URL: `https://postal.nesohq.org`
- URL: `https://postal.nesohq.org/api/v1/posts/{id}/archive`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/nesohq/apis/postal-post-management-service-apis/docs/api/v1/posts/:id/archive/post.ts> (a function with typed inputs; its response is checked against the schema)

Archives a post.

## Path parameters

- `id` integer, required

## Response `200`

Post archived successfully

- PostResponse
  - `status` boolean
  - `message` string
  - `data` Post
    - `id` integer
    - `uuid` string, uuid
    - `title` string
    - `slug` string
    - `content` string
    - `summary` string
    - `thumbnail` string
    - `category_id` integer
    - `sub_category_id` integer
    - `meta_title` string
    - `meta_description` string
    - `keywords` string
    - `og_image` string
    - `status` 'draft' | 'published' | 'archived'
    - `is_public` boolean
    - `is_featured` boolean
    - `is_pinned` boolean
    - `published_at` string, date-time
    - `archived_at` string, date-time
    - `created_by` integer
    - `updated_by` integer
    - `view_count` integer
    - `version` integer
    - `created_at` string, date-time
    - `updated_at` string, date-time
    - `deleted_at` string, date-time

## Other responses

- `401`: Unauthorized
- `404`: Post not found

---

[API](https://skmtc.dev/nesohq/apis/postal-post-management-service-apis.md) - [All operations](https://skmtc.dev/nesohq/apis/postal-post-management-service-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/nesohq/apis/postal-post-management-service-apis/revisions/64a3f9ff2411?raw)
