CommentsController_create |
Add a comment to a post or reply to an existing comment. Supports mentions and notifies the post author. |
|
| required |
description |
content |
true |
Comment with postId and optional parentId |
| application/json |
| schema |
| type |
properties |
required |
title |
object |
| comment |
| description |
allOf |
Comment details for creation |
| type |
properties |
required |
title |
object |
| body |
postId |
isPrivate |
parentId |
mentions |
| type |
description |
example |
maxLength |
string |
Comment body text |
This is a thoughtful comment about the post |
8000 |
|
| type |
description |
example |
number |
ID of the post this comment belongs to |
123 |
|
| type |
default |
description |
example |
boolean |
false |
Whether the comment is private |
false |
|
| type |
description |
example |
number |
ID of the parent comment (for replies) |
456 |
|
| description |
type |
items |
User mentions in the comment |
array |
| type |
properties |
required |
title |
object |
| marker |
userId |
displayName |
| type |
pattern |
example |
string |
/{{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}}}/ |
{{9e639c0f-e02f-c32f-b0ae-e0d8c8d80b2d}} |
|
|
|
|
marker |
userId |
displayName |
|
UserMentionAttributes |
|
|
|
|
CreateCommentDto |
|
|
|
|
|
CreateCommentBody |
|
|
|
|
| 201 |
400 |
401 |
404 |
| description |
content |
Comment created |
| application/json |
| schema |
| type |
properties |
required |
title |
object |
| comment |
success |
| type |
properties |
required |
title |
object |
| id |
postId |
authorId |
parentId |
isPrivate |
body |
createdAt |
updatedAt |
toxicityScore |
repliesCount |
likesCount |
reported |
removed |
hidden |
languageId |
languageName |
moderationStatus |
author |
mentions |
tags |
|
|
|
|
| type |
default |
boolean |
false |
|
|
| format |
type |
date-time |
string |
|
| format |
type |
date-time |
string |
|
|
|
|
| type |
default |
boolean |
false |
|
| type |
default |
boolean |
false |
|
| type |
default |
boolean |
false |
|
|
|
|
| type |
properties |
required |
title |
object |
| postsCount |
avatarUrls |
id |
username |
verified |
firstName |
lastName |
memberType |
|
| type |
properties |
object |
| small |
medium |
large |
| required |
type |
true |
string |
|
| required |
type |
true |
string |
|
| required |
type |
true |
string |
|
|
|
|
|
| type |
default |
boolean |
false |
|
|
|
|
|
|
CommentAuthor |
|
| type |
items |
array |
| type |
properties |
required |
title |
object |
| postsCount |
avatarUrls |
id |
username |
verified |
firstName |
lastName |
memberType |
locations |
followersCount |
displayName |
|
| type |
properties |
object |
| small |
medium |
large |
| required |
type |
true |
string |
|
| required |
type |
true |
string |
|
| required |
type |
true |
string |
|
|
|
|
|
| type |
default |
boolean |
false |
|
|
|
|
|
|
|
|
avatarUrls |
id |
locations |
followersCount |
|
UserWithMentionLocations |
|
|
| type |
items |
array |
| type |
properties |
required |
title |
object |
| language |
id |
name |
commentsCount |
|
|
|
|
|
|
CommentTag |
|
|
|
id |
postId |
authorId |
parentId |
isPrivate |
body |
createdAt |
updatedAt |
|
Comment |
|
|
|
|
CreateCommentResponse |
|
|
|
|
| description |
Invalid comment - empty body or invalid postId |
|
| description |
User not authenticated |
|
| description |
Post or parent comment not found |
|
|
|
| url |
description |
|
Pre-production Server |
|
| url |
description |
|
Production Server |
|
|
post |
/v1/comments |
|
| x-auth-token |
x-client-id |
| type |
in |
name |
description |
apiKey |
header |
x-auth-token |
The JWT access token required for accessing the endpoints. |
|
| type |
in |
name |
description |
apiKey |
header |
x-client-id |
Your client id |
|
|
| comment |
| body |
postId |
isPrivate |
parentId |
mentions |
This is a thoughtful comment about the post |
123 |
false |
456 |
| marker |
userId |
displayName |
{{9e639c0f-e02f-c32f-b0ae-e0d8c8d80b2d}} |
string |
string |
|
|
|
|
| title |
version |
description |
User-related APIs |
1.0.0 |
Quran.Foundation user-related APIs enable your app to seamlessly integrate with Quran.Foundation's user-centric features, providing access to personalized notes, bookmarks, goals, streaks, reading sessions, and more. This differentiates them from [content APIs](/docs/category/content-apis) that focus on non-user-specific resources like translations, tafsirs, and verses.
## How to get access
We are using OAuth2 flows to authenticate and authorize requests. To get started, you need to [get an access token](/docs/tutorials/oidc/getting-started-with-oauth2#obtaining-oauth-20-client-credentials) to make requests to our APIs. Then follow the steps mentioned [here](/docs/tutorials/oidc/getting-started-with-oauth2).
## Pagination
We are using cursor based pagination. The pagination query params consist of `first`,`after`, `before` and `last`.
Example
- `first: 10` will give you first 10 items
- `first: 10, after: xyz` will give you first 10 items after the item with id `xyz`
- `last: 10` will give you the last 10 items
- `last: 10, before: xyz` will give you the last 10 items before the item with id `xyz`
The only possible combinations are `first + after` or `last + before`. They should not be used together |
|
| name |
description |
url |
header |
method |
body |
Create a new comment |
| content |
type |
Add a comment to a post or reply to an existing comment. Supports mentions and notifies the post author. |
text/plain |
|
|
| key |
value |
Content-Type |
application/json |
|
| key |
value |
Accept |
application/json |
|
|
POST |
|
|