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"
  },
  "repliesCount": 123,
  "emotionsData": {},
  "requesterContext": {}
}

Headers

x-request-id
string<uuid>
required

A unique request identifier.

Example:

"cca18efc-7b9d-43bd-bda1-a24715fad8fd"

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
emotionsData
object
requesterContext
object