---
title: "Like or unlike a post (toggles)"
method: POST
path: "/like-post"
---

# Like or unlike a post (toggles)

`POST /like-post`

## Request

- Base URL: `https://api.vakantio.de`
- URL: `https://api.vakantio.de/like-post`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.vakantio.de/authorize`, token URL `https://api.vakantio.de/token`, scopes: `vakantio:full`)
  - none

Requires authentication: OAuth 2.1 access token or a vakantio session token (from `vakantio login`), sent as `Authorization: Bearer <token>`.

## Request body

- object
  - `postId` string, required

## Response `200`

Updated post

- PostSummary
  - `_id` string
  - `title` string
  - `preview` string
  - `tags` string[]
  - `topics` string[]
  - `path` string: URL slug (assigned at first publish)
  - `fullPath` string: Public URL path: /<blogPath>/<slug>
  - `blogName` string
  - `likeCount` number
  - `commentCount` number
  - `datePublished` number: Unix ms
  - `dateTraveled` number: Unix ms

## Other responses

- `4XX`: Client error — JSON body with a stable `error` code (e.g. not_found, not_authenticated, request_failed) and an optional `hint`.
- `5XX`: Server error — JSON body with `error: "server_error"`.

---

[API](https://skmtc.dev/vakantio/apis/vakantio-api.md) · [All operations](https://skmtc.dev/vakantio/apis/vakantio-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vakantio/apis/vakantio-api/revisions/2e1306807326?raw)
