Forum Discussion

parveens's avatar
parveens
Contributor
7 years ago

API to create tags not working

We are using V2 endpoint  "https://api.stage.lithium.com/community/2.0/yourtenantId/messages/:messageId/tags"  for attaching tags to a specific message. Here is the sample request

 

 

curl -X POST \
  https://api.stage.lithium.com/community/2.0/tenantId/messages/messageId/tags \
  -H 'authorization: Bearer gfhfgkF5wu2uD54f0n4ohT0Nr1TDgfhfIKreVEmE=' \

  -H 'client-id: VghgfgfhfgGIoY6PpMGEEGb0k4QQJlS+gpSNb' \
  -H 'content-type: application/json' \
  -d '{
    "data": {
    	"type": "tag",
        "text":"fdsfsdfs"
       
    }
}'

 

we are getting the following response:

{
    "status": "error",
    "message": "The resource was not found",
    "data": {
        "type": "error_data",
        "code": 303,
        "developer_message": "sub collection not defined.",
        "more_info": ""
    },
    "metadata": {}
}

Can you please let us know the desired behaviour?

Thanks

 

  • parveens,

    Url you shared of documentation for adding the Tags using V2 is correct.

    Issue you are facing due to version compatibility of your community. As mentioned in the document this API is only work in the release version 17.9 or above of your community.