Skip to content

Get Contact By Comment ​

PUThttps://api.repliz.com/public/contact/comment/{commentId}

Retrieve the contact of the person who wrote a stored comment. The contact is created from the comment when the comment came in before contacts existed; an existing contact is returned unchanged.

Endpoint Details ​

  • Authentication: Basic Auth (Authorization: Basic Base64(AccessKey:SecretKey))
  • Access Tier: Standard+

Parameters ​

ParameterTypeRequiredDescription
commentIdstringYesID of the comment in Repliz, the _id from Get Comment. This isn't the platform's comment ID.

Example Request ​

bash
curl -X PUT "https://api.repliz.com/public/contact/comment/69afe793cb043c8192dcc3c7" \
  -H "Authorization: Basic $(echo -n 'YOUR_ACCESS_KEY:YOUR_SECRET_KEY' | base64)"
javascript
import axios from 'axios';

const commentId = '69afe793cb043c8192dcc3c7';

const response = await axios.put(
  `https://api.repliz.com/public/contact/comment/${commentId}`,
  {},
  {
    auth: {
      username: 'YOUR_ACCESS_KEY',
      password: 'YOUR_SECRET_KEY',
    },
  },
);

console.log(response.data);
javascript
const credentials = btoa('YOUR_ACCESS_KEY:YOUR_SECRET_KEY');

const commentId = '69afe793cb043c8192dcc3c7';

const response = await fetch(`https://api.repliz.com/public/contact/comment/${commentId}`, {
  method: 'PUT',
  headers: {
    Authorization: `Basic ${credentials}`,
  },
});

const data = await response.json();
console.log(data);

Response ​

json
{
  "_id": "690a1f3ce12f2f72916f67e1",
  "accountId": "69686c4c41ec8ac5117c8929",
  "externalId": "6793729447315239",
  "name": "Shika",
  "picture": "https://platform-lookaside.fbsbx.com/platform/profilepic/?psid=6793729447315239",
  "sources": [
    "comment",
    "chat"
  ],
  "stage": "interested",
  "tags": [
    "reseller",
    "jakarta"
  ],
  "note": "Asked for the reseller price list.",
  "followUp": {
    "at": "2026-11-05T02:00:00.000Z",
    "note": "Send the new catalog.",
    "message": "Halo kak, ini katalog terbaru kami."
  },
  "lastText": "Harga reseller berapa kak?",
  "lastSource": "chat",
  "lastCommentId": "69afe793cb043c8192dcc3c7",
  "chatId": "69b0a1c2cb043c8192dcc401",
  "lastInteractionAt": "2026-11-04T08:12:00.000Z",
  "lastChatAt": "2026-11-04T08:12:00.000Z",
  "userId": "6879b98097fc8c8a78d1d4c1",
  "createdAt": "2026-11-04T07:55:10.000Z",
  "updatedAt": "2026-11-04T08:20:00.000Z",
  "account": {
    "_id": "69686c4c41ec8ac5117c8929",
    "name": "Halaman ke 3",
    "username": "Cafe",
    "picture": "https://scontent-cgk2-1.xx.fbcdn.net/v/t39.30808-1/281663458_113958441315334_...",
    "isConnected": true,
    "type": "facebook",
    "id": "69686c4c41ec8ac5117c8929"
  },
  "id": "690a1f3ce12f2f72916f67e1"
}
json
{
  "code": 404,
  "message": "comment not found"
}
json
{
  "code": 401,
  "message": "unauthorized"
}