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

# Add Reaction

> Add an emoji reaction to a comment.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/comments/{comment_id}/reactions
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/comments/{comment_id}/reactions:
    post:
      tags:
        - comments
      summary: Add Reaction
      description: Add an emoji reaction to a comment.
      operationId: comments.post_comments_post_comments_by_comment_id_reactions
      parameters:
        - in: path
          name: comment_id
          required: true
          schema:
            title: Comment Id
            type: string
        - in: query
          name: hub_id
          required: true
          schema:
            title: Hub Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ReactionCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ReactionResponse'
          description: Successful Response
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    ReactionCreateRequest:
      additionalProperties: false
      description: >-
        Top-level envelope for POST /api/comments/<id>/reactions.


        Shape: { "data": { "type": "comment_reactions", "attributes": { "emoji":
        "..." } } }
      properties:
        data:
          $ref: '#/components/schemas/ReactionCreateResource'
      required:
        - data
      title: ReactionCreateRequest
      type: object
    ReactionResponse:
      description: |-
        Single-item JSON:API envelope for a reaction.

        Shape: { "data": <ReactionResource> }
      properties:
        data:
          $ref: '#/components/schemas/ReactionResource'
      required:
        - data
      title: ReactionResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ReactionCreateResource:
      additionalProperties: false
      description: JSON:API resource wrapper for a reaction create request.
      properties:
        attributes:
          $ref: '#/components/schemas/ReactionCreateAttributes'
        type:
          const: comment_reactions
          title: Type
          type: string
      required:
        - type
        - attributes
      title: ReactionCreateResource
      type: object
    ReactionResource:
      description: |-
        JSON:API resource object for a comment reaction.

        Shape:
        {
          "type": "comment_reactions",
          "id": "<uuid>",
          "attributes": { "comment_id": "...", "contact_id": "...", "emoji": "...",
                          "created_at": "..." }
        }
      properties:
        attributes:
          $ref: '#/components/schemas/ReactionAttributes'
        id:
          title: Id
          type: string
        type:
          const: comment_reactions
          default: comment_reactions
          title: Type
          type: string
      required:
        - id
        - attributes
      title: ReactionResource
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ReactionCreateAttributes:
      additionalProperties: false
      description: Attributes for POST /api/comments/<id>/reactions.
      properties:
        emoji:
          maxLength: 40
          minLength: 1
          title: Emoji
          type: string
      required:
        - emoji
      title: ReactionCreateAttributes
      type: object
    ReactionAttributes:
      description: Attributes for a comment_reaction JSON:API resource object.
      properties:
        comment_id:
          title: Comment Id
          type: string
        contact_id:
          title: Contact Id
          type: string
        created_at:
          format: date-time
          title: Created At
          type: string
        emoji:
          title: Emoji
          type: string
      required:
        - comment_id
        - contact_id
        - emoji
        - created_at
      title: ReactionAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````