Skip to main content
POST
/
api
/
v1
/
reactions
/
{postId}
/
comment
Create a comment on a post
curl --request POST \
  --url https://public-api.etoro.com/api/v1/reactions/{postId}/comment \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --header 'x-request-id: <x-request-id>' \
  --header 'x-user-key: <x-user-key>' \
  --data '
{
  "owner": 12345,
  "message": "Great analysis! Thanks for sharing.",
  "tags": {
    "tags": [
      {
        "name": "string",
        "id": "string"
      }
    ]
  },
  "mentions": {
    "mentions": [
      {
        "userName": "string",
        "id": "string",
        "isDirect": true
      }
    ]
  },
  "attachments": [
    {
      "url": "string",
      "title": "string",
      "host": "string",
      "description": "string",
      "mediaType": "None",
      "media": {
        "image": {
          "width": 0,
          "height": 0,
          "url": "string"
        },
        "video": {
          "videoSourceId": "string",
          "videoSource": "None",
          "image": {
            "width": 0,
            "height": 0,
            "url": "string"
          }
        }
      }
    }
  ]
}
'
{
  "entity": {
    "message": {
      "text": "<string>",
      "languageCode": "<string>"
    },
    "id": "<string>",
    "owner": {
      "id": "<string>",
      "username": "<string>",
      "firstName": "<string>",
      "lastName": "<string>",
      "avatar": {
        "small": "<string>",
        "medium": "<string>",
        "large": "<string>"
      },
      "roles": [
        "<string>"
      ],
      "isBlocked": true,
      "isPrivate": true,
      "countryCode": 123,
      "piLevel": 123
    },
    "created": "2023-11-07T05:31:56Z",
    "obsoleteId": "<string>",
    "attachments": [
      {
        "type": "image",
        "url": "<string>",
        "thumbnailUrl": "<string>",
        "host": "<string>",
        "mediaType": "None",
        "media": {},
        "metadata": {
          "width": 123,
          "height": 123,
          "duration": 123
        }
      }
    ],
    "isSpam": true,
    "editStatus": "None",
    "parent": {
      "id": "<string>",
      "obsoleteId": "<string>",
      "type": "<string>"
    }
  },
  "repliesCount": 123,
  "replies": [
    {}
  ],
  "emotionsData": {
    "like": {
      "paging": {
        "totalCount": 123
      },
      "emotions": [
        {
          "type": "<string>",
          "id": "<string>",
          "owner": {
            "id": "<string>",
            "username": "<string>",
            "firstName": "<string>",
            "lastName": "<string>",
            "avatar": {
              "small": "<string>",
              "medium": "<string>",
              "large": "<string>"
            },
            "roles": [
              "<string>"
            ],
            "isBlocked": true,
            "isPrivate": true,
            "countryCode": 123,
            "piLevel": 123
          },
          "obsoleteId": "<string>",
          "parent": {
            "id": "<string>",
            "obsoleteId": "<string>",
            "type": "<string>"
          },
          "created": "2023-11-07T05:31:56Z"
        }
      ]
    }
  },
  "requesterContext": {
    "isFlaggingAsSpam": true,
    "isSubscribed": true,
    "isLiking": true,
    "isSaved": true,
    "isPinned": true,
    "isRequesterBlocking": true,
    "isInteractionRestricted": true,
    "isFollowing": true
  }
}

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"c98a6a85-6f99-44d8-b102-faea73c07a18"

x-api-key
string<password>
required

API key for authentication.

Example:

"lhgfaslk21490FAScVPkdsb53F9dNkfHG4faZSG5vfjndfcfgdssdgsdHF4663"

x-user-key
string<password>
required

User-specific authentication key.

Example:

"eyJlYW4iOiJVbnJlZ2lzdGVyZWRBcHBsaWNhdGlvbiIsImVrIjoiOE5sZ2cwcW5EUVdROUFNWGpXT2lmOWktZnpidG5KcUlqWGJ3WHJZZkpZcldrbG90ZEhvLVBjSWhQaU8xU1ZtMW84aU1WZGZqN2xWNzFjLXFxLmcybXE1dnh4Q1hUT25xaWRUaTFlcEhmVk1fIn0_"

Path Parameters

postId
string
required

ID of the post to comment on

Body

application/json

Comment creation details

Request model for creating a new comment

owner
integer
required

ID of the user creating the comment

Example:

12345

message
string
required

The text content of the comment

Example:

"Great analysis! Thanks for sharing."

tags
object

Tags associated with a post or comment

mentions
object

Mentions included in a post or comment

attachments
object[]

List of attachments for a post or comment

Response

201 - application/json

Comment created successfully

entity
object
repliesCount
integer
replies
object[]
emotionsData
object
requesterContext
object