Image message doesn't return "caption"

@amityco/ts-sdk”: “7.8.6”
apiRegion = EU

const imageMessage = {
subChannelId: channelId,
dataType: MessageContentType.IMAGE,
fileId: file.fileId,
caption: text,
};

await MessageRepository.createMessage(imageMessage);

Hello @Svrle , could you please try the sample code below and let us know if the issue still persists?

  const createMessagechatImage = async () => {
     const imageMessage = {
      subChannelId: "channelId123",
      dataType: MessageContentType.IMAGE,
      fileId: uploadedImageId[0].fileId,
      data: {
        caption: "caption inside the data object",
      },
    };
      const data = await MessageRepository.createMessage(imageMessage);
      console.log("chat image created:", data);
  };

@SocialPlus_Support This resolved the issue, is there a part of the docs I missed about the structure of the imageMessage object being sent to createMessage?

Hello @Svrle , Thanks for confirming it’s resolved. You didn’t miss anything—our docs had an inconsistency on the imageMessage payload for createMessage. We’re updating the docs and will add a verified example. Appreciate the heads-up!