API ReferenceapicommunityPOST /v1/comments/{comment_id}/reactions

POST /v1/comments/\{comment_id\}/reactions

Service: community · operationId: (none)

Required scopes

(no scope declared — review service config)

Path parameters

  • comment_id (string) required

Request body

{
  "type": "object",
  "properties": {
    "kind": {
      "type": "string",
      "enum": [
        "upvote",
        "downvote",
        "heart",
        "fire",
        "brain",
        "hands",
        "eyes"
      ]
    }
  },
  "required": [
    "kind"
  ]
}

Responses

200 Comment reaction toggled

{
  "type": "object",
  "properties": {
    "score": {
      "type": "integer"
    },
    "reactionCounts": {
      "type": "object",
      "additionalProperties": {
        "type": "integer"
      }
    },
    "viewerReactions": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "upvote",
          "downvote",
          "heart",
          "fire",
          "brain",
          "hands",
          "eyes"
        ]
      }
    },
    "active": {
      "type": "boolean"
    }
  },
  "required": [
    "score",
    "reactionCounts",
    "viewerReactions",
    "active"
  ]
}

403 User restricted from reacting

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

404 Comment not found

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

429 Rate limit exceeded

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://community.platform.loop.health/v1/comments/{comment_id}/reactions \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'