Update theme with API


Is there a way to update the HTML and CSS of an existing theme using the Discourse API? In our use case, we’d like to automatically update our theme as part of a CI build.

I didn’t find anything about it in the API docs, but wanted to double check.


Yes, it can be done. See How to reverse engineer the Discourse API for details about how to find the correct request. It’s working for me using Postman to send the request, with the api_key and api_username set as query params, and the theme json in the request body.


Thanks @Simon_Cossar, that link is super informative!