Rest API
Reorder help center categories
POST
/api/v1/help-center/categories/reorder
const url = 'https://api.unless.com/api/v1/help-center/categories/reorder';const options = { method: 'POST', headers: { 'x-api-key': 'example', 'x-user-email': 'example', 'x-account-id': 'example', 'x-website-id': 'example', 'Content-Type': 'application/json' }, body: '{"items":[{"categoryId":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","order":0},{"categoryId":"yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy","order":1}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.unless.com/api/v1/help-center/categories/reorder \ --header 'Content-Type: application/json' \ --header 'x-account-id: example' \ --header 'x-api-key: example' \ --header 'x-user-email: example' \ --header 'x-website-id: example' \ --data '{ "items": [ { "categoryId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "order": 0 }, { "categoryId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", "order": 1 } ] }'Set the sort position of several categories at once.
Notes
- Only the categories you list are touched; the rest keep their order
- Changes only reach visitors after
POST /api/v1/help-center/publish
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-api-key
required
string
Your API key from account settings.
x-user-email
required
string
The email address of your user.
x-account-id
required
string
The ID of your account. You can find this in the account settings.
x-website-id
required
string
The ID of the workspace you want to use.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
items
required
Array<object>
object
categoryId
required
string
order
required
number
Example
{ "items": [ { "categoryId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "order": 0 }, { "categoryId": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy", "order": 1 } ]}Responses
Section titled “Responses”The categories were reordered.
Media typeapplication/json
object
success
boolean
Example generated
{ "success": true}Bad request - missing websiteId, or an empty items list.
Unauthorized - invalid API key.