Skip to main content

Create post

Create reflection/post by sending a POST request with required params.Please see body schema for required params and their description.

Query Parameters
    client_auth_token string required

    Client API token

Header Parameters
    access-token string required

    user access token

    token-type string required

    Default value: Bearer

    token type

    Example: Bearer
    client string required

    client access token

    expiry string required

    author's access token expiry timestamp

    Example: 1586092545
    uid string required

    author's uid

    Example: user@quranreflect.com
Request Body
    post object
    body string

    the post body

    draft boolean

    Default value: false

    Provide true if this a private note of user.

    tag_ids string[]

    list of tag ids

    filters_attributes object[]

    List of ayah/surah references for this reflection.You can add multiple references.

  • Array [
  • chapter_id integer

    surah number

    from integer

    From ayah number, use from and to if this reflection is for range of ayah. If both from and to are missing, that'll means user is referencing full surah for this post.

    to integer

    to ayah number. We'll use from value if this is blank(that'll mean a single ayah is being referenced for this post)

  • ]
  • room_id integer

    room id if creating post in a room/group

Responses

Example response


Schema
    success boolean

    Default value: true

    message string

    Possible values: [post created successfully]

    Default value: post created successfully

    post object

    Post/Reflection model

    id integer

    The ID of the post.

    body string

    the post text

    likes integer

    The number of likes.

    draft boolean

    Whether the post should be publicly viewed or not.

    published_at string

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

    room_id nullable
    global boolean

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

    editable boolean

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

    deletable boolean

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

    reportable boolean

    Whether the current user can report the post or not.

    citation_texts object[]
  • Array [
  • id integer
    text string

    translation text

    translated_name string

    name of the translation

    from integer

    from ayah number

    to integer

    to ayah number

    translation_id integer
  • ]
  • language string

    The language of the post.

    detected_translation integer
    views integer

    The number of views.

    group nullable
    group_link nullable
    comments object[]
    liked boolean
    author object
    id integer
    username string
    name string
    verified boolean
    profile_img string
    filters object[]
  • Array [
  • id integer
    from integer nullable
    to integer nullable
    indicator_text string
  • ]
  • tags object[]
  • Array [
  • id integer
    name string

    the #tag

  • ]
  • estimated_reading_time float

    Default value: 0

    The average time it takes to read the post

Loading...