> ## Documentation Index
> Fetch the complete documentation index at: https://docs.salesive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Like comment

> Like a comment.

## Request

```http theme={null}
POST /comments/696cec2f1f6748186587748e/like
Authorization: Bearer {{token}}
x-shop-id: {{shopId}}
```

## Headers

| Header          | Type   | Description                                   |
| --------------- | ------ | --------------------------------------------- |
| `Authorization` | string | Provide the customer token as `Bearer <jwt>`. |
| `x-shop-id`     | string | Identify the shop.                            |

## Path parameters

| Parameter   | Type   | Required | Description                 |
| ----------- | ------ | -------- | --------------------------- |
| `commentId` | string | Yes      | Comment identifier to like. |

## Successful response

```json theme={null}
{
    "status": 200,
    "success": true,
    "message": "Comment like toggled",
    "data": {
        "likes": 1,
        "dislikes": 0,
        "isLiked": true,
        "isDisliked": false
    }
}
```

## Error response

```json theme={null}
{
    "status": 404,
    "success": false,
    "message": "Comment not found",
    "data": {}
}
```


## OpenAPI

````yaml POST /comments/{commentId}/like
openapi: 3.1.0
info:
  title: Salesive Store API
  description: >-
    REST interface for querying products, categories, and merchandising banners
    exposed by Salesive storefronts.
  version: 1.0.0
servers:
  - description: Production
    url: https://store.salesive.com/api/v1
security:
  - BearerAuth: []
    ShopIdHeader: []
paths:
  /comments/{commentId}/like:
    post:
      summary: Like comment
      description: Like a comment.
      parameters:
        - $ref: '#/components/parameters/XShopIdHeader'
        - name: commentId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Comment liked successfully
components:
  parameters:
    XShopIdHeader:
      name: x-shop-id
      in: header
      description: >-
        Optional identifier that scopes responses to a specific storefront when
        the referer cannot be inferred.
      required: false
      schema:
        type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT issued by the Salesive Store API for authenticated shoppers.
    ShopIdHeader:
      type: apiKey
      in: header
      name: x-shop-id
      description: >-
        Optional storefront identifier sent as a header to scope responses to a
        specific shop. Try It requests remember this value once provided.

````