This is the newer, REST-based version of this API. If you are maintaining an older application, it might be using the legacy, non-RESTful version of this API, which can be found documented here.
The categories API is identical for both Post categories, and Attachment categories, the only difference being the "type" parameter, which can be either "post" or "attachment".
Returns all categories for the given project. To filter by type, pass the “type” parameter, which can be one of “post” or “attachment”.
<categories>
<category>
<name>Documents</name>
...
</category>
...
</categories>
Returns a single category identified by its integer ID.
<category>
<name>Documents</name>
...
<category>
Creates a new category of the given type for the given project. The “type” attribute is required and must be one of “post” or “attachment”.
<category>
<type>post</type>
<name>Transcripts</name>
</category>
Returns HTTP status code 201 (“Created”) on success, with the Location header set to the “Get category” URL for the new category. The new category ID can be extracted from that URL. On failure, a non-200 status code will be returned, possibly with error information in XML format as the response’s content.
Updates an existing category identified by its integer ID.
<category>
<name>Transcripts</name>
</category>
Returns HTTP status code 200 on success, or any other code (and possibly error information in XML format) on error.
Deletes the category identified by its integer ID. Note that only categories without elements can be deleted.
Returns HTTP status code 200 on success. If the category contains elements a 409 status code (conflict) will be returned.