2 endpoints.
| Method | Path | Summary |
|---|---|---|
POST | /api/communities/{communityId}/content-invitations | Invite members to view a blog post, an album, an event, a post, a project or a consultant («دعوة للمشاهدة») |
GET | /api/communities/{communityId}/content-invitations/mine | The members the caller already invited to an item |
POST /api/communities/{communityId}/content-invitationsThe section's managers only: posts:manage|moderate, blogs:manage|moderate,
albums:manage|moderate, calendar:manage|moderate, projects:manage|moderate,
projects2:manage|moderate, consultants:manage — by resourceType. The caller must also be
able to open the item. Each invitee is told through channels:
inApp (the bell), push (their phones) and/or email (in the community's brand, current
APPROVED members only, sent paced in the background — emailQueued counts what was queued).
Omitted, channels is [push, inApp] — what the endpoint has always done. The notification
and the e-mail open the item. Per invitee the answer is either invited or skipped with a reason:
SELF, ALREADY_INVITED (a person is invited to an item once, by anyone) or UNAVAILABLE
(not an approved member, hidden from the caller's member directory, or cannot open the
item — deliberately one reason, so ids cannot be probed for membership). An item that is
not this community's, or that the CALLER cannot open, is a 404. At most 1000 invitees per
request and 3000 invitations per sender per 24 hours (429 INVITES_DAILY_LIMIT).
Auth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string | — |
Request body (required) — application/json
| Field | Type | Required | Description |
|---|---|---|---|
communityId | string | no | — |
resourceType | enum: blog, album, event, tweet, project, project2, consultant | yes | — |
resourceId | string | yes | — |
inviteeIds | string[] | yes | — |
message | string | no | — |
channels | enum: email, push, inApp[] | no | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | success, data: { invited: [userId], skipped: [{ userId, reason }], channels, emailQueued } | — |
400 | INVITE_TYPE_INVALID / INVITE_RESOURCE_REQUIRED / INVITEES_REQUIRED / INVITEES_TOO_MANY / INVITE_MESSAGE_TOO_LONG / INVITE_CHANNEL_INVALID | — |
403 | NOT_A_COMMUNITY_MEMBER, «Missing one of permissions» (not a manager of the item's section), FEATURE_NOT_AVAILABLE (the item's section is off) or RESTRICTION_BLOCKED — read the body. | — |
404 | No such item, or the caller cannot open it. | — |
429 | INVITES_DAILY_LIMIT, or RATE_LIMITED. | — |
GET /api/communities/{communityId}/content-invitations/mineAuth: Bearer JWT required.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
communityId | path | yes | string | — |
resourceType | query | yes | enum: blog, album, event, tweet, project, project2, consultant | — |
resourceId | query | yes | string | — |
Responses
| Status | Description | Body |
|---|---|---|
200 | success, data: { inviteeIds: [userId] } | — |
404 | No such item | — |