These are authenticated endpoints. You can visit authentication to get an access token.
These endpoints allow you to manage profiles. They are the users of the social network and are the owners of posts.
These endpoints support pagination and sorting. Read more about these features here .
Prop Type Default string
- string
- string
- string
- -
Not all of the properties of a post are returned by default. You can use the following optional query parameters to include additional properties in the response.
Prop Type Default boolean
false
boolean
false
boolean
false
Example with all optional query parameters {
"name" : "string" ,
"email" : "user@example.com" ,
"banner" : "https://url.com/image.jpg" ,
"avatar" : "https://url.com/image.jpg" ,
"followers" : [
{
"name" : "string" ,
"avatar" : "https://url.com/image.jpg"
}
],
"following" : [
{
"name" : "string" ,
"avatar" : "https://url.com/image.jpg"
}
],
"posts" : [
{
"id" : 0 ,
"owner" : "string" ,
"title" : "string" ,
"body" : "string" ,
"tags" : [ "string" ],
"media" : "https://url.com/image.jpg" ,
"created" : "2022-09-04T08:08:38.830Z" ,
"updated" : "2022-09-04T08:08:38.830Z"
}
],
"_count" : {
"posts" : 0 ,
"followers" : 0 ,
"following" : 0
}
}
GET /social/profiles
Retrieve all profiles.
[
{
"name" : "string" ,
"email" : "user@example.com" ,
"banner" : "https://url.com/image.jpg" ,
"avatar" : "https://url.com/image.jpg" ,
"_count" : {
"posts" : 0 ,
"followers" : 0 ,
"following" : 0
}
},
{
"name" : "string" ,
"email" : "user@example.com" ,
"banner" : "https://url.com/image.jpg" ,
"avatar" : "https://url.com/image.jpg" ,
"_count" : {
"posts" : 0 ,
"followers" : 0 ,
"following" : 0
}
}
]
GET /social/profiles/<name>
Retrieve a single profile by its id.
{
"name" : "string" ,
"email" : "user@example.com" ,
"banner" : "https://url.com/image.jpg" ,
"avatar" : "https://url.com/image.jpg" ,
"_count" : {
"posts" : 0 ,
"followers" : 0 ,
"following" : 0
}
}
GET /social/profiles/<name>/posts
Retrieve all posts made by profile.
The response is the same as the posts endpoint, and accepts the same optional query parameters and flags.
[
{
"id" : 0 ,
"title" : "string" ,
"body" : "string" ,
"tags" : [ "string" ],
"media" : "https://url.com/image.jpg" ,
"created" : "2022-09-04T08:08:38.830Z" ,
"updated" : "2022-09-04T08:08:38.830Z"
},
{
"id" : 0 ,
"title" : "string" ,
"body" : "string" ,
"tags" : [ "string" ],
"media" : "https://url.com/image.jpg" ,
"created" : "2022-09-04T08:08:38.830Z" ,
"updated" : "2022-09-04T08:08:38.830Z"
}
// ...
]
PUT /social/profiles/<name>/media
Update or set profile banner
and avatar
images.
You can send either or both of the properties in the request body.
Remove profile media by setting the banner
or avatar
property to null
.
Please note that the avatar
and banner
properties must be fully formed URLs that links to live and publicly accessible images. The API will check the provided URLs and if they cannot be accessed publicly you will receive a 400 error response.
{
"banner" : "https://url.com/image.jpg" ,
"avatar" : "https://url.com/image.jpg"
}
{
"name" : "string" ,
"email" : "user@example.com" ,
"banner" : "https://url.com/image.jpg" ,
"avatar" : "https://url.com/image.jpg" ,
"_count" : {
"posts" : 0 ,
"followers" : 0 ,
"following" : 0
}
},
PUT /social/profiles/<name>/follow
PUT /social/profiles/<name>/unfollow
Follow or unfollow another profile by its name.
The request body should be empty.
{
"name" : "string" ,
"email" : "user@example.com" ,
"banner" : "https://url.com/image.jpg" ,
"avatar" : "https://url.com/image.jpg" ,
"_count" : {
"posts" : 0 ,
"followers" : 0 ,
"following" : 0
}
},