---
# System prepended metadata

title: Instagram Clone

---

# Instagram Clone 
## API Endpoints

### Account


| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/auth/signup     | POST     | Add a new user |
| api/v1/auth/signin   |   POST   | Allows a signed user to login  |



### Users
| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/users/     | GET     | Get profile details for the signed user and all his posts |
| api/v1/users/:userId  | GET     | Get profile details for other users and all there posts


### Posts 


| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/posts/     | GET     | Get posts from users that the signed user is following and all its details as the likes number and the author
| api/v1/posts     | POST     | Add a new post  |
| api/v1/posts/:postId     | PUT     | Update post content  |
| api/v1/posts/:postId     |  DELETE    | Delete a post |

### Comments 
| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/comments/:postId     | GET     | Get all comments on the post |
| api/v1/comments/:postId    | POST     | Add a new comment  |
| api/v1/posts/:commentId     | PUT     | Update a comment   |
| api/v1/posts/:commentId     |  DELETE    | Delete a comment by the post's writer  or the user who wrote the comment |

### Stories 
| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/stories/myStory    | GET     | Get all stories of the signed user |
| api/v1/stories/    | GET     | Get all stories of users who are followed by the signed user |
| api/v1/stories/:userId  | GET     | Get all stories of certain user |
| api/v1/stories/    | POST     | Add a new story  |
| api/v1/stories/     | DELETE     | DELETE a story   |


### Bookmarks 
| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/bookmarks/     | GET     | Get all posts in the bookmarks of the signed user |
| api/v1/bookmarks/    | POST     | Add a new post to the bookmarks  |
| api/v1/bookmarks/     | DELETE     | DELETE a post from the bookmarks   |

### Viewers

| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/viewers/:storyId| GET     | Get all users who watched the story|
| api/v1/viewers/:storyId| POST     | Add a new viewer to story|

### Following

| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/following/| GET     | Get all users who are following me (signed user)|
| api/v1/following/:userId| GET     | Get all users who are following a certain user|
| api/v1/following/:userId| POST     | Add a new follower when the signed user follow someone|
| api/v1/following/:userId| DELETE     | Delete a follower|

### Likes

| Route|  Method | Description |
| -------- | -------- | -------- |
| api/v1/likes/:postId| POST     | Add like to the post |
| api/v1/likes/:postId| DELETE     |Delete like from the post|
