GET

Get Category By Slug


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Returns a single category by URL slug.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Forums
Read Forums
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/forum/v1/categories/slugs/{slug}

Path Params
slugstringRequired

URL slug.

Query Params
extraFieldsArray <string>

Array of extra category fields to be added in the response. UNKNOWN must not be passed.

Response Object
categoryCategory

Retrieved category for the provided category ID.

Get Category By Slug Example 1
Request
cURL
curl -X GET https://www.wixapis.com/forum/v1/categories/slugs/discussion-corner -H 'Content-Type: application/json;charset=UTF-8' -H 'Authorization: <ACCESS_TOKEN>'
Response
JSON
{ "category": { "id": "5cacd5fe04976c0015f35362", "parentId": "001005fe04976c0015f35362", "name": "Discussion corner", "headerTitle": "Discussion corner", "description": "Share stories, ideas, pictures and more!", "headerType": "IMAGE", "headerImage": { "id": "image.jpg", "url": "https://static.wixstatic.com/media/image.jpg", "height": 760, "width": 2100 }, "rank": 0, "postCount": 2, "postViewCount": 17, "slug": "discussion-corner", "noMemberPosting": true, "categoryAccess": "PUBLIC", "createdDate": "2019-04-09T17:27:26.171Z", "updatedDate": "2019-04-09T17:27:26.171Z", "postTypes": ["DISCUSSION", "QUESTION"], "postInteraction": "MULTIPLE_REACTIONS", "mainPostReactionIcon": { "iconType": "LOVE", "code": ":love:" }, "additionalPostReactions": [ { "iconType": "THUMBS_UP", "code": ":thumbs_up:" } ], "commentInteraction": "REACTION", "mainCommentReactionIcon": { "iconType": "THUMBS_UP", "code": ":thumbs_up:" }, "additionalCommentReactions": [ { "iconType": "THUMBS_UP", "code": ":thumbs_up:" } ], "guestReactionsEnabled": false, "guestCommentsEnabled": false, "commentOrder": "NEWEST", "commentRepliesEnabled": true, "commentButtonLabel": "Publish", "commentPlaceholderText": "Leave a comment", "commentSectionHeader": "Comments", "url": { "base": "https://wix.com", "path": "/forum/discussion-corner" } } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?