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

# Set reaction on article

> Creates or updates the caller's reaction for the article. One reaction per actor (authenticated user, or guest fingerprint) is kept, so submitting `like` after `dislike` switches it. Reactions are rejected with 403 when the article, its category, or its sub-category disables reactions.



## OpenAPI

````yaml /api-reference/ai-cms/openapi.json post /articles/{id}/reaction
openapi: 3.1.0
info:
  title: Blog API
  version: 1.0.0
servers:
  - url: https://api.octaviatech.app/cms
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Tags
    description: Tag management endpoints
paths:
  /articles/{id}/reaction:
    post:
      tags:
        - Articles
      summary: Set reaction on article
      description: >-
        Creates or updates the caller's reaction for the article. One reaction
        per actor (authenticated user, or guest fingerprint) is kept, so
        submitting `like` after `dislike` switches it. Reactions are rejected
        with 403 when the article, its category, or its sub-category disables
        reactions.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{24}$
            example: '{{objectId}}'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - type
              properties:
                type:
                  type: string
                  description: Reaction to record
                  enum:
                    - like
                    - dislike
                captchaToken:
                  type: string
                  description: >-
                    Captcha token. Required when the caller is treated as a
                    guest and the tenant has `requireCaptchaForGuestEngagement`
                    enabled.
                guestId:
                  type: string
                  description: >-
                    Stable client-generated guest identifier. Used to build the
                    guest fingerprint together with IP and user agent when the
                    caller is unauthenticated.
            examples:
              Like Article:
                value:
                  type: like
              Dislike Article As Guest:
                value:
                  type: dislike
                  guestId: guest-7f3a1
                  captchaToken: 03AGdBq26...
      responses:
        '200':
          description: OK
          content:
            application/json:
              example:
                success: true
                statusCode: 200
                message: Reaction saved successfully
                data:
                  articleId: '{{objectId}}'
                  reaction: like
                  likes: 12
                  dislikes: 3
        '400':
          description: >-
            Bad request (invalid article id, unsupported reaction type, or
            missing guest identity)
          content:
            application/json:
              example:
                success: false
                statusCode: 400
                message: Reaction type must be 'like' or 'dislike'
                data: null
        '401':
          description: >-
            Unauthorized (missing auth context, or captchaToken required for
            guest engagement)
          content:
            application/json:
              example:
                success: false
                statusCode: 401
                message: captchaToken is required for guest engagement
                data: null
        '403':
          description: >-
            Forbidden (reactions disabled, or guest reactions disabled for this
            tenant)
          content:
            application/json:
              example:
                success: false
                statusCode: 403
                message: Reactions are disabled for this article
                data: null
        '404':
          description: Article not found
          content:
            application/json:
              example:
                success: false
                statusCode: 404
                message: Article not found
                data: null
        '429':
          description: Too many requests (guest rate limit exceeded)
          content:
            application/json:
              example:
                success: false
                statusCode: 429
                message: Too many guest reactions, please try later
                data: null
        '500':
          description: Server error
          content:
            application/json:
              example:
                success: false
                statusCode: 500
                message: Server Error
                data: null
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````