Retrieves detailed information about a specific post, including the post content, media, comments, and engagement metrics. The response includes information about whether the viewing user has saved the post and handles blocking relationships.
Endpoint
Authentication
This endpoint does not require authentication, but may return different results for authenticated users.
Path Parameters
The unique identifier (PostID) of the post to retrieve
Request Body
Optional username of the viewing user. Used to determine if the post is saved by this user and to check blocking relationships.
Request Example
curl -X GET https://api.example.com/api/posts/12345 \
-H "Content-Type: application/json" \
-d '{
"userName": "john_doe"
}'
Response
{
"postOwnerPfpUrl" : "https://example.com/pfp/user123.jpg" ,
"postOwnerUserName" : "jane_smith" ,
"dateCreated" : "2026-03-04T10:30:00Z" ,
"likesCount" : 42 ,
"postCaption" : "Beautiful sunset at the beach today!" ,
"postMedias" : [
{
"postMediaID" : 1 ,
"postID" : 12345 ,
"mediaType" : "Image" ,
"mediaURL" : "https://example.com/images/sunset.jpg"
}
],
"postComments" : [
{
"commentID" : 101 ,
"postID" : 12345 ,
"commenterID" : 456 ,
"commentText" : "Amazing photo!" ,
"likeCount" : 5 ,
"createdAt" : "2026-03-04T11:00:00Z" ,
"isDeleted" : false
}
],
"isSaved" : true
}
Username of the post creator
Timestamp when the post was created
Total number of likes on the post
The text content of the post (max 800 characters)
Array of media attachments Unique identifier for the media item
Type of media: Image or Video
Array of comments on the post Unique identifier for the comment
The comment text content (max 1000 characters)
Number of likes on the comment
When the comment was created
Whether the comment has been deleted
Whether the viewing user has saved this post (requires userName in request)
Error Responses
"This post does not exist"
Returned when no post exists with the specified ID.
"This post has been deleted"
Returned when the post exists but has been soft deleted.
"Action cannot be completed due to a block."
Returned when there is a blocking relationship between the viewing user and the post owner.