Skip to main content

Get posts

Get list of posts.

Query Parameters
    exactAyah boolean

    Get posts of an exact Ayah only and not of range of Ayahs (the default behavior).

    languages string

    Comma-separated language iso codes, to fetch posts in a specific language(s).

    scholarsPosts boolean

    Include posts of scholars

    authorIds integer[]

    The Ids of the authors of the posts

    studentsOfKnowledgePosts boolean

    Include posts of students of knowledge

    verified boolean

    Include verified posts

    approved boolean

    Include approved posts

    updatedSince string

    Get posts that are updated after the given date (inclusive).

    filters object

    Further customize the results, you can fetch posts of specific members, post that have specific tags, post for specific surah, ayah range or single ayah etc.

    tab string

    Possible values: [newest, following, draft, favorite, most_popular, only_room_members, public, feed]

    Default value: most_popular

    newest = Recent posts will be at the top.

    following = Get posts of authors the current user is following.

    draft = Get current user's private posts.

    favorite = Get current user's favorite posts.

    most_popular = Get most popular posts.

    only_room_members = Get posts that are posted by current room members.

    public = Include public posts of private rooms.

    feed = When passed, this will ignore most passed filters and send verified posts (if verified = true), posts by scholars and student of knowledge, verified posts, posts from author the user is following.

    feed boolean

    Include only trusted posts and posts by author the user is following.

    page integer

    The current post page. Each page will have 25 posts by default. pages response field will have the total number of pages.

Responses

Request has been handled successfully.


Schema
    success boolean
    data object
    posts object[]

    List of posts

  • Array [
  • id integer required

    The ID of the post.

    body string required

    The body of the post.

    likes integer required

    The number of likes.

    isPrivate boolean required

    Default value: false

    Whether the post should be publicly viewed or not.

    publishedAt string required

    The date the post was published at. Format of the date is MMMM dd, yyyy HH:mm

    createdAt string required

    The date the post was created at. Format of the date is MMMM dd, yyyy HH:mm

    lastUpdated string required

    The date the post was last updated. Format of the date is MMMM dd, yyyy HH:mm

    author object

    Details about the author.

    id integer required

    The id of the author of the comment.

    username string required

    The username of the author of the comment.

    firstName string required

    The first name of the author of the comment.

    lastName string required

    The first name of the author of the comment.

    displayName string required

    The display name of the author of the comment.

    verified boolean required

    Whether the comment's author has been verified.

    profileImage string nullable required

    The profile image of the author of the comment. Will be null if it's empty

    followed boolean required

    Whether the current user is following the author of the comment or not.

    language string required

    The language of the post.

    liked boolean required

    Default value: false

    Whether the post was liked by the current user or not.

    saved boolean required

    Default value: false

    Whether the post was saved by the current user or not.

    verified boolean required

    Default value: false

    Whether the post is verified or not.

    hidden boolean required

    Default value: false

    Whether the post is hidden or not.

    views integer required

    The number of views.

    global boolean required

    Default value: false

    Whether the post is global or not. A post inside a room can be set to global and becomes visible to everyone.

    editable boolean required

    Default value: false

    Whether the post is editable or not. It will be true if the post belongs to the current user.

    deletable boolean required

    Default value: false

    Whether the post is deletable or not. It will be true if the post belongs to the current user.

    reportable boolean required

    Default value: false

    Whether the current user can report the post or not.

    restorable boolean required

    Default value: false

    Whether the current user can restore the post after it was deleted or not.

    comments object[]

    List of comments that belong to the post.

  • Array [
  • id integer required

    The id of the comment.

    createdAt string required

    The creation date of the comment.

    hidden boolean required

    Whether the comment is hidden.

    body string required

    The body of the comment.

    parentId integer nullable required

    The parent comment's id. Will be null if this comment does not have a parent.

    author object

    Details about the author.

    id integer required

    The id of the author of the comment.

    username string required

    The username of the author of the comment.

    firstName string required

    The first name of the author of the comment.

    lastName string required

    The first name of the author of the comment.

    displayName string required

    The display name of the author of the comment.

    verified boolean required

    Whether the comment's author has been verified.

    profileImage string nullable required

    The profile image of the author of the comment. Will be null if it's empty

    followed boolean required

    Whether the current user is following the author of the comment or not.

  • ]
  • commentsCount integer required

    The number of comments the post has. This includes private comments.

    publicCommentsCount integer required

    The number of public comments the post has.

    roomId integer nullable required

    The Id of the room the post belongs to.

    group string nullable required

    The name of the group the post belongs to. Will be null it the post does not belong to a group.

    groupLink string nullable required

    The link to the group the post belongs to. Will be null it the post does not belong to a group.

    postTitle string required

    A social-media sharable title of the post.

    references object[]
  • Array [
  • surahId integer required

    Possible values: >= 1 and <= 114

    The Surah number

    fromAyah integer nullable

    Possible values: >= 1 and <= 286

    The start of the range of Ayah(s) in a Surah that the post relates to.

    If it's a single Ayah,fromAyah and toAyah should have the same value.

    If the post belongs to the entire Surah, fromAyah and toAyah should be left empty

    toAyah integer nullable

    Possible values: >= 1 and <= 286

    The end of the range of Ayah(s) in a Surah that the post relates to.

    If it's a single Ayah,fromAyah and toAyah should have the same value.

    If the post belongs to the entire Surah, fromAyah and toAyah should be left empty

    isSurah boolean

    Default value: false

    Whether the post belongs to the entire Surah.

  • ]
  • tags object[]

    List of tags the post belongs to. If tags not passed with update post API, existing references of the post will be removed.

  • Array [
  • id integer required

    The Id of the tag

    name string required

    The name of the tag.

    language string required

    The language of the tag.

  • ]
  • roomPostStatus RoomPostStatus required

    Possible values: [as_room, publicly, only_members]

    The room post status.

    estimatedReadingTime float required

    The average number of milliseconds it takes to read the post. It can be 0 if the value could not be estimated.

  • ]
  • pages integer

    Number of pages matching the queried posts

Loading...