You can associate a measure with multiple categories. However, at this moment you can only associate a measure with a single category with the API. Associating a measure with a category is done through the measures API.
For example to set the category for an existing measure use:
$ curl -n http://api.ivyroot.com/api.3/measures/40 -d "categories=11"
{"status":2,"name":"DataBySecond","categories":["/categories/11"],"uri":"/measures/40","comments":[],"frequency":"second","values":[],"user":"api","scope":"40/None/None","starred":0,"ever":{"count":7,"earliest":"110","last":20,"min":"110","max":"1120","sum":"2792","updated_at":1266249109,"latest":"1120","avg":"398.857142857","first":0},"id":40,"unit":"","description":""}
That’s all for now, you get can get more detail in API Reference or check out the Sample PHP client