cURL
curl --request POST \ --url https://localhost:5000/posts/create \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "image": "<string>", "image_public_id": "<string>", "caption": "<string>" } '
{ "success": true, "message": "Post created successfully", "post": { "image": "<string>", "image_public_id": "<string>", "author": "<string>", "_id": "<string>", "caption": "<string>", "likes": [ "<string>" ], "createdAt": "2023-11-07T05:31:56Z", "updatedAt": "2023-11-07T05:31:56Z" } }
Create a new post with caption and image URLs
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bearer <token>
<token>
JSON stringified array of image URLs
JSON stringified array of image public IDs
Post caption
Post created successfully
true
"Post created successfully"
Show child attributes