Request Parameters
Name | Type | Description | Required | Default | Options |
---|---|---|---|---|---|
ForumId | int | Forum Id | Required | ||
Subject | string | Subject | Required | ||
Body | string | Body | Required | ||
IsSticky | bool? | Defaults to false if not specified. | Optional | ||
StickyDate | DateTime? | If a thread is sticky, used to specify how long it should be sticky. If no sticky date provided default is current date + 7 days. | Optional | ||
IsFeatured | bool? | Default is false. | Optional | ||
FeaturedImage | string | Used to include a featured image when IsFeatured is true. | Optional | ||
PostDate | DateTime? | Defaults to current datetime if not specified. | Optional | ||
IsQuestion | bool? | Default is false. Only used when the forum being posted to has both discussions and questions. | Optional | ||
IsLocked | bool? | Default is false. | Optional | ||
SubscribeToThread | bool? | Default is false. | Optional | ||
Tags | string | A comma separated list of tags. | Optional | ||
ContentType | string | Used when adding a post attachement. | Optional | ||
FileName | string | Used when adding a post attachement. | Optional | ||
FileData | Byte[] | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
FileUploadContext | string | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
FileUrl | string | When adding a post attachment either FileData, FileUrl or FileUploadContext is required. | Optional | ||
IsAnonymous | bool? | Default is false. | Optional | ||
HasPoll | bool? | Default is false. Deprecated in 8.5, use poll embedding instead. | Optional | ||
PollTitle | string | Deprecated in 8.5, use poll embedding instead. | Optional | ||
PollDescription | string | Deprecated in 8.5, use poll embedding instead. | Optional | ||
PollExpirationDate | DateTime? | Deprecated in 8.5, use poll embedding instead. | Optional | ||
ExtendedAttributes | RestExtendedAttributes | Extended Attributes | Optional | ||
MarkAsRead | bool? | Default is false. | Optional |
Example Requests
C# REST SDK
This example uses the REST SDK to access the Community REST API within a .Net C# application. In the example, USER_NAME
is the user name of the effective user for the request and OAUTH_CLIENT_ID
and OAUTH_SECRET
are the OAuth client ID and secret, respectively, associated to this application as configured in Administration > Integration > OAuth Clients with the "Client Credentials" grant type enabled. See the documentation for the REST SDK for more details about installation, configuration, and usage options.
Widget Javascript
This example uses the rest JavaScript API to access the Community REST API within the Community web UI. When accessing the REST API through the javascript API, the effective user is the current contextual user of the web interface.
cURL
This example uses the cURL command-line HTTP utility. ENCODED_TOKEN
in the example is the base64-encoded concatenation of the user's API key (created from the user's profile), a colon (:), and the user's user name. Learn more about using the REST API.