curl --request POST \
--url https://api.example.com/api/reply_to_post \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"post_id": 123,
"content": "<string>"
}
'{
"message": "<string>"
}Create a reply to an existing post
curl --request POST \
--url https://api.example.com/api/reply_to_post \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"post_id": 123,
"content": "<string>"
}
'{
"message": "<string>"
}POST /api/reply_to_post
201 Created
{
"message": "reply created"
}
400 Bad Request
{
"error": "missing post_id or content"
}
post_id or content is missing from the request body.
{
"error": "reply content cannot exceed 512 characters"
}
401 Unauthorized
{
"error": "invalid token, please re-login"
}
{
"error": "unauthorized"
}
404 Not Found
{
"error": "post not found"
}
curl -X POST https://api.example.com/api/reply_to_post \
-H "Authorization: your-auth-token" \
-H "Content-Type: application/json" \
-d '{
"post_id": 123,
"content": "Great post! I totally agree with this."
}'
{
"message": "reply created"
}
replies table linked to the original post via post_id