Can't Create a text Post via API

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": []
}'

Hi @naphat

dataType shouldn’t be sent if you’re creating a normal text, image, file or video post. dataType is used when you want to create a custom post and it should be in format of custom.<your-custom-type for example custom.newsarticle