Commet Create API
The "create comment" API allows a user to add a new comment to a specific post.
Query Parameters
client_auth_token string required
Client API token
Header Parameters
access-token string required
user access token
client string required
client access token
expiry string required
timestamp of token expiry
Example: 1531315250
token-type string required
access token type
Example: Bearer
uid string required
user uid
Example: user@quranreflect.com
application/json
Request Body
Sample request body, parent_id
is optional, set this if user is replying to another comment. Either post_id
or parent_id
should be present.
comment object
body string required
comment body
post_id integer
post id, optional
is_private boolean
Set this to true if this is a private comment
parent_id integer
Set the parent comment ID is this is a reply to another comment.
Responses
- 200
- 400
- 500
Comment created
Response Headers
application/json
Schema
Example (from schema)
example-0
example-1
Schema
success boolean
message string
{
"success": true,
"message": "string"
}
Commet Create API (true)
{
"success": true,
"message": "Comment created successfully"
}
Commet Create API false success
{
"success": false,
"message": "Couldn't create comment"
}
Example response
application/json
Schema
Example (from schema)
Example 1
Schema
success boolean
errors string
status string
will be 400 ( bad request )
{
"success": true,
"errors": "string",
"status": "string"
}
{
"success": true,
"errors": "Bad request, required params are missing or have invalid value.",
"status": "string"
}
Internal server error, api will respond with 500 if something went wrong processing the request.
application/json
Schema
Example (from schema)
Schema
success boolean required
Default value: false
message string required
Default value: internal server error
error message
{
"success": false,
"message": "internal server error"
}
Loading...