When uploading a file I don't want to hard code its categories ids. How can I find a category by its name by using Content Server API v1?
Categories can be stored anywhere on the server. There is no dedicated API to look for them by name.
If you maintain the categories in a single container, you could use the children listing resource with the name filter: /nodes/{node_id}/nodes?where_type=131&where_name={name_part}. If you have them directly in the Category Volume, you can get them by /volumes/133/nodes?where_type=131&where_name={name_part}. You could also walk through the Category Volume recursively, but that would be unacceptable because of the bad performance.
/nodes/{node_id}/nodes?where_type=131&where_name={name_part}
/volumes/133/nodes?where_type=131&where_name={name_part}
You could develop your own REST API resource, if you need to be able to pick the category by name from any place.
Mind, that the category name is unique only in the parent container, where the category is stored at. There can be multiple categories with the same name stored on the server. I would recommend you using node IDs to refer to the categories.