getCategory( )


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 ID.

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.
Method Declaration
Copy
Method Parameters
categoryIdstringRequired

ID of the retrieved category.


optionsGetCategoryOptions

Options specifying which fields to return.

Returns
Return Type:Promise<Category>
Errors

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

Did this help?

getCategoryBySlug( )


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.
Method Declaration
Copy
Method Parameters
slugstringRequired

URL slug.


optionsGetCategoryBySlugOptions

Options specifying which fields to return.

Returns
Return Type:Promise<CategoryResponse>
Errors

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

Did this help?

queryCategories( )


Developer Preview

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

Retrieves a list of categories, given the provided paging, filtering, and sorting.

Query Categories runs with these defaults, which you can override:

  • paging.limit is 10
  • paging.offset is 0

For field support for filters and sorting, see Categories: Supported Filters and Sorting.

To learn about working with Query endpoints, see API Query Language, Sorting and Paging, and Field Projection.

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.
Method Declaration
Copy
Method Parameters
optionsQueryCategoriesOptions

Options for sorting, filtering, paging, and specifying return fields.

Returns
Return Type:Promise<QueryCategoriesResponse>
Errors

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

Did this help?

onCategoryCreated( )


Developer Preview

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

Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when a category is created.

Permissions
Manage Forums
Read Forums
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: CategoryCreatedEnvelope): void | Promise<void>

Did this help?

onCategoryDeleted( )


Developer Preview

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

Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when a category is removed.

Permissions
Manage Forums
Read Forums
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: CategoryDeletedEnvelope): void | Promise<void>

Did this help?

onCategoryUpdated( )


Developer Preview

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

Note: This method registers a callback function as an event handler. Subscribe your app to the relevant event via the Webhooks page in the Wix Dev Center to enable it. For more information, see Handle Events With Webhooks.

Triggered when a category is updated.

Permissions
Manage Forums
Read Forums
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
handlerfunction

handler(event: CategoryUpdatedEnvelope): void | Promise<void>

Did this help?