Hi guys I just tried to create a text post via API but response showed it can’t create post because
{
"status": "error",
"message": "Parameters validation error!",
"code": 500000,
"data": {
"detail": [
"The 'dataType' field fails to match the required pattern."
]
}
}
API I used:
curl --location --request POST 'https://api.sg.amity.co/api/v3/posts' \
--header 'Authorization: Bearer ADMINTOKEN' \
--header 'Content-Type: application/json' \
--data-raw '{
"targetType": "community",
"targetId": "9a9ddb84d8cd2c3799c401095be34470",
"dataType": "text",
"metadata": {
"liveNow": false
},
"tags": [],
"data": {
"text": "TestLiveNoww"
},
"children": [],
"mentionees": []
}'