Wix Answers Help Center
Labels APIs
Like categories and subcategories, labels enable your users to filter and locate articles that are relevant to specific topics. For more information, see About Labels. To add labels to articles, see Update Article Labels. You can use labels to control whether or not to display certain articles; see Including and Excluding Articles in Your Help Center.
You can also use labels to filter and locate tickets. To add labels to tickets, see Update a Ticket's Labels and Update Labels for One or More Tickets.
Get Labels
GET https://<tenant_subdomain>.wixanswers.com/api/v1/labels
Get all labels and their information.
Get all labels and their information.
- Authorization: Requires agent authorization token and permission FETCH_LABELS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: List of Label objects
Request Example:
1
GET https://<tenant_subdomain>.wixanswers.com/api/v1/labels
Request Example Using curl:
1
curl -X GET https://<tenant_subdomain>.wixanswers.com/api/v1/labels -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json; charset=utf-8' -H 'Accept: application/json'
Get a Label
GET https://<tenant_subdomain>.wixanswers.com/api/v1/labels/{labels GUID}
Get a label and its information.
Get a label and its information.
- Authorization: Requires agent authorization token and permission FETCH_LABELS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Label object
Request Example:
1
GET https://<tenant_subdomain>.wixanswers.com/api/v1/labels/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a
Add Label
POST https://<tenant_subdomain>.wixanswers.com/api/v1/labels
Add a label. Label names must be unique in the tenant.
Add a label. Label names must be unique in the tenant.
- Authorization: Requires admin authorization token and permission MANAGE_LABELS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: Label object
Payload Params | Description | Type | Required |
---|---|---|---|
name | Label name Must be unique in the tenant. | String, between 1 and 80 characters | ✓ |
Payload Example:
1 2 3 4 5
POST https://<tenant_subdomain>.wixanswers.com/api/v1/labels { "name":"programming" }
Delete Label
DELETE https://<tenant_subdomain>.wixanswers.com/api/v1/labels/{label GUID}?permanentDelete={true|false}
Delete label. The label is removed from all associated items.
- Authorization: Requires admin authorization token and permission MANAGE_LABELS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: None
Request Params | Description | Type |
---|---|---|
permanentDelete | Whether to delete the label permanently. If not deleted permanently, the label can be restored (see Restore Deleted Label). The default is false | Boolean |
Request Example:
1
DELETE https://<tenant_subdomain>.wixanswers.com/api/v1/labels/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a
Request Example Using curl:
1
curl -X DELETE https://<tenant_subdomain>.wixanswers.com/api/v1/labels/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json; charset=utf-8' -H 'Accept: application/json'
Restore Deleted Label
POST https://<tenant_subdomain>.wixanswers.com/api/v1/labels/{label GUID}/restore
Restore a previously-deleted label, if it was not deleted permanently. The label is restored and available, but Wix Answers does not re-associate the label to any items. For example, if the label was associated to an article before the label was deleted, restoring the label does not re-associate the label to that article.
Restore a previously-deleted label, if it was not deleted permanently. The label is restored and available, but Wix Answers does not re-associate the label to any items. For example, if the label was associated to an article before the label was deleted, restoring the label does not re-associate the label to that article.
- Authorization: Requires admin authorization token and permission MANAGE_LABELS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: None
Request Example:
1
POST https://<tenant_subdomain>.wixanswers.com/api/v1/labels/e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a/restore
Update Label
PUT https://<tenant_subdomain>.wixanswers.com/api/v1/labels/{label GUID}
Change label name. See Important Information about Updating Using the API.
Change label name. See Important Information about Updating Using the API.
- Authorization: Requires admin authorization token and permission MANAGE_LABELS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: None
Payload Params | Description | Type | Required |
---|---|---|---|
name | Label name | String, between 1 and 80 characters | ✓ |
Payload Example:
1 2 3 4 5
PUT https://<tenant_subdomain>.wixanswers.com/api/v1/labels/d367738e-368e-41fe-9289-1a5cbbc3c239 { "name":"Java" }
Sort Labels
POST https://<tenant_subdomain>.wixanswers.com/api/v1/labels/sort
Sort display of labels according to the specified order.
Sort display of labels according to the specified order.
- Authorization: Requires admin authorization token and permission MANAGE_LABELS
- Content type: application/json; charset=utf-8
- Accept: application/json
- Response: None
Payload Params | Description | Type | Required |
---|---|---|---|
ids | List of labels in the desired sort order If you do not include one or more label ids, the ones that you include are sorted in the specified order and appear before the other (not included) ids. | List of GUIDs | ✓ |
Payload Example:
1 2 3 4 5
POST https://<tenant_subdomain>.wixanswers.com/api/v1/labels/sort { "ids":["e932c0a3-6e9b-43cf-b3a9-0ae790f6ee6a","bd948e62-a3fd-4cf0-87f3-ee6a0ae7f3fa","77bc8694-5ccf-436c-ab2b-543563a5f425"] }
Was this article helpful?