Overview
When using the Kayako API to remove tags from a case, you may encounter the error "The value of the field cannot be empty". This occurs because the tags parameter must be passed as a URL query parameter — not in the request body — when using the DELETE method.
Symptoms
You are likely affected by this issue if:
- You are calling the
DELETE /api/v1/cases/<case_id>/tagsendpoint - You are passing the
tagsparameter in the request body - The API returns the error:
"The value of the field cannot be empty"
Cause
The DELETE method does not process a request body in this endpoint. When the tags parameter is placed in the body instead of the URL, the API receives no value for the field and returns a validation error.
Resolution
Pass the tags parameter as a query string in the URL.
Incorrect usage (causes the error):
bash
curl --request DELETE 'https://your_instance.domain.com/api/v1/cases/<case_id>/tags' \
--header 'Authorization: Basic <your_auth_token>' \
--data 'tags=<tag_name>'
Correct usage:
bash
curl --request DELETE 'https://your_instance.domain.com/api/v1/cases/<case_id>/tags?tags=<tag_name>' \
--header 'Authorization: Basic <your_auth_token>'
Replace <case_id>, <tag_name>, and <your_auth_token> with your actual values.
Verification
After updating your request, confirm the fix was successful:
- The API returns HTTP
200 OK. - The tag no longer appears on the case.
Frequently Asked Questions
- How do I know if this error applies to my situation?
- You'll encounter the error message "The value of the field cannot be empty" when attempting to remove tags from a case using the API with the tags parameter incorrectly placed in the request body.
-
No. This behavior is specific to the DELETE method. Adding tags uses a different method and request structure and is not affected by this issue.
Go to Kayako Classic
Benito Hall
Comments