On this page

13 endpoints.

MethodPathSummary
GET/api/tweetsGet tweets feed (تغذية المنشورات)
POST/api/tweetsCreate a new tweet (إنشاء منشور جديد)
DELETE/api/tweets/{tweetId}Delete a tweet (حذف المنشور)
GET/api/tweets/{tweetId}Get tweet by ID (تفاصيل المنشور)
PATCH/api/tweets/{tweetId}Edit a tweet (تعديل المنشور)
DELETE/api/tweets/{tweetId}/likeUnlike a tweet (إلغاء الإعجاب)
POST/api/tweets/{tweetId}/likeLike a tweet (إعجاب بالمنشور)
PATCH/api/tweets/{tweetId}/pinPin a tweet (تثبيت المنشور)
GET/api/tweets/{tweetId}/poll/resultsGet poll results (نتائج الاستطلاع)
POST/api/tweets/{tweetId}/poll/voteVote on a poll (التصويت في استطلاع)
PATCH/api/tweets/{tweetId}/unpinUnpin a tweet (إلغاء تثبيت المنشور)
GET/api/tweets/pinnedGet pinned tweets (المنشورات المثبتة)
GET/api/tweets/user/{userId}Get user's tweets (منشورات المستخدم)

Returns paginated tweets for the community or a specific group Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdqueryyesstring (uuid)Community ID
groupIdquerynostring (uuid)Filter by group (optional)
typequerynoenum: TEXT, IMAGE, VIDEO, DOCUMENT, POLLFilter by tweet type
pagequerynointeger—
limitquerynointeger—

Responses

StatusDescriptionBody
200Paginated list of tweetsobject
401Authentication required—

Create a new tweet/post in the community or a specific group. Supports text, images, videos, documents, and polls.

  • Max 10 media files per tweet
  • Images: JPEG, PNG, GIF, WebP (max 10MB each)
  • Videos: MP4, WebM, MOV, AVI (max 100MB each)
  • Documents: PDF, Word, Excel, PowerPoint, TXT, RTF (max 10MB each)

Auth: Bearer JWT required.

Request body (required) — multipart/form-data

FieldTypeRequiredDescription
communityIdstring (uuid)yesCommunity ID
groupIdstring (uuid)noOptional group ID for group posts
contentstringyesTweet text content
typeenum: TEXT, IMAGE, VIDEO, DOCUMENT, POLLno—
mediastring (binary)[]noMedia files (max 10)
pollstringnoJSON string for poll data: "question": "...", "options": ["A", "B"], "endDate": "2024-12-31T23:59:59Z", "allowMultipleVotes": false

Responses

StatusDescriptionBody
201Tweet created successfullyobject
400Validation error—
401Authentication required—
403User is restricted from posting—
429Rate limit exceeded—

Permanently delete a tweet. Only the author or moderators can delete. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Tweet deleted successfully—
403Not authorized to delete—
404Tweet not found—

Returns detailed information about a specific tweet Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Tweet detailsobject
404Tweet not found—

Edit an existing tweet. Only the author or moderators can edit.

  • Poll tweets cannot be edited after votes are cast

Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Request body (required) — application/json

FieldTypeRequiredDescription
contentstringno—

Responses

StatusDescriptionBody
200Tweet updated successfully—
400Invalid request—
403Not authorized to edit—
404Tweet not found—

Remove your like from a tweet Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Like removed successfully—

Add a like to a tweet. Rate limited. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Tweet liked successfully—
403User is restricted from liking—
429Rate limit exceeded—

Pin a tweet to the top of the feed. Requires moderation permission. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Tweet pinned successfully—
403Permission denied—

Returns current poll results with vote counts Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Poll resultsobject
404Tweet is not a poll—

Cast a vote on a poll tweet. Rate limited. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Request body (required) — application/json

FieldTypeRequiredDescription
optionIdstring (uuid)yesPoll option ID to vote for

Responses

StatusDescriptionBody
200Vote recorded successfully—
400Poll has ended or invalid option—
403User is restricted from voting—
429Rate limit exceeded—

Remove pin from a tweet. Requires moderation permission. Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
tweetIdpathyesstring (uuid)—

Responses

StatusDescriptionBody
200Tweet unpinned successfully—
403Permission denied—

Returns all pinned tweets for the community Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
communityIdqueryyesstring (uuid)—
groupIdquerynostring (uuid)—

Responses

StatusDescriptionBody
200List of pinned tweets—

Returns all tweets by a specific user Auth: Bearer JWT required.

Parameters

NameInRequiredTypeDescription
userIdpathyesstring (uuid)—
communityIdqueryyesstring (uuid)—
pagequerynointeger—
limitquerynointeger—

Responses

StatusDescriptionBody
200Paginated list of user's tweets—