Skip to main content
GET
/
:projectId
/
comments
/
by-foreign-id
Get Comment by Foreign ID
curl --request GET \
  --url https://api.replyke.com/api/v6/:projectId/comments/by-foreign-id
{
  "comment": {
    "id": "<string>",
    "foreignId": "<string>",
    "content": "<string>",
    "createdAt": "<string>"
  },
  "parentComment": {}
}
Fetches a single comment using its foreignId. Optionally returns the parent comment if it exists and withParent=true is passed. This is useful when using a custom identifier set by the client, instead of the internal comment ID.

Query Parameters

foreignId
string
required
The external reference ID used to identify a comment
withParent
string
If true, includes the parent comment in the response

Response

comment
object
parentComment
object
Parent comment object (null if no parent or withParent not set)

Error Responses

{
  "error": "Missing valid reference ID in request query",
  "code": "comment/invalid-request"
}
{
  "error": "Comment not found",
  "code": "comment/not-found"
}
{
  "error": "Internal server error.",
  "code": "comment/server-error",
  "details": "[error message]"
}

Notes

  • Requires a valid foreignId to locate the comment.
  • Set withParent=true to include the parent comment.
  • Returns parentComment: null if there is no parent or it’s not requested.
I